@taiga-ui/core 3.39.1 → 3.40.0-canary.f82bb42
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-data-list.umd.js +7 -3
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +7 -3
- package/bundles/taiga-ui-core-components-dialog.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-notification.umd.js +10 -10
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +38 -22
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +2 -2
- package/bundles/taiga-ui-core-components-primitive-textfield.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-internal-primitive-year-month-pagination.umd.js +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +21 -0
- package/bundles/taiga-ui-core-tokens.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/data-list/option/option.component.d.ts +4 -2
- package/components/dialog/dialog.component.d.ts +4 -2
- 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/components/notification/notification.component.d.ts +3 -4
- package/components/primitive-spin-button/primitive-spin-button.component.d.ts +6 -6
- package/components/primitive-spin-button/primitive-spin-button.module.d.ts +2 -3
- 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/directives/textfield-controller/textfield.options.d.ts +1 -1
- 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/data-list/option/option.component.js +9 -5
- package/esm2015/components/dialog/dialog.component.js +9 -5
- 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/notification/notification.component.js +8 -9
- package/esm2015/components/primitive-checkbox/checkbox.options.js +3 -7
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +34 -19
- package/esm2015/components/primitive-spin-button/primitive-spin-button.module.js +4 -5
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +1 -1
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -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/directives/textfield-controller/textfield.options.js +1 -1
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +1 -1
- 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/tokens/common-icon.js +12 -0
- package/esm2015/tokens/index.js +3 -1
- package/esm2015/tokens/spin-icons.js +8 -0
- 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-data-list.js +8 -4
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +8 -4
- package/fesm2015/taiga-ui-core-components-dialog.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-notification.js +7 -8
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +2 -6
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +36 -21
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +2 -2
- package/fesm2015/taiga-ui-core-components-primitive-textfield.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-internal-primitive-year-month-pagination.js +1 -1
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +20 -2
- package/fesm2015/taiga-ui-core-tokens.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/styles/mixins/textfield.less +5 -0
- package/styles/mixins/textfield.scss +5 -0
- package/tokens/common-icon.d.ts +9 -0
- package/tokens/index.d.ts +2 -0
- package/tokens/spin-icons.d.ts +7 -0
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-constants.umd.js","sources":["../../../projects/core/constants/cache-basting-payload.ts","../../../projects/core/constants/decimal-symbols.ts","../../../projects/core/constants/default-icons-path.ts","../../../projects/core/constants/default-marker-handler.ts","../../../projects/core/constants/default-number-format.ts","../../../projects/core/constants/editing-keys.ts","../../../projects/core/constants/events.ts","../../../projects/core/constants/hint-directions.ts","../../../projects/core/constants/mask-caret-trap.ts","../../../projects/core/constants/regexp.ts","../../../projects/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["import {TUI_VERSION} from '@taiga-ui/cdk';\n\nexport const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}` as const;\n","/**\n * @deprecated\n * TODO: delete in v4.0\n */\nexport const TUI_DECIMAL_SYMBOLS: readonly string[] = [`,`, `.`];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes(`.svg#`) ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","import {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n decimalLimit: Infinity,\n decimalSeparator: `,`,\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n rounding: `truncate`,\n};\n","export const tuiEditingKeys: readonly string[] = [\n `Spacebar`,\n `Backspace`,\n `Delete`,\n `ArrowLeft`,\n `ArrowRight`,\n `Left`,\n `Right`,\n `End`,\n `Home`,\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = `tui-expand-loaded`;\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = `tui-scroll-into-view`;\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = `tui-scrollable`;\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = `tui-icon-error`;\n","import {TuiHintDirection} from '@taiga-ui/core/types';\n\nexport const TUI_HINT_DIRECTIONS: readonly TuiHintDirection[] = [\n `bottom-left`,\n `bottom`,\n `bottom-right`,\n `top-left`,\n `top`,\n `top-right`,\n `left-top`,\n `left`,\n `left-bottom`,\n `right-top`,\n `right`,\n `right-bottom`,\n];\n","/**\n * @deprecated Use {@link https://github.com/
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-constants.umd.js","sources":["../../../projects/core/constants/cache-basting-payload.ts","../../../projects/core/constants/decimal-symbols.ts","../../../projects/core/constants/default-icons-path.ts","../../../projects/core/constants/default-marker-handler.ts","../../../projects/core/constants/default-number-format.ts","../../../projects/core/constants/editing-keys.ts","../../../projects/core/constants/events.ts","../../../projects/core/constants/hint-directions.ts","../../../projects/core/constants/mask-caret-trap.ts","../../../projects/core/constants/regexp.ts","../../../projects/core/constants/taiga-ui-core-constants.ts"],"sourcesContent":["import {TUI_VERSION} from '@taiga-ui/cdk';\n\nexport const TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}` as const;\n","/**\n * @deprecated\n * TODO: delete in v4.0\n */\nexport const TUI_DECIMAL_SYMBOLS: readonly string[] = [`,`, `.`];\n","import {TuiStringHandler} from '@taiga-ui/cdk';\n\nexport const DEFAULT_ICONS_PATH: TuiStringHandler<string> = name =>\n name.includes(`.svg#`) ? name : `#${name}`;\n","import {EMPTY_ARRAY} from '@taiga-ui/cdk';\nimport {TuiMarkerHandler} from '@taiga-ui/core/types';\n\nexport const TUI_DEFAULT_MARKER_HANDLER: TuiMarkerHandler = () => EMPTY_ARRAY;\n","import {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk';\nimport {TuiNumberFormatSettings} from '@taiga-ui/core/interfaces';\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n decimalLimit: Infinity,\n decimalSeparator: `,`,\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n rounding: `truncate`,\n};\n","export const tuiEditingKeys: readonly string[] = [\n `Spacebar`,\n `Backspace`,\n `Delete`,\n `ArrowLeft`,\n `ArrowRight`,\n `Left`,\n `Right`,\n `End`,\n `Home`,\n];\n","/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nexport const TUI_EXPAND_LOADED = `tui-expand-loaded`;\n\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nexport const TUI_SCROLL_INTO_VIEW = `tui-scroll-into-view`;\n\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nexport const TUI_SCROLLABLE = `tui-scrollable`;\n\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nexport const TUI_ICON_ERROR = `tui-icon-error`;\n","import {TuiHintDirection} from '@taiga-ui/core/types';\n\nexport const TUI_HINT_DIRECTIONS: readonly TuiHintDirection[] = [\n `bottom-left`,\n `bottom`,\n `bottom-right`,\n `top-left`,\n `top`,\n `top-right`,\n `left-top`,\n `left`,\n `left-bottom`,\n `right-top`,\n `right`,\n `right-bottom`,\n];\n","/**\n * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}\n * TODO: delete in v4.0\n */\nexport const MASK_CARET_TRAP = `[]`;\n","export const TUI_DIGIT_REGEXP = /\\d/;\nexport const TUI_NON_DIGIT_REGEXP = /\\D/;\nexport const TUI_NON_DIGITS_REGEXP = /\\D+/g;\nexport const TUI_LEADING_ZEROES_REGEXP = /^0+/;\nexport const TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nexport const TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nexport const TUI_LATIN_REGEXP = /[A-z]/;\nexport const TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["TUI_VERSION","EMPTY_ARRAY","CHAR_NO_BREAK_SPACE"],"mappings":";;;;;;AAEa,QAAA,yBAAyB,GAAG,KAAA,GAAMA;;ICF/C;;;IAGG;QACU,mBAAmB,GAAsB,CAAC,GAAG,EAAE,GAAG;;ACFlD,QAAA,kBAAkB,GAA6B,UAAA,IAAI,EAC5D,EAAA,OAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,GAAI,GAAA,IAAM,CAA1C;;QCAS,0BAA0B,GAAqB,cAAM,OAAAC,eAAW,CAAX;;ACArD,QAAA,yBAAyB,GAA4B;IAC9D,IAAA,YAAY,EAAE,QAAQ;IACtB,IAAA,gBAAgB,EAAE,GAAG;IACrB,IAAA,iBAAiB,EAAEC,uBAAmB;IACtC,IAAA,WAAW,EAAE,IAAI;IACjB,IAAA,QAAQ,EAAE,UAAU;;;ACRX,QAAA,cAAc,GAAsB;QAC7C,UAAU;QACV,WAAW;QACX,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,MAAM;QACN,OAAO;QACP,KAAK;QACL,MAAM;;;ICTV;;;IAGG;AACI,QAAM,iBAAiB,GAAG,oBAAoB;IAErD;;IAEG;AACI,QAAM,oBAAoB,GAAG,uBAAuB;IAE3D;;;IAGG;AACI,QAAM,cAAc,GAAG,iBAAiB;IAE/C;;IAEG;AACI,QAAM,cAAc,GAAG;;AClBjB,QAAA,mBAAmB,GAAgC;QAC5D,aAAa;QACb,QAAQ;QACR,cAAc;QACd,UAAU;QACV,KAAK;QACL,WAAW;QACX,UAAU;QACV,MAAM;QACN,aAAa;QACb,WAAW;QACX,OAAO;QACP,cAAc;;;ICdlB;;;IAGG;AACI,QAAM,eAAe,GAAG;;ACJxB,QAAM,gBAAgB,GAAG,KAAK;AAC9B,QAAM,oBAAoB,GAAG,KAAK;AAClC,QAAM,qBAAqB,GAAG,OAAO;AACrC,QAAM,yBAAyB,GAAG,MAAM;AACxC,QAAM,uBAAuB,GAAG,YAAY;AAC5C,QAAM,gCAAgC,GAAG,mCAAmC;AAC5E,QAAM,gBAAgB,GAAG,QAAQ;AACjC,QAAM,4BAA4B,GAAG;;ICP5C;;IAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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;
|