@taiga-ui/core 3.14.0-dev.main-3f74fe5 → 3.14.0-dev.main-49a682e
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/taiga-ui-core-components-alert.umd.js +11 -11
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +16 -16
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +3 -3
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +33 -36
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +16 -16
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +5 -5
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +14 -14
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +17 -17
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +4 -4
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +12 -12
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +6 -6
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +14 -14
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +5 -5
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +10 -10
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +5 -5
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +57 -57
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +4 -4
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +6 -6
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +28 -28
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +10 -10
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +18 -18
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +4 -4
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +9 -9
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +87 -83
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +61 -61
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +2 -2
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +34 -34
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +9 -9
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +3 -3
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +3 -3
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/directives/dropdown/dropdown-context.directive.d.ts +4 -4
- package/directives/dropdown/dropdown-options.directive.d.ts +3 -5
- package/directives/dropdown/dropdown.directive.d.ts +1 -1
- package/esm2015/components/alert/alert.component.js +12 -12
- package/esm2015/components/button/button.component.js +17 -17
- package/esm2015/components/calendar/calendar.component.js +4 -4
- package/esm2015/components/data-list/data-list.component.js +16 -16
- package/esm2015/components/data-list/data-list.directive.js +2 -2
- package/esm2015/components/data-list/opt-group.directive.js +5 -5
- package/esm2015/components/data-list/option/option.component.js +14 -17
- package/esm2015/components/dialog/dialog.component.js +14 -14
- package/esm2015/components/dialog/dialog.directive.js +4 -4
- package/esm2015/components/error/error.component.js +6 -6
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +14 -14
- package/esm2015/components/group/group-styles.component.js +4 -4
- package/esm2015/components/group/group.directive.js +15 -15
- package/esm2015/components/hints-host/hints-host.component.js +5 -5
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +12 -12
- package/esm2015/components/label/label.component.js +7 -7
- package/esm2015/components/link/link.component.js +15 -15
- package/esm2015/components/loader/loader.component.js +6 -6
- package/esm2015/components/notification/notification.component.js +11 -11
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +6 -6
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +6 -6
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +6 -6
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +32 -32
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +2 -2
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +13 -13
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +14 -14
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +5 -5
- package/esm2015/components/root/root.component.js +7 -7
- package/esm2015/components/scroll-controls/scroll-controls.component.js +6 -6
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +2 -2
- package/esm2015/components/scroll-controls/scrollbar.directive.js +23 -23
- package/esm2015/components/scrollbar/scroll-ref.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollable.directive.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +9 -9
- package/esm2015/components/svg/svg.component.js +19 -19
- package/esm2015/components/theme-night/theme-night.component.js +5 -5
- package/esm2015/components/tooltip/tooltip.component.js +10 -10
- package/esm2015/directives/dropdown/dropdown-context.directive.js +16 -16
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-host.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +4 -4
- package/esm2015/directives/dropdown/dropdown-manual.directive.js +2 -2
- package/esm2015/directives/dropdown/dropdown-options.directive.js +19 -15
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +12 -12
- package/esm2015/directives/dropdown/dropdown-position.directive.js +11 -11
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +11 -11
- package/esm2015/directives/dropdown/dropdown.component.js +17 -17
- package/esm2015/directives/dropdown/dropdown.directive.js +7 -7
- package/esm2015/directives/hint/hint-describe.directive.js +5 -5
- package/esm2015/directives/hint/hint-driver.directive.js +2 -2
- package/esm2015/directives/hint/hint-host.directive.js +2 -2
- package/esm2015/directives/hint/hint-hover.directive.js +5 -5
- package/esm2015/directives/hint/hint-manual.directive.js +2 -2
- package/esm2015/directives/hint/hint-options.directive.js +12 -12
- package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
- package/esm2015/directives/hint/hint-position.directive.js +25 -25
- package/esm2015/directives/hint/hint.component.js +10 -10
- package/esm2015/directives/hint/hint.directive.js +5 -5
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +2 -2
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +2 -2
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-filler.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-icon.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +4 -4
- package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +5 -5
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +5 -5
- package/esm2015/directives/wrapper/wrapper.directive.js +10 -10
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +4 -4
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +4 -4
- package/fesm2015/taiga-ui-core-components-alert.js +11 -11
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js +16 -16
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-calendar.js +3 -3
- package/fesm2015/taiga-ui-core-components-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +33 -36
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +16 -16
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-error.js +5 -5
- package/fesm2015/taiga-ui-core-components-error.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +14 -14
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +17 -17
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +4 -4
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +12 -12
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +6 -6
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +14 -14
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +5 -5
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-notification.js +10 -10
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +57 -57
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +4 -4
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +6 -6
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +28 -28
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +10 -10
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-svg.js +18 -18
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +4 -4
- package/fesm2015/taiga-ui-core-components-theme-night.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-tooltip.js +9 -9
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +89 -84
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +61 -61
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mode.js +2 -2
- package/fesm2015/taiga-ui-core-directives-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +1 -1
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +34 -34
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +9 -9
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +3 -3
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +3 -3
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/package.json +2 -2
|
@@ -366,14 +366,14 @@
|
|
|
366
366
|
this.elementRef = elementRef;
|
|
367
367
|
this.component = component;
|
|
368
368
|
this.dropdownService = dropdownService;
|
|
369
|
-
this.content =
|
|
369
|
+
this.content = '';
|
|
370
370
|
this.dropdownBoxRef = null;
|
|
371
371
|
}
|
|
372
372
|
Object.defineProperty(TuiDropdownDirective.prototype, "position", {
|
|
373
373
|
get: function () {
|
|
374
374
|
return utils.tuiCheckFixedPosition(this.elementRef.nativeElement)
|
|
375
|
-
?
|
|
376
|
-
:
|
|
375
|
+
? 'fixed'
|
|
376
|
+
: 'absolute';
|
|
377
377
|
},
|
|
378
378
|
enumerable: false,
|
|
379
379
|
configurable: true
|
|
@@ -424,8 +424,8 @@
|
|
|
424
424
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownDirective, decorators: [{
|
|
425
425
|
type: i0.Directive,
|
|
426
426
|
args: [{
|
|
427
|
-
selector:
|
|
428
|
-
exportAs:
|
|
427
|
+
selector: '[tuiDropdown]:not(ng-container)',
|
|
428
|
+
exportAs: 'tuiDropdown',
|
|
429
429
|
providers: [
|
|
430
430
|
i1$1.tuiAsRectAccessor(TuiDropdownDirective),
|
|
431
431
|
i1$1.tuiAsVehicle(TuiDropdownDirective),
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
}] }];
|
|
450
450
|
}, propDecorators: { content: [{
|
|
451
451
|
type: i0.Input,
|
|
452
|
-
args: [
|
|
452
|
+
args: ['tuiDropdown']
|
|
453
453
|
}], position: [] } });
|
|
454
454
|
|
|
455
455
|
var TuiDropdownHoverDirective = /** @class */ (function (_super) {
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHoverDirective, decorators: [{
|
|
480
480
|
type: i0.Directive,
|
|
481
481
|
args: [{
|
|
482
|
-
selector:
|
|
482
|
+
selector: '[tuiDropdownHover]:not(ng-container)',
|
|
483
483
|
providers: [i1$1.tuiAsDriver(TuiDropdownHoverDirective), i2.TuiHoveredService],
|
|
484
484
|
}]
|
|
485
485
|
}], ctorParameters: function () {
|
|
@@ -489,25 +489,22 @@
|
|
|
489
489
|
}] }];
|
|
490
490
|
}, propDecorators: { showDelay: [{
|
|
491
491
|
type: i0.Input,
|
|
492
|
-
args: [
|
|
492
|
+
args: ['tuiDropdownShowDelay']
|
|
493
493
|
}], hideDelay: [{
|
|
494
494
|
type: i0.Input,
|
|
495
|
-
args: [
|
|
495
|
+
args: ['tuiDropdownHideDelay']
|
|
496
496
|
}] } });
|
|
497
497
|
|
|
498
|
-
/**
|
|
499
|
-
* Safe space around host and screen edges
|
|
500
|
-
*/
|
|
501
|
-
var TUI_DROPDOWN_OFFSET = 4;
|
|
502
498
|
/** Default values for dropdown options */
|
|
503
499
|
var TUI_DROPDOWN_DEFAULT_OPTIONS = {
|
|
504
|
-
align:
|
|
500
|
+
align: 'left',
|
|
505
501
|
direction: null,
|
|
506
|
-
limitWidth:
|
|
502
|
+
limitWidth: 'auto',
|
|
507
503
|
maxHeight: 400,
|
|
508
504
|
minHeight: 80,
|
|
505
|
+
offset: 4,
|
|
509
506
|
};
|
|
510
|
-
var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken(
|
|
507
|
+
var TUI_DROPDOWN_OPTIONS = new i0.InjectionToken('[TUI_DROPDOWN_OPTIONS] Default parameters for dropdown directive', {
|
|
511
508
|
factory: function () { return TUI_DROPDOWN_DEFAULT_OPTIONS; },
|
|
512
509
|
});
|
|
513
510
|
var tuiDropdownOptionsProvider = function (override) { return ({
|
|
@@ -526,11 +523,12 @@
|
|
|
526
523
|
this.limitWidth = this.options.limitWidth;
|
|
527
524
|
this.minHeight = this.options.minHeight;
|
|
528
525
|
this.maxHeight = this.options.maxHeight;
|
|
526
|
+
this.offset = this.options.offset;
|
|
529
527
|
}
|
|
530
528
|
return TuiDropdownOptionsDirective;
|
|
531
529
|
}());
|
|
532
530
|
TuiDropdownOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS, skipSelf: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
533
|
-
TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight]", inputs: { align: ["tuiDropdownAlign", "align"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"] }, providers: [
|
|
531
|
+
TuiDropdownOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [
|
|
534
532
|
{
|
|
535
533
|
provide: TUI_DROPDOWN_OPTIONS,
|
|
536
534
|
useExisting: i0.forwardRef(function () { return TuiDropdownOptionsDirective; }),
|
|
@@ -551,10 +549,13 @@
|
|
|
551
549
|
__decorate([
|
|
552
550
|
i2.tuiDefaultProp()
|
|
553
551
|
], TuiDropdownOptionsDirective.prototype, "maxHeight", void 0);
|
|
552
|
+
__decorate([
|
|
553
|
+
i2.tuiDefaultProp()
|
|
554
|
+
], TuiDropdownOptionsDirective.prototype, "offset", void 0);
|
|
554
555
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownOptionsDirective, decorators: [{
|
|
555
556
|
type: i0.Directive,
|
|
556
557
|
args: [{
|
|
557
|
-
selector:
|
|
558
|
+
selector: '[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
|
|
558
559
|
providers: [
|
|
559
560
|
{
|
|
560
561
|
provide: TUI_DROPDOWN_OPTIONS,
|
|
@@ -571,19 +572,22 @@
|
|
|
571
572
|
}] }];
|
|
572
573
|
}, propDecorators: { align: [{
|
|
573
574
|
type: i0.Input,
|
|
574
|
-
args: [
|
|
575
|
+
args: ['tuiDropdownAlign']
|
|
575
576
|
}], direction: [{
|
|
576
577
|
type: i0.Input,
|
|
577
|
-
args: [
|
|
578
|
+
args: ['tuiDropdownDirection']
|
|
578
579
|
}], limitWidth: [{
|
|
579
580
|
type: i0.Input,
|
|
580
|
-
args: [
|
|
581
|
+
args: ['tuiDropdownLimitWidth']
|
|
581
582
|
}], minHeight: [{
|
|
582
583
|
type: i0.Input,
|
|
583
|
-
args: [
|
|
584
|
+
args: ['tuiDropdownMinHeight']
|
|
584
585
|
}], maxHeight: [{
|
|
585
586
|
type: i0.Input,
|
|
586
|
-
args: [
|
|
587
|
+
args: ['tuiDropdownMaxHeight']
|
|
588
|
+
}], offset: [{
|
|
589
|
+
type: i0.Input,
|
|
590
|
+
args: ['tuiDropdownOffset']
|
|
587
591
|
}] } });
|
|
588
592
|
|
|
589
593
|
/**
|
|
@@ -626,32 +630,32 @@
|
|
|
626
630
|
var clientRect = this.host.clientRect;
|
|
627
631
|
var position = this.directive.position;
|
|
628
632
|
var rect = this.accessor.getClientRect();
|
|
629
|
-
var offsetX = position ===
|
|
630
|
-
var offsetY = position ===
|
|
633
|
+
var offsetX = position === 'fixed' ? 0 : -clientRect.left;
|
|
634
|
+
var offsetY = position === 'fixed' ? 0 : -clientRect.top;
|
|
631
635
|
top += offsetY;
|
|
632
636
|
left += offsetX;
|
|
633
637
|
var isIntersecting = left < rect.right &&
|
|
634
638
|
right > rect.left &&
|
|
635
|
-
top < offsetY + 2 *
|
|
639
|
+
top < offsetY + 2 * this.options.offset;
|
|
636
640
|
var available = isIntersecting
|
|
637
|
-
? rect.top - 2 *
|
|
638
|
-
: offsetY + innerHeight - top -
|
|
641
|
+
? rect.top - 2 * this.options.offset
|
|
642
|
+
: offsetY + innerHeight - top - this.options.offset;
|
|
639
643
|
style.position = position;
|
|
640
|
-
style.top = i2.tuiPx(Math.max(top, offsetY +
|
|
644
|
+
style.top = i2.tuiPx(Math.max(top, offsetY + this.options.offset));
|
|
641
645
|
style.left = i2.tuiPx(left);
|
|
642
646
|
style.maxHeight = i2.tuiPx(Math.min(maxHeight, available));
|
|
643
|
-
style.width =
|
|
644
|
-
style.minWidth =
|
|
647
|
+
style.width = '';
|
|
648
|
+
style.minWidth = '';
|
|
645
649
|
switch (limitWidth) {
|
|
646
|
-
case
|
|
650
|
+
case 'min':
|
|
647
651
|
style.minWidth = i2.tuiPx(rect.width);
|
|
648
652
|
break;
|
|
649
|
-
case
|
|
653
|
+
case 'fixed':
|
|
650
654
|
style.width = i2.tuiPx(rect.width);
|
|
651
655
|
}
|
|
652
656
|
};
|
|
653
657
|
TuiDropdownComponent.prototype.moveFocusOutside = function (previous) {
|
|
654
|
-
var host = document.createElement(
|
|
658
|
+
var host = document.createElement('div');
|
|
655
659
|
var ownerDocument = host.ownerDocument;
|
|
656
660
|
var root = ownerDocument ? ownerDocument.body : host;
|
|
657
661
|
var focusable = i2.tuiGetClosestFocusable({ initial: host, root: root, previous: previous });
|
|
@@ -667,9 +671,9 @@
|
|
|
667
671
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownComponent, decorators: [{
|
|
668
672
|
type: i0.Component,
|
|
669
673
|
args: [{
|
|
670
|
-
selector:
|
|
671
|
-
templateUrl:
|
|
672
|
-
styleUrls: [
|
|
674
|
+
selector: 'tui-dropdown',
|
|
675
|
+
templateUrl: './dropdown.template.html',
|
|
676
|
+
styleUrls: ['./dropdown.style.less'],
|
|
673
677
|
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
674
678
|
providers: [i2.TuiDestroyService, services.TuiPositionService],
|
|
675
679
|
animations: [animations.tuiDropdownAnimation],
|
|
@@ -712,14 +716,14 @@
|
|
|
712
716
|
}] }];
|
|
713
717
|
}, propDecorators: { dropdownAnimation: [{
|
|
714
718
|
type: i0.HostBinding,
|
|
715
|
-
args: [
|
|
719
|
+
args: ['@tuiDropdownAnimation']
|
|
716
720
|
}] } });
|
|
717
721
|
|
|
718
722
|
var TuiDropdownContextDirective = /** @class */ (function (_super) {
|
|
719
723
|
__extends(TuiDropdownContextDirective, _super);
|
|
720
|
-
function TuiDropdownContextDirective(
|
|
724
|
+
function TuiDropdownContextDirective(activeZone) {
|
|
721
725
|
var _this = _super.call(this, function (subscriber) { return _this.stream$.subscribe(subscriber); }) || this;
|
|
722
|
-
_this.
|
|
726
|
+
_this.activeZone = activeZone;
|
|
723
727
|
_this.stream$ = new i5.Subject();
|
|
724
728
|
_this.currentRect = i2.EMPTY_CLIENT_RECT;
|
|
725
729
|
return _this;
|
|
@@ -729,8 +733,7 @@
|
|
|
729
733
|
this.stream$.next(true);
|
|
730
734
|
};
|
|
731
735
|
TuiDropdownContextDirective.prototype.closeDropdown = function (target) {
|
|
732
|
-
|
|
733
|
-
if (!((_a = this.dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement.contains(target))) {
|
|
736
|
+
if (!this.activeZone.contains(target)) {
|
|
734
737
|
this.stream$.next(false);
|
|
735
738
|
}
|
|
736
739
|
};
|
|
@@ -739,37 +742,39 @@
|
|
|
739
742
|
};
|
|
740
743
|
return TuiDropdownContextDirective;
|
|
741
744
|
}(i1$1.TuiDriver));
|
|
742
|
-
TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token:
|
|
745
|
+
TuiDropdownContextDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, deps: [{ token: i2.TuiActiveZoneDirective }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
743
746
|
TuiDropdownContextDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)" } }, providers: [
|
|
747
|
+
i2.TuiActiveZoneDirective,
|
|
744
748
|
i1$1.tuiAsDriver(TuiDropdownContextDirective),
|
|
745
749
|
i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
746
750
|
], usesInheritance: true, ngImport: i0__namespace });
|
|
747
751
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownContextDirective, decorators: [{
|
|
748
752
|
type: i0.Directive,
|
|
749
753
|
args: [{
|
|
750
|
-
selector:
|
|
754
|
+
selector: '[tuiDropdown][tuiDropdownContext]',
|
|
751
755
|
providers: [
|
|
756
|
+
i2.TuiActiveZoneDirective,
|
|
752
757
|
i1$1.tuiAsDriver(TuiDropdownContextDirective),
|
|
753
758
|
i1$1.tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
754
759
|
],
|
|
755
760
|
}]
|
|
756
761
|
}], ctorParameters: function () {
|
|
757
|
-
return [{ type:
|
|
762
|
+
return [{ type: i2__namespace.TuiActiveZoneDirective, decorators: [{
|
|
758
763
|
type: i0.Inject,
|
|
759
|
-
args: [
|
|
764
|
+
args: [i2.TuiActiveZoneDirective]
|
|
760
765
|
}] }];
|
|
761
766
|
}, propDecorators: { onContextMenu: [{
|
|
762
767
|
type: i0.HostListener,
|
|
763
|
-
args: [
|
|
768
|
+
args: ['contextmenu.prevent.stop', ['$event.clientX', '$event.clientY']]
|
|
764
769
|
}], closeDropdown: [{
|
|
765
770
|
type: i0.HostListener,
|
|
766
|
-
args: [
|
|
771
|
+
args: ['document:click.silent', ['$event.target']]
|
|
767
772
|
}, {
|
|
768
773
|
type: i0.HostListener,
|
|
769
|
-
args: [
|
|
774
|
+
args: ['document:contextmenu.capture.silent', ['$event.target']]
|
|
770
775
|
}, {
|
|
771
776
|
type: i0.HostListener,
|
|
772
|
-
args: [
|
|
777
|
+
args: ['document:keydown.esc', ['$event.currentTarget']]
|
|
773
778
|
}] } });
|
|
774
779
|
|
|
775
780
|
var TuiDropdownDriverDirective = /** @class */ (function (_super) {
|
|
@@ -784,7 +789,7 @@
|
|
|
784
789
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownDriverDirective, decorators: [{
|
|
785
790
|
type: i0.Directive,
|
|
786
791
|
args: [{
|
|
787
|
-
selector:
|
|
792
|
+
selector: '[tuiDropdown]',
|
|
788
793
|
providers: [i2.TuiDestroyService],
|
|
789
794
|
}]
|
|
790
795
|
}] });
|
|
@@ -805,7 +810,7 @@
|
|
|
805
810
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownHostDirective, decorators: [{
|
|
806
811
|
type: i0.Directive,
|
|
807
812
|
args: [{
|
|
808
|
-
selector:
|
|
813
|
+
selector: '[tuiDropdown][tuiDropdownHost]',
|
|
809
814
|
providers: [i1$1.tuiAsRectAccessor(TuiDropdownHostDirective)],
|
|
810
815
|
}]
|
|
811
816
|
}], propDecorators: { tuiDropdownHost: [{
|
|
@@ -830,7 +835,7 @@
|
|
|
830
835
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownManualDirective, decorators: [{
|
|
831
836
|
type: i0.Directive,
|
|
832
837
|
args: [{
|
|
833
|
-
selector:
|
|
838
|
+
selector: '[tuiDropdown][tuiDropdownManual]',
|
|
834
839
|
providers: [i1$1.tuiAsDriver(TuiDropdownManualDirective)],
|
|
835
840
|
}]
|
|
836
841
|
}], ctorParameters: function () { return []; }, propDecorators: { tuiDropdownManual: [{
|
|
@@ -848,21 +853,21 @@
|
|
|
848
853
|
var hostRect = this.accessor.getClientRect();
|
|
849
854
|
var _b = this.windowRef, innerHeight = _b.innerHeight, innerWidth = _b.innerWidth;
|
|
850
855
|
var _c = this.options, minHeight = _c.minHeight, align = _c.align, direction = _c.direction;
|
|
851
|
-
var previous = this.previous || direction ||
|
|
852
|
-
var right = Math.max(hostRect.right - width,
|
|
856
|
+
var previous = this.previous || direction || 'bottom';
|
|
857
|
+
var right = Math.max(hostRect.right - width, this.options.offset);
|
|
853
858
|
var available = {
|
|
854
|
-
top: hostRect.top - 2 *
|
|
855
|
-
bottom: innerHeight - hostRect.bottom - 2 *
|
|
859
|
+
top: hostRect.top - 2 * this.options.offset,
|
|
860
|
+
bottom: innerHeight - hostRect.bottom - 2 * this.options.offset,
|
|
856
861
|
};
|
|
857
862
|
var position = {
|
|
858
|
-
top: hostRect.top -
|
|
859
|
-
bottom: hostRect.bottom +
|
|
863
|
+
top: hostRect.top - this.options.offset - height,
|
|
864
|
+
bottom: hostRect.bottom + this.options.offset,
|
|
860
865
|
right: right,
|
|
861
|
-
left: hostRect.left + width < innerWidth -
|
|
866
|
+
left: hostRect.left + width < innerWidth - this.options.offset
|
|
862
867
|
? hostRect.left
|
|
863
868
|
: right,
|
|
864
869
|
};
|
|
865
|
-
var better = available.top > available.bottom ?
|
|
870
|
+
var better = available.top > available.bottom ? 'top' : 'bottom';
|
|
866
871
|
if ((available[previous] > minHeight && direction) ||
|
|
867
872
|
available[previous] > height) {
|
|
868
873
|
return [position[previous], position[align]];
|
|
@@ -877,7 +882,7 @@
|
|
|
877
882
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionDirective, decorators: [{
|
|
878
883
|
type: i0.Directive,
|
|
879
884
|
args: [{
|
|
880
|
-
selector:
|
|
885
|
+
selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
|
|
881
886
|
providers: [i1$1.tuiAsPositionAccessor(TuiDropdownPositionDirective)],
|
|
882
887
|
}]
|
|
883
888
|
}], ctorParameters: function () {
|
|
@@ -899,8 +904,8 @@
|
|
|
899
904
|
this.windowRef = windowRef;
|
|
900
905
|
this.accessor = accessor;
|
|
901
906
|
this.vertical = vertical;
|
|
902
|
-
this.previous = this.options.direction ||
|
|
903
|
-
this.tuiDropdownSided =
|
|
907
|
+
this.previous = this.options.direction || 'bottom';
|
|
908
|
+
this.tuiDropdownSided = '';
|
|
904
909
|
}
|
|
905
910
|
TuiDropdownPositionSidedDirective.prototype.getPosition = function (rect) {
|
|
906
911
|
if (this.tuiDropdownSided === false) {
|
|
@@ -912,17 +917,17 @@
|
|
|
912
917
|
var _b = this.options, align = _b.align, direction = _b.direction, minHeight = _b.minHeight;
|
|
913
918
|
var available = {
|
|
914
919
|
top: hostRect.bottom,
|
|
915
|
-
left: hostRect.left -
|
|
916
|
-
right: innerWidth - hostRect.right -
|
|
920
|
+
left: hostRect.left - this.options.offset,
|
|
921
|
+
right: innerWidth - hostRect.right - this.options.offset,
|
|
917
922
|
bottom: innerHeight - hostRect.top,
|
|
918
923
|
};
|
|
919
924
|
var position = {
|
|
920
|
-
top: hostRect.bottom - height +
|
|
921
|
-
left: hostRect.left - width -
|
|
922
|
-
right: hostRect.right +
|
|
923
|
-
bottom: hostRect.top -
|
|
925
|
+
top: hostRect.bottom - height + 1,
|
|
926
|
+
left: hostRect.left - width - this.options.offset,
|
|
927
|
+
right: hostRect.right + this.options.offset,
|
|
928
|
+
bottom: hostRect.top - 1, // 1 for border
|
|
924
929
|
};
|
|
925
|
-
var better = available.top > available.bottom ?
|
|
930
|
+
var better = available.top > available.bottom ? 'top' : 'bottom';
|
|
926
931
|
var maxLeft = available.left > available.right ? position.left : position.right;
|
|
927
932
|
var left = available[align] > width ? position[align] : maxLeft;
|
|
928
933
|
if ((available[this.previous] > minHeight && direction) ||
|
|
@@ -942,7 +947,7 @@
|
|
|
942
947
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownPositionSidedDirective, decorators: [{
|
|
943
948
|
type: i0.Directive,
|
|
944
949
|
args: [{
|
|
945
|
-
selector:
|
|
950
|
+
selector: '[tuiDropdownSided]',
|
|
946
951
|
providers: [
|
|
947
952
|
TuiDropdownPositionDirective,
|
|
948
953
|
i1$1.tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
@@ -989,7 +994,7 @@
|
|
|
989
994
|
: _this.range;
|
|
990
995
|
return (contained && handler(_this.range)) || _this.inDropdown(range);
|
|
991
996
|
}));
|
|
992
|
-
_this.position =
|
|
997
|
+
_this.position = 'selection';
|
|
993
998
|
return _this;
|
|
994
999
|
}
|
|
995
1000
|
Object.defineProperty(TuiDropdownSelectionDirective.prototype, "tuiDropdownSelection", {
|
|
@@ -1003,7 +1008,7 @@
|
|
|
1003
1008
|
});
|
|
1004
1009
|
TuiDropdownSelectionDirective.prototype.getClientRect = function () {
|
|
1005
1010
|
switch (this.position) {
|
|
1006
|
-
case
|
|
1011
|
+
case 'tag': {
|
|
1007
1012
|
var commonAncestorContainer = this.range.commonAncestorContainer;
|
|
1008
1013
|
var element = i2.tuiIsElement(commonAncestorContainer)
|
|
1009
1014
|
? commonAncestorContainer
|
|
@@ -1012,7 +1017,7 @@
|
|
|
1012
1017
|
? element.getBoundingClientRect()
|
|
1013
1018
|
: i2.EMPTY_CLIENT_RECT;
|
|
1014
1019
|
}
|
|
1015
|
-
case
|
|
1020
|
+
case 'word':
|
|
1016
1021
|
return utils.tuiGetWordRange(this.range).getBoundingClientRect();
|
|
1017
1022
|
default:
|
|
1018
1023
|
return this.range.getBoundingClientRect();
|
|
@@ -1069,13 +1074,13 @@
|
|
|
1069
1074
|
* Create an invisible DIV styled exactly like input/textarea element inside directive
|
|
1070
1075
|
*/
|
|
1071
1076
|
TuiDropdownSelectionDirective.prototype.initGhost = function (element) {
|
|
1072
|
-
var ghost = this.documentRef.createElement(
|
|
1077
|
+
var ghost = this.documentRef.createElement('div');
|
|
1073
1078
|
var nativeElement = this.viewContainerRef.element.nativeElement;
|
|
1074
1079
|
var _b = getComputedStyle(element), font = _b.font, letterSpacing = _b.letterSpacing, textTransform = _b.textTransform, padding = _b.padding;
|
|
1075
|
-
ghost.style.position =
|
|
1076
|
-
ghost.style.pointerEvents =
|
|
1077
|
-
ghost.style.opacity =
|
|
1078
|
-
ghost.style.whiteSpace =
|
|
1080
|
+
ghost.style.position = 'absolute';
|
|
1081
|
+
ghost.style.pointerEvents = 'none';
|
|
1082
|
+
ghost.style.opacity = '0';
|
|
1083
|
+
ghost.style.whiteSpace = 'pre-wrap';
|
|
1079
1084
|
ghost.style.font = font;
|
|
1080
1085
|
ghost.style.letterSpacing = letterSpacing;
|
|
1081
1086
|
ghost.style.textTransform = textTransform;
|
|
@@ -1097,7 +1102,7 @@
|
|
|
1097
1102
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDropdownSelectionDirective, decorators: [{
|
|
1098
1103
|
type: i0.Directive,
|
|
1099
1104
|
args: [{
|
|
1100
|
-
selector:
|
|
1105
|
+
selector: '[tuiDropdown][tuiDropdownSelection]',
|
|
1101
1106
|
providers: [
|
|
1102
1107
|
i1$1.tuiAsDriver(TuiDropdownSelectionDirective),
|
|
1103
1108
|
i1$1.tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
@@ -1125,7 +1130,7 @@
|
|
|
1125
1130
|
}] }];
|
|
1126
1131
|
}, propDecorators: { position: [{
|
|
1127
1132
|
type: i0.Input,
|
|
1128
|
-
args: [
|
|
1133
|
+
args: ['tuiDropdownSelectionPosition']
|
|
1129
1134
|
}], tuiDropdownSelection: [{
|
|
1130
1135
|
type: i0.Input
|
|
1131
1136
|
}] } });
|
|
@@ -1216,7 +1221,6 @@
|
|
|
1216
1221
|
|
|
1217
1222
|
exports.TUI_DROPDOWN_COMPONENT = TUI_DROPDOWN_COMPONENT;
|
|
1218
1223
|
exports.TUI_DROPDOWN_DEFAULT_OPTIONS = TUI_DROPDOWN_DEFAULT_OPTIONS;
|
|
1219
|
-
exports.TUI_DROPDOWN_OFFSET = TUI_DROPDOWN_OFFSET;
|
|
1220
1224
|
exports.TUI_DROPDOWN_OPTIONS = TUI_DROPDOWN_OPTIONS;
|
|
1221
1225
|
exports.TuiDropdownComponent = TuiDropdownComponent;
|
|
1222
1226
|
exports.TuiDropdownContextDirective = TuiDropdownContextDirective;
|