@progress/kendo-react-inputs 5.4.0-dev.202206061009 → 5.4.0-dev.202206131814

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.
@@ -60,7 +60,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
60
60
  var result = false;
61
61
  for (var prop in state) {
62
62
  if (state.hasOwnProperty(prop)) {
63
- result = result || state[prop];
63
+ result = result || Boolean(state[prop]);
64
64
  }
65
65
  }
66
66
  return result;
@@ -14,7 +14,7 @@ export declare class Parser {
14
14
  /**
15
15
  * @hidden
16
16
  */
17
- export declare const mask: ({ prompt, promptPlaceholder }: {
17
+ export declare const mask: (args: {
18
18
  prompt: any;
19
19
  promptPlaceholder: any;
20
20
  }) => (rule: any) => Parser;
@@ -37,7 +37,7 @@ export declare const token: (rules: any, creator: any) => Parser;
37
37
  /**
38
38
  * @hidden
39
39
  */
40
- export declare const rawMask: ({ prompt, promptPlaceholder }: {
40
+ export declare const rawMask: (args: {
41
41
  prompt: any;
42
42
  promptPlaceholder: any;
43
43
  }) => Parser;
@@ -37,29 +37,27 @@ export { Parser };
37
37
  /**
38
38
  * @hidden
39
39
  */
40
- export var mask = function (_a) {
41
- var prompt = _a.prompt, promptPlaceholder = _a.promptPlaceholder;
42
- return function (rule) { return new Parser(function (stream) {
43
- while (!stream.eof()) {
44
- var _a = stream.peek(), char = _a.char, control = _a.control;
45
- if (char === control && control === prompt) {
46
- stream.eat();
47
- return new Result(prompt, stream, ResultType.Mask);
48
- }
49
- if (rule.test(char)) {
50
- stream.eat();
51
- return new Result(char, stream, ResultType.Mask);
52
- }
53
- if (char === promptPlaceholder) {
54
- stream.eat();
55
- return new Result(prompt, stream, ResultType.Mask);
56
- }
57
- stream.eat_input();
40
+ export var mask = function (args) { return function (rule) { return new Parser(function (stream) {
41
+ var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
42
+ while (!stream.eof()) {
43
+ var _a = stream.peek(), char = _a.char, control = _a.control;
44
+ if (char === control && control === prompt) {
45
+ stream.eat();
46
+ return new Result(prompt, stream, ResultType.Mask);
58
47
  }
59
- stream.eat();
60
- return new Result(prompt, stream, ResultType.Mask);
61
- }); };
62
- };
48
+ if (rule.test(char)) {
49
+ stream.eat();
50
+ return new Result(char, stream, ResultType.Mask);
51
+ }
52
+ if (char === promptPlaceholder) {
53
+ stream.eat();
54
+ return new Result(prompt, stream, ResultType.Mask);
55
+ }
56
+ stream.eat_input();
57
+ }
58
+ stream.eat();
59
+ return new Result(prompt, stream, ResultType.Mask);
60
+ }); }; };
63
61
  /**
64
62
  * @hidden
65
63
  */
@@ -132,16 +130,14 @@ export var token = function (rules, creator) { return new Parser(function (strea
132
130
  /**
133
131
  * @hidden
134
132
  */
135
- export var rawMask = function (_a) {
136
- var prompt = _a.prompt, promptPlaceholder = _a.promptPlaceholder;
137
- return new Parser(function (stream) {
138
- var char = stream.next().char;
139
- if (char === prompt) {
140
- return new Result(promptPlaceholder, stream);
141
- }
142
- return new Result(char, stream);
143
- });
144
- };
133
+ export var rawMask = function (args) { return new Parser(function (stream) {
134
+ var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
135
+ var char = stream.next().char;
136
+ if (char === prompt) {
137
+ return new Result(promptPlaceholder, stream);
138
+ }
139
+ return new Result(char, stream);
140
+ }); };
145
141
  /**
146
142
  * @hidden
147
143
  */
@@ -35,7 +35,7 @@ export declare const decreaseValue: (value: any, newState: any, step: any, min:
35
35
  /**
36
36
  * @hidden
37
37
  */
38
- export declare const rangeValue: (value: number | null, min: any, max: any) => number | null;
38
+ export declare const rangeValue: (value: number | null, min?: number, max?: number) => number | null;
39
39
  /**
40
40
  * @hidden
41
41
  */
@@ -350,7 +350,7 @@ export var sanitizeNumber = function (state, format, intlService) {
350
350
  var formatInfo = [positiveInfo, negativeInfo, zeroInfo, oneInfo];
351
351
  var isFormatContainPrefixSuffix = formatInfo.findIndex(function (info) { return info.findIndex(function (nestedInfo) { return Boolean(nestedInfo); }) !== -1; }) !== 1;
352
352
  var isDelete = currentLooseValueAsString.length > 0 && currentLooseValueAsString.length < prevLooseValueAsString.length;
353
- var isPercentFormat = format &&
353
+ var isPercentFormat = typeof format === 'string' &&
354
354
  format[0] === 'p' &&
355
355
  currentLooseValueAsString &&
356
356
  currentLooseValueAsString.indexOf(symbols.percentSign) === -1;
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-inputs',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1654509130,
8
+ publishDate: 1655143029,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -23,8 +23,9 @@ export var SliderLabel = function (props) {
23
23
  var sliderLabelRef = React.useRef(null);
24
24
  var dir = useDir(sliderLabelRef);
25
25
  var style = props.vertical
26
- ? { bottom: "".concat(props.position, "%"), height: '1px', width: '100%' }
27
- : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a.width = '1px', _a.height = '-webkit-fill-available', _a);
28
- return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large", title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
26
+ ? { bottom: "".concat(props.position, "%") }
27
+ : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a);
28
+ var tickStyle = props.vertical ? 'k-tick-vertical' : 'k-tick-horizontal';
29
+ return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
29
30
  React.createElement("span", __assign({}, (_b = {}, _b[SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
30
31
  };
@@ -63,7 +63,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
63
63
  var result = false;
64
64
  for (var prop in state) {
65
65
  if (state.hasOwnProperty(prop)) {
66
- result = result || state[prop];
66
+ result = result || Boolean(state[prop]);
67
67
  }
68
68
  }
69
69
  return result;
@@ -14,7 +14,7 @@ export declare class Parser {
14
14
  /**
15
15
  * @hidden
16
16
  */
17
- export declare const mask: ({ prompt, promptPlaceholder }: {
17
+ export declare const mask: (args: {
18
18
  prompt: any;
19
19
  promptPlaceholder: any;
20
20
  }) => (rule: any) => Parser;
@@ -37,7 +37,7 @@ export declare const token: (rules: any, creator: any) => Parser;
37
37
  /**
38
38
  * @hidden
39
39
  */
40
- export declare const rawMask: ({ prompt, promptPlaceholder }: {
40
+ export declare const rawMask: (args: {
41
41
  prompt: any;
42
42
  promptPlaceholder: any;
43
43
  }) => Parser;
@@ -40,29 +40,27 @@ exports.Parser = Parser;
40
40
  /**
41
41
  * @hidden
42
42
  */
43
- var mask = function (_a) {
44
- var prompt = _a.prompt, promptPlaceholder = _a.promptPlaceholder;
45
- return function (rule) { return new Parser(function (stream) {
46
- while (!stream.eof()) {
47
- var _a = stream.peek(), char = _a.char, control = _a.control;
48
- if (char === control && control === prompt) {
49
- stream.eat();
50
- return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
51
- }
52
- if (rule.test(char)) {
53
- stream.eat();
54
- return new result_1.Result(char, stream, result_1.ResultType.Mask);
55
- }
56
- if (char === promptPlaceholder) {
57
- stream.eat();
58
- return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
59
- }
60
- stream.eat_input();
43
+ var mask = function (args) { return function (rule) { return new Parser(function (stream) {
44
+ var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
45
+ while (!stream.eof()) {
46
+ var _a = stream.peek(), char = _a.char, control = _a.control;
47
+ if (char === control && control === prompt) {
48
+ stream.eat();
49
+ return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
61
50
  }
62
- stream.eat();
63
- return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
64
- }); };
65
- };
51
+ if (rule.test(char)) {
52
+ stream.eat();
53
+ return new result_1.Result(char, stream, result_1.ResultType.Mask);
54
+ }
55
+ if (char === promptPlaceholder) {
56
+ stream.eat();
57
+ return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
58
+ }
59
+ stream.eat_input();
60
+ }
61
+ stream.eat();
62
+ return new result_1.Result(prompt, stream, result_1.ResultType.Mask);
63
+ }); }; };
66
64
  exports.mask = mask;
67
65
  /**
68
66
  * @hidden
@@ -140,16 +138,14 @@ exports.token = token;
140
138
  /**
141
139
  * @hidden
142
140
  */
143
- var rawMask = function (_a) {
144
- var prompt = _a.prompt, promptPlaceholder = _a.promptPlaceholder;
145
- return new Parser(function (stream) {
146
- var char = stream.next().char;
147
- if (char === prompt) {
148
- return new result_1.Result(promptPlaceholder, stream);
149
- }
150
- return new result_1.Result(char, stream);
151
- });
152
- };
141
+ var rawMask = function (args) { return new Parser(function (stream) {
142
+ var prompt = args.prompt, promptPlaceholder = args.promptPlaceholder;
143
+ var char = stream.next().char;
144
+ if (char === prompt) {
145
+ return new result_1.Result(promptPlaceholder, stream);
146
+ }
147
+ return new result_1.Result(char, stream);
148
+ }); };
153
149
  exports.rawMask = rawMask;
154
150
  /**
155
151
  * @hidden
@@ -35,7 +35,7 @@ export declare const decreaseValue: (value: any, newState: any, step: any, min:
35
35
  /**
36
36
  * @hidden
37
37
  */
38
- export declare const rangeValue: (value: number | null, min: any, max: any) => number | null;
38
+ export declare const rangeValue: (value: number | null, min?: number, max?: number) => number | null;
39
39
  /**
40
40
  * @hidden
41
41
  */
@@ -380,7 +380,7 @@ var sanitizeNumber = function (state, format, intlService) {
380
380
  var formatInfo = [positiveInfo, negativeInfo, zeroInfo, oneInfo];
381
381
  var isFormatContainPrefixSuffix = formatInfo.findIndex(function (info) { return info.findIndex(function (nestedInfo) { return Boolean(nestedInfo); }) !== -1; }) !== 1;
382
382
  var isDelete = currentLooseValueAsString.length > 0 && currentLooseValueAsString.length < prevLooseValueAsString.length;
383
- var isPercentFormat = format &&
383
+ var isPercentFormat = typeof format === 'string' &&
384
384
  format[0] === 'p' &&
385
385
  currentLooseValueAsString &&
386
386
  currentLooseValueAsString.indexOf(symbols.percentSign) === -1;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-inputs',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1654509130,
11
+ publishDate: 1655143029,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
14
14
  };
@@ -26,9 +26,10 @@ var SliderLabel = function (props) {
26
26
  var sliderLabelRef = React.useRef(null);
27
27
  var dir = (0, kendo_react_common_1.useDir)(sliderLabelRef);
28
28
  var style = props.vertical
29
- ? { bottom: "".concat(props.position, "%"), height: '1px', width: '100%' }
30
- : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a.width = '1px', _a.height = '-webkit-fill-available', _a);
31
- return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large", title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
29
+ ? { bottom: "".concat(props.position, "%") }
30
+ : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a);
31
+ var tickStyle = props.vertical ? 'k-tick-vertical' : 'k-tick-horizontal';
32
+ return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
32
33
  React.createElement("span", __assign({}, (_b = {}, _b[exports.SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
33
34
  };
34
35
  exports.SliderLabel = SliderLabel;