@taiga-ui/kit 2.37.1 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/input-slider.d.ts +9 -5
- package/abstract/taiga-ui-kit-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.js +8 -10
- package/bundles/taiga-ui-kit-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-abstract.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-accordion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +8 -0
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +21 -14
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +12 -2
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +153 -117
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-input-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-components-slider.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +2 -2
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.min.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +25 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js +2 -2
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.min.js.map +1 -1
- package/components/accordion/taiga-ui-kit-components-accordion.metadata.json +1 -1
- package/components/checkbox/taiga-ui-kit-components-checkbox.metadata.json +1 -1
- package/components/input-files/input-files.component.d.ts +1 -0
- package/components/input-files/taiga-ui-kit-components-input-files.metadata.json +1 -1
- package/components/input-number/input-number.component.d.ts +4 -2
- package/components/input-number/taiga-ui-kit-components-input-number.metadata.json +1 -1
- package/components/input-range/input-range.component.d.ts +2 -1
- package/components/input-range/taiga-ui-kit-components-input-range.metadata.json +1 -1
- package/components/input-slider/input-slider.component.d.ts +39 -22
- package/components/input-slider/taiga-ui-kit-components-input-slider.metadata.json +1 -1
- package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
- package/components/radio/taiga-ui-kit-components-radio.metadata.json +1 -1
- package/components/select/taiga-ui-kit-components-select.metadata.json +1 -1
- package/components/slider/taiga-ui-kit-components-slider.metadata.json +1 -1
- package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
- package/components/toggle/taiga-ui-kit-components-toggle.metadata.json +1 -1
- package/esm2015/abstract/input-slider.js +9 -7
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm2015/components/checkbox/checkbox.component.js +3 -3
- package/esm2015/components/input-files/input-files.component.js +5 -1
- package/esm2015/components/input-number/input-number.component.js +21 -15
- package/esm2015/components/input-number/input-number.module.js +5 -1
- package/esm2015/components/input-range/input-range.component.js +10 -4
- package/esm2015/components/input-slider/input-slider.component.js +155 -108
- package/esm2015/components/input-slider/input-slider.module.js +5 -2
- package/esm2015/components/input-tag/input-tag.component.js +1 -1
- package/esm2015/components/radio/radio.component.js +2 -2
- package/esm2015/components/select/select.component.js +2 -2
- package/esm2015/components/slider/slider.component.js +1 -1
- package/esm2015/components/text-area/text-area.component.js +3 -3
- package/esm2015/components/toggle/toggle.component.js +3 -3
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +26 -2
- package/esm5/abstract/input-slider.js +9 -11
- package/esm5/components/accordion/accordion-item/accordion-item.component.js +1 -1
- package/esm5/components/checkbox/checkbox.component.js +3 -3
- package/esm5/components/input-files/input-files.component.js +9 -1
- package/esm5/components/input-number/input-number.component.js +18 -12
- package/esm5/components/input-number/input-number.module.js +5 -1
- package/esm5/components/input-range/input-range.component.js +14 -4
- package/esm5/components/input-slider/input-slider.component.js +153 -117
- package/esm5/components/input-slider/input-slider.module.js +5 -2
- package/esm5/components/input-tag/input-tag.component.js +1 -1
- package/esm5/components/radio/radio.component.js +2 -2
- package/esm5/components/select/select.component.js +2 -2
- package/esm5/components/slider/slider.component.js +1 -1
- package/esm5/components/text-area/text-area.component.js +3 -3
- package/esm5/components/toggle/toggle.component.js +3 -3
- package/esm5/internal/primitive-calendar-range/primitive-calendar-range.component.js +26 -2
- package/fesm2015/taiga-ui-kit-abstract.js +8 -6
- package/fesm2015/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-accordion.js +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +2 -2
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +4 -0
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +24 -15
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +8 -2
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +156 -107
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +2 -2
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +25 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-abstract.js +8 -10
- package/fesm5/taiga-ui-kit-abstract.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-accordion.js +1 -1
- package/fesm5/taiga-ui-kit-components-checkbox.js +2 -2
- package/fesm5/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-files.js +8 -0
- package/fesm5/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-number.js +21 -12
- package/fesm5/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-range.js +12 -2
- package/fesm5/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-slider.js +154 -116
- package/fesm5/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-input-tag.js +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js +1 -1
- package/fesm5/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-select.js +1 -1
- package/fesm5/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-slider.js +1 -1
- package/fesm5/taiga-ui-kit-components-text-area.js +2 -2
- package/fesm5/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm5/taiga-ui-kit-components-toggle.js +2 -2
- package/fesm5/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js +25 -1
- package/fesm5/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/internal/primitive-calendar-range/primitive-calendar-range.component.d.ts +3 -0
- package/internal/primitive-calendar-range/taiga-ui-kit-internal-primitive-calendar-range.metadata.json +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-range/input-range.component.ts","ng://@taiga-ui/kit/components/input-range/input-range.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","TuiInputRangeComponent","control","changeDetectorRef","modeDirective","isMobile","numberFormat","appearance","_this","_super","call","this","__","constructor","prototype","create","__extends","nativeLeft","disabled","nativeElement","focusedLeft","focusedRight","isNativeFocused","nativeRight","minLabel","value","min","maxLabel","max","computedPureValueLeft","computedPureValueRight","onActiveZone","active","updateFocused","onMouseDown","setNativeFocused","onKeyDownArrowUpLeft","event","readOnly","preventDefault","processStep","onKeyDownArrowDownLeft","onKeyDownArrowUpRight","onKeyDownArrowDownRight","onInputLeft","inputValueLeft","capped","capInputValue","postfix","slice","maskedMoneyValueIsEmpty","newValue","formatNumber","updateValue","onInputRight","inputValueRight","onRangeValue","guardedValue","map","item","valueGuard","element","onLeftFocused","focused","inputValue","maskedNumberStringToNumber","computedValueLeft","decimalSeparator","thousandSeparator","isNaN","onRightFocused","computedValueRight","Math","getFallbackValue","increment","right","start","step","end","NgControl","type","Optional","Self","Inject","args","ChangeDetectorRef","TuiModeDirective","TUI_IS_MOBILE","TUI_NUMBER_FORMAT","TUI_TEXTFIELD_APPEARANCE","ViewChild","HostBinding","tuiPure","TuiInputRangeComponent_1","Component","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","providers","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","AbstractTuiInputSlider","TuiInputRangeModule","NgModule","imports","CommonModule","FormsModule","ReactiveFormsModule","TextMaskModule","TuiFocusableModule","TuiFocusedModule","TuiHoveredModule","Tui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,iBACAC,EAAAA,iBACAC,EAAAA,oBACAC,EAAAA,mBACAC,EAAAA,oBACAC,EAAAA,eACAC,EAAAA,kBAEJC,aAAc,CAACzH,GACf0H,QAAS,CAAC1H,MAEDyG","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n NumberFormatSettings,\n TUI_NUMBER_FORMAT,\n TUI_TEXTFIELD_APPEARANCE,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-range',\n templateUrl: './input-range.template.html',\n styleUrls: ['./input-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputRangeComponent),\n },\n ],\n})\nexport class TuiInputRangeComponent\n extends AbstractTuiInputSlider<[number, number]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('nativeLeft')\n private readonly nativeLeft?: ElementRef<HTMLInputElement>;\n\n @ViewChild('nativeRight')\n private readonly nativeRight?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_IS_MOBILE)\n private readonly isMobile: boolean,\n @Inject(TUI_NUMBER_FORMAT)\n protected readonly numberFormat: NumberFormatSettings,\n @Inject(TUI_TEXTFIELD_APPEARANCE)\n readonly appearance: string,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.nativeLeft || this.disabled ? null : this.nativeLeft.nativeElement;\n }\n\n get focused(): boolean {\n return this.focusedLeft || this.focusedRight;\n }\n\n get focusedLeft(): boolean {\n return !!this.nativeLeft && isNativeFocused(this.nativeLeft.nativeElement);\n }\n\n get focusedRight(): boolean {\n return !!this.nativeRight && isNativeFocused(this.nativeRight.nativeElement);\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focusedLeft && !!this.minLabel && this.value[0] === this.min;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focusedRight && !!this.maxLabel && this.value[1] === this.max;\n }\n\n get inputValueLeft(): string {\n return this.nativeLeft ? this.nativeLeft.nativeElement.value : '';\n }\n\n get inputValueRight(): string {\n return this.nativeRight ? this.nativeRight.nativeElement.value : '';\n }\n\n get computedValueLeft(): string {\n return this.computedPureValueLeft(this.value[0]);\n }\n\n get computedValueRight(): string {\n return this.computedPureValueRight(this.value[1]);\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onMouseDown() {\n if (this.nativeRight && !this.isMobile) {\n setNativeFocused(this.nativeRight.nativeElement);\n }\n }\n\n onKeyDownArrowUpLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, false);\n }\n\n onKeyDownArrowDownLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, false);\n }\n\n onKeyDownArrowUpRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, true);\n }\n\n onKeyDownArrowDownRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, true);\n }\n\n onInputLeft() {\n const value = this.inputValueLeft;\n const capped = this.capInputValue(value, this.value[1]);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeLeft && this.inputValueLeft !== newValue) {\n this.nativeLeft.nativeElement.value = newValue;\n }\n\n this.updateValue([capped, this.value[1]]);\n }\n\n onInputRight() {\n const value = this.inputValueRight;\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeRight && this.inputValueRight !== newValue) {\n this.nativeRight.nativeElement.value = newValue;\n }\n\n if (capped >= this.value[0]) {\n this.updateValue([this.value[0], capped]);\n }\n }\n\n onRangeValue(value: [number, number]) {\n const guardedValue = value.map(item => this.valueGuard(item)) as [number, number];\n\n if (\n !this.nativeLeft ||\n !this.nativeRight ||\n (guardedValue[0] === this.value[0] && guardedValue[1] === this.value[1])\n ) {\n return;\n }\n\n if (!this.isMobile) {\n const element =\n guardedValue[0] !== this.value[0]\n ? this.nativeLeft.nativeElement\n : this.nativeRight.nativeElement;\n\n setNativeFocused(element);\n }\n\n this.updateValue(guardedValue);\n this.nativeLeft.nativeElement.value = this.formatNumber(guardedValue[0]);\n }\n\n onLeftFocused(focused: boolean) {\n if (focused || !this.nativeLeft) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueLeft,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.nativeLeft.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[0]) {\n this.updateValue([value, this.value[1]]);\n }\n }\n\n onRightFocused(focused: boolean) {\n if (focused || !this.nativeRight) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueRight,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n\n const value = isNaN(inputValue)\n ? this.value[0]\n : this.valueGuard(Math.max(inputValue, this.value[0]));\n\n this.nativeRight.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[1]) {\n this.updateValue([this.value[0], value]);\n }\n }\n\n protected getFallbackValue(): [number, number] {\n return [0, 0];\n }\n\n @tuiPure\n private computedPureValueLeft(value: number) {\n return this.formatNumber(value);\n }\n\n @tuiPure\n private computedPureValueRight(value: number) {\n return this.formatNumber(value);\n }\n\n private formatNumber(value: number): string {\n return formatNumber(\n value,\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n\n private processStep(increment: boolean, right: boolean) {\n const start = this.valueGuard(\n increment ? this.value[0] + this.step : this.value[0] - this.step,\n );\n const end = this.valueGuard(\n increment ? this.value[1] + this.step : this.value[1] - this.step,\n );\n const value: [number, number] = [\n right ? this.value[0] : Math.min(start, this.value[1]),\n right ? Math.max(end, this.value[0]) : this.value[1],\n ];\n\n if (value[0] !== this.value[0] || value[1] !== this.value[1]) {\n this.updateValue(value);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRangeModule} from '@taiga-ui/kit/components/range';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputRangeComponent} from './input-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiActiveZoneModule,\n TuiRangeModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputRangeComponent],\n exports: [TuiInputRangeComponent],\n})\nexport class TuiInputRangeModule {}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://@taiga-ui/kit/components/input-range/input-range.component.ts","ng://@taiga-ui/kit/components/input-range/input-range.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","TuiInputRangeComponent","control","changeDetectorRef","modeDirective","isMobile","numberFormat","appearance","_this","_super","call","this","__","constructor","prototype","create","__extends","nativeLeft","disabled","nativeElement","focusedLeft","focusedRight","isNativeFocused","nativeRight","minLabel","value","min","maxLabel","max","mode","computedPureValueLeft","computedPureValueRight","onActiveZone","active","updateFocused","onMouseDown","setNativeFocused","onKeyDownArrowUpLeft","event","readOnly","preventDefault","processStep","onKeyDownArrowDownLeft","onKeyDownArrowUpRight","onKeyDownArrowDownRight","onInputLeft","inputValueLeft","capped","capInputValue","postfix","slice","maskedMoneyValueIsEmpty","newValue","formatNumber","updateValue","onInputRight","inputValueRight","onRangeValue","guardedValue","map","item","valueGuard","element","onLeftFocused","focused","inputValue","maskedNumberStringToNumber","computedValueLeft","decimalSeparator","thousandSeparator","isNaN","onRightFocused","computedValueRight","Math","getFallbackValue","increment","right","start","step","end","NgControl","type","Optional","Self","Inject","args","ChangeDetectorRef","TuiModeDirective","TUI_IS_MOBILE","TUI_NUMBER_FORMAT","TUI_TEXTFIELD_APPEARANCE","ViewChild","HostBinding","tuiPure","TuiInputRangeComponent_1","Component","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","providers","provide","TUI_FOCUSABLE_ITEM_ACCESSOR","useExisting","forwardRef","AbstractTuiInputSlider","TuiInputRangeModule","NgModule","imports","CommonModule","FormsModule","ReactiveFormsModule","TextMaskModule","TuiFocusableModule","TuiFocusedModule","TuiHoveredModule","TuiPressedModule","TuiMapperPipeModule","TuiInputModeModule","TuiActiveZoneModule","TuiRangeModule","TuiWrapperModule","declarations","exports"],"mappings":";;;;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,eACAC,EAAAA,mBACAC,EAAAA,iBACAC,EAAAA,iBACAC,EAAAA,iBACAC,EAAAA,oBACAC,EAAAA,mBACAC,EAAAA,oBACAC,EAAAA,eACAC,EAAAA,kBAEJC,aAAc,CAAC1H,GACf2H,QAAS,CAAC3H,MAED0G","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Inject,\n Optional,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {\n isNativeFocused,\n setNativeFocused,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_IS_MOBILE,\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {\n formatNumber,\n maskedMoneyValueIsEmpty,\n maskedNumberStringToNumber,\n NumberFormatSettings,\n TUI_NUMBER_FORMAT,\n TUI_TEXTFIELD_APPEARANCE,\n TuiBrightness,\n TuiModeDirective,\n} from '@taiga-ui/core';\nimport {AbstractTuiInputSlider} from '@taiga-ui/kit/abstract';\n\n// @dynamic\n@Component({\n selector: 'tui-input-range',\n templateUrl: './input-range.template.html',\n styleUrls: ['./input-range.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiInputRangeComponent),\n },\n ],\n})\nexport class TuiInputRangeComponent\n extends AbstractTuiInputSlider<[number, number]>\n implements TuiFocusableElementAccessor\n{\n @ViewChild('nativeLeft')\n private readonly nativeLeft?: ElementRef<HTMLInputElement>;\n\n @ViewChild('nativeRight')\n private readonly nativeRight?: ElementRef<HTMLInputElement>;\n\n constructor(\n @Optional()\n @Self()\n @Inject(NgControl)\n control: NgControl | null,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Optional()\n @Inject(TuiModeDirective)\n protected readonly modeDirective: TuiModeDirective | null,\n @Inject(TUI_IS_MOBILE)\n private readonly isMobile: boolean,\n @Inject(TUI_NUMBER_FORMAT)\n protected readonly numberFormat: NumberFormatSettings,\n @Inject(TUI_TEXTFIELD_APPEARANCE)\n readonly appearance: string,\n ) {\n super(control, changeDetectorRef);\n }\n\n get nativeFocusableElement(): TuiNativeFocusableElement | null {\n return !this.nativeLeft || this.disabled ? null : this.nativeLeft.nativeElement;\n }\n\n get focused(): boolean {\n return this.focusedLeft || this.focusedRight;\n }\n\n get focusedLeft(): boolean {\n return !!this.nativeLeft && isNativeFocused(this.nativeLeft.nativeElement);\n }\n\n get focusedRight(): boolean {\n return !!this.nativeRight && isNativeFocused(this.nativeRight.nativeElement);\n }\n\n @HostBinding('class._min-label')\n get showMinLabel(): boolean {\n return !this.focusedLeft && !!this.minLabel && this.value[0] === this.min;\n }\n\n @HostBinding('class._max-label')\n get showMaxLabel(): boolean {\n return !this.focusedRight && !!this.maxLabel && this.value[1] === this.max;\n }\n\n @HostBinding('attr.data-mode')\n get hostMode(): TuiBrightness | null {\n return this.modeDirective && this.modeDirective.mode;\n }\n\n get inputValueLeft(): string {\n return this.nativeLeft ? this.nativeLeft.nativeElement.value : '';\n }\n\n get inputValueRight(): string {\n return this.nativeRight ? this.nativeRight.nativeElement.value : '';\n }\n\n get computedValueLeft(): string {\n return this.computedPureValueLeft(this.value[0]);\n }\n\n get computedValueRight(): string {\n return this.computedPureValueRight(this.value[1]);\n }\n\n onActiveZone(active: boolean) {\n this.updateFocused(active);\n }\n\n onMouseDown() {\n if (this.nativeRight && !this.isMobile) {\n setNativeFocused(this.nativeRight.nativeElement);\n }\n }\n\n onKeyDownArrowUpLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, false);\n }\n\n onKeyDownArrowDownLeft(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, false);\n }\n\n onKeyDownArrowUpRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(true, true);\n }\n\n onKeyDownArrowDownRight(event: KeyboardEvent) {\n if (this.readOnly) {\n return;\n }\n\n event.preventDefault();\n this.processStep(false, true);\n }\n\n onInputLeft() {\n const value = this.inputValueLeft;\n const capped = this.capInputValue(value, this.value[1]);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeLeft && this.inputValueLeft !== newValue) {\n this.nativeLeft.nativeElement.value = newValue;\n }\n\n this.updateValue([capped, this.value[1]]);\n }\n\n onInputRight() {\n const value = this.inputValueRight;\n const capped = this.capInputValue(value);\n const postfix = value.slice(-1)[0] === ',' ? ',' : '';\n\n if (maskedMoneyValueIsEmpty(value) || capped === null) {\n return;\n }\n\n const newValue = this.formatNumber(capped) + postfix;\n\n if (this.nativeRight && this.inputValueRight !== newValue) {\n this.nativeRight.nativeElement.value = newValue;\n }\n\n if (capped >= this.value[0]) {\n this.updateValue([this.value[0], capped]);\n }\n }\n\n onRangeValue(value: [number, number]) {\n const guardedValue = value.map(item => this.valueGuard(item)) as [number, number];\n\n if (\n !this.nativeLeft ||\n !this.nativeRight ||\n (guardedValue[0] === this.value[0] && guardedValue[1] === this.value[1])\n ) {\n return;\n }\n\n if (!this.isMobile) {\n const element =\n guardedValue[0] !== this.value[0]\n ? this.nativeLeft.nativeElement\n : this.nativeRight.nativeElement;\n\n setNativeFocused(element);\n }\n\n this.updateValue(guardedValue);\n this.nativeLeft.nativeElement.value = this.formatNumber(guardedValue[0]);\n }\n\n onLeftFocused(focused: boolean) {\n if (focused || !this.nativeLeft) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueLeft,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n const value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);\n\n this.nativeLeft.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[0]) {\n this.updateValue([value, this.value[1]]);\n }\n }\n\n onRightFocused(focused: boolean) {\n if (focused || !this.nativeRight) {\n return;\n }\n\n const inputValue = maskedNumberStringToNumber(\n this.computedValueRight,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n\n const value = isNaN(inputValue)\n ? this.value[0]\n : this.valueGuard(Math.max(inputValue, this.value[0]));\n\n this.nativeRight.nativeElement.value = this.formatNumber(value);\n\n if (value !== this.value[1]) {\n this.updateValue([this.value[0], value]);\n }\n }\n\n protected getFallbackValue(): [number, number] {\n return [0, 0];\n }\n\n @tuiPure\n private computedPureValueLeft(value: number) {\n return this.formatNumber(value);\n }\n\n @tuiPure\n private computedPureValueRight(value: number) {\n return this.formatNumber(value);\n }\n\n private formatNumber(value: number): string {\n return formatNumber(\n value,\n null,\n this.numberFormat.decimalSeparator,\n this.numberFormat.thousandSeparator,\n );\n }\n\n private processStep(increment: boolean, right: boolean) {\n const start = this.valueGuard(\n increment ? this.value[0] + this.step : this.value[0] - this.step,\n );\n const end = this.valueGuard(\n increment ? this.value[1] + this.step : this.value[1] - this.step,\n );\n const value: [number, number] = [\n right ? this.value[0] : Math.min(start, this.value[1]),\n right ? Math.max(end, this.value[0]) : this.value[1],\n ];\n\n if (value[0] !== this.value[0] || value[1] !== this.value[1]) {\n this.updateValue(value);\n }\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n TuiActiveZoneModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiInputModeModule,\n TuiMapperPipeModule,\n TuiPressedModule,\n} from '@taiga-ui/cdk';\nimport {TuiWrapperModule} from '@taiga-ui/core';\nimport {TuiRangeModule} from '@taiga-ui/kit/components/range';\nimport {TextMaskModule} from 'angular2-text-mask';\n\nimport {TuiInputRangeComponent} from './input-range.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n TextMaskModule,\n TuiFocusableModule,\n TuiFocusedModule,\n TuiHoveredModule,\n TuiPressedModule,\n TuiMapperPipeModule,\n TuiInputModeModule,\n TuiActiveZoneModule,\n TuiRangeModule,\n TuiWrapperModule,\n ],\n declarations: [TuiInputRangeComponent],\n exports: [TuiInputRangeComponent],\n})\nexport class TuiInputRangeModule {}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/abstract'), require('@taiga-ui/kit/components/slider'), require('@taiga-ui/kit/tokens'), require('rxjs'), require('@angular/common'), require('@tinkoff/ng-polymorpheus'), require('angular2-text-mask')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-slider', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/abstract', '@taiga-ui/kit/components/slider', '@taiga-ui/kit/tokens', 'rxjs', '@angular/common', '@tinkoff/ng-polymorpheus', 'angular2-text-mask'], factory) :
|
|
4
|
-
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].kit = global['taiga-ui'].kit || {}, global['taiga-ui'].kit.components = global['taiga-ui'].kit.components || {}, global['taiga-ui'].kit.components['input-slider'] = {}), global.ng.core, global.ng.forms, global.cdk, global.core$1, global['taiga-ui'].kit.abstract, global['taiga-ui'].kit.components.slider, global['taiga-ui'].kit.tokens, global.rxjs, global.ng.common, global.ngPolymorpheus, global.angular2TextMask));
|
|
5
|
-
}(this, (function (exports, core, forms, cdk, core$1, abstract, slider, tokens, rxjs, common, ngPolymorpheus, angular2TextMask) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/abstract'), require('@taiga-ui/kit/components/input-number'), require('@taiga-ui/kit/components/slider'), require('@taiga-ui/kit/constants'), require('@taiga-ui/kit/tokens'), require('rxjs'), require('@angular/common'), require('@tinkoff/ng-polymorpheus'), require('angular2-text-mask')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-slider', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/abstract', '@taiga-ui/kit/components/input-number', '@taiga-ui/kit/components/slider', '@taiga-ui/kit/constants', '@taiga-ui/kit/tokens', 'rxjs', '@angular/common', '@tinkoff/ng-polymorpheus', 'angular2-text-mask'], factory) :
|
|
4
|
+
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].kit = global['taiga-ui'].kit || {}, global['taiga-ui'].kit.components = global['taiga-ui'].kit.components || {}, global['taiga-ui'].kit.components['input-slider'] = {}), global.ng.core, global.ng.forms, global.cdk, global.core$1, global['taiga-ui'].kit.abstract, global['taiga-ui'].kit.components['input-number'], global['taiga-ui'].kit.components.slider, global['taiga-ui'].kit.constants, global['taiga-ui'].kit.tokens, global.rxjs, global.ng.common, global.ngPolymorpheus, global.angular2TextMask));
|
|
5
|
+
}(this, (function (exports, core, forms, cdk, core$1, abstract, inputNumber, slider, constants, tokens, rxjs, common, ngPolymorpheus, angular2TextMask) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -241,15 +241,26 @@
|
|
|
241
241
|
// @dynamic
|
|
242
242
|
var TuiInputSliderComponent = /** @class */ (function (_super) {
|
|
243
243
|
__extends(TuiInputSliderComponent, _super);
|
|
244
|
-
function TuiInputSliderComponent(control, changeDetectorRef,
|
|
244
|
+
function TuiInputSliderComponent(control, changeDetectorRef, controller, numberFormat, fromToTexts$, isNew) {
|
|
245
245
|
var _this = _super.call(this, control, changeDetectorRef) || this;
|
|
246
|
-
_this.modeDirective = modeDirective;
|
|
247
|
-
_this.hintController = hintController;
|
|
248
246
|
_this.controller = controller;
|
|
249
247
|
_this.numberFormat = numberFormat;
|
|
250
|
-
_this.appearance = appearance;
|
|
251
248
|
_this.fromToTexts$ = fromToTexts$;
|
|
252
249
|
_this.isNew = isNew;
|
|
250
|
+
_this.min = 0;
|
|
251
|
+
_this.max = Infinity;
|
|
252
|
+
_this.quantum = 1;
|
|
253
|
+
_this.steps = 0;
|
|
254
|
+
_this.segments = 0;
|
|
255
|
+
_this.keySteps = null;
|
|
256
|
+
_this.valueContent = '';
|
|
257
|
+
_this.prefix = '';
|
|
258
|
+
_this.postfix = '';
|
|
259
|
+
/**
|
|
260
|
+
* @deprecated use `tuiTextfieldSize` instead
|
|
261
|
+
* TODO delete in v3.0
|
|
262
|
+
*/
|
|
263
|
+
_this.size = 'l';
|
|
253
264
|
/**
|
|
254
265
|
* @deprecated use `tuiTextfieldCustomContent` instead
|
|
255
266
|
* TODO delete in v3.0
|
|
@@ -260,9 +271,10 @@
|
|
|
260
271
|
TuiInputSliderComponent_1 = TuiInputSliderComponent;
|
|
261
272
|
Object.defineProperty(TuiInputSliderComponent.prototype, "nativeFocusableElement", {
|
|
262
273
|
get: function () {
|
|
263
|
-
|
|
274
|
+
var _a;
|
|
275
|
+
return !((_a = this.inputNumberRef) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || this.computedDisabled
|
|
264
276
|
? null
|
|
265
|
-
: this.
|
|
277
|
+
: this.inputNumberRef.nativeFocusableElement;
|
|
266
278
|
},
|
|
267
279
|
enumerable: true,
|
|
268
280
|
configurable: true
|
|
@@ -276,170 +288,170 @@
|
|
|
276
288
|
enumerable: true,
|
|
277
289
|
configurable: true
|
|
278
290
|
});
|
|
279
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
291
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "computedSteps", {
|
|
280
292
|
get: function () {
|
|
281
|
-
return
|
|
293
|
+
return this.steps || (this.max - this.min) / this.quantum;
|
|
282
294
|
},
|
|
283
295
|
enumerable: true,
|
|
284
296
|
configurable: true
|
|
285
297
|
});
|
|
286
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
298
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "precision", {
|
|
287
299
|
get: function () {
|
|
288
|
-
return
|
|
300
|
+
return core$1.getFractionPartPadded(this.quantum).length;
|
|
289
301
|
},
|
|
290
302
|
enumerable: true,
|
|
291
303
|
configurable: true
|
|
292
304
|
});
|
|
293
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
305
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "decimal", {
|
|
294
306
|
get: function () {
|
|
295
|
-
return
|
|
307
|
+
return this.precision ? 'not-zero' : 'never';
|
|
296
308
|
},
|
|
297
309
|
enumerable: true,
|
|
298
310
|
configurable: true
|
|
299
311
|
});
|
|
300
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
312
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "computedSize", {
|
|
313
|
+
/**
|
|
314
|
+
* TODO remove old property `size` in v3.0
|
|
315
|
+
*/
|
|
301
316
|
get: function () {
|
|
302
|
-
if (this.
|
|
303
|
-
|
|
317
|
+
if (this.isNew) {
|
|
318
|
+
cdk.tuiAssert.assert(this.controller.size !== 's', "Size 's' is not supported by this input.");
|
|
319
|
+
return this.controller.size === 'l' ? 'l' : 'm';
|
|
304
320
|
}
|
|
305
|
-
return this.
|
|
306
|
-
},
|
|
307
|
-
enumerable: true,
|
|
308
|
-
configurable: true
|
|
309
|
-
});
|
|
310
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "showValue", {
|
|
311
|
-
get: function () {
|
|
312
|
-
return !this.showMinLabel && !this.showMaxLabel;
|
|
321
|
+
return this.size;
|
|
313
322
|
},
|
|
314
323
|
enumerable: true,
|
|
315
324
|
configurable: true
|
|
316
325
|
});
|
|
317
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
326
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "computedValueContent", {
|
|
327
|
+
/**
|
|
328
|
+
* @deprecated for backward compatibility
|
|
329
|
+
* TODO replace by just `this.valueContent` in v3.0
|
|
330
|
+
*/
|
|
318
331
|
get: function () {
|
|
319
|
-
return this.
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
if (this.focusableElement) {
|
|
323
|
-
this.focusableElement.nativeElement.value = value;
|
|
324
|
-
}
|
|
332
|
+
return this.minLabel || this.maxLabel
|
|
333
|
+
? legacyMinMaxLabel(this)
|
|
334
|
+
: this.valueContent;
|
|
325
335
|
},
|
|
326
336
|
enumerable: true,
|
|
327
337
|
configurable: true
|
|
328
338
|
});
|
|
329
339
|
TuiInputSliderComponent.prototype.focusTextInput = function () {
|
|
330
|
-
|
|
331
|
-
|
|
340
|
+
var _a;
|
|
341
|
+
var focusableElement = (_a = this.inputNumberRef) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement;
|
|
342
|
+
if (focusableElement) {
|
|
343
|
+
cdk.setNativeFocused(focusableElement);
|
|
332
344
|
}
|
|
333
345
|
};
|
|
334
|
-
TuiInputSliderComponent.prototype.
|
|
335
|
-
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
event.preventDefault();
|
|
339
|
-
this.processStep(true);
|
|
340
|
-
this.inputValue = this.formattedValue;
|
|
346
|
+
TuiInputSliderComponent.prototype.safelyUpdateValue = function (value) {
|
|
347
|
+
this.updateValue(this.valueGuard(value !== null && value !== void 0 ? value : this.safeCurrentValue));
|
|
341
348
|
};
|
|
342
|
-
TuiInputSliderComponent.prototype.
|
|
349
|
+
TuiInputSliderComponent.prototype.onVerticalArrowKeyDown = function (coefficient) {
|
|
343
350
|
if (this.readOnly) {
|
|
344
351
|
return;
|
|
345
352
|
}
|
|
346
|
-
|
|
347
|
-
this.
|
|
348
|
-
|
|
349
|
-
};
|
|
350
|
-
TuiInputSliderComponent.prototype.onFocused = function (focused) {
|
|
351
|
-
this.updateFocused(focused);
|
|
352
|
-
if (focused) {
|
|
353
|
-
return;
|
|
353
|
+
var value = this.value + coefficient * this.step;
|
|
354
|
+
if (value !== this.value) {
|
|
355
|
+
this.safelyUpdateValue(value);
|
|
354
356
|
}
|
|
355
|
-
|
|
356
|
-
var value = isNaN(inputValue) ? this.min : this.valueGuard(inputValue);
|
|
357
|
-
this.updateValue(value);
|
|
358
|
-
this.inputValue = this.formattedValue;
|
|
357
|
+
this.updateTextInputValue(this.valueGuard(value));
|
|
359
358
|
};
|
|
360
|
-
TuiInputSliderComponent.prototype.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
if (core$1.maskedMoneyValueIsEmpty(value) || capped === null) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
var newValue = this.formatNumber(capped) + postfix;
|
|
367
|
-
if (value !== newValue) {
|
|
368
|
-
this.inputValue = newValue;
|
|
359
|
+
TuiInputSliderComponent.prototype.onFocused = function (focused) {
|
|
360
|
+
if (!focused && !this.textInputValue) {
|
|
361
|
+
this.updateTextInputValue(this.safeCurrentValue);
|
|
369
362
|
}
|
|
370
|
-
this.
|
|
363
|
+
this.updateFocused(focused);
|
|
371
364
|
};
|
|
372
|
-
TuiInputSliderComponent.prototype.
|
|
373
|
-
this.
|
|
374
|
-
this.inputValue = this.formattedValue;
|
|
365
|
+
TuiInputSliderComponent.prototype.onPressed = function (pressed) {
|
|
366
|
+
this.updatePressed(pressed);
|
|
375
367
|
};
|
|
376
|
-
TuiInputSliderComponent.prototype.
|
|
377
|
-
|
|
368
|
+
TuiInputSliderComponent.prototype.onHovered = function (hovered) {
|
|
369
|
+
this.updateHovered(hovered);
|
|
378
370
|
};
|
|
379
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "
|
|
380
|
-
get: function () {
|
|
381
|
-
return this.formatNumber(this.value);
|
|
382
|
-
},
|
|
383
|
-
enumerable: true,
|
|
384
|
-
configurable: true
|
|
385
|
-
});
|
|
386
|
-
Object.defineProperty(TuiInputSliderComponent.prototype, "isInputValueNotFinished", {
|
|
371
|
+
Object.defineProperty(TuiInputSliderComponent.prototype, "textInputValue", {
|
|
387
372
|
get: function () {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
var nativeNumberValue = core$1.maskedNumberStringToNumber(this.inputValue, this.numberFormat.decimalSeparator, this.numberFormat.thousandSeparator);
|
|
392
|
-
return nativeNumberValue < 0
|
|
393
|
-
? nativeNumberValue > this.max
|
|
394
|
-
: nativeNumberValue < this.min;
|
|
373
|
+
var _a;
|
|
374
|
+
return ((_a = this.inputNumberRef) === null || _a === void 0 ? void 0 : _a.nativeValue) || '';
|
|
395
375
|
},
|
|
396
376
|
enumerable: true,
|
|
397
377
|
configurable: true
|
|
398
378
|
});
|
|
399
|
-
TuiInputSliderComponent.prototype.
|
|
400
|
-
|
|
401
|
-
if (value !== this.value) {
|
|
402
|
-
this.updateValue(value);
|
|
403
|
-
}
|
|
379
|
+
TuiInputSliderComponent.prototype.getFallbackValue = function () {
|
|
380
|
+
return 0;
|
|
404
381
|
};
|
|
405
|
-
TuiInputSliderComponent.prototype.
|
|
406
|
-
|
|
382
|
+
TuiInputSliderComponent.prototype.valueGuard = function (value) {
|
|
383
|
+
var roundedValue = cdk.round(Math.round(value / this.quantum) * this.quantum, constants.TUI_FLOATING_PRECISION);
|
|
384
|
+
return cdk.clamp(roundedValue, this.min, this.max);
|
|
385
|
+
};
|
|
386
|
+
TuiInputSliderComponent.prototype.updateTextInputValue = function (value) {
|
|
387
|
+
if (this.inputNumberRef) {
|
|
388
|
+
this.inputNumberRef.nativeValue =
|
|
389
|
+
this.inputNumberRef.getFormattedValue(value);
|
|
390
|
+
}
|
|
407
391
|
};
|
|
408
392
|
var TuiInputSliderComponent_1;
|
|
409
393
|
TuiInputSliderComponent.ctorParameters = function () { return [
|
|
410
394
|
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }, { type: core.Inject, args: [forms.NgControl,] }] },
|
|
411
395
|
{ type: core.ChangeDetectorRef, decorators: [{ type: core.Inject, args: [core.ChangeDetectorRef,] }] },
|
|
412
|
-
{ type: core$1.TuiModeDirective, decorators: [{ type: core.Optional }, { type: core.Inject, args: [core$1.TuiModeDirective,] }] },
|
|
413
|
-
{ type: core$1.TuiHintControllerDirective, decorators: [{ type: core.Inject, args: [core$1.TUI_HINT_WATCHED_CONTROLLER,] }] },
|
|
414
396
|
{ type: core$1.TuiTextfieldController, decorators: [{ type: core.Inject, args: [core$1.TUI_TEXTFIELD_WATCHED_CONTROLLER,] }] },
|
|
415
397
|
{ type: undefined, decorators: [{ type: core.Inject, args: [core$1.TUI_NUMBER_FORMAT,] }] },
|
|
416
|
-
{ type: String, decorators: [{ type: core.Inject, args: [core$1.TUI_TEXTFIELD_APPEARANCE,] }] },
|
|
417
398
|
{ type: rxjs.Observable, decorators: [{ type: core.Inject, args: [tokens.TUI_FROM_TO_TEXTS,] }] },
|
|
418
399
|
{ type: TuiNewInputSliderDirective, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TuiNewInputSliderDirective,] }] }
|
|
419
400
|
]; };
|
|
420
401
|
__decorate([
|
|
421
|
-
core.ViewChild(
|
|
422
|
-
], TuiInputSliderComponent.prototype, "
|
|
402
|
+
core.ViewChild(inputNumber.TuiInputNumberComponent)
|
|
403
|
+
], TuiInputSliderComponent.prototype, "inputNumberRef", void 0);
|
|
423
404
|
__decorate([
|
|
424
405
|
core.ViewChild(slider.TuiSliderComponent, { read: core.ElementRef })
|
|
425
406
|
], TuiInputSliderComponent.prototype, "sliderRef", void 0);
|
|
426
407
|
__decorate([
|
|
427
408
|
core.Input(),
|
|
428
409
|
cdk.tuiDefaultProp()
|
|
429
|
-
], TuiInputSliderComponent.prototype, "
|
|
410
|
+
], TuiInputSliderComponent.prototype, "min", void 0);
|
|
411
|
+
__decorate([
|
|
412
|
+
core.Input(),
|
|
413
|
+
cdk.tuiDefaultProp()
|
|
414
|
+
], TuiInputSliderComponent.prototype, "max", void 0);
|
|
415
|
+
__decorate([
|
|
416
|
+
core.Input(),
|
|
417
|
+
cdk.tuiDefaultProp(quantumAssertion, 'Quantum must be positive')
|
|
418
|
+
], TuiInputSliderComponent.prototype, "quantum", void 0);
|
|
419
|
+
__decorate([
|
|
420
|
+
core.Input(),
|
|
421
|
+
cdk.tuiDefaultProp()
|
|
422
|
+
], TuiInputSliderComponent.prototype, "steps", void 0);
|
|
430
423
|
__decorate([
|
|
431
|
-
core.
|
|
432
|
-
|
|
424
|
+
core.Input(),
|
|
425
|
+
cdk.tuiDefaultProp()
|
|
426
|
+
], TuiInputSliderComponent.prototype, "segments", void 0);
|
|
427
|
+
__decorate([
|
|
428
|
+
core.Input(),
|
|
429
|
+
cdk.tuiDefaultProp()
|
|
430
|
+
], TuiInputSliderComponent.prototype, "keySteps", void 0);
|
|
433
431
|
__decorate([
|
|
434
|
-
core.
|
|
435
|
-
|
|
432
|
+
core.Input(),
|
|
433
|
+
cdk.tuiDefaultProp()
|
|
434
|
+
], TuiInputSliderComponent.prototype, "valueContent", void 0);
|
|
436
435
|
__decorate([
|
|
437
|
-
core.
|
|
438
|
-
|
|
436
|
+
core.Input(),
|
|
437
|
+
cdk.tuiDefaultProp()
|
|
438
|
+
], TuiInputSliderComponent.prototype, "prefix", void 0);
|
|
439
|
+
__decorate([
|
|
440
|
+
core.Input(),
|
|
441
|
+
cdk.tuiDefaultProp()
|
|
442
|
+
], TuiInputSliderComponent.prototype, "postfix", void 0);
|
|
443
|
+
__decorate([
|
|
444
|
+
core.Input(),
|
|
445
|
+
cdk.tuiDefaultProp()
|
|
446
|
+
], TuiInputSliderComponent.prototype, "size", void 0);
|
|
447
|
+
__decorate([
|
|
448
|
+
core.Input(),
|
|
449
|
+
cdk.tuiDefaultProp()
|
|
450
|
+
], TuiInputSliderComponent.prototype, "secondary", void 0);
|
|
439
451
|
TuiInputSliderComponent = TuiInputSliderComponent_1 = __decorate([
|
|
440
452
|
core.Component({
|
|
441
453
|
selector: 'tui-input-slider',
|
|
442
|
-
template: "<tui-
|
|
454
|
+
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)=\"safelyUpdateValue($event)\"\n (click)=\"focusTextInput()\"\n />\n\n <!--TODO delete ticks labels in v3.0-->\n <div *ngIf=\"segments && !isNew\" class=\"t-ticks-labels\">\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",
|
|
443
455
|
host: {
|
|
444
456
|
/**
|
|
445
457
|
* TODO delete it in v3.0
|
|
@@ -457,24 +469,46 @@
|
|
|
457
469
|
core$1.HINT_CONTROLLER_PROVIDER,
|
|
458
470
|
core$1.TEXTFIELD_CONTROLLER_PROVIDER,
|
|
459
471
|
],
|
|
460
|
-
styles: [":host{position:relative;z-index:0;display:block
|
|
461
|
-
})
|
|
472
|
+
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)}"]
|
|
473
|
+
})
|
|
474
|
+
/**
|
|
475
|
+
* TODO replace `extends AbstractTuiInputSlider<number>` by `extends AbstractTuiControl<number> implements TuiWithOptionalMinMax<number>`
|
|
476
|
+
* in v3.0
|
|
477
|
+
*/
|
|
478
|
+
,
|
|
462
479
|
__param(0, core.Optional()),
|
|
463
480
|
__param(0, core.Self()),
|
|
464
481
|
__param(0, core.Inject(forms.NgControl)),
|
|
465
482
|
__param(1, core.Inject(core.ChangeDetectorRef)),
|
|
466
|
-
__param(2, core.
|
|
467
|
-
__param(
|
|
468
|
-
__param(
|
|
469
|
-
__param(
|
|
470
|
-
__param(5, core.Inject(
|
|
471
|
-
__param(6, core.Inject(core$1.TUI_TEXTFIELD_APPEARANCE)),
|
|
472
|
-
__param(7, core.Inject(tokens.TUI_FROM_TO_TEXTS)),
|
|
473
|
-
__param(8, core.Optional()),
|
|
474
|
-
__param(8, core.Inject(TuiNewInputSliderDirective))
|
|
483
|
+
__param(2, core.Inject(core$1.TUI_TEXTFIELD_WATCHED_CONTROLLER)),
|
|
484
|
+
__param(3, core.Inject(core$1.TUI_NUMBER_FORMAT)),
|
|
485
|
+
__param(4, core.Inject(tokens.TUI_FROM_TO_TEXTS)),
|
|
486
|
+
__param(5, core.Optional()),
|
|
487
|
+
__param(5, core.Inject(TuiNewInputSliderDirective))
|
|
475
488
|
], TuiInputSliderComponent);
|
|
476
489
|
return TuiInputSliderComponent;
|
|
477
490
|
}(abstract.AbstractTuiInputSlider));
|
|
491
|
+
function quantumAssertion(quantum) {
|
|
492
|
+
return quantum > 0;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @deprecated helper for backward compatibility.
|
|
496
|
+
* TODO remove in v3.0
|
|
497
|
+
*/
|
|
498
|
+
function legacyMinMaxLabel(_a) {
|
|
499
|
+
var min = _a.min, max = _a.max, minLabel = _a.minLabel, maxLabel = _a.maxLabel;
|
|
500
|
+
return function (_a) {
|
|
501
|
+
var value = _a.$implicit;
|
|
502
|
+
switch (value) {
|
|
503
|
+
case min:
|
|
504
|
+
return minLabel || value;
|
|
505
|
+
case max:
|
|
506
|
+
return maxLabel || value;
|
|
507
|
+
default:
|
|
508
|
+
return value;
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
}
|
|
478
512
|
|
|
479
513
|
var TuiInputSliderModule = /** @class */ (function () {
|
|
480
514
|
function TuiInputSliderModule() {
|
|
@@ -498,6 +532,8 @@
|
|
|
498
532
|
core$1.TuiFormatNumberPipeModule,
|
|
499
533
|
cdk.TuiRepeatTimesModule,
|
|
500
534
|
ngPolymorpheus.PolymorpheusModule,
|
|
535
|
+
inputNumber.TuiInputNumberModule,
|
|
536
|
+
core$1.TuiTextfieldControllerModule,
|
|
501
537
|
],
|
|
502
538
|
declarations: [TuiInputSliderComponent, TuiNewInputSliderDirective],
|
|
503
539
|
exports: [TuiInputSliderComponent, TuiNewInputSliderDirective],
|