@taiga-ui/kit 2.50.0 → 2.50.1
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-kit-components-input-slider.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js +12 -11
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.min.js.map +1 -1
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/directives/present/present.directive.d.ts +7 -5
- package/directives/present/taiga-ui-kit-directives-present.metadata.json +1 -1
- package/esm2015/components/input-slider/input-slider.component.js +1 -1
- package/esm2015/directives/present/present.directive.js +16 -28
- package/esm5/components/input-slider/input-slider.component.js +1 -1
- package/esm5/directives/present/present.directive.js +16 -15
- package/fesm2015/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js +15 -27
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +1 -1
- package/fesm5/taiga-ui-kit-directives-present.js +15 -14
- package/fesm5/taiga-ui-kit-directives-present.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TuiNewInputSliderDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":52,"character":1},"arguments":[{"selector":"tui-input-slider[new]"}]}],"members":{}},"TuiInputSliderComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@taiga-ui/kit/abstract","name":"AbstractTuiInputSlider","line":85,"character":12},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":58,"character":1},"arguments":[{"selector":"tui-input-slider","host":{"[class._show-ticks-labels]":"!isNew","$quoted$":["[class._show-ticks-labels]"]},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":69,"character":21},"member":"OnPush"},"providers":[{"provide":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TUI_FOCUSABLE_ITEM_ACCESSOR","line":72,"character":21},"useExisting":{"__symbolic":"reference","name":"TuiInputSliderComponent"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"tuiSliderOptionsProvider","line":75,"character":8},"arguments":[{"trackColor":"transparent"}]},{"__symbolic":"reference","module":"@taiga-ui/core","name":"HINT_CONTROLLER_PROVIDER","line":76,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TEXTFIELD_CONTROLLER_PROVIDER","line":77,"character":8}],"template":"<tui-input-number\n [min]=\"min\"\n [max]=\"max\"\n [precision]=\"precision\"\n [decimal]=\"decimal\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix || (value | i18nPlural: pluralizeMap || pluralizeMapFallback)\"\n [tuiTextfieldCustomContent]=\"controller.customContent || deprecatedSecondary\"\n [tuiTextfieldSize]=\"computedSize\"\n [tuiTextfieldLabelOutside]=\"computedSize !== 'l'\"\n [readOnly]=\"readOnly\"\n [pseudoFocused]=\"computedFocused\"\n [pseudoHovered]=\"computedHovered\"\n [pseudoPressed]=\"computedPressed\"\n [pseudoInvalid]=\"pseudoInvalid\"\n [ngModel]=\"value\"\n (ngModelChange)=\"safelyUpdateValue($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n (keydown.arrowUp.prevent)=\"onVerticalArrowKeyDown(1)\"\n (keydown.arrowDown.prevent)=\"onVerticalArrowKeyDown(-1)\"\n>\n <ng-content></ng-content>\n <div\n *ngIf=\"computedValueContent && !focused\"\n polymorpheus-outlet\n automation-id=\"tui-input-slider__value-content\"\n [content]=\"computedValueContent\"\n [context]=\"{$implicit: value}\"\n ></div>\n</tui-input-number>\n\n<!--TODO: remove in v3.0-->\n<ng-template #deprecatedSecondary>{{secondary}}</ng-template>\n\n<!--TODO: remove wrapper + ticks labels (leave only slider) in v3.0-->\n<div class=\"t-slider-wrapper\">\n <input\n tuiSlider\n type=\"range\"\n [tuiFocusable]=\"false\"\n [max]=\"computedSteps\"\n [segments]=\"segments\"\n [keySteps]=\"computedKeySteps\"\n [attr.disabled]=\"readOnly || disabled || null\"\n [ngModel]=\"value\"\n (keyStepsInput)=\"onSliderChange($event)\"\n (click)=\"focusTextInput()\"\n />\n\n <!--TODO delete ticks labels in v3.0-->\n <div\n *ngIf=\"segments && !isNew\"\n class=\"t-ticks-labels\"\n >\n <span\n *tuiRepeatTimes=\"let tickIndex of segments + 1\"\n automation-id=\"tui-slider__segment\"\n >\n <span *ngIf=\"fromToTexts$ | async as fromToText\">\n {{ getTickPrefix(tickIndex, segments, fromToText) }} {{\n tickIndex | tuiSliderTickLabel:segments:computedKeySteps |\n tuiFormatNumber}}\n <span *ngIf=\"segmentsPluralizeMap\">\n {{ tickIndex | tuiSliderTickLabel:segments:computedKeySteps\n | i18nPlural: segmentsPluralizeMap }}\n </span>\n </span>\n </span>\n </div>\n</div>\n","styles":[":host{position:relative;z-index:0;display:block}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]}]}],"members":{"inputNumberRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":88,"character":5},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/components/input-number","name":"TuiInputNumberComponent","line":88,"character":15}]}]}],"sliderRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":91,"character":5},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"TuiSliderComponent","line":91,"character":15},{"read":{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":91,"character":42}}]}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":95,"character":5}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":99,"character":5}}]}],"quantum":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":102,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":103,"character":5},"arguments":[{"__symbolic":"error","message":"Reference to a non-exported function","line":279,"character":9,"context":{"name":"quantumAssertion"},"module":"./input-slider.component"},"Quantum must be positive"]}]}],"steps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":107,"character":5}}]}],"segments":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":111,"character":5}}]}],"keySteps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":114,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":115,"character":5}}]}],"valueContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":119,"character":5}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":122,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":123,"character":5}}]}],"postfix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":126,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":127,"character":5}}]}],"secondary":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":134,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":135,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":140,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":141,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":141,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":143,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":144,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/core","name":"TUI_TEXTFIELD_WATCHED_CONTROLLER","line":144,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":146,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/tokens","name":"TUI_FROM_TO_TEXTS","line":146,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":147,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":148,"character":9},"arguments":[{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":142,"character":17},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":54},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiTextfieldController","line":145,"character":29},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":146,"character":69,"module":"./input-slider.component"}]},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}],"focusTextInput":[{"__symbolic":"method"}],"safelyUpdateValue":[{"__symbolic":"method"}],"onVerticalArrowKeyDown":[{"__symbolic":"method"}],"onSliderChange":[{"__symbolic":"method"}],"onFocused":[{"__symbolic":"method"}],"onPressed":[{"__symbolic":"method"}],"onHovered":[{"__symbolic":"method"}],"getFallbackValue":[{"__symbolic":"method"}],"valueGuard":[{"__symbolic":"method"}],"updateTextInputValue":[{"__symbolic":"method"}]}},"TuiInputSliderModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":14,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":18,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TuiFocusableModule","line":19,"character":8},{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"TuiSliderModule","line":20,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiFormatNumberPipeModule","line":21,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TuiRepeatTimesModule","line":22,"character":8},{"__symbolic":"reference","module":"@tinkoff/ng-polymorpheus","name":"PolymorpheusModule","line":23,"character":8},{"__symbolic":"reference","module":"@taiga-ui/kit/components/input-number","name":"TuiInputNumberModule","line":24,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiTextfieldControllerModule","line":25,"character":8}],"declarations":[{"__symbolic":"reference","name":"TuiInputSliderComponent"},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}],"exports":[{"__symbolic":"reference","name":"TuiInputSliderComponent"},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}]}],"members":{}}},"origins":{"TuiNewInputSliderDirective":"./input-slider.component","TuiInputSliderComponent":"./input-slider.component","TuiInputSliderModule":"./input-slider.module"},"importAs":"@taiga-ui/kit/components/input-slider"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TuiNewInputSliderDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":52,"character":1},"arguments":[{"selector":"tui-input-slider[new]"}]}],"members":{}},"TuiInputSliderComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@taiga-ui/kit/abstract","name":"AbstractTuiInputSlider","line":85,"character":12},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":58,"character":1},"arguments":[{"selector":"tui-input-slider","host":{"[class._show-ticks-labels]":"!isNew","$quoted$":["[class._show-ticks-labels]"]},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":69,"character":21},"member":"OnPush"},"providers":[{"provide":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TUI_FOCUSABLE_ITEM_ACCESSOR","line":72,"character":21},"useExisting":{"__symbolic":"reference","name":"TuiInputSliderComponent"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"tuiSliderOptionsProvider","line":75,"character":8},"arguments":[{"trackColor":"transparent"}]},{"__symbolic":"reference","module":"@taiga-ui/core","name":"HINT_CONTROLLER_PROVIDER","line":76,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TEXTFIELD_CONTROLLER_PROVIDER","line":77,"character":8}],"template":"<tui-input-number\n [min]=\"min\"\n [max]=\"max\"\n [precision]=\"precision\"\n [decimal]=\"decimal\"\n [prefix]=\"prefix\"\n [postfix]=\"postfix || (value | i18nPlural: pluralizeMap || pluralizeMapFallback)\"\n [tuiTextfieldCustomContent]=\"controller.customContent || deprecatedSecondary\"\n [tuiTextfieldSize]=\"computedSize\"\n [tuiTextfieldLabelOutside]=\"computedSize !== 'l'\"\n [readOnly]=\"readOnly\"\n [pseudoFocused]=\"computedFocused\"\n [pseudoHovered]=\"computedHovered\"\n [pseudoPressed]=\"computedPressed\"\n [pseudoInvalid]=\"pseudoInvalid\"\n [ngModel]=\"value\"\n (ngModelChange)=\"safelyUpdateValue($event)\"\n (focusedChange)=\"onFocused($event)\"\n (hoveredChange)=\"onHovered($event)\"\n (pressedChange)=\"onPressed($event)\"\n (keydown.arrowUp.prevent)=\"onVerticalArrowKeyDown(1)\"\n (keydown.arrowDown.prevent)=\"onVerticalArrowKeyDown(-1)\"\n>\n <ng-content></ng-content>\n <div\n *ngIf=\"computedValueContent && !focused\"\n polymorpheus-outlet\n automation-id=\"tui-input-slider__value-content\"\n [content]=\"computedValueContent\"\n [context]=\"{$implicit: value}\"\n ></div>\n</tui-input-number>\n\n<!--TODO: remove in v3.0-->\n<ng-template #deprecatedSecondary>{{secondary}}</ng-template>\n\n<!--TODO: remove wrapper + ticks labels (leave only slider) in v3.0-->\n<div class=\"t-slider-wrapper\">\n <input\n tuiSlider\n type=\"range\"\n [tuiFocusable]=\"false\"\n [max]=\"computedSteps\"\n [segments]=\"segments\"\n [keySteps]=\"computedKeySteps\"\n [attr.disabled]=\"readOnly || disabled || null\"\n [ngModel]=\"value\"\n (keyStepsInput)=\"onSliderChange($event)\"\n (click)=\"focusTextInput()\"\n />\n\n <!--TODO delete ticks labels in v3.0-->\n <div\n *ngIf=\"segments && !isNew\"\n class=\"t-ticks-labels\"\n >\n <span\n *tuiRepeatTimes=\"let tickIndex of segments + 1\"\n automation-id=\"tui-slider__segment\"\n >\n <span *ngIf=\"fromToTexts$ | async as fromToText\">\n {{ getTickPrefix(tickIndex, segments, fromToText) }} {{\n tickIndex | tuiSliderTickLabel:segments:computedKeySteps |\n tuiFormatNumber}}\n <span *ngIf=\"segmentsPluralizeMap\">\n {{ tickIndex | tuiSliderTickLabel:segments:computedKeySteps\n | i18nPlural: segmentsPluralizeMap }}\n </span>\n </span>\n </span>\n </div>\n</div>\n","styles":[":host{position:relative;z-index:0;display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]}]}],"members":{"inputNumberRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":88,"character":5},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/components/input-number","name":"TuiInputNumberComponent","line":88,"character":15}]}]}],"sliderRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":91,"character":5},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"TuiSliderComponent","line":91,"character":15},{"read":{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":91,"character":42}}]}]}],"min":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":94,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":95,"character":5}}]}],"max":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":99,"character":5}}]}],"quantum":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":102,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":103,"character":5},"arguments":[{"__symbolic":"error","message":"Reference to a non-exported function","line":279,"character":9,"context":{"name":"quantumAssertion"},"module":"./input-slider.component"},"Quantum must be positive"]}]}],"steps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":106,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":107,"character":5}}]}],"segments":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":110,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":111,"character":5}}]}],"keySteps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":114,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":115,"character":5}}]}],"valueContent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":118,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":119,"character":5}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":122,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":123,"character":5}}]}],"postfix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":126,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":127,"character":5}}]}],"secondary":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":134,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"tuiDefaultProp","line":135,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":139,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self","line":140,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":141,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":141,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":143,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":144,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/core","name":"TUI_TEXTFIELD_WATCHED_CONTROLLER","line":144,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":146,"character":9},"arguments":[{"__symbolic":"reference","module":"@taiga-ui/kit/tokens","name":"TUI_FROM_TO_TEXTS","line":146,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":147,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":148,"character":9},"arguments":[{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/forms","name":"NgControl","line":142,"character":17},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":143,"character":54},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiTextfieldController","line":145,"character":29},{"__symbolic":"reference","name":"Observable","module":"rxjs","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":146,"character":69,"module":"./input-slider.component"}]},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}],"focusTextInput":[{"__symbolic":"method"}],"safelyUpdateValue":[{"__symbolic":"method"}],"onVerticalArrowKeyDown":[{"__symbolic":"method"}],"onSliderChange":[{"__symbolic":"method"}],"onFocused":[{"__symbolic":"method"}],"onPressed":[{"__symbolic":"method"}],"onHovered":[{"__symbolic":"method"}],"getFallbackValue":[{"__symbolic":"method"}],"valueGuard":[{"__symbolic":"method"}],"updateTextInputValue":[{"__symbolic":"method"}]}},"TuiInputSliderModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":14,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":16,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":17,"character":8},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":18,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TuiFocusableModule","line":19,"character":8},{"__symbolic":"reference","module":"@taiga-ui/kit/components/slider","name":"TuiSliderModule","line":20,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiFormatNumberPipeModule","line":21,"character":8},{"__symbolic":"reference","module":"@taiga-ui/cdk","name":"TuiRepeatTimesModule","line":22,"character":8},{"__symbolic":"reference","module":"@tinkoff/ng-polymorpheus","name":"PolymorpheusModule","line":23,"character":8},{"__symbolic":"reference","module":"@taiga-ui/kit/components/input-number","name":"TuiInputNumberModule","line":24,"character":8},{"__symbolic":"reference","module":"@taiga-ui/core","name":"TuiTextfieldControllerModule","line":25,"character":8}],"declarations":[{"__symbolic":"reference","name":"TuiInputSliderComponent"},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}],"exports":[{"__symbolic":"reference","name":"TuiInputSliderComponent"},{"__symbolic":"reference","name":"TuiNewInputSliderDirective"}]}]}],"members":{}}},"origins":{"TuiNewInputSliderDirective":"./input-slider.component","TuiInputSliderComponent":"./input-slider.component","TuiInputSliderModule":"./input-slider.module"},"importAs":"@taiga-ui/kit/components/input-slider"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import { TuiDirectiveStylesService } from '@taiga-ui/cdk';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
2
|
export declare class TuiPresentDirective implements OnDestroy {
|
|
5
3
|
private readonly visibility$;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor({ nativeElement }: ElementRef<HTMLElement>, directiveStyles: TuiDirectiveStylesService, userAgent: string);
|
|
4
|
+
readonly tuiPresentChange: import("rxjs").Observable<boolean>;
|
|
5
|
+
constructor({ nativeElement }: ElementRef<HTMLElement>, userAgent: string);
|
|
9
6
|
/**
|
|
10
7
|
* Someday animationcancel would work and mutation observer would not be needed:
|
|
11
8
|
* https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel
|
|
12
9
|
* It would also trigger on CSS like display: none on parent nodes which is awesome
|
|
13
10
|
* but currently only works in Firefox
|
|
11
|
+
* ___
|
|
12
|
+
* TODO: remove MutationObserver when we bump versions of supported browsers:
|
|
13
|
+
*** Safari 12+
|
|
14
|
+
*** Chrome 83+
|
|
15
|
+
* See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}
|
|
14
16
|
*/
|
|
15
17
|
onAnimation(event: Event, visibility: boolean): void;
|
|
16
18
|
ngOnDestroy(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"TuiPresentDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"TuiPresentDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":13,"character":1},"arguments":[{"selector":"[tuiPresentChange]","host":{"[style.animation]":"\"tuiPresent 1s infinite\"","$quoted$":["[style.animation]"]}}]}],"members":{"tuiPresentChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":16}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":9},"arguments":[{"__symbolic":"reference","module":"@ng-web-apis/common","name":"USER_AGENT","line":27,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":26,"character":56,"context":{"typeName":"HTMLElement"},"module":"./present.directive"}]},{"__symbolic":"reference","name":"string"}]}],"onAnimation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":60,"character":5},"arguments":["animationcancel",["$event","false"]]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":61,"character":5},"arguments":["animationstart",["$event","true"]]}]}],"ngOnDestroy":[{"__symbolic":"method"}]}},"TuiPresentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"TuiPresentDirective"}],"exports":[{"__symbolic":"reference","name":"TuiPresentDirective"}]}]}],"members":{}}},"origins":{"TuiPresentDirective":"./present.directive","TuiPresentModule":"./present.module"},"importAs":"@taiga-ui/kit/directives/present"}
|
|
@@ -218,7 +218,7 @@ TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
|
218
218
|
HINT_CONTROLLER_PROVIDER,
|
|
219
219
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
220
220
|
],
|
|
221
|
-
styles: [":host{position:relative;z-index:0;display:block}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
221
|
+
styles: [":host{position:relative;z-index:0;display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
222
222
|
})
|
|
223
223
|
/**
|
|
224
224
|
* TODO replace `extends AbstractTuiInputSlider<number>` by `extends AbstractTuiControl<number> implements TuiWithOptionalMinMax<number>`
|
|
@@ -1,39 +1,24 @@
|
|
|
1
1
|
import { __decorate, __param } from "tslib";
|
|
2
2
|
import { Directive, ElementRef, HostListener, Inject, OnDestroy, Output, } from '@angular/core';
|
|
3
3
|
import { USER_AGENT } from '@ng-web-apis/common';
|
|
4
|
-
import { isCurrentTarget, isFirefox
|
|
5
|
-
import {
|
|
6
|
-
import { distinctUntilChanged, skip
|
|
7
|
-
const STYLE = `
|
|
8
|
-
@keyframes tuiPresent {
|
|
9
|
-
from {
|
|
10
|
-
content: '1';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
to {
|
|
14
|
-
content: '2';
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tui-present {
|
|
19
|
-
animation: tuiPresent 1000s infinite;
|
|
20
|
-
}`;
|
|
4
|
+
import { isCurrentTarget, isFirefox } from '@taiga-ui/cdk';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, skip } from 'rxjs/operators';
|
|
21
7
|
let TuiPresentDirective = class TuiPresentDirective {
|
|
22
|
-
constructor({ nativeElement },
|
|
23
|
-
this.visibility$ = new
|
|
24
|
-
|
|
25
|
-
this.tuiPresentChange = this.visibility$.pipe(startWith(false), distinctUntilChanged(), skip(1));
|
|
8
|
+
constructor({ nativeElement }, userAgent) {
|
|
9
|
+
this.visibility$ = new BehaviorSubject(false);
|
|
10
|
+
this.tuiPresentChange = this.visibility$.pipe(distinctUntilChanged(), skip(1));
|
|
26
11
|
if (isFirefox(userAgent)) {
|
|
27
12
|
return;
|
|
28
13
|
}
|
|
29
|
-
|
|
14
|
+
const observer = new MutationObserver(() => {
|
|
30
15
|
if (!nativeElement.offsetParent &&
|
|
31
16
|
nativeElement.offsetWidth === 0 &&
|
|
32
17
|
nativeElement.offsetHeight === 0) {
|
|
33
18
|
this.visibility$.next(false);
|
|
34
19
|
}
|
|
35
20
|
});
|
|
36
|
-
|
|
21
|
+
observer.observe(nativeElement, {
|
|
37
22
|
attributes: true,
|
|
38
23
|
attributeFilter: ['style', 'class'],
|
|
39
24
|
});
|
|
@@ -43,6 +28,11 @@ let TuiPresentDirective = class TuiPresentDirective {
|
|
|
43
28
|
* https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel
|
|
44
29
|
* It would also trigger on CSS like display: none on parent nodes which is awesome
|
|
45
30
|
* but currently only works in Firefox
|
|
31
|
+
* ___
|
|
32
|
+
* TODO: remove MutationObserver when we bump versions of supported browsers:
|
|
33
|
+
*** Safari 12+
|
|
34
|
+
*** Chrome 83+
|
|
35
|
+
* See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}
|
|
46
36
|
*/
|
|
47
37
|
onAnimation(event, visibility) {
|
|
48
38
|
if (isCurrentTarget(event)) {
|
|
@@ -55,7 +45,6 @@ let TuiPresentDirective = class TuiPresentDirective {
|
|
|
55
45
|
};
|
|
56
46
|
TuiPresentDirective.ctorParameters = () => [
|
|
57
47
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
58
|
-
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] },
|
|
59
48
|
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
|
|
60
49
|
];
|
|
61
50
|
__decorate([
|
|
@@ -69,12 +58,11 @@ TuiPresentDirective = __decorate([
|
|
|
69
58
|
Directive({
|
|
70
59
|
selector: '[tuiPresentChange]',
|
|
71
60
|
host: {
|
|
72
|
-
|
|
61
|
+
'[style.animation]': '"tuiPresent 1s infinite"',
|
|
73
62
|
},
|
|
74
63
|
}),
|
|
75
64
|
__param(0, Inject(ElementRef)),
|
|
76
|
-
__param(1, Inject(
|
|
77
|
-
__param(2, Inject(USER_AGENT))
|
|
65
|
+
__param(1, Inject(USER_AGENT))
|
|
78
66
|
], TuiPresentDirective);
|
|
79
67
|
export { TuiPresentDirective };
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkva2l0L2RpcmVjdGl2ZXMvcHJlc2VudC8iLCJzb3VyY2VzIjpbInByZXNlbnQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0gsU0FBUyxFQUNULFVBQVUsRUFDVixZQUFZLEVBQ1osTUFBTSxFQUNOLFNBQVMsRUFDVCxNQUFNLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQy9DLE9BQU8sRUFBQyxlQUFlLEVBQUUsU0FBUyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFDckMsT0FBTyxFQUFDLG9CQUFvQixFQUFFLElBQUksRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBUTFELElBQWEsbUJBQW1CLEdBQWhDLE1BQWEsbUJBQW1CO0lBTTVCLFlBQ3dCLEVBQUMsYUFBYSxFQUEwQixFQUN4QyxTQUFpQjtRQVB4QixnQkFBVyxHQUFHLElBQUksZUFBZSxDQUFDLEtBQ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10pXG4gICAgb25BbmltYXRpb24oZXZlbnQ6IEV2ZW50LCB2aXNpYmlsaXR5OiBib29sZWFuKTogdm9pZCB7XG4gICAgICAgIGlmIChpc0N1cnJlbnRUYXJnZXQoZXZlbnQpKSB7XG4gICAgICAgICAgICB0aGlzLnZpc2liaWxpdHkkLm5leHQodmlzaWJpbGl0eSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy52aXNpYmlsaXR5JC5uZXh0KGZhbHNlKTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -250,7 +250,7 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
250
250
|
HINT_CONTROLLER_PROVIDER,
|
|
251
251
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
252
252
|
],
|
|
253
|
-
styles: [":host{position:relative;z-index:0;display:block}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
253
|
+
styles: [":host{position:relative;z-index:0;display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
254
254
|
})
|
|
255
255
|
/**
|
|
256
256
|
* TODO replace `extends AbstractTuiInputSlider<number>` by `extends AbstractTuiControl<number> implements TuiWithOptionalMinMax<number>`
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { __decorate, __param } from "tslib";
|
|
2
2
|
import { Directive, ElementRef, HostListener, Inject, OnDestroy, Output, } from '@angular/core';
|
|
3
3
|
import { USER_AGENT } from '@ng-web-apis/common';
|
|
4
|
-
import { isCurrentTarget, isFirefox
|
|
5
|
-
import {
|
|
6
|
-
import { distinctUntilChanged, skip
|
|
7
|
-
var STYLE = "\n@keyframes tuiPresent {\n from {\n content: '1';\n }\n\n to {\n content: '2';\n }\n}\n\n.tui-present {\n animation: tuiPresent 1000s infinite;\n}";
|
|
4
|
+
import { isCurrentTarget, isFirefox } from '@taiga-ui/cdk';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, skip } from 'rxjs/operators';
|
|
8
7
|
var TuiPresentDirective = /** @class */ (function () {
|
|
9
|
-
function TuiPresentDirective(_a,
|
|
8
|
+
function TuiPresentDirective(_a, userAgent) {
|
|
10
9
|
var _this = this;
|
|
11
10
|
var nativeElement = _a.nativeElement;
|
|
12
|
-
this.visibility$ = new
|
|
13
|
-
|
|
14
|
-
this.tuiPresentChange = this.visibility$.pipe(startWith(false), distinctUntilChanged(), skip(1));
|
|
11
|
+
this.visibility$ = new BehaviorSubject(false);
|
|
12
|
+
this.tuiPresentChange = this.visibility$.pipe(distinctUntilChanged(), skip(1));
|
|
15
13
|
if (isFirefox(userAgent)) {
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
var observer = new MutationObserver(function () {
|
|
19
17
|
if (!nativeElement.offsetParent &&
|
|
20
18
|
nativeElement.offsetWidth === 0 &&
|
|
21
19
|
nativeElement.offsetHeight === 0) {
|
|
22
20
|
_this.visibility$.next(false);
|
|
23
21
|
}
|
|
24
22
|
});
|
|
25
|
-
|
|
23
|
+
observer.observe(nativeElement, {
|
|
26
24
|
attributes: true,
|
|
27
25
|
attributeFilter: ['style', 'class'],
|
|
28
26
|
});
|
|
@@ -32,6 +30,11 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
32
30
|
* https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel
|
|
33
31
|
* It would also trigger on CSS like display: none on parent nodes which is awesome
|
|
34
32
|
* but currently only works in Firefox
|
|
33
|
+
* ___
|
|
34
|
+
* TODO: remove MutationObserver when we bump versions of supported browsers:
|
|
35
|
+
*** Safari 12+
|
|
36
|
+
*** Chrome 83+
|
|
37
|
+
* See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}
|
|
35
38
|
*/
|
|
36
39
|
TuiPresentDirective.prototype.onAnimation = function (event, visibility) {
|
|
37
40
|
if (isCurrentTarget(event)) {
|
|
@@ -43,7 +46,6 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
43
46
|
};
|
|
44
47
|
TuiPresentDirective.ctorParameters = function () { return [
|
|
45
48
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
46
|
-
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] },
|
|
47
49
|
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
|
|
48
50
|
]; };
|
|
49
51
|
__decorate([
|
|
@@ -57,14 +59,13 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
57
59
|
Directive({
|
|
58
60
|
selector: '[tuiPresentChange]',
|
|
59
61
|
host: {
|
|
60
|
-
|
|
62
|
+
'[style.animation]': '"tuiPresent 1s infinite"',
|
|
61
63
|
},
|
|
62
64
|
}),
|
|
63
65
|
__param(0, Inject(ElementRef)),
|
|
64
|
-
__param(1, Inject(
|
|
65
|
-
__param(2, Inject(USER_AGENT))
|
|
66
|
+
__param(1, Inject(USER_AGENT))
|
|
66
67
|
], TuiPresentDirective);
|
|
67
68
|
return TuiPresentDirective;
|
|
68
69
|
}());
|
|
69
70
|
export { TuiPresentDirective };
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlc2VudC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkva2l0L2RpcmVjdGl2ZXMvcHJlc2VudC8iLCJzb3VyY2VzIjpbInByZXNlbnQuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0gsU0FBUyxFQUNULFVBQVUsRUFDVixZQUFZLEVBQ1osTUFBTSxFQUNOLFNBQVMsRUFDVCxNQUFNLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQy9DLE9BQU8sRUFBQyxlQUFlL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XG4gICAgICoqKiBDaHJvbWUgODMrXG4gICAgICogU2VlOiB7QGxpbmsgaHR0cHM6Ly9jYW5pdXNlLmNvbS9tZG4tYXBpX3dpbmRvd19hbmltYXRpb25jYW5jZWxfZXZlbnR9XG4gICAgICovXG4gICAgQEhvc3RMaXN0ZW5lcignYW5pbWF0aW9uY2FuY2VsJywgWyckZXZlbnQnLCAnZmFsc2UnXSlcbiAgICBASG9zdExpc3RlbmVyKCdhbmltYXRpb25zdGFydCcsIFsnJGV2ZW50JywgJ3RydWUnXSlcbiAgICBvbkFuaW1hdGlvbihldmVudDogRXZlbnQsIHZpc2liaWxpdHk6IGJvb2xlYW4pOiB2b2lkIHtcbiAgICAgICAgaWYgKGlzQ3VycmVudFRhcmdldChldmVudCkpIHtcbiAgICAgICAgICAgIHRoaXMudmlzaWJpbGl0eSQubmV4dCh2aXNpYmlsaXR5KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCk6IHZvaWQge1xuICAgICAgICB0aGlzLnZpc2liaWxpdHkkLm5leHQoZmFsc2UpO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -220,7 +220,7 @@ TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
|
220
220
|
HINT_CONTROLLER_PROVIDER,
|
|
221
221
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
222
222
|
],
|
|
223
|
-
styles: [":host{position:relative;z-index:0;display:block}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
223
|
+
styles: [":host{position:relative;z-index:0;display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
224
224
|
})
|
|
225
225
|
/**
|
|
226
226
|
* TODO replace `extends AbstractTuiInputSlider<number>` by `extends AbstractTuiControl<number> implements TuiWithOptionalMinMax<number>`
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { ElementRef, Inject, Output, HostListener, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { USER_AGENT } from '@ng-web-apis/common';
|
|
4
|
-
import { isFirefox, isCurrentTarget
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { isFirefox, isCurrentTarget } from '@taiga-ui/cdk';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, skip } from 'rxjs/operators';
|
|
7
7
|
|
|
8
|
-
const STYLE = `
|
|
9
|
-
@keyframes tuiPresent {
|
|
10
|
-
from {
|
|
11
|
-
content: '1';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
to {
|
|
15
|
-
content: '2';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.tui-present {
|
|
20
|
-
animation: tuiPresent 1000s infinite;
|
|
21
|
-
}`;
|
|
22
8
|
let TuiPresentDirective = class TuiPresentDirective {
|
|
23
|
-
constructor({ nativeElement },
|
|
24
|
-
this.visibility$ = new
|
|
25
|
-
|
|
26
|
-
this.tuiPresentChange = this.visibility$.pipe(startWith(false), distinctUntilChanged(), skip(1));
|
|
9
|
+
constructor({ nativeElement }, userAgent) {
|
|
10
|
+
this.visibility$ = new BehaviorSubject(false);
|
|
11
|
+
this.tuiPresentChange = this.visibility$.pipe(distinctUntilChanged(), skip(1));
|
|
27
12
|
if (isFirefox(userAgent)) {
|
|
28
13
|
return;
|
|
29
14
|
}
|
|
30
|
-
|
|
15
|
+
const observer = new MutationObserver(() => {
|
|
31
16
|
if (!nativeElement.offsetParent &&
|
|
32
17
|
nativeElement.offsetWidth === 0 &&
|
|
33
18
|
nativeElement.offsetHeight === 0) {
|
|
34
19
|
this.visibility$.next(false);
|
|
35
20
|
}
|
|
36
21
|
});
|
|
37
|
-
|
|
22
|
+
observer.observe(nativeElement, {
|
|
38
23
|
attributes: true,
|
|
39
24
|
attributeFilter: ['style', 'class'],
|
|
40
25
|
});
|
|
@@ -44,6 +29,11 @@ let TuiPresentDirective = class TuiPresentDirective {
|
|
|
44
29
|
* https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel
|
|
45
30
|
* It would also trigger on CSS like display: none on parent nodes which is awesome
|
|
46
31
|
* but currently only works in Firefox
|
|
32
|
+
* ___
|
|
33
|
+
* TODO: remove MutationObserver when we bump versions of supported browsers:
|
|
34
|
+
*** Safari 12+
|
|
35
|
+
*** Chrome 83+
|
|
36
|
+
* See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}
|
|
47
37
|
*/
|
|
48
38
|
onAnimation(event, visibility) {
|
|
49
39
|
if (isCurrentTarget(event)) {
|
|
@@ -56,7 +46,6 @@ let TuiPresentDirective = class TuiPresentDirective {
|
|
|
56
46
|
};
|
|
57
47
|
TuiPresentDirective.ctorParameters = () => [
|
|
58
48
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
59
|
-
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] },
|
|
60
49
|
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
|
|
61
50
|
];
|
|
62
51
|
__decorate([
|
|
@@ -70,12 +59,11 @@ TuiPresentDirective = __decorate([
|
|
|
70
59
|
Directive({
|
|
71
60
|
selector: '[tuiPresentChange]',
|
|
72
61
|
host: {
|
|
73
|
-
|
|
62
|
+
'[style.animation]': '"tuiPresent 1s infinite"',
|
|
74
63
|
},
|
|
75
64
|
}),
|
|
76
65
|
__param(0, Inject(ElementRef)),
|
|
77
|
-
__param(1, Inject(
|
|
78
|
-
__param(2, Inject(USER_AGENT))
|
|
66
|
+
__param(1, Inject(USER_AGENT))
|
|
79
67
|
], TuiPresentDirective);
|
|
80
68
|
|
|
81
69
|
let TuiPresentModule = class TuiPresentModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-present.js","sources":["ng://@taiga-ui/kit/directives/present/present.directive.ts","ng://@taiga-ui/kit/directives/present/present.module.ts","ng://@taiga-ui/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {isCurrentTarget, isFirefox
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-present.js","sources":["ng://@taiga-ui/kit/directives/present/present.directive.ts","ng://@taiga-ui/kit/directives/present/present.module.ts","ng://@taiga-ui/kit/directives/present/taiga-ui-kit-directives-present.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\nimport {isCurrentTarget, isFirefox} from '@taiga-ui/cdk';\nimport {BehaviorSubject} from 'rxjs';\nimport {distinctUntilChanged, skip} from 'rxjs/operators';\n\n@Directive({\n selector: '[tuiPresentChange]',\n host: {\n '[style.animation]': '\"tuiPresent 1s infinite\"',\n },\n})\nexport class TuiPresentDirective implements OnDestroy {\n private readonly visibility$ = new BehaviorSubject(false);\n\n @Output()\n readonly tuiPresentChange = this.visibility$.pipe(distinctUntilChanged(), skip(1));\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(USER_AGENT) userAgent: string,\n ) {\n if (isFirefox(userAgent)) {\n return;\n }\n\n const observer = new MutationObserver(() => {\n if (\n !nativeElement.offsetParent &&\n nativeElement.offsetWidth === 0 &&\n nativeElement.offsetHeight === 0\n ) {\n this.visibility$.next(false);\n }\n });\n\n observer.observe(nativeElement, {\n attributes: true,\n attributeFilter: ['style', 'class'],\n });\n }\n\n /**\n * Someday animationcancel would work and mutation observer would not be needed:\n * https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel\n * It would also trigger on CSS like display: none on parent nodes which is awesome\n * but currently only works in Firefox\n * ___\n * TODO: remove MutationObserver when we bump versions of supported browsers:\n *** Safari 12+\n *** Chrome 83+\n * See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}\n */\n @HostListener('animationcancel', ['$event', 'false'])\n @HostListener('animationstart', ['$event', 'true'])\n onAnimation(event: Event, visibility: boolean): void {\n if (isCurrentTarget(event)) {\n this.visibility$.next(visibility);\n }\n }\n\n ngOnDestroy(): void {\n this.visibility$.next(false);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiPresentDirective} from './present.directive';\n\n@NgModule({\n declarations: [TuiPresentDirective],\n exports: [TuiPresentDirective],\n})\nexport class TuiPresentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAmBa,mBAAmB,GAAhC,MAAa,mBAAmB;IAM5B,YACwB,EAAC,aAAa,EAA0B,EACxC,SAAiB;QAPxB,gBAAW,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAGjD,qBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAM/E,IAAI,SAAS,CAAC,SAAS,CAAC,EAAE;YACtB,OAAO;SACV;QAED,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC;YAClC,IACI,CAAC,aAAa,CAAC,YAAY;gBAC3B,aAAa,CAAC,WAAW,KAAK,CAAC;gBAC/B,aAAa,CAAC,YAAY,KAAK,CAAC,EAClC;gBACE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAChC;SACJ,CAAC,CAAC;QAEH,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE;YAC5B,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;SACtC,CAAC,CAAC;KACN;;;;;;;;;;;;IAeD,WAAW,CAAC,KAAY,EAAE,UAAmB;QACzC,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACrC;KACJ;IAED,WAAW;QACP,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAChC;EACJ;;YA7C4C,UAAU,uBAA9C,MAAM,SAAC,UAAU;yCACjB,MAAM,SAAC,UAAU;;AAJtB;IADC,MAAM,EAAE;6DAC0E;AAuCnF;IAFC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,YAAY,CAAC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;sDAKlD;AA/CQ,mBAAmB;IAN/B,SAAS,CAAC;QACP,QAAQ,EAAE,oBAAoB;QAC9B,IAAI,EAAE;YACF,mBAAmB,EAAE,0BAA0B;SAClD;KACJ,CAAC;IAQO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;GARd,mBAAmB,CAoD/B;;IC/DY,gBAAgB,GAA7B,MAAa,gBAAgB;EAAG;AAAnB,gBAAgB;IAJ5B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;QACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;KACjC,CAAC;GACW,gBAAgB,CAAG;;ACRhC;;;;;;"}
|
|
@@ -252,7 +252,7 @@ var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
|
252
252
|
HINT_CONTROLLER_PROVIDER,
|
|
253
253
|
TEXTFIELD_CONTROLLER_PROVIDER,
|
|
254
254
|
],
|
|
255
|
-
styles: [":host{position:relative;z-index:0;display:block}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
255
|
+
styles: [":host{position:relative;z-index:0;display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content}:host._segmented._show-ticks-labels{border-bottom:26px solid transparent}.t-slider-wrapper{position:absolute;top:100%;left:calc(var(--tui-radius-m)/ 2);right:0;margin:-.5625rem 0 0}input[type=range]{border-top-left-radius:0;border-bottom-left-radius:calc(var(--tui-radius-m) * 5) calc(var(--tui-radius-m) * 1.5)}.t-ticks-labels{display:flex;margin:0 .5rem;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-ticks-labels>*{position:relative;flex:2;text-align:center}.t-ticks-labels>:first-child{left:-.5rem;flex:1;text-align:left}.t-ticks-labels>:last-child{right:-.5rem;flex:1;text-align:right}tui-input-slider+.t-ticks-labels{margin-left:calc(var(--tui-radius-m)/ 2 + .5rem)}tui-input-range+.t-ticks-labels,tui-range+.t-ticks-labels{margin-left:1rem;margin-right:1rem}tui-input-range+.t-ticks-labels>:first-child,tui-range+.t-ticks-labels>:first-child{left:-1rem}tui-input-range+.t-ticks-labels>:last-child,tui-range+.t-ticks-labels>:last-child{right:-1rem}"]
|
|
256
256
|
})
|
|
257
257
|
/**
|
|
258
258
|
* TODO replace `extends AbstractTuiInputSlider<number>` by `extends AbstractTuiControl<number> implements TuiWithOptionalMinMax<number>`
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { ElementRef, Inject, Output, HostListener, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { USER_AGENT } from '@ng-web-apis/common';
|
|
4
|
-
import { isFirefox, isCurrentTarget
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { isFirefox, isCurrentTarget } from '@taiga-ui/cdk';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { distinctUntilChanged, skip } from 'rxjs/operators';
|
|
7
7
|
|
|
8
|
-
var STYLE = "\n@keyframes tuiPresent {\n from {\n content: '1';\n }\n\n to {\n content: '2';\n }\n}\n\n.tui-present {\n animation: tuiPresent 1000s infinite;\n}";
|
|
9
8
|
var TuiPresentDirective = /** @class */ (function () {
|
|
10
|
-
function TuiPresentDirective(_a,
|
|
9
|
+
function TuiPresentDirective(_a, userAgent) {
|
|
11
10
|
var _this = this;
|
|
12
11
|
var nativeElement = _a.nativeElement;
|
|
13
|
-
this.visibility$ = new
|
|
14
|
-
|
|
15
|
-
this.tuiPresentChange = this.visibility$.pipe(startWith(false), distinctUntilChanged(), skip(1));
|
|
12
|
+
this.visibility$ = new BehaviorSubject(false);
|
|
13
|
+
this.tuiPresentChange = this.visibility$.pipe(distinctUntilChanged(), skip(1));
|
|
16
14
|
if (isFirefox(userAgent)) {
|
|
17
15
|
return;
|
|
18
16
|
}
|
|
19
|
-
|
|
17
|
+
var observer = new MutationObserver(function () {
|
|
20
18
|
if (!nativeElement.offsetParent &&
|
|
21
19
|
nativeElement.offsetWidth === 0 &&
|
|
22
20
|
nativeElement.offsetHeight === 0) {
|
|
23
21
|
_this.visibility$.next(false);
|
|
24
22
|
}
|
|
25
23
|
});
|
|
26
|
-
|
|
24
|
+
observer.observe(nativeElement, {
|
|
27
25
|
attributes: true,
|
|
28
26
|
attributeFilter: ['style', 'class'],
|
|
29
27
|
});
|
|
@@ -33,6 +31,11 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
33
31
|
* https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel
|
|
34
32
|
* It would also trigger on CSS like display: none on parent nodes which is awesome
|
|
35
33
|
* but currently only works in Firefox
|
|
34
|
+
* ___
|
|
35
|
+
* TODO: remove MutationObserver when we bump versions of supported browsers:
|
|
36
|
+
*** Safari 12+
|
|
37
|
+
*** Chrome 83+
|
|
38
|
+
* See: {@link https://caniuse.com/mdn-api_window_animationcancel_event}
|
|
36
39
|
*/
|
|
37
40
|
TuiPresentDirective.prototype.onAnimation = function (event, visibility) {
|
|
38
41
|
if (isCurrentTarget(event)) {
|
|
@@ -44,7 +47,6 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
44
47
|
};
|
|
45
48
|
TuiPresentDirective.ctorParameters = function () { return [
|
|
46
49
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
47
|
-
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] },
|
|
48
50
|
{ type: String, decorators: [{ type: Inject, args: [USER_AGENT,] }] }
|
|
49
51
|
]; };
|
|
50
52
|
__decorate([
|
|
@@ -58,12 +60,11 @@ var TuiPresentDirective = /** @class */ (function () {
|
|
|
58
60
|
Directive({
|
|
59
61
|
selector: '[tuiPresentChange]',
|
|
60
62
|
host: {
|
|
61
|
-
|
|
63
|
+
'[style.animation]': '"tuiPresent 1s infinite"',
|
|
62
64
|
},
|
|
63
65
|
}),
|
|
64
66
|
__param(0, Inject(ElementRef)),
|
|
65
|
-
__param(1, Inject(
|
|
66
|
-
__param(2, Inject(USER_AGENT))
|
|
67
|
+
__param(1, Inject(USER_AGENT))
|
|
67
68
|
], TuiPresentDirective);
|
|
68
69
|
return TuiPresentDirective;
|
|
69
70
|
}());
|