@taiga-ui/core 3.40.0 → 3.41.0
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/README.md +3 -3
- package/bundles/taiga-ui-core-components-alert.umd.js +21 -9
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +79 -24
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +52 -2
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +6 -6
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/components/alert/alert.component.d.ts +12 -4
- package/components/alert/alert.providers.d.ts +2 -0
- package/components/alert/index.d.ts +1 -0
- package/components/hosted-dropdown/dropdown-open-monitor.directive.d.ts +10 -0
- package/components/hosted-dropdown/hosted-dropdown.module.d.ts +8 -7
- package/components/hosted-dropdown/hosted-dropdown.token.d.ts +3 -0
- package/components/hosted-dropdown/index.d.ts +1 -0
- package/constants/cache-basting-payload.d.ts +1 -1
- package/constants/mask-caret-trap.d.ts +1 -1
- package/directives/dropdown/dropdown-open.directive.d.ts +10 -0
- package/directives/dropdown/dropdown.directive.d.ts +4 -2
- package/directives/dropdown/dropdown.module.d.ts +14 -13
- package/directives/dropdown/index.d.ts +1 -0
- package/esm2015/components/alert/alert.component.js +19 -11
- package/esm2015/components/alert/alert.providers.js +6 -0
- package/esm2015/components/alert/index.js +2 -1
- package/esm2015/components/hosted-dropdown/dropdown-open-monitor.directive.js +45 -0
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +16 -6
- package/esm2015/components/hosted-dropdown/hosted-dropdown.module.js +4 -1
- package/esm2015/components/hosted-dropdown/hosted-dropdown.token.js +3 -0
- package/esm2015/components/hosted-dropdown/index.js +2 -1
- package/esm2015/components/root/root.component.js +1 -1
- package/esm2015/constants/mask-caret-trap.js +2 -2
- package/esm2015/directives/dropdown/dropdown-open.directive.js +24 -0
- package/esm2015/directives/dropdown/dropdown.directive.js +24 -4
- package/esm2015/directives/dropdown/dropdown.module.js +6 -1
- package/esm2015/directives/dropdown/index.js +2 -1
- package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +2 -2
- package/esm2015/mask/text-mask-config.js +1 -1
- package/esm2015/mask/text-mask-correction-handler.js +1 -1
- package/esm2015/mask/text-mask-list-handler.js +1 -1
- package/esm2015/mask/text-mask-list.js +1 -1
- package/esm2015/mask/text-mask-options.js +1 -1
- package/esm2015/mask/text-mask-pipe-handler.js +1 -1
- package/esm2015/mask/text-mask-pipe-result.js +1 -1
- package/esm2015/utils/format/format-phone.js +2 -2
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +2 -2
- package/esm2015/utils/mask/create-correction-mask.js +2 -2
- package/esm2015/utils/mask/create-number-mask.js +2 -2
- package/esm2015/utils/mask/enable-auto-correct-decimal-symbol.js +2 -2
- package/esm2015/utils/mask/masked-money-value-is-empty.js +2 -2
- package/esm2015/utils/mask/masked-number-string-to-number.js +2 -2
- package/fesm2015/taiga-ui-core-components-alert.js +24 -13
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +65 -13
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +48 -4
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +6 -6
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/mask/text-mask-config.d.ts +1 -1
- package/mask/text-mask-correction-handler.d.ts +1 -1
- package/mask/text-mask-list-handler.d.ts +1 -1
- package/mask/text-mask-list.d.ts +1 -1
- package/mask/text-mask-options.d.ts +1 -1
- package/mask/text-mask-pipe-handler.d.ts +1 -1
- package/mask/text-mask-pipe-result.d.ts +1 -1
- package/package.json +6 -6
- package/utils/format/format-phone.d.ts +1 -1
- package/utils/mask/create-auto-corrected-money-pipe.d.ts +1 -1
- package/utils/mask/create-correction-mask.d.ts +1 -1
- package/utils/mask/create-number-mask.d.ts +1 -1
- package/utils/mask/enable-auto-correct-decimal-symbol.d.ts +1 -1
- package/utils/mask/masked-money-value-is-empty.d.ts +1 -1
- package/utils/mask/masked-number-string-to-number.d.ts +1 -1
|
@@ -355,17 +355,51 @@
|
|
|
355
355
|
factory: function () { return TuiDropdownComponent; },
|
|
356
356
|
});
|
|
357
357
|
|
|
358
|
+
var TuiDropdownOpenDirective = /** @class */ (function () {
|
|
359
|
+
function TuiDropdownOpenDirective() {
|
|
360
|
+
this.tuiDropdownOpenChange = new i0.EventEmitter();
|
|
361
|
+
}
|
|
362
|
+
Object.defineProperty(TuiDropdownOpenDirective.prototype, "tuiDropdownOpen", {
|
|
363
|
+
set: function (open) {
|
|
364
|
+
var _a;
|
|
365
|
+
(_a = this.dropdown) === null || _a === void 0 ? void 0 : _a.toggle(open);
|
|
366
|
+
},
|
|
367
|
+
enumerable: false,
|
|
368
|
+
configurable: true
|
|
369
|
+
});
|
|
370
|
+
return TuiDropdownOpenDirective;
|
|
371
|
+
}());
|
|
372
|
+
TuiDropdownOpenDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
373
|
+
TuiDropdownOpenDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOpenDirective, selector: "[tuiDropdownOpen],[tuiDropdownOpenChange]", inputs: { tuiDropdownOpen: "tuiDropdownOpen" }, outputs: { tuiDropdownOpenChange: "tuiDropdownOpenChange" }, ngImport: i0__namespace });
|
|
374
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownOpenDirective, decorators: [{
|
|
375
|
+
type: i0.Directive,
|
|
376
|
+
args: [{
|
|
377
|
+
selector: '[tuiDropdownOpen],[tuiDropdownOpenChange]',
|
|
378
|
+
}]
|
|
379
|
+
}], propDecorators: { tuiDropdownOpen: [{
|
|
380
|
+
type: i0.Input
|
|
381
|
+
}], tuiDropdownOpenChange: [{
|
|
382
|
+
type: i0.Output
|
|
383
|
+
}] } });
|
|
384
|
+
|
|
358
385
|
var TuiDropdownDirective = /** @class */ (function () {
|
|
359
|
-
function TuiDropdownDirective(destroy$, el, dropdown, injector, dropdownService) {
|
|
386
|
+
function TuiDropdownDirective(destroy$, el, dropdown, injector, dropdownService, open) {
|
|
360
387
|
var _this = this;
|
|
361
388
|
this.el = el;
|
|
362
389
|
this.dropdown = dropdown;
|
|
363
390
|
this.injector = injector;
|
|
364
391
|
this.dropdownService = dropdownService;
|
|
392
|
+
this.open = open;
|
|
365
393
|
this.refresh$ = new i1.Subject();
|
|
366
394
|
this.dropdownBoxRef = null;
|
|
367
395
|
this.type = 'dropdown';
|
|
368
396
|
this.component = new i3.PolymorpheusComponent(this.dropdown, this.injector);
|
|
397
|
+
if (this.open && !this.open.dropdown) {
|
|
398
|
+
this.open.dropdown = this;
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
this.open = null;
|
|
402
|
+
}
|
|
369
403
|
// Ignore multiple change detection triggers at the same frame
|
|
370
404
|
this.refresh$.pipe(operators.throttleTime(0), operators.takeUntil(destroy$)).subscribe(function () {
|
|
371
405
|
var _a, _b;
|
|
@@ -390,22 +424,28 @@
|
|
|
390
424
|
};
|
|
391
425
|
TuiDropdownDirective.prototype.ngOnDestroy = function () {
|
|
392
426
|
this.toggle(false);
|
|
427
|
+
if (this.open) {
|
|
428
|
+
this.open.dropdown = undefined;
|
|
429
|
+
}
|
|
393
430
|
};
|
|
394
431
|
TuiDropdownDirective.prototype.getClientRect = function () {
|
|
395
432
|
return this.el.nativeElement.getBoundingClientRect();
|
|
396
433
|
};
|
|
397
434
|
TuiDropdownDirective.prototype.toggle = function (show) {
|
|
435
|
+
var _a, _b;
|
|
398
436
|
if (show && this.content && !this.dropdownBoxRef) {
|
|
399
437
|
this.dropdownBoxRef = this.dropdownService.add(this.component);
|
|
438
|
+
(_a = this.open) === null || _a === void 0 ? void 0 : _a.tuiDropdownOpenChange.emit(true);
|
|
400
439
|
}
|
|
401
440
|
else if (!show && this.dropdownBoxRef) {
|
|
402
441
|
this.dropdownService.remove(this.dropdownBoxRef);
|
|
403
442
|
this.dropdownBoxRef = null;
|
|
443
|
+
(_b = this.open) === null || _b === void 0 ? void 0 : _b.tuiDropdownOpenChange.emit(false);
|
|
404
444
|
}
|
|
405
445
|
};
|
|
406
446
|
return TuiDropdownDirective;
|
|
407
447
|
}());
|
|
408
|
-
TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
448
|
+
TuiDropdownDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownDirective, deps: [{ token: i2.TuiDestroyService, self: true }, { token: i0.ElementRef }, { token: TUI_DROPDOWN_COMPONENT }, { token: i0.INJECTOR }, { token: i2.TuiDropdownPortalService }, { token: TuiDropdownOpenDirective, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
409
449
|
TuiDropdownDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
|
|
410
450
|
i2.TuiDestroyService,
|
|
411
451
|
i1$1.tuiAsRectAccessor(TuiDropdownDirective),
|
|
@@ -443,6 +483,11 @@
|
|
|
443
483
|
}] }, { type: i2__namespace.TuiDropdownPortalService, decorators: [{
|
|
444
484
|
type: i0.Inject,
|
|
445
485
|
args: [i2.TuiDropdownPortalService]
|
|
486
|
+
}] }, { type: TuiDropdownOpenDirective, decorators: [{
|
|
487
|
+
type: i0.Optional
|
|
488
|
+
}, {
|
|
489
|
+
type: i0.Inject,
|
|
490
|
+
args: [TuiDropdownOpenDirective]
|
|
446
491
|
}] }];
|
|
447
492
|
}, propDecorators: { content: [{
|
|
448
493
|
type: i0.Input,
|
|
@@ -1224,6 +1269,7 @@
|
|
|
1224
1269
|
TuiDropdownModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1225
1270
|
TuiDropdownModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
|
|
1226
1271
|
TuiDropdownComponent,
|
|
1272
|
+
TuiDropdownOpenDirective,
|
|
1227
1273
|
TuiDropdownOptionsDirective,
|
|
1228
1274
|
TuiDropdownHostDirective,
|
|
1229
1275
|
TuiDropdownDriverDirective,
|
|
@@ -1238,6 +1284,7 @@
|
|
|
1238
1284
|
i1$2.TuiScrollbarModule,
|
|
1239
1285
|
i2.TuiHoveredModule], exports: [TuiDropdownDirective,
|
|
1240
1286
|
TuiDropdownComponent,
|
|
1287
|
+
TuiDropdownOpenDirective,
|
|
1241
1288
|
TuiDropdownOptionsDirective,
|
|
1242
1289
|
TuiDropdownHostDirective,
|
|
1243
1290
|
TuiDropdownDriverDirective,
|
|
@@ -1267,6 +1314,7 @@
|
|
|
1267
1314
|
declarations: [
|
|
1268
1315
|
TuiDropdownDirective,
|
|
1269
1316
|
TuiDropdownComponent,
|
|
1317
|
+
TuiDropdownOpenDirective,
|
|
1270
1318
|
TuiDropdownOptionsDirective,
|
|
1271
1319
|
TuiDropdownHostDirective,
|
|
1272
1320
|
TuiDropdownDriverDirective,
|
|
@@ -1280,6 +1328,7 @@
|
|
|
1280
1328
|
exports: [
|
|
1281
1329
|
TuiDropdownDirective,
|
|
1282
1330
|
TuiDropdownComponent,
|
|
1331
|
+
TuiDropdownOpenDirective,
|
|
1283
1332
|
TuiDropdownOptionsDirective,
|
|
1284
1333
|
TuiDropdownHostDirective,
|
|
1285
1334
|
TuiDropdownDriverDirective,
|
|
@@ -1310,6 +1359,7 @@
|
|
|
1310
1359
|
exports.TuiDropdownHoverDirective = TuiDropdownHoverDirective;
|
|
1311
1360
|
exports.TuiDropdownManualDirective = TuiDropdownManualDirective;
|
|
1312
1361
|
exports.TuiDropdownModule = TuiDropdownModule;
|
|
1362
|
+
exports.TuiDropdownOpenDirective = TuiDropdownOpenDirective;
|
|
1313
1363
|
exports.TuiDropdownOptionsDirective = TuiDropdownOptionsDirective;
|
|
1314
1364
|
exports.TuiDropdownPositionDirective = TuiDropdownPositionDirective;
|
|
1315
1365
|
exports.TuiDropdownPositionSidedDirective = TuiDropdownPositionSidedDirective;
|