@progress/kendo-pdfviewer-common 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,32 @@
1
- # Kendo UI for Angular
1
+ ## Professional Grade UI Components
2
2
 
3
- This package is part of the [Kendo UI for Angular](http://www.telerik.com/kendo-angular-ui/) suite.
3
+ This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/) and [KendoReact](https://www.telerik.com/kendo-react-ui/components/#react-components) suites.
4
4
 
5
5
  ## License
6
6
 
7
- This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI Complete**](http://www.telerik.com/purchase/license-agreement/kendo-ui-complete). If you do not own a commercial license, this file shall be governed by the trial license terms.
7
+ This is commercial software. To use it, you need to agree to the [**Telerik End User License Agreement for Kendo UI** (for Kendo UI for Angular)](http://www.telerik.com/purchase/license-agreement/kendo-ui) or to the [**End User License Agreement for Progress KendoReact** (for KendoReact)](https://www.telerik.com/purchase/license-agreement/progress-kendoreact). If you do not own a commercial license, this file shall be governed by the trial license terms.
8
8
 
9
9
  All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.
10
+
11
+ ## Kendo UI for Angular Resources and Feedback
12
+
13
+ - [Get Started](https://www.telerik.com/kendo-angular-ui/getting-started)
14
+ - [Component References](https://www.telerik.com/kendo-angular-ui/components)
15
+ - [Blogs](http://www.telerik.com/blogs/kendo-ui)
16
+ - [FAQ](https://www.telerik.com/kendo-angular-ui/components/faq/)
17
+ - [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
18
+ - [Feedback Portal](http://kendoui-feedback.telerik.com/forums/555517-kendo-ui-for-angular-2-feedback)
19
+ - [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
20
+
21
+ ## KendoReact Resources and Feedback
22
+
23
+ - [Get Started](https://www.telerik.com/kendo-react-ui/getting-started)
24
+ - [Component References](https://www.telerik.com/kendo-react-ui/components/#react-components)
25
+ - [Blogs](http://www.telerik.com/blogs/kendo-ui)
26
+ - [GitHub Issues](https://github.com/telerik/kendo-react/issues)
27
+ - [Feedback Portal](http://kendoui-feedback.telerik.com/forums/908425-kendo-ui-for-react-feedback)
28
+ - [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-react-ui)
29
+
30
+ *Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
31
+
32
+ *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
package/dist/es/search.js CHANGED
@@ -69,8 +69,12 @@ export class SearchService {
69
69
  matches: []
70
70
  });
71
71
  }
72
+ escapeRegExp(text) {
73
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
74
+ }
72
75
  search({ text, matchCase }) {
73
- let searchRegex = new RegExp(text, matchCase ? 'g' : 'ig');
76
+ let escapedText = this.escapeRegExp(text);
77
+ let searchRegex = new RegExp(escapedText, matchCase ? 'g' : 'ig');
74
78
  let match;
75
79
  if (this.shouldTransformText()) {
76
80
  this.transformTextForSearch();
@@ -78,7 +82,7 @@ export class SearchService {
78
82
  this.state.matches = [];
79
83
  this.state.activeMatchIndex = 0;
80
84
  this.removeIndicators();
81
- if (text === '') {
85
+ if (escapedText === '') {
82
86
  return [];
83
87
  }
84
88
  match = searchRegex.exec(this.state.text);
@@ -69,8 +69,12 @@ export class SearchService {
69
69
  matches: []
70
70
  });
71
71
  }
72
+ escapeRegExp(text) {
73
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
74
+ }
72
75
  search({ text, matchCase }) {
73
- let searchRegex = new RegExp(text, matchCase ? 'g' : 'ig');
76
+ let escapedText = this.escapeRegExp(text);
77
+ let searchRegex = new RegExp(escapedText, matchCase ? 'g' : 'ig');
74
78
  let match;
75
79
  if (this.shouldTransformText()) {
76
80
  this.transformTextForSearch();
@@ -78,7 +82,7 @@ export class SearchService {
78
82
  this.state.matches = [];
79
83
  this.state.activeMatchIndex = 0;
80
84
  this.removeIndicators();
81
- if (text === '') {
85
+ if (escapedText === '') {
82
86
  return [];
83
87
  }
84
88
  match = searchRegex.exec(this.state.text);
@@ -9,6 +9,7 @@ export declare class SearchService {
9
9
  extendOptions(options: any): void;
10
10
  setState(newState: any): void;
11
11
  resetState(): void;
12
+ escapeRegExp(text: string): string;
12
13
  search({ text, matchCase }: any): {
13
14
  startOffset: number;
14
15
  endOffset: number;
@@ -71,8 +71,12 @@ class SearchService {
71
71
  matches: []
72
72
  });
73
73
  }
74
+ escapeRegExp(text) {
75
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
76
+ }
74
77
  search({ text, matchCase }) {
75
- let searchRegex = new RegExp(text, matchCase ? 'g' : 'ig');
78
+ let escapedText = this.escapeRegExp(text);
79
+ let searchRegex = new RegExp(escapedText, matchCase ? 'g' : 'ig');
76
80
  let match;
77
81
  if (this.shouldTransformText()) {
78
82
  this.transformTextForSearch();
@@ -80,7 +84,7 @@ class SearchService {
80
84
  this.state.matches = [];
81
85
  this.state.activeMatchIndex = 0;
82
86
  this.removeIndicators();
83
- if (text === '') {
87
+ if (escapedText === '') {
84
88
  return [];
85
89
  }
86
90
  match = searchRegex.exec(this.state.text);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-pdfviewer-common",
3
3
  "description": "Kendo UI TypeScript package exporting functions for PDFViewer component",
4
- "version": "0.2.6",
4
+ "version": "0.2.7",
5
5
  "keywords": [
6
6
  "Kendo UI"
7
7
  ],