@firedesktop/react-base 1.56.0 → 1.57.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.
@@ -21,4 +21,4 @@ function FileUtils() {
21
21
  };
22
22
  }
23
23
  export default FileUtils;
24
- //# sourceMappingURL=FileUtil.js.map
24
+ //# sourceMappingURL=FileUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUtils.js","sourceRoot":"","sources":["../../src/lib/utils/FileUtils.ts"],"names":[],"mappings":"AAAA,SAAS,SAAS;IACd,IAAM,SAAS,GAAG,UAAC,OAAO,EAAE,WAAgB,EAAE,SAAe;QAAjC,4BAAA,EAAA,gBAAgB;QAAE,0BAAA,EAAA,eAAe;QACzD,IAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,IAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE;YACtE,IAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;YAE/D,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACnC,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;aACxC;YAED,IAAM,SAAS,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;YAC9C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC9B;QAED,IAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO;QACH,SAAS,WAAA;KACZ,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare function UrlUtils(): {
2
+ validate: (url?: string) => boolean;
3
+ };
4
+ export default UrlUtils;
@@ -0,0 +1,16 @@
1
+ function UrlUtils() {
2
+ var validate = function (url) {
3
+ var pattern = new RegExp('^(https?:\\/\\/)?' +
4
+ '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' +
5
+ '((\\d{1,3}\\.){3}\\d{1,3}))' +
6
+ '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' +
7
+ '(\\?[;&a-z\\d%_.~+=-]*)?' +
8
+ '(\\#[-a-z\\d_]*)?$', 'i');
9
+ return !!pattern.test(url);
10
+ };
11
+ return {
12
+ validate: validate
13
+ };
14
+ }
15
+ export default UrlUtils;
16
+ //# sourceMappingURL=UrlUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrlUtils.js","sourceRoot":"","sources":["../../src/lib/utils/UrlUtils.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ;IACb,IAAM,QAAQ,GAAG,UAAC,GAAY;QAC1B,IAAI,OAAO,GAAG,IAAI,MAAM,CAAC,mBAAmB;YACxC,kDAAkD;YAClD,6BAA6B;YAC7B,iCAAiC;YACjC,0BAA0B;YAC1B,oBAAoB,EAAE,GAAG,CAAC,CAAC;QAC/B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,OAAO;QACH,QAAQ,UAAA;KACX,CAAC;AACN,CAAC;AAED,eAAe,QAAQ,CAAC"}
@@ -2,6 +2,7 @@ import * as Fetch from './fetch';
2
2
  import * as Configuration from './configuration';
3
3
  import CurrencyUtiles from './CurrencyUtiles';
4
4
  import DateUtils from './DateUtils';
5
- import FileUtils from './FileUtil';
5
+ import FileUtils from './FileUtils';
6
+ import UrlUtils from './UrlUtils';
6
7
  import * as Labels from './labels';
7
- export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
8
+ export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels, UrlUtils };
@@ -2,7 +2,8 @@ import * as Fetch from './fetch';
2
2
  import * as Configuration from './configuration';
3
3
  import CurrencyUtiles from './CurrencyUtiles';
4
4
  import DateUtils from './DateUtils';
5
- import FileUtils from './FileUtil';
5
+ import FileUtils from './FileUtils';
6
+ import UrlUtils from './UrlUtils';
6
7
  import * as Labels from './labels';
7
- export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
8
+ export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels, UrlUtils };
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firedesktop/react-base",
3
- "version": "1.56.0",
3
+ "version": "1.57.0",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "description": "This is the FireDesktop base package used to support every React Project in this Company.",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@babel/cli": "7.18.10",
15
- "@babel/core": "7.18.10",
15
+ "@babel/core": "7.18.13",
16
16
  "@babel/plugin-proposal-class-properties": "7.18.6",
17
17
  "@babel/plugin-transform-arrow-functions": "7.18.6",
18
18
  "@babel/preset-typescript": "7.18.6",
@@ -20,7 +20,7 @@
20
20
  "@testing-library/react": "13.3.0",
21
21
  "@testing-library/user-event": "14.4.3",
22
22
  "@types/jest": "28.1.7",
23
- "@types/node": "18.7.6",
23
+ "@types/node": "18.7.11",
24
24
  "@types/react": "18.0.17",
25
25
  "@types/react-dom": "18.0.6",
26
26
  "@types/react-redux": "7.1.24",
@@ -0,0 +1,17 @@
1
+ function UrlUtils() {
2
+ const validate = (url?: string) => {
3
+ var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
4
+ '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
5
+ '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
6
+ '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
7
+ '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
8
+ '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
9
+ return !!pattern.test(url);
10
+ };
11
+
12
+ return {
13
+ validate
14
+ };
15
+ }
16
+
17
+ export default UrlUtils;
@@ -2,7 +2,9 @@ import * as Fetch from './fetch';
2
2
  import * as Configuration from './configuration';
3
3
  import CurrencyUtiles from './CurrencyUtiles';
4
4
  import DateUtils from './DateUtils';
5
- import FileUtils from './FileUtil';
5
+ import FileUtils from './FileUtils';
6
+ import UrlUtils from './UrlUtils';
7
+
6
8
  import * as Labels from './labels';
7
9
 
8
- export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
10
+ export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels, UrlUtils };
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileUtil.js","sourceRoot":"","sources":["../../src/lib/utils/FileUtil.ts"],"names":[],"mappings":"AAAA,SAAS,SAAS;IACd,IAAM,SAAS,GAAG,UAAC,OAAO,EAAE,WAAgB,EAAE,SAAe;QAAjC,4BAAA,EAAA,gBAAgB;QAAE,0BAAA,EAAA,eAAe;QACzD,IAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,IAAM,UAAU,GAAG,EAAE,CAAC;QAEtB,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,IAAI,SAAS,EAAE;YACtE,IAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;YAE/D,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACnC,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;aACxC;YAED,IAAM,SAAS,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;YAC9C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC9B;QAED,IAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO;QACH,SAAS,WAAA;KACZ,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
File without changes
File without changes