Showing
4 changed files
with
10 additions
and
3 deletions
... | ... | @@ -5073,8 +5073,7 @@ |
5073 | 5073 | "es6-promise": { |
5074 | 5074 | "version": "4.2.8", |
5075 | 5075 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", |
5076 | - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", | |
5077 | - "dev": true | |
5076 | + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" | |
5078 | 5077 | }, |
5079 | 5078 | "es6-promisify": { |
5080 | 5079 | "version": "5.0.0", |
... | ... | @@ -10399,6 +10398,11 @@ |
10399 | 10398 | "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", |
10400 | 10399 | "dev": true |
10401 | 10400 | }, |
10401 | + "promise-polyfill": { | |
10402 | + "version": "8.1.3", | |
10403 | + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz", | |
10404 | + "integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g==" | |
10405 | + }, | |
10402 | 10406 | "promise-retry": { |
10403 | 10407 | "version": "1.1.1", |
10404 | 10408 | "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", | ... | ... |
... | ... | @@ -47,6 +47,7 @@ |
47 | 47 | "compass-sass-mixins": "^0.12.7", |
48 | 48 | "core-js": "^3.6.5", |
49 | 49 | "date-fns": "^2.12.0", |
50 | + "es6-promise": "^4.2.8", | |
50 | 51 | "flot": "git://github.com/thingsboard/flot.git#0.9-work", |
51 | 52 | "flot.curvedlines": "git://github.com/MichaelZinsmaier/CurvedLines.git#master", |
52 | 53 | "font-awesome": "^4.7.0", |
... | ... | @@ -73,6 +74,7 @@ |
73 | 74 | "ngx-hm-carousel": "^2.0.0-rc.1", |
74 | 75 | "ngx-translate-messageformat-compiler": "^4.6.0", |
75 | 76 | "objectpath": "^2.0.0", |
77 | + "promise-polyfill": "8.1.3", | |
76 | 78 | "prop-types": "^15.7.2", |
77 | 79 | "raphael": "^2.3.0", |
78 | 80 | "rc-select": "^10.2.4", | ... | ... |
... | ... | @@ -539,7 +539,7 @@ export function parseTemplate(template: string, data: object, translateFn?: (key |
539 | 539 | } |
540 | 540 | const expressions = template.match(/\{(.*?)\}/g); |
541 | 541 | if (expressions) { |
542 | - const clearMatches = template.match(/(?<=\{)(.+?)(?=(\}|\:))/g); | |
542 | + const clearMatches = template.match(/(.)/g); | |
543 | 543 | for (const key in data) { |
544 | 544 | if (!key.includes('|')) |
545 | 545 | variables += `let ${key} = '${clearMatches[key] ? padValue(data[key], +clearMatches[key]) : data[key]}';`; | ... | ... |
... | ... | @@ -75,6 +75,7 @@ |
75 | 75 | import './zone-flags'; |
76 | 76 | import 'zone.js/dist/zone'; // Included with Angular CLI. |
77 | 77 | import 'core-js/es/array'; |
78 | +import { polyfill } from 'es6-promise'; polyfill(); | |
78 | 79 | import moment from 'moment'; |
79 | 80 | |
80 | 81 | /*************************************************************************************************** | ... | ... |