From ba8324bd55f38d533dcfb075de8e3db9fa3122d8 Mon Sep 17 00:00:00 2001 From: SundaresanGunasekaran Date: Thu, 1 Jan 2026 16:11:30 +0530 Subject: [PATCH 1/4] feature(REPORT-481519): Resolve Dependabot Alerts --- angular.json | 46 +- package.json | 26 +- src/app/common/app.component.ts | 5 +- src/app/common/header/header.component.ts | 3 +- .../main-content/main-content.component.ts | 8 +- src/app/common/main.component.ts | 3 +- src/app/common/preview/preview.component.ts | 5 +- src/app/common/sidebar/sidebar.component.ts | 3 +- .../components/barcode/barcode.component.ts | 3 +- .../cmr-report/cmr-report.component.ts | 3 +- .../company-sales/company-sales.component.ts | 3 +- .../conditional-row-formatting.component.ts | 3 +- .../consolidated-balance-sheet.component.ts | 3 +- .../customer-support-analysis.component.ts | 3 +- .../components/data-bar/data-bar.component.ts | 3 +- .../components/designer/designer.component.ts | 3 +- .../dynamic-chart-series.component.ts | 3 +- .../dynamic-columns.component.ts | 3 +- .../dynamic-logos/dynamic-logos.component.ts | 3 +- .../barcode.reportitem.css | 25 +- .../barcode.reportitem.js | 316 ++++++-- .../qrbarcode.reportitem.js | 752 ++++++++++++++++-- .../external-parameter-report.component.ts | 3 +- src/app/components/globals.ts | 4 +- .../grouping-aggregate.component.ts | 3 +- .../hr-payroll/hr-payroll.component.ts | 3 +- .../infographics-report.component.ts | 3 +- .../components/invoice/invoice.component.ts | 3 +- .../load-large-data.component.ts | 3 +- .../mail-merge/mail-merge.component.ts | 3 +- .../multi-language-report.component.ts | 3 +- ...ind-products-suppliers-report.component.ts | 3 +- .../parameter-customization.component.ts | 1 + .../patient-experience-analysis.component.ts | 3 +- .../components/paystub/paystub.component.ts | 3 +- .../personal-expense-analysis.component.ts | 3 +- .../powerpoint-report.component.ts | 3 +- .../product-catalog.component.ts | 3 +- .../product-details.component.ts | 3 +- .../product-line-sales.component.ts | 3 +- src/app/components/rdlc/rdlc.component.ts | 3 +- .../sales-by-year/sales-by-year.component.ts | 3 +- .../sales-order-detail.component.ts | 3 +- .../sales-report/sales-report.component.ts | 3 +- .../spark-line/spark-line.component.ts | 3 +- .../sub-report/sub-report.component.ts | 3 +- .../territory-sales.component.ts | 3 +- .../tickets-sales-analysis.component.ts | 3 +- .../transcript-report.component.ts | 3 +- .../website-visitor-analysis.component.ts | 3 +- src/polyfills.ts | 69 -- src/tsconfig.app.json | 22 - src/tsconfig.spec.json | 18 - tsconfig.app.json | 21 + tsconfig.json | 15 +- tsconfig.spec.json | 14 + 56 files changed, 1151 insertions(+), 316 deletions(-) delete mode 100644 src/polyfills.ts delete mode 100644 src/tsconfig.app.json delete mode 100644 src/tsconfig.spec.json create mode 100644 tsconfig.app.json create mode 100644 tsconfig.spec.json diff --git a/angular.json b/angular.json index 945951e..2f1a296 100644 --- a/angular.json +++ b/angular.json @@ -20,8 +20,10 @@ "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.app.json", + "polyfills": [ + "zone.js" + ], + "tsConfig": "tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets", @@ -36,13 +38,17 @@ "styles": [ "src/styles.scss" ], - "scripts": [], + "scripts": [ + "./node_modules/jquery/dist/jquery.js" + ], "allowedCommonJsDependencies": [ "bootstrap", - "@boldreports/javascript-reporting-controls/Scripts/bold.report-viewer.min", - "@boldreports/javascript-reporting-controls/Scripts/data-visualization/ej.bulletgraph.min", - "@boldreports/javascript-reporting-controls/Scripts/data-visualization/ej.chart.min", - "@boldreports/javascript-reporting-controls/Scripts/bold.report-designer.min", + "prismjs", + "@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.common.min", + "@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.widgets.min", + "@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-viewer.min", + "@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-designer.min", + "codemirror/lib/codemirror", "codemirror/addon/hint/show-hint", "codemirror/addon/hint/sql-hint", "codemirror/mode/sql/sql", @@ -72,32 +78,39 @@ "maximumError": "30mb" } ] + }, + "development": { + "outputHashing": "all" } - } + }, + "defaultConfiguration": "production" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "reports-cli:build" + "buildTarget": "reports-cli:build" }, "configurations": { "production": { - "browserTarget": "reports-cli:build:production" + "buildTarget": "reports-cli:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "reports-cli:build" + "buildTarget": "reports-cli:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", + "polyfills": [ + "zone.js", + "zone.js/testing" + ], + "tsConfig": "tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ "src/styles.scss" @@ -113,8 +126,8 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" + "tsconfig.app.json", + "tsconfig.spec.json" ], "exclude": [ "**/node_modules/**", @@ -153,6 +166,5 @@ } } } - }, - "defaultProject": "reports-cli" + } } diff --git a/package.json b/package.json index c7515ea..b20d549 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,14 @@ "serve": "gulp serve" }, "dependencies": { - "@angular/animations": "^16.1.0", - "@angular/common": "^16.1.0", - "@angular/compiler": "^16.1.0", - "@angular/core": "^16.1.0", - "@angular/forms": "^16.1.0", - "@angular/platform-browser": "^16.1.0", - "@angular/platform-browser-dynamic": "^16.1.0", - "@angular/router": "^16.1.0", + "@angular/animations": "21.0.6", + "@angular/common": "21.0.6", + "@angular/compiler": "21.0.6", + "@angular/core": "21.0.6", + "@angular/forms": "21.0.6", + "@angular/platform-browser": "21.0.6", + "@angular/platform-browser-dynamic": "21.0.6", + "@angular/router": "21.0.6", "@boldreports/angular-reporting-components": "12.1.12", "@boldreports/javascript-reporting-controls": "12.1.12", "@boldreports/javascript-reporting-extensions": "12.1.12", @@ -33,12 +33,12 @@ "rxjs": "6.6.0", "shelljs": "0.8.5", "tslib": "2.0.0", - "zone.js": "0.13.1" + "zone.js": "0.15.1" }, "devDependencies": { - "@angular-devkit/build-angular": "^16.1.0", - "@angular/cli": "~16.1.0", - "@angular/compiler-cli": "^16.1.0", + "@angular-devkit/build-angular": "21.0.4", + "@angular/cli": "21.0.4", + "@angular/compiler-cli": "21.0.6", "@types/jasmine": "2.8.8", "@types/jasminewd2": "2.0.3", "@types/jquery": "3.3.29", @@ -57,7 +57,7 @@ "require-dir": "1.2.0", "ts-node": "8.3.0", "tslint": "6.1.0", - "typescript": "4.9.3", + "typescript": "5.9.3", "typo-js": "1.0.3" } } diff --git a/src/app/common/app.component.ts b/src/app/common/app.component.ts index aa807d9..036f1e5 100644 --- a/src/app/common/app.component.ts +++ b/src/app/common/app.component.ts @@ -13,7 +13,8 @@ type sampleInfo = typeof data; @Component({ selector: 'ej-main', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], + standalone: false }) export class AppComponent implements OnInit { tocSlideLeft = false; @@ -63,7 +64,7 @@ export class AppComponent implements OnInit { this.meta.updateTag({ name: 'description', property: 'og:description', content: sampleData.metaData.description }); } - @HostListener('window:resize', ['$event']) + @HostListener('window:resize') onResize(): void { let sampleData: sampleInfo['samples'][0]; this.subscriptions.add(this.routerService.sampleUrl.subscribe((url) => { diff --git a/src/app/common/header/header.component.ts b/src/app/common/header/header.component.ts index 3ad8a06..f40140f 100644 --- a/src/app/common/header/header.component.ts +++ b/src/app/common/header/header.component.ts @@ -9,7 +9,8 @@ const data = samples; @Component({ selector: 'ej-header', templateUrl: './header.component.html', - styleUrls: ['./header.component.scss'] + styleUrls: ['./header.component.scss'], + standalone: false }) export class HeaderComponent { platforms: string[]; diff --git a/src/app/common/main-content/main-content.component.ts b/src/app/common/main-content/main-content.component.ts index 42a602f..36348da 100644 --- a/src/app/common/main-content/main-content.component.ts +++ b/src/app/common/main-content/main-content.component.ts @@ -1,4 +1,4 @@ -import { Component, ViewChild, AfterViewInit, Input, EventEmitter, Output, Renderer2 } from '@angular/core'; +import { Component, ViewChild, AfterViewInit, Input, EventEmitter, Output, Renderer2, ChangeDetectorRef } from '@angular/core'; import { forkJoin, Observable } from 'rxjs'; import { Location } from '@angular/common'; import { Router } from '@angular/router'; @@ -26,7 +26,8 @@ interface CurData { @Component({ selector: 'ej-main-content', templateUrl: './main-content.component.html', - styleUrls: ['./main-content.component.scss'] + styleUrls: ['./main-content.component.scss'], + standalone: false }) export class MainContentComponent implements AfterViewInit { @@ -46,7 +47,7 @@ export class MainContentComponent implements AfterViewInit { @ViewChild('features[2]', { static: true }) feature3; @ViewChild('freeTrialUrl', { static: true }) freeTrialUrl; @ViewChild('copyrightYear', { static: true }) copyrightYear; - constructor(private routerService: RouterService, private http: HttpClient, private router: Router, private location: Location, private renderer: Renderer2) { } + constructor(private routerService: RouterService, private http: HttpClient, private router: Router, private location: Location, private renderer: Renderer2, private cdr: ChangeDetectorRef) { } public loadSourceCode(sampleData: sampleInfo['samples'][0]): void { (jQuery('#parentTab li:first-child a') as any).tab('show'); @@ -93,6 +94,7 @@ export class MainContentComponent implements AfterViewInit { name: `${sampleData.routerPath}.component.html`, body: Prism.highlight(this.getStringWithOutDescription(resultCollection[0], /(\'|\")description/g), Prism.languages.html), id: 'html' }); + this.cdr.detectChanges(); }); } diff --git a/src/app/common/main.component.ts b/src/app/common/main.component.ts index 5cbff79..95b2e8b 100644 --- a/src/app/common/main.component.ts +++ b/src/app/common/main.component.ts @@ -3,7 +3,8 @@ import { Router, NavigationStart, Event, NavigationEnd } from '@angular/router'; import { RouterService } from './router.service'; @Component({ selector: 'app-root', - template: '' + template: '', + standalone: false }) export class MainComponent { constructor(private router: Router, private routerService: RouterService) { diff --git a/src/app/common/preview/preview.component.ts b/src/app/common/preview/preview.component.ts index 0d2e866..c4cd44c 100644 --- a/src/app/common/preview/preview.component.ts +++ b/src/app/common/preview/preview.component.ts @@ -10,7 +10,8 @@ const data = samples; @Component({ selector: 'ej-preview', templateUrl: './preview.component.html', - styleUrls: ['./preview.component.scss'] + styleUrls: ['./preview.component.scss'], + standalone: false }) export class PreviewComponent implements OnInit { @@ -52,7 +53,7 @@ export class PreviewComponent implements OnInit { })); } - @HostListener('window:resize', ['$event']) + @HostListener('window:resize') onResize(): void { this.setReportsHeight(); } diff --git a/src/app/common/sidebar/sidebar.component.ts b/src/app/common/sidebar/sidebar.component.ts index d8fe303..84d1a58 100644 --- a/src/app/common/sidebar/sidebar.component.ts +++ b/src/app/common/sidebar/sidebar.component.ts @@ -8,7 +8,8 @@ const data = samples; @Component({ selector: 'ej-sidebar', templateUrl: './sidebar.component.html', - styleUrls: ['./sidebar.component.scss'] + styleUrls: ['./sidebar.component.scss'], + standalone: false }) export class SidebarComponent { samples: sampleInfo['samples'] = data.samples; diff --git a/src/app/components/barcode/barcode.component.ts b/src/app/components/barcode/barcode.component.ts index b98fb43..d07e5e6 100644 --- a/src/app/components/barcode/barcode.component.ts +++ b/src/app/components/barcode/barcode.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './barcode.component.html', - styleUrls: ['./barcode.component.css'] + styleUrls: ['./barcode.component.css'], + standalone: false }) export class BarcodeComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/cmr-report/cmr-report.component.ts b/src/app/components/cmr-report/cmr-report.component.ts index c33e3aa..1d1990f 100644 --- a/src/app/components/cmr-report/cmr-report.component.ts +++ b/src/app/components/cmr-report/cmr-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './cmr-report.component.html', - styleUrls: ['./cmr-report.component.css'] + styleUrls: ['./cmr-report.component.css'], + standalone: false }) export class CMRReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/company-sales/company-sales.component.ts b/src/app/components/company-sales/company-sales.component.ts index aa35dd4..9e5d394 100644 --- a/src/app/components/company-sales/company-sales.component.ts +++ b/src/app/components/company-sales/company-sales.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './company-sales.component.html', - styleUrls: ['./company-sales.component.css'] + styleUrls: ['./company-sales.component.css'], + standalone: false }) export class CompanySalesComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/conditional-row-formatting/conditional-row-formatting.component.ts b/src/app/components/conditional-row-formatting/conditional-row-formatting.component.ts index 4152f26..9152c1f 100644 --- a/src/app/components/conditional-row-formatting/conditional-row-formatting.component.ts +++ b/src/app/components/conditional-row-formatting/conditional-row-formatting.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './conditional-row-formatting.component.html', - styleUrls: ['./conditional-row-formatting.component.css'] + styleUrls: ['./conditional-row-formatting.component.css'], + standalone: false }) export class ConditionalRowFormattingComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/consolidated-balance-sheet/consolidated-balance-sheet.component.ts b/src/app/components/consolidated-balance-sheet/consolidated-balance-sheet.component.ts index a63528c..bd7e17c 100644 --- a/src/app/components/consolidated-balance-sheet/consolidated-balance-sheet.component.ts +++ b/src/app/components/consolidated-balance-sheet/consolidated-balance-sheet.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './consolidated-balance-sheet.component.html', - styleUrls: ['./consolidated-balance-sheet.component.css'] + styleUrls: ['./consolidated-balance-sheet.component.css'], + standalone: false }) export class ConsolidatedBalanceSheetComponent { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/customer-support-analysis/customer-support-analysis.component.ts b/src/app/components/customer-support-analysis/customer-support-analysis.component.ts index 4ea8fe7..8e03be6 100644 --- a/src/app/components/customer-support-analysis/customer-support-analysis.component.ts +++ b/src/app/components/customer-support-analysis/customer-support-analysis.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './customer-support-analysis.component.html', - styleUrls: ['./customer-support-analysis.component.css'] + styleUrls: ['./customer-support-analysis.component.css'], + standalone: false }) export class CustomerSupportAnalysisComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/data-bar/data-bar.component.ts b/src/app/components/data-bar/data-bar.component.ts index 0062488..3a51f18 100644 --- a/src/app/components/data-bar/data-bar.component.ts +++ b/src/app/components/data-bar/data-bar.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './data-bar.component.html', - styleUrls: ['./data-bar.component.css'] + styleUrls: ['./data-bar.component.css'], + standalone: false }) export class DataBar { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/designer/designer.component.ts b/src/app/components/designer/designer.component.ts index 3cecdc0..3741523 100644 --- a/src/app/components/designer/designer.component.ts +++ b/src/app/components/designer/designer.component.ts @@ -37,7 +37,8 @@ window[pdfSignature] = EJPDFSignature; @Component({ selector: 'ej-sample', templateUrl: './designer.component.html', - styleUrls: ['./designer.component.css'] + styleUrls: ['./designer.component.css'], + standalone: false }) export class DesignerComponent implements AfterViewInit { @ViewChild('designer') designerInst; diff --git a/src/app/components/dynamic-chart-series/dynamic-chart-series.component.ts b/src/app/components/dynamic-chart-series/dynamic-chart-series.component.ts index 71e7a5f..4f3ce34 100644 --- a/src/app/components/dynamic-chart-series/dynamic-chart-series.component.ts +++ b/src/app/components/dynamic-chart-series/dynamic-chart-series.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './dynamic-chart-series.component.html', - styleUrls: ['./dynamic-chart-series.component.css'] + styleUrls: ['./dynamic-chart-series.component.css'], + standalone: false }) export class DynamicChartSeriesComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/dynamic-columns/dynamic-columns.component.ts b/src/app/components/dynamic-columns/dynamic-columns.component.ts index 9602674..839b5c1 100644 --- a/src/app/components/dynamic-columns/dynamic-columns.component.ts +++ b/src/app/components/dynamic-columns/dynamic-columns.component.ts @@ -6,7 +6,8 @@ @Component({ selector: 'ej-sample', templateUrl: './dynamic-columns.component.html', - styleUrls: ['./dynamic-columns.component.css'] + styleUrls: ['./dynamic-columns.component.css'], + standalone: false }) export class DynamicColumnsComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/dynamic-logos/dynamic-logos.component.ts b/src/app/components/dynamic-logos/dynamic-logos.component.ts index dd73e12..33d8c8a 100644 --- a/src/app/components/dynamic-logos/dynamic-logos.component.ts +++ b/src/app/components/dynamic-logos/dynamic-logos.component.ts @@ -6,7 +6,8 @@ @Component({ selector: 'ej-sample', templateUrl: './dynamic-logos.component.html', - styleUrls: ['./dynamic-logos.component.css'] + styleUrls: ['./dynamic-logos.component.css'], + standalone: false }) export class DynamicLogosComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/extensions/report-item-extensions/barcode.reportitem.css b/src/app/components/extensions/report-item-extensions/barcode.reportitem.css index 9fea938..1bbbf18 100644 --- a/src/app/components/extensions/report-item-extensions/barcode.reportitem.css +++ b/src/app/components/extensions/report-item-extensions/barcode.reportitem.css @@ -1,22 +1,37 @@ -.customitem-barcode { +.e-rptdesigner-designarea.e-waitingpopup .customitem-barcode { background-image: url('images/barcode.png'); } -.customitem-qrbarcode { +.e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode { background-image: url('images/qrbarcode.png'); } -.customitem-barcode, -.customitem-qrbarcode { +.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode { + background-image: url('images/barcode.svg'); +} + +.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode { + background-image: url('images/qrbarcode.svg'); +} + +.e-rptdesigner-designarea.e-waitingpopup .customitem-barcode, +.e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode { background-position: 50% 50%; background-repeat: no-repeat; height: 25px; } +.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode, +.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode { + background-repeat: no-repeat; + height: 42px; + background-position: center; +} + .e-rptdesigner-itempanel-dragelements .customitem-barcode, .e-rptdesigner-itempanel-dragelements .customitem-qrbarcode { margin-top: 0px !important; - height: 100%; + height: 100% !important; } .e-rptdesigner-loaderDiv .e-rptdesigner-spinnerDiv { diff --git a/src/app/components/extensions/report-item-extensions/barcode.reportitem.js b/src/app/components/extensions/report-item-extensions/barcode.reportitem.js index 3520503..b6ca1f0 100644 --- a/src/app/components/extensions/report-item-extensions/barcode.reportitem.js +++ b/src/app/components/extensions/report-item-extensions/barcode.reportitem.js @@ -17,10 +17,12 @@ var EJBarcode = (function () { args.renderCallback = $.proxy(this.renderData, this); args.loadingCallback = $.proxy(this.showIndicator, this); }; - EJBarcode.prototype.renderItem = function (customJson, target) { - this.customJSON = customJson; - this.rootElement = target; - this.renderBarcode(); + EJBarcode.prototype.renderItem = function (customJson, target, eventData) { + if (eventData.eventName === 'begin') { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); + } }; EJBarcode.prototype.renderBarcode = function () { this.customItemDiv = ej.buildTag('div.customitem', '', { @@ -82,8 +84,14 @@ var EJBarcode = (function () { break; case 'DisplayBarcodeText': this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); + break; + case 'BarcodeRotation': + this.updatePropertyVal(name, newValue ? newValue : 'None'); + break; } }; + EJBarcode.prototype.updatePropertyUIValue = function (name, value) { + }; EJBarcode.prototype.onPositionChanged = function (top, left) { }; EJBarcode.prototype.onSizeChanged = function (height, width) { @@ -104,49 +112,58 @@ var EJBarcode = (function () { }); } }; - EJBarcode.prototype.getPropertyGridItems = function () { - var propertyItems = { - 'HeaderText': this.customJSON.Name, - 'PropertyType': 'barcode', - 'SubType': 'barcode', - 'IsEditHeader': true, - 'Items': [{ - 'CategoryId': 'basicsettings', - 'DisplayName': this.getLocale('categoryBasicSettings'), - 'IsExpand': true, - 'Items': [ - { - 'ItemId': 'barcodetype', - 'Name': 'BarcodeType', - 'DisplayName': this.getLocale('BarcodeType'), - 'Value': this.getPropertyVal('BarcodeType'), - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B', - 'Code128C', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5', - 'Standard 2 of 5', 'Pharmacode'] - }, - { - 'ItemId': 'barcodevalue', - 'Name': 'BarcodeValue', - 'DisplayName': this.getLocale('barcodeValue'), - 'EnableExpression': true, - 'Value': this.getPropertyVal('BarcodeValue'), - 'ItemType': 'TextBox' - }, - { - 'ItemId': 'displaybarcodetext', - 'Name': 'DisplayBarcodeText', - 'DisplayName': this.getLocale('displayText'), - 'Value': this.isDisplayText() ? true : false, - 'ItemType': 'Bool', - 'EnableExpression': false - } - ] - } - ] - }; - return propertyItems; + EJBarcode.prototype.getPropertyGridItems = function (baseProperties) { + var barCodeType = this.getPropertyVal('BarcodeType'); + var itemProperties = [{ + 'CategoryId': 'basicsettings', + 'DisplayName': 'categoryBasicSettings', + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': 'BarcodeType', + 'Value': barCodeType, + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B', + 'Code128C', 'GS1-128', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5', + 'Standard 2 of 5', 'Pharmacode'] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': 'barcodeValue', + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': 'displayText', + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false + }, + { + 'ItemId': 'barcoderotation', + 'Name': 'BarcodeRotation', + 'DisplayName': 'barcodeRotationLabel', + 'Value': this.getBarcodeRotation(this.getPropertyVal('BarcodeRotation')), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': this.getRotationLevel() + } + ] + } + ]; + baseProperties.HeaderText = this.customJSON.Name; + baseProperties.PropertyType = 'barcode'; + baseProperties.SubType = 'barcode'; + baseProperties.IsEditHeader = true; + baseProperties.Items = $.merge(itemProperties, baseProperties.Items); + return baseProperties; }; EJBarcode.prototype.getPropertyVal = function (name) { if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { @@ -165,13 +182,19 @@ var EJBarcode = (function () { this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); }; EJBarcode.prototype.updatePropertyVal = function (propertyName, value) { + var isUpdated = false; if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { if (this.customJSON.CustomProperties[index].Name === propertyName) { this.customJSON.CustomProperties[index].Value = value; + isUpdated = true; + break; } } } + if (!isUpdated) { + this.setPropertyVal(propertyName, value); + } }; EJBarcode.prototype.getReportItemJson = function () { if (this.customJSON === null) { @@ -179,14 +202,43 @@ var EJBarcode = (function () { this.setPropertyVal('BarcodeValue', '00000'); this.setPropertyVal('BarcodeType', 'Code39'); this.setPropertyVal('DisplayBarcodeText', 'true'); + this.setPropertyVal('BarcodeRotation', 'None'); } return this.customJSON; }; + EJBarcode.prototype.getRotationLevel = function () { + return [ + { + text: 'rotationnone', value: 'None' + }, + { + text: 'rotate90degrees', value: 'Rotate90Degrees' + }, + { + text: 'rotate180degrees', value: 'Rotate180Degrees' + }, + { + text: 'rotate270degrees', value: 'Rotate270Degrees' + } + ]; + }; + EJBarcode.prototype.getBarcodeRotation = function (rotation) { + var rotationVal = rotation ? rotation.toLowerCase() : ''; + switch (rotationVal) { + case 'none': return 'None'; + case 'rotate90degrees': return 'Rotate90Degrees'; + case 'rotate180degrees': return 'Rotate180Degrees'; + case 'rotate270degrees': return 'Rotate270Degrees'; + } + return 'None'; + }; EJBarcode.prototype.setReportItemJson = function (reportItem) { this.customJSON = reportItem; }; EJBarcode.prototype.dispose = function () { }; + EJBarcode.prototype.undoRedoAction = function (args) { + }; EJBarcode.prototype.isDisplayText = function () { return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; }; @@ -221,6 +273,31 @@ var EJBarcode = (function () { return barcodeLocale.categoryBasicSettings; } return defaultLocale.categoryBasicSettings; + case 'barcoderotationlabel': + if (barcodeLocale && barcodeLocale.barcodeRotationLabel) { + return barcodeLocale.barcodeRotationLabel; + } + return defaultLocale.barcodeRotationLabel; + case 'rotationnone': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotationNone) { + return barcodeLocale.barcodeRotation.rotationNone; + } + return defaultLocale.barcodeRotation.rotationNone; + case 'rotate90degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate90degrees) { + return barcodeLocale.barcodeRotation.rotate90degrees; + } + return defaultLocale.barcodeRotation.rotate90degrees; + case 'rotate180degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate180degrees) { + return barcodeLocale.barcodeRotation.rotate180degrees; + } + return defaultLocale.barcodeRotation.rotate180degrees; + case 'rotate270degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate270degrees) { + return barcodeLocale.barcodeRotation.rotate270degrees; + } + return defaultLocale.barcodeRotation.rotate270degrees; } return text; }; @@ -234,7 +311,7 @@ var EJBarcode = (function () { this.errMsgDiv.css('display', 'none'); this.customItemDiv.css({ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', - 'background-size': 'auto 100%', + 'background-size': '100% 100%', 'background-repeat': 'no-repeat', 'background-position': 'left top' }); @@ -249,13 +326,37 @@ var EJBarcode = (function () { }; return EJBarcode; }()); -export { EJBarcode }; EJBarcode.Locale = {}; +EJBarcode.Locale['en-NZ'] = { + barcodeValue: 'Text', + barcodeType: 'Symbology Type', + textVisibility: 'Text Visibility', + categoryBasicSettings: 'Basic Settings', + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'None', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + toolTip: { + requirements: 'Display any barcode type.', + description: 'Displays the barcodes.', + title: 'Barcode' + } +}; EJBarcode.Locale['en-US'] = { barcodeValue: 'Text', barcodeType: 'Symbology Type', textVisibility: 'Text Visibility', categoryBasicSettings: 'Basic Settings', + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'None', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, toolTip: { requirements: 'Display any barcode type.', description: 'Displays the barcodes.', @@ -266,6 +367,13 @@ EJBarcode.Locale['fr-FR'] = { barcodeValue: 'Texte', barcodeType: 'Type de symbologie', textVisibility: 'Visibilite du texte', + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'Aucun', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, categoryBasicSettings: 'Paramètres de base', toolTip: { requirements: 'Afficher n\'importe quel type de code à barres.', @@ -273,3 +381,113 @@ EJBarcode.Locale['fr-FR'] = { title: 'code à barre' } }; +EJBarcode.Locale['he-IL'] = { + barcodeValue: 'טקסט', + barcodeType: 'סוג סימנים', + textVisibility: 'הצגת טקסט', + barcodeRotationLabel: 'סיבוב', + barcodeRotation: { + rotationNone: 'ללא', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: 'הגדרות בסיסיות', + toolTip: { + requirements: 'הצג כל סוג של ברקוד.', + description: 'מציג ברקודים.', + title: 'ברקוד' + } +}; +EJBarcode.Locale['ja-JP'] = { + barcodeValue: 'テキスト', + barcodeType: 'シンボロジータイプ', + textVisibility: 'テキストの表示', + barcodeRotationLabel: '回転', + barcodeRotation: { + rotationNone: 'なし', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: '基本設定', + toolTip: { + requirements: 'すべてのバーコードタイプを表示します。', + description: 'バーコードを表示します。', + title: 'バーコード' + } +}; +EJBarcode.Locale['pt-PT'] = { + barcodeValue: 'Texto', + barcodeType: 'Tipo de simbologia', + textVisibility: 'Visibilidade do texto', + barcodeRotationLabel: 'Rotação', + barcodeRotation: { + rotationNone: 'Nenhuma', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: 'Configurações básicas', + toolTip: { + requirements: 'Exibe qualquer tipo de código de barras.', + description: 'Exibe os códigos de barras.', + title: 'Código de barras' + } +}; +EJBarcode.Locale['ru-RU'] = { + barcodeValue: 'Текст', + barcodeType: 'Тип символики', + textVisibility: 'Отображение текста', + barcodeRotationLabel: 'Вращение', + barcodeRotation: { + rotationNone: 'Нет', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: 'Основные настройки', + toolTip: { + requirements: 'Отображает любой тип штрихкода.', + description: 'Отображает штрихкоды.', + title: 'Штрихкод' + } +}; +EJBarcode.Locale['zh-Hans'] = { + barcodeValue: '文本', + barcodeType: '符号类型', + textVisibility: '文本可见性', + barcodeRotationLabel: '旋转', + barcodeRotation: { + rotationNone: '无', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: '基本设置', + toolTip: { + requirements: '显示任何条码类型。', + description: '显示条码。', + title: '条码' + } +}; +EJBarcode.Locale['zh-Hant'] = { + barcodeValue: '文字', + barcodeType: '符號類型', + textVisibility: '文字可見性', + barcodeRotationLabel: '旋轉', + barcodeRotation: { + rotationNone: '無', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + }, + categoryBasicSettings: '基本設定', + toolTip: { + requirements: '顯示任何條碼類型。', + description: '顯示條碼。', + title: '條碼' + } +}; + +export { EJBarcode }; \ No newline at end of file diff --git a/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js b/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js index 9409ce3..c2171b2 100644 --- a/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js +++ b/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js @@ -1,26 +1,30 @@ var EJQRBarcode = (function () { function EJQRBarcode(rptDesigner) { this.customJSON = null; + this.propertyPanel = null; this.rootElement = null; this.customItemDiv = null; this.reportDesigner = null; this.loaderDiv = null; this.errMsgDiv = null; this.reportDesigner = rptDesigner; + this.propertyPanel = this.reportDesigner.getInstance('PropertyPanel'); } EJQRBarcode.prototype.initializeItem = function (args) { args.isBuildInService = true; args.defaultHeight = 160; args.defaultWidth = 160; args.minimumHeight = 15; - args.minimumWidth = 90; + args.minimumWidth = 15; args.renderCallback = $.proxy(this.renderData, this); args.loadingCallback = $.proxy(this.showIndicator, this); }; - EJQRBarcode.prototype.renderItem = function (customJson, target) { - this.customJSON = customJson; - this.rootElement = target; - this.renderBarcode(); + EJQRBarcode.prototype.renderItem = function (customJson, target, eventData) { + if (eventData.eventName === 'begin') { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); + } }; EJQRBarcode.prototype.renderBarcode = function () { this.customItemDiv = ej.buildTag('div.customitem', '', { @@ -77,12 +81,58 @@ var EJQRBarcode = (function () { case 'BarcodeType': newValue = this.setBarcodeType(newValue); this.updatePropertyVal(name, newValue); + if (!this.reportDesigner.undoManager.isPerformAction) { + var baseInstance = this.rootElement.data('CustomItem'); + var correctionOldVal = this.getPropertyVal('CorrectionLevel'); + baseInstance.updatePropertyChange(this.getCorrectionId(oldValue), correctionOldVal, null); + var correctionId = this.getCorrectionId(newValue); + if (correctionId) { + var correctionNewVal = this.getCorrectionVal(newValue); + baseInstance.updatePropertyChange(this.getCorrectionId(newValue), null, correctionNewVal); + this.updatePropertyUIValue(correctionId, correctionNewVal); + } + } break; case 'BarcodeValue': this.updatePropertyVal(name, newValue); break; case 'DisplayBarcodeText': this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); + break; + case 'QrcodeCorrectionLevel': + newValue = this.getQrErrCorrLevel(newValue); + this.updatePropertyVal('CorrectionLevel', newValue); + break; + case 'Pdf417CorrectionLevel': + newValue = this.getPdfErrCorrLevel(newValue); + this.updatePropertyVal('CorrectionLevel', newValue); + break; + case 'BarcodeRotation': + this.updatePropertyVal(name, newValue ? newValue : 'None'); + break; + } + }; + EJQRBarcode.prototype.updatePropertyUIValue = function (name, value) { + var customId = this.customJSON.UniqueId; + switch (name) { + case 'BarcodeType': + this.propertyPanel.updatePropertyUIValue('barcodetype', value, customId); + break; + case 'BarcodeValue': + this.propertyPanel.updatePropertyUIValue('barcodevalue', value, customId); + break; + case 'DisplayBarcodeText': + this.propertyPanel.updatePropertyUIValue('displaybarcodetext', value, customId); + break; + case 'QrcodeCorrectionLevel': + this.propertyPanel.updatePropertyUIValue('qrerrcorrlevel', value, customId); + break; + case 'Pdf417CorrectionLevel': + this.propertyPanel.updatePropertyUIValue('pdferrcorrlevel', value, customId); + break; + case 'BarcodeRotation': + this.propertyPanel.updatePropertyUIValue('barcoderotation', value, customId); + break; } }; EJQRBarcode.prototype.onPositionChanged = function (top, left) { @@ -105,60 +155,93 @@ var EJQRBarcode = (function () { }); } }; - EJQRBarcode.prototype.getPropertyGridItems = function () { - var propertyItems = { - 'HeaderText': this.customJSON.Name, - 'PropertyType': 'qrbarcode', - 'SubType': 'qrbarcode', - 'IsEditHeader': true, - 'Items': [{ - 'CategoryId': 'basicsettings', - 'DisplayName': this.getLocale('categoryBasicSettings'), - 'IsExpand': true, - 'Items': [ - { - 'ItemId': 'barcodetype', - 'Name': 'BarcodeType', - 'DisplayName': this.getLocale('BarcodeType'), - 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')), - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417'], - 'DependentItems': [ - { - EnableItems: ['basicsettings_displaybarcodetext'], - DisableItems: [], - Value: ['QR Barcode'] - }, - { - EnableItems: [], - DisableItems: ['basicsettings_displaybarcodetext'], - Value: ['Data Matrix', 'PDF417'] - } - ] - }, - { - 'ItemId': 'barcodevalue', - 'Name': 'BarcodeValue', - 'DisplayName': this.getLocale('barcodeValue'), - 'EnableExpression': true, - 'Value': this.getPropertyVal('BarcodeValue'), - 'ItemType': 'TextBox' - }, - { - 'ItemId': 'displaybarcodetext', - 'Name': 'DisplayBarcodeText', - 'DisplayName': this.getLocale('displayText'), - 'Value': this.isDisplayText() ? true : false, - 'ItemType': 'Bool', - 'EnableExpression': false, - 'ParentId': 'basicsettings_barcodetype' - } - ] - } - ] - }; - return propertyItems; + EJQRBarcode.prototype.getPropertyGridItems = function (baseProperties) { + var itemProperties = [{ + 'CategoryId': 'basicsettings', + 'DisplayName': 'categoryBasicSettings', + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': 'BarcodeType', + 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'DependentItems': [ + { + 'EnableItems': ['basicsettings_qrerrcorrlevel'], + 'DisableItems': ['basicsettings_pdferrcorrlevel'], + 'Value': ['QR Barcode'] + }, + { + 'EnableItems': ['basicsettings_pdferrcorrlevel'], + 'DisableItems': ['basicsettings_qrerrcorrlevel'], + 'Value': ['PDF417'] + }, + { + 'EnableItems': [], + 'DisableItems': ['basicsettings_qrerrcorrlevel', 'basicsettings_pdferrcorrlevel'], + 'Value': ['Data Matrix'] + } + ], + 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417'] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': 'barcodeValue', + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': 'displayText', + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false, + 'IsVisible': false + }, + { + 'ItemId': 'qrerrcorrlevel', + 'Name': 'QrcodeCorrectionLevel', + 'DisplayName': 'correctionLabel', + 'Value': this.getQrErrCorrLevel(this.getPropertyVal('CorrectionLevel')), + 'ParentId': 'basicsettings_barcodetype', + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': this.getQrcodeCorrectionLevel() + }, + { + 'ItemId': 'pdferrcorrlevel', + 'Name': 'Pdf417CorrectionLevel', + 'DisplayName': 'correctionLabel', + 'Value': this.getPdfErrCorrLevel(this.getPropertyVal('CorrectionLevel')), + 'ParentId': 'basicsettings_barcodetype', + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': this.getPDF417CorrectionLevel() + }, + { + 'ItemId': 'barcoderotation', + 'Name': 'BarcodeRotation', + 'DisplayName': 'barcodeRotationLabel', + 'Value': this.getBarcodeRotation(this.getPropertyVal('BarcodeRotation')), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': this.getRotationLevel() + } + ] + } + ]; + baseProperties.HeaderText = this.customJSON.Name; + baseProperties.PropertyType = 'qrbarcode'; + baseProperties.SubType = 'qrbarcode'; + baseProperties.IsEditHeader = true; + baseProperties.Items = $.merge(itemProperties, baseProperties.Items); + return baseProperties; }; EJQRBarcode.prototype.getPropertyVal = function (name) { if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { @@ -170,6 +253,82 @@ var EJQRBarcode = (function () { } return null; }; + EJQRBarcode.prototype.getPDF417CorrectionLevel = function () { + return [ + { + text: 'auto', value: 'Auto' + }, + { + text: 'level0', value: 'Level0' + }, + { + text: 'level1', value: 'Level1' + }, + { + text: 'level2', value: 'Level2' + }, + { + text: 'level3', value: 'Level3' + }, + { + text: 'level4', value: 'Level4' + }, + { + text: 'level5', value: 'Level5' + }, + { + text: 'level6', value: 'Level6' + }, + { + text: 'level7', value: 'Level7' + }, + { + text: 'level8', value: 'Level8' + } + ]; + }; + EJQRBarcode.prototype.getQrcodeCorrectionLevel = function () { + return [ + { + text: 'low', value: 'Low' + }, + { + text: 'medium', value: 'Medium' + }, + { + text: 'quartile', value: 'Quartile' + }, + { + text: 'high', value: 'High' + } + ]; + }; + EJQRBarcode.prototype.getRotationLevel = function () { + return [ + { + text: 'rotationnone', value: 'None' + }, + { + text: 'rotate90degrees', value: 'Rotate90Degrees' + }, + { + text: 'rotate180degrees', value: 'Rotate180Degrees' + }, + { + text: 'rotate270degrees', value: 'Rotate270Degrees' + } + ]; + }; + EJQRBarcode.prototype.getBarcodeRotation = function (rotation) { + var rotationVal = rotation ? rotation.toLowerCase() : ''; + switch (rotationVal) { + case 'none': return 'None'; + case 'rotate90degrees': return 'Rotate90Degrees'; + case 'rotate180degrees': return 'Rotate180Degrees'; + case 'rotate270degrees': return 'Rotate270Degrees'; + } + return 'None'; + }; EJQRBarcode.prototype.getBarcodeType = function (type) { switch (type.toLowerCase()) { case 'qrbarcode': return 'QR Barcode'; @@ -178,14 +337,57 @@ var EJQRBarcode = (function () { } return type; }; + EJQRBarcode.prototype.getQrErrCorrLevel = function (level) { + var errLvl = level ? level.toLowerCase() : ''; + switch (errLvl) { + case 'low': return 'Low'; + case 'medium': return 'Medium'; + case 'quartile': return 'Quartile'; + case 'high': return 'High'; + } + return 'Low'; + }; + EJQRBarcode.prototype.getPdfErrCorrLevel = function (level) { + var errLvl = level ? level.toLowerCase() : ''; + switch (errLvl) { + case 'auto': return 'Auto'; + case 'level0': return 'Level0'; + case 'level1': return 'Level1'; + case 'level2': return 'Level2'; + case 'level3': return 'Level3'; + case 'level4': return 'Level4'; + case 'level5': return 'Level5'; + case 'level6': return 'Level6'; + case 'level7': return 'Level7'; + case 'level8': return 'Level8'; + } + return 'Auto'; + }; EJQRBarcode.prototype.setBarcodeType = function (type) { - switch (type.toLowerCase()) { - case 'qr barcode': return 'QRBarcode'; - case 'data matrix': return 'DataMatrix'; + var barcodeType = type.replace(/\s+/g, ''); + switch (barcodeType.toLowerCase()) { + case 'qrbarcode': return 'QRBarcode'; + case 'datamatrix': return 'DataMatrix'; case 'pdf417': return 'PDF417'; } return type; }; + EJQRBarcode.prototype.getCorrectionVal = function (type) { + var barcodeType = type.replace(/\s+/g, ''); + switch (barcodeType.toLowerCase()) { + case 'qrbarcode': return this.getQrcodeCorrectionLevel()[0].value; + case 'pdf417': return this.getPDF417CorrectionLevel()[0].value; + } + return null; + }; + EJQRBarcode.prototype.getCorrectionId = function (type) { + var barcodeType = type.replace(/\s+/g, ''); + switch (barcodeType.toLowerCase()) { + case 'qrbarcode': return 'QrcodeCorrectionLevel'; + case 'pdf417': return 'Pdf417CorrectionLevel'; + } + return null; + }; EJQRBarcode.prototype.setPropertyVal = function (name, val) { if (this.customJSON.CustomProperties === null) { this.customJSON.CustomProperties = []; @@ -193,13 +395,19 @@ var EJQRBarcode = (function () { this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); }; EJQRBarcode.prototype.updatePropertyVal = function (propertyName, value) { + var isUpdated = false; if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { if (this.customJSON.CustomProperties[index].Name === propertyName) { this.customJSON.CustomProperties[index].Value = value; + isUpdated = true; + break; } } } + if (!isUpdated) { + this.setPropertyVal(propertyName, value); + } }; EJQRBarcode.prototype.getReportItemJson = function () { if (this.customJSON === null) { @@ -207,6 +415,8 @@ var EJQRBarcode = (function () { this.setPropertyVal('BarcodeValue', '00000'); this.setPropertyVal('BarcodeType', 'QRBarcode'); this.setPropertyVal('DisplayBarcodeText', 'true'); + this.setPropertyVal('CorrectionLevel', 'Low'); + this.setPropertyVal('BarcodeRotation', 'None'); } return this.customJSON; }; @@ -218,6 +428,8 @@ var EJQRBarcode = (function () { EJQRBarcode.prototype.isDisplayText = function () { return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; }; + EJQRBarcode.prototype.undoRedoAction = function (args) { + }; EJQRBarcode.prototype.getLocale = function (text) { var barcodeLocale; var defaultLocale = EJQRBarcode.Locale['en-US']; @@ -249,6 +461,106 @@ var EJQRBarcode = (function () { return barcodeLocale.categoryBasicSettings; } return defaultLocale.categoryBasicSettings; + case 'correctionlabel': + if (barcodeLocale && barcodeLocale.correctionLabel) { + return barcodeLocale.correctionLabel; + } + return defaultLocale.correctionLabel; + case 'low': + if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.low) { + return barcodeLocale.qrcodeCorrectionLevel.low; + } + return defaultLocale.qrcodeCorrectionLevel.low; + case 'medium': + if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.medium) { + return barcodeLocale.qrcodeCorrectionLevel.medium; + } + return defaultLocale.qrcodeCorrectionLevel.medium; + case 'quartile': + if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.quartile) { + return barcodeLocale.qrcodeCorrectionLevel.quartile; + } + return defaultLocale.qrcodeCorrectionLevel.quartile; + case 'high': + if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.high) { + return barcodeLocale.qrcodeCorrectionLevel.high; + } + return defaultLocale.qrcodeCorrectionLevel.high; + case 'level0': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level0) { + return barcodeLocale.pdf417CorrectionLevel.level0; + } + return defaultLocale.pdf417CorrectionLevel.level0; + case 'level1': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level1) { + return barcodeLocale.pdf417CorrectionLevel.level1; + } + return defaultLocale.pdf417CorrectionLevel.level1; + case 'level2': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level2) { + return barcodeLocale.pdf417CorrectionLevel.level2; + } + return defaultLocale.pdf417CorrectionLevel.level2; + case 'level3': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level3) { + return barcodeLocale.pdf417CorrectionLevel.level3; + } + return defaultLocale.pdf417CorrectionLevel.level3; + case 'level4': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level4) { + return barcodeLocale.pdf417CorrectionLevel.level4; + } + return defaultLocale.pdf417CorrectionLevel.level4; + case 'level5': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level5) { + return barcodeLocale.pdf417CorrectionLevel.level5; + } + return defaultLocale.pdf417CorrectionLevel.level5; + case 'level6': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level6) { + return barcodeLocale.pdf417CorrectionLevel.level6; + } + return defaultLocale.pdf417CorrectionLevel.level6; + case 'level7': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level7) { + return barcodeLocale.pdf417CorrectionLevel.level7; + } + return defaultLocale.pdf417CorrectionLevel.level7; + case 'level8': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level8) { + return barcodeLocale.pdf417CorrectionLevel.level8; + } + return defaultLocale.pdf417CorrectionLevel.level8; + case 'auto': + if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.auto) { + return barcodeLocale.pdf417CorrectionLevel.auto; + } + return defaultLocale.pdf417CorrectionLevel.auto; + case 'barcoderotationlabel': + if (barcodeLocale && barcodeLocale.barcodeRotationLabel) { + return barcodeLocale.barcodeRotationLabel; + } + return defaultLocale.barcodeRotationLabel; + case 'rotationnone': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotationNone) { + return barcodeLocale.barcodeRotation.rotationNone; + } + return defaultLocale.barcodeRotation.rotationNone; + case 'rotate90degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate90degrees) { + return barcodeLocale.barcodeRotation.rotate90degrees; + } + return defaultLocale.barcodeRotation.rotate90degrees; + case 'rotate180degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate180degrees) { + return barcodeLocale.barcodeRotation.rotate180degrees; + } + return defaultLocale.barcodeRotation.rotate180degrees; + case 'rotate270degrees': + if (barcodeLocale && barcodeLocale.barcodeRotation.rotate270degrees) { + return barcodeLocale.barcodeRotation.rotate270degrees; + } + return defaultLocale.barcodeRotation.rotate270degrees; } return text; }; @@ -262,7 +574,7 @@ var EJQRBarcode = (function () { this.errMsgDiv.css('display', 'none'); this.customItemDiv.css({ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', - 'background-size': 'auto 100%', + 'background-size': '100% 100%', 'background-repeat': 'no-repeat', 'background-position': 'left top' }); @@ -277,8 +589,44 @@ var EJQRBarcode = (function () { }; return EJQRBarcode; }()); -export { EJQRBarcode }; EJQRBarcode.Locale = {}; +EJQRBarcode.Locale['en-NZ'] = { + barcodeType: 'Symbology Type', + barcodeValue: 'Text', + textVisibility: 'Text Visibility', + categoryBasicSettings: 'Basic Settings', + toolTip: { + requirements: 'Display any barcode type.', + description: 'Displays the barcodes.', + title: 'QRBarcode' + }, + correctionLabel: 'Correction Level', + qrcodeCorrectionLevel: { + low: 'Low', + medium: 'Medium', + quartile: 'Quartile', + high: 'High' + }, + pdf417CorrectionLevel: { + auto: 'Auto', + level0: 'Level0', + level1: 'Level1', + level2: 'Level2', + level3: 'Level3', + level4: 'Level4', + level5: 'Level5', + level6: 'Level6', + level7: 'Level7', + level8: 'Level8', + }, + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'None', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; EJQRBarcode.Locale['en-US'] = { barcodeType: 'Symbology Type', barcodeValue: 'Text', @@ -288,6 +636,32 @@ EJQRBarcode.Locale['en-US'] = { requirements: 'Display any barcode type.', description: 'Displays the barcodes.', title: 'QRBarcode' + }, + correctionLabel: 'Correction Level', + qrcodeCorrectionLevel: { + low: 'Low', + medium: 'Medium', + quartile: 'Quartile', + high: 'High' + }, + pdf417CorrectionLevel: { + auto: 'Auto', + level0: 'Level0', + level1: 'Level1', + level2: 'Level2', + level3: 'Level3', + level4: 'Level4', + level5: 'Level5', + level6: 'Level6', + level7: 'Level7', + level8: 'Level8', + }, + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'None', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' } }; EJQRBarcode.Locale['fr-FR'] = { @@ -299,5 +673,255 @@ EJQRBarcode.Locale['fr-FR'] = { requirements: 'Afficher n\'importe quel type de code à barres.', description: 'Affiche les codes barres.', title: 'QRBarcode' + }, + correctionLabel: 'Niveau de correction', + qrcodeCorrectionLevel: { + low: 'Faible', + medium: 'Moyen', + quartile: 'Quartile', + high: 'Haut' + }, + pdf417CorrectionLevel: { + auto: 'Auto', + level0: 'Niveau0', + level1: 'Niveau1', + level2: 'Niveau2', + level3: 'Niveau3', + level4: 'Niveau4', + level5: 'Niveau5', + level6: 'Niveau6', + level7: 'Niveau7', + level8: 'Niveau8', + }, + barcodeRotationLabel: 'Rotation', + barcodeRotation: { + rotationNone: 'Aucun', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['he-IL'] = { + barcodeType: 'סוג סימנים', + barcodeValue: 'טקסט', + textVisibility: 'הצגת טקסט', + categoryBasicSettings: 'הגדרות בסיסיות', + toolTip: { + requirements: 'הצג כל סוג של ברקוד.', + description: 'מציג ברקודים.', + title: 'ברקוד QR' + }, + correctionLabel: 'רמת תיקון', + qrcodeCorrectionLevel: { + low: 'נמוכה', + medium: 'בינונית', + quartile: 'רמה רבעית', + high: 'גבוהה' + }, + pdf417CorrectionLevel: { + auto: 'אוטומטית', + level0: 'רמה 0', + level1: 'רמה 1', + level2: 'רמה 2', + level3: 'רמה 3', + level4: 'רמה 4', + level5: 'רמה 5', + level6: 'רמה 6', + level7: 'רמה 7', + level8: 'רמה 8', + }, + barcodeRotationLabel: 'סיבוב', + barcodeRotation: { + rotationNone: 'ללא', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['ja-JP'] = { + barcodeType: 'シンボロジータイプ', + barcodeValue: 'テキスト', + textVisibility: 'テキストの表示', + categoryBasicSettings: '基本設定', + toolTip: { + requirements: 'すべてのバーコードタイプを表示します。', + description: 'バーコードを表示します。', + title: 'QRバーコード' + }, + correctionLabel: '訂正レベル', + qrcodeCorrectionLevel: { + low: '低', + medium: '中', + quartile: '四分位', + high: '高' + }, + pdf417CorrectionLevel: { + auto: '自動', + level0: 'レベル0', + level1: 'レベル1', + level2: 'レベル2', + level3: 'レベル3', + level4: 'レベル4', + level5: 'レベル5', + level6: 'レベル6', + level7: 'レベル7', + level8: 'レベル8', + }, + barcodeRotationLabel: '回転', + barcodeRotation: { + rotationNone: 'なし', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['pt-PT'] = { + barcodeType: 'Tipo de simbologia', + barcodeValue: 'Texto', + textVisibility: 'Visibilidade do texto', + categoryBasicSettings: 'Configurações básicas', + toolTip: { + requirements: 'Exibe qualquer tipo de código de barras.', + description: 'Exibe os códigos de barras.', + title: 'Código QR' + }, + correctionLabel: 'Nível de correção', + qrcodeCorrectionLevel: { + low: 'Baixo', + medium: 'Médio', + quartile: 'Quartil', + high: 'Alto' + }, + pdf417CorrectionLevel: { + auto: 'Automático', + level0: 'Nível0', + level1: 'Nível1', + level2: 'Nível2', + level3: 'Nível3', + level4: 'Nível4', + level5: 'Nível5', + level6: 'Nível6', + level7: 'Nível7', + level8: 'Nível8', + }, + barcodeRotationLabel: 'Rotação', + barcodeRotation: { + rotationNone: 'Nenhuma', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['ru-RU'] = { + barcodeType: 'Тип символики', + barcodeValue: 'Текст', + textVisibility: 'Отображение текста', + categoryBasicSettings: 'Основные настройки', + toolTip: { + requirements: 'Отображает любой тип штрихкода.', + description: 'Отображает штрихкоды.', + title: 'QR-код' + }, + correctionLabel: 'Уровень коррекции', + qrcodeCorrectionLevel: { + low: 'Низкий', + medium: 'Средний', + quartile: 'Квартиль', + high: 'Высокий' + }, + pdf417CorrectionLevel: { + auto: 'Авто', + level0: 'Уровень0', + level1: 'Уровень1', + level2: 'Уровень2', + level3: 'Уровень3', + level4: 'Уровень4', + level5: 'Уровень5', + level6: 'Уровень6', + level7: 'Уровень7', + level8: 'Уровень8', + }, + barcodeRotationLabel: 'Вращение', + barcodeRotation: { + rotationNone: 'Нет', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['zh-Hans'] = { + barcodeType: '符号类型', + barcodeValue: '文本', + textVisibility: '文本可见性', + categoryBasicSettings: '基本设置', + toolTip: { + requirements: '显示任何条码类型。', + description: '显示条码。', + title: '二维码' + }, + correctionLabel: '纠错级别', + qrcodeCorrectionLevel: { + low: '低', + medium: '中', + quartile: '四分位', + high: '高' + }, + pdf417CorrectionLevel: { + auto: '自动', + level0: '级别0', + level1: '级别1', + level2: '级别2', + level3: '级别3', + level4: '级别4', + level5: '级别5', + level6: '级别6', + level7: '级别7', + level8: '级别8', + }, + barcodeRotationLabel: '旋转', + barcodeRotation: { + rotationNone: '无', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' + } +}; +EJQRBarcode.Locale['zh-Hant'] = { + barcodeType: '符號類型', + barcodeValue: '文字', + textVisibility: '文字可見性', + categoryBasicSettings: '基本設定', + toolTip: { + requirements: '顯示任何條碼類型。', + description: '顯示條碼。', + title: '二維碼' + }, + correctionLabel: '糾錯等級', + qrcodeCorrectionLevel: { + low: '低', + medium: '中', + quartile: '四分位', + high: '高' + }, + pdf417CorrectionLevel: { + auto: '自動', + level0: '等級0', + level1: '等級1', + level2: '等級2', + level3: '等級3', + level4: '等級4', + level5: '等級5', + level6: '等級6', + level7: '等級7', + level8: '等級8' + }, + barcodeRotationLabel: '旋轉', + barcodeRotation: { + rotationNone: '無', + rotate90degrees: '90', + rotate180degrees: '180', + rotate270degrees: '270' } }; + +export { EJQRBarcode }; \ No newline at end of file diff --git a/src/app/components/external-parameter-report/external-parameter-report.component.ts b/src/app/components/external-parameter-report/external-parameter-report.component.ts index 251c6a3..680fcc8 100644 --- a/src/app/components/external-parameter-report/external-parameter-report.component.ts +++ b/src/app/components/external-parameter-report/external-parameter-report.component.ts @@ -13,7 +13,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './external-parameter-report.component.html', - styleUrls: ['./external-parameter-report.component.css'] + styleUrls: ['./external-parameter-report.component.css'], + standalone: false }) export class ExternalParameterReportComponent { @ViewChild('externalparameterreport', { static: false }) externalParameterReport; diff --git a/src/app/components/globals.ts b/src/app/components/globals.ts index 142e5a4..82dff8f 100644 --- a/src/app/components/globals.ts +++ b/src/app/components/globals.ts @@ -1,6 +1,6 @@ export const Globals = { - SERVICE_URL: '/services/api/ReportViewerWebApi', - DESIGNER_SERVICE_URL: '/services/api/ReportDesignerWebApi', + SERVICE_URL: 'https://demos.boldreports.com/services/api/ReportViewerWebApi', + DESIGNER_SERVICE_URL: 'https://demos.boldreports.com/services/api/ReportDesignerWebApi', REPORT_CONTROL_ID: 'reportdesigner', TOOLBAR_OPTIONS: { showToolbar: true, diff --git a/src/app/components/grouping-aggregate/grouping-aggregate.component.ts b/src/app/components/grouping-aggregate/grouping-aggregate.component.ts index 9a3eb8e..cfd4f09 100644 --- a/src/app/components/grouping-aggregate/grouping-aggregate.component.ts +++ b/src/app/components/grouping-aggregate/grouping-aggregate.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './grouping-aggregate.component.html', - styleUrls: ['./grouping-aggregate.component.css'] + styleUrls: ['./grouping-aggregate.component.css'], + standalone: false }) export class GroupingAggregateComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/hr-payroll/hr-payroll.component.ts b/src/app/components/hr-payroll/hr-payroll.component.ts index 2dd7bea..4c0374a 100644 --- a/src/app/components/hr-payroll/hr-payroll.component.ts +++ b/src/app/components/hr-payroll/hr-payroll.component.ts @@ -6,7 +6,8 @@ @Component({ selector: 'ej-sample', templateUrl: './hr-payroll.component.html', - styleUrls: ['./hr-payroll.component.css'] + styleUrls: ['./hr-payroll.component.css'], + standalone: false }) export class HRPayrollComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/infographics-report/infographics-report.component.ts b/src/app/components/infographics-report/infographics-report.component.ts index ee0fb7a..437af64 100644 --- a/src/app/components/infographics-report/infographics-report.component.ts +++ b/src/app/components/infographics-report/infographics-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './infographics-report.component.html', - styleUrls: ['./infographics-report.component.css'] + styleUrls: ['./infographics-report.component.css'], + standalone: false }) export class InfographicsReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/invoice/invoice.component.ts b/src/app/components/invoice/invoice.component.ts index 3c7ec8c..4f37f71 100644 --- a/src/app/components/invoice/invoice.component.ts +++ b/src/app/components/invoice/invoice.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './invoice.component.html', - styleUrls: ['./invoice.component.css'] + styleUrls: ['./invoice.component.css'], + standalone: false }) export class InvoiceComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/load-large-data/load-large-data.component.ts b/src/app/components/load-large-data/load-large-data.component.ts index 710a5fa..0e5a4d5 100644 --- a/src/app/components/load-large-data/load-large-data.component.ts +++ b/src/app/components/load-large-data/load-large-data.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './load-large-data.component.html', - styleUrls: ['./load-large-data.component.css'] + styleUrls: ['./load-large-data.component.css'], + standalone: false }) export class LoadLargeDataComponent { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/mail-merge/mail-merge.component.ts b/src/app/components/mail-merge/mail-merge.component.ts index 2ac6d0b..ebbc9dc 100644 --- a/src/app/components/mail-merge/mail-merge.component.ts +++ b/src/app/components/mail-merge/mail-merge.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './mail-merge.component.html', - styleUrls: ['./mail-merge.component.css'] + styleUrls: ['./mail-merge.component.css'], + standalone: false }) export class MailMergeComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/multi-language-report/multi-language-report.component.ts b/src/app/components/multi-language-report/multi-language-report.component.ts index 6814707..0422b74 100644 --- a/src/app/components/multi-language-report/multi-language-report.component.ts +++ b/src/app/components/multi-language-report/multi-language-report.component.ts @@ -10,7 +10,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './multi-language-report.component.html', - styleUrls: ['./multi-language-report.component.css'] + styleUrls: ['./multi-language-report.component.css'], + standalone: false }) export class MultiLanguageReportComponent { @ViewChild('multilanguagereport', { static: false }) multiLanguageReport; diff --git a/src/app/components/northwind-products-suppliers-report/northwind-products-suppliers-report.component.ts b/src/app/components/northwind-products-suppliers-report/northwind-products-suppliers-report.component.ts index 1dab0b2..bb2ccb8 100644 --- a/src/app/components/northwind-products-suppliers-report/northwind-products-suppliers-report.component.ts +++ b/src/app/components/northwind-products-suppliers-report/northwind-products-suppliers-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './northwind-products-suppliers-report.component.html', - styleUrls: ['./northwind-products-suppliers-report.component.css'] + styleUrls: ['./northwind-products-suppliers-report.component.css'], + standalone: false }) export class NorthwindProductsSuppliersReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/parameter-customization/parameter-customization.component.ts b/src/app/components/parameter-customization/parameter-customization.component.ts index cb37e4d..dae3c49 100644 --- a/src/app/components/parameter-customization/parameter-customization.component.ts +++ b/src/app/components/parameter-customization/parameter-customization.component.ts @@ -9,6 +9,7 @@ import { DateTimePicker } from '@syncfusion/ej2-angular-calendars'; selector: 'ej-sample', templateUrl: './parameter-customization.component.html', styleUrls: ['./parameter-customization.component.css'], + standalone: false }) export class ParameterCustomizationComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/patient-experience-analysis/patient-experience-analysis.component.ts b/src/app/components/patient-experience-analysis/patient-experience-analysis.component.ts index 9534e35..73082e3 100644 --- a/src/app/components/patient-experience-analysis/patient-experience-analysis.component.ts +++ b/src/app/components/patient-experience-analysis/patient-experience-analysis.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './patient-experience-analysis.component.html', - styleUrls: ['./patient-experience-analysis.component.css'] + styleUrls: ['./patient-experience-analysis.component.css'], + standalone: false }) export class PatientExperienceAnalysisComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/paystub/paystub.component.ts b/src/app/components/paystub/paystub.component.ts index f3b2e41..9246e4c 100644 --- a/src/app/components/paystub/paystub.component.ts +++ b/src/app/components/paystub/paystub.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './paystub.component.html', - styleUrls: ['./paystub.component.css'] + styleUrls: ['./paystub.component.css'], + standalone: false }) export class PaystubComponent { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/personal-expense-analysis/personal-expense-analysis.component.ts b/src/app/components/personal-expense-analysis/personal-expense-analysis.component.ts index 96e1018..95cc8c8 100644 --- a/src/app/components/personal-expense-analysis/personal-expense-analysis.component.ts +++ b/src/app/components/personal-expense-analysis/personal-expense-analysis.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './personal-expense-analysis.component.html', - styleUrls: ['./personal-expense-analysis.component.css'] + styleUrls: ['./personal-expense-analysis.component.css'], + standalone: false }) export class PersonalExpenseAnalysisComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/powerpoint-report/powerpoint-report.component.ts b/src/app/components/powerpoint-report/powerpoint-report.component.ts index cf9bf21..3d302a7 100644 --- a/src/app/components/powerpoint-report/powerpoint-report.component.ts +++ b/src/app/components/powerpoint-report/powerpoint-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './powerpoint-report.component.html', - styleUrls: ['./powerpoint-report.component.css'] + styleUrls: ['./powerpoint-report.component.css'], + standalone: false }) export class PowerpointReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/product-catalog/product-catalog.component.ts b/src/app/components/product-catalog/product-catalog.component.ts index 9d60951..b98b298 100644 --- a/src/app/components/product-catalog/product-catalog.component.ts +++ b/src/app/components/product-catalog/product-catalog.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './product-catalog.component.html', - styleUrls: ['./product-catalog.component.css'] + styleUrls: ['./product-catalog.component.css'], + standalone: false }) export class ProductCatalogComponent { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/product-details/product-details.component.ts b/src/app/components/product-details/product-details.component.ts index e62ede0..c596612 100644 --- a/src/app/components/product-details/product-details.component.ts +++ b/src/app/components/product-details/product-details.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './product-details.component.html', - styleUrls: ['./product-details.component.css'] + styleUrls: ['./product-details.component.css'], + standalone: false }) export class ProductDetailsComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/product-line-sales/product-line-sales.component.ts b/src/app/components/product-line-sales/product-line-sales.component.ts index 897499f..e5ed615 100644 --- a/src/app/components/product-line-sales/product-line-sales.component.ts +++ b/src/app/components/product-line-sales/product-line-sales.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './product-line-sales.component.html', - styleUrls: ['./product-line-sales.component.css'] + styleUrls: ['./product-line-sales.component.css'], + standalone: false }) export class ProductLineSalesComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/rdlc/rdlc.component.ts b/src/app/components/rdlc/rdlc.component.ts index 86f1cfb..04b467a 100644 --- a/src/app/components/rdlc/rdlc.component.ts +++ b/src/app/components/rdlc/rdlc.component.ts @@ -39,7 +39,8 @@ window[pdfSignature] = EJPDFSignature; @Component({ selector: 'ej-sample', templateUrl: './rdlc.component.html', - styleUrls: ['./rdlc.component.css'] + styleUrls: ['./rdlc.component.css'], + standalone: false }) export class RDLCComponent implements AfterViewInit { @ViewChild('designer') designerInst; diff --git a/src/app/components/sales-by-year/sales-by-year.component.ts b/src/app/components/sales-by-year/sales-by-year.component.ts index 0874061..7f9527a 100644 --- a/src/app/components/sales-by-year/sales-by-year.component.ts +++ b/src/app/components/sales-by-year/sales-by-year.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './sales-by-year.component.html', - styleUrls: ['./sales-by-year.component.css'] + styleUrls: ['./sales-by-year.component.css'], + standalone: false }) export class SalesByYearComponent { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/sales-order-detail/sales-order-detail.component.ts b/src/app/components/sales-order-detail/sales-order-detail.component.ts index 7f49199..88d8993 100644 --- a/src/app/components/sales-order-detail/sales-order-detail.component.ts +++ b/src/app/components/sales-order-detail/sales-order-detail.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './sales-order-detail.component.html', - styleUrls: ['./sales-order-detail.component.css'] + styleUrls: ['./sales-order-detail.component.css'], + standalone: false }) export class SalesOrderDetailComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/sales-report/sales-report.component.ts b/src/app/components/sales-report/sales-report.component.ts index 6eb5a87..f5698ac 100644 --- a/src/app/components/sales-report/sales-report.component.ts +++ b/src/app/components/sales-report/sales-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './sales-report.component.html', - styleUrls: ['./sales-report.component.css'] + styleUrls: ['./sales-report.component.css'], + standalone: false }) export class SalesReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/spark-line/spark-line.component.ts b/src/app/components/spark-line/spark-line.component.ts index 1e08a77..9234fca 100644 --- a/src/app/components/spark-line/spark-line.component.ts +++ b/src/app/components/spark-line/spark-line.component.ts @@ -7,7 +7,8 @@ import { rdlcData } from '../rdlcData'; @Component({ selector: 'ej-sample', templateUrl: './spark-line.component.html', - styleUrls: ['./spark-line.component.css'] + styleUrls: ['./spark-line.component.css'], + standalone: false }) export class SparkLine { @ViewChild('viewer') viewerInst; diff --git a/src/app/components/sub-report/sub-report.component.ts b/src/app/components/sub-report/sub-report.component.ts index d6f10e5..ad27722 100644 --- a/src/app/components/sub-report/sub-report.component.ts +++ b/src/app/components/sub-report/sub-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './sub-report.component.html', - styleUrls: ['./sub-report.component.css'] + styleUrls: ['./sub-report.component.css'], + standalone: false }) export class SubReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/territory-sales/territory-sales.component.ts b/src/app/components/territory-sales/territory-sales.component.ts index 2353a11..fa915a2 100644 --- a/src/app/components/territory-sales/territory-sales.component.ts +++ b/src/app/components/territory-sales/territory-sales.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './territory-sales.component.html', - styleUrls: ['./territory-sales.component.css'] + styleUrls: ['./territory-sales.component.css'], + standalone: false }) export class TerritorySalesComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/tickets-sales-analysis/tickets-sales-analysis.component.ts b/src/app/components/tickets-sales-analysis/tickets-sales-analysis.component.ts index c3e3d4f..444b693 100644 --- a/src/app/components/tickets-sales-analysis/tickets-sales-analysis.component.ts +++ b/src/app/components/tickets-sales-analysis/tickets-sales-analysis.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './tickets-sales-analysis.component.html', - styleUrls: ['./tickets-sales-analysis.component.css'] + styleUrls: ['./tickets-sales-analysis.component.css'], + standalone: false }) export class TicketsSalesComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/transcript-report/transcript-report.component.ts b/src/app/components/transcript-report/transcript-report.component.ts index c84a3ca..d942bb9 100644 --- a/src/app/components/transcript-report/transcript-report.component.ts +++ b/src/app/components/transcript-report/transcript-report.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './transcript-report.component.html', - styleUrls: ['./transcript-report.component.css'] + styleUrls: ['./transcript-report.component.css'], + standalone: false }) export class TranscriptReportComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/app/components/website-visitor-analysis/website-visitor-analysis.component.ts b/src/app/components/website-visitor-analysis/website-visitor-analysis.component.ts index 11574ac..39a0736 100644 --- a/src/app/components/website-visitor-analysis/website-visitor-analysis.component.ts +++ b/src/app/components/website-visitor-analysis/website-visitor-analysis.component.ts @@ -6,7 +6,8 @@ import { Globals } from '../globals'; @Component({ selector: 'ej-sample', templateUrl: './website-visitor-analysis.component.html', - styleUrls: ['./website-visitor-analysis.component.css'] + styleUrls: ['./website-visitor-analysis.component.css'], + standalone: false }) export class WebsiteVisitorAnalysisComponent { // Specifies the report Web API service URL. It is used to process the reports. diff --git a/src/polyfills.ts b/src/polyfills.ts deleted file mode 100644 index c474b8d..0000000 --- a/src/polyfills.ts +++ /dev/null @@ -1,69 +0,0 @@ -import * as jquery from 'jquery'; - -let windowInstance = (window as { [key: string]: any }); -windowInstance['jQuery'] = jquery; -windowInstance['$'] = jquery; - -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags.ts'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json deleted file mode 100644 index 9817e86..0000000 --- a/src/tsconfig.app.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "types": [ - "jquery", - "reports.all" - ] - }, - "exclude": [ - "test.ts", - "**/*.spec.ts", - "demos" - ], - "files": [ - "./main.ts", - "./polyfills.ts" - ], - "include": [ - "./**/*.d.ts" - ] -} \ No newline at end of file diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json deleted file mode 100644 index de77336..0000000 --- a/src/tsconfig.spec.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts", - "polyfills.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/tsconfig.app.json b/tsconfig.app.json new file mode 100644 index 0000000..cde279b --- /dev/null +++ b/tsconfig.app.json @@ -0,0 +1,21 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/app", + "typeRoots": [ + "node_modules/@types", + "node_modules/@boldreports/types" + ], + "types": [ + "jquery", + "reports.all" + ] + }, + "files": [ + "src/main.ts" + ], + "include": [ + "src/**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index cff91ef..bb737df 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,21 +6,16 @@ "sourceMap": true, "declaration": false, "module": "es2015", - "moduleResolution": "node", + "moduleResolution": "bundler", "emitDecoratorMetadata": true, "experimentalDecorators": true, - "resolveJsonModule": true, "importHelpers": true, + "resolveJsonModule": true, "target": "ES2022", - "typeRoots": [ - "node_modules/@types", - "node_modules/@boldreports/types" - ], + "esModuleInterop": true, "lib": [ - "es2018", + "ES2022", "dom" - ], - "allowSyntheticDefaultImports": true, - "esModuleInterop": true + ] } } diff --git a/tsconfig.spec.json b/tsconfig.spec.json new file mode 100644 index 0000000..be7e9da --- /dev/null +++ b/tsconfig.spec.json @@ -0,0 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "include": [ + "src/**/*.spec.ts", + "src/**/*.d.ts" + ] +} From 1a0555fd4c62ee176b6f94c66a2e939eedd0284c Mon Sep 17 00:00:00 2001 From: SundaresanGunasekaran Date: Thu, 1 Jan 2026 16:17:14 +0530 Subject: [PATCH 2/4] feature(REPORT-481519): Revert --- .../barcode.reportitem.css | 25 +- .../barcode.reportitem.js | 316 ++------ .../qrbarcode.reportitem.js | 752 ++---------------- 3 files changed, 118 insertions(+), 975 deletions(-) diff --git a/src/app/components/extensions/report-item-extensions/barcode.reportitem.css b/src/app/components/extensions/report-item-extensions/barcode.reportitem.css index 1bbbf18..9fea938 100644 --- a/src/app/components/extensions/report-item-extensions/barcode.reportitem.css +++ b/src/app/components/extensions/report-item-extensions/barcode.reportitem.css @@ -1,37 +1,22 @@ -.e-rptdesigner-designarea.e-waitingpopup .customitem-barcode { +.customitem-barcode { background-image: url('images/barcode.png'); } -.e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode { +.customitem-qrbarcode { background-image: url('images/qrbarcode.png'); } -.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode { - background-image: url('images/barcode.svg'); -} - -.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode { - background-image: url('images/qrbarcode.svg'); -} - -.e-rptdesigner-designarea.e-waitingpopup .customitem-barcode, -.e-rptdesigner-designarea.e-waitingpopup .customitem-qrbarcode { +.customitem-barcode, +.customitem-qrbarcode { background-position: 50% 50%; background-repeat: no-repeat; height: 25px; } -.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-barcode, -.e-rptdesigner-designarea:not(.e-waitingpopup) .customitem-qrbarcode { - background-repeat: no-repeat; - height: 42px; - background-position: center; -} - .e-rptdesigner-itempanel-dragelements .customitem-barcode, .e-rptdesigner-itempanel-dragelements .customitem-qrbarcode { margin-top: 0px !important; - height: 100% !important; + height: 100%; } .e-rptdesigner-loaderDiv .e-rptdesigner-spinnerDiv { diff --git a/src/app/components/extensions/report-item-extensions/barcode.reportitem.js b/src/app/components/extensions/report-item-extensions/barcode.reportitem.js index b6ca1f0..3520503 100644 --- a/src/app/components/extensions/report-item-extensions/barcode.reportitem.js +++ b/src/app/components/extensions/report-item-extensions/barcode.reportitem.js @@ -17,12 +17,10 @@ var EJBarcode = (function () { args.renderCallback = $.proxy(this.renderData, this); args.loadingCallback = $.proxy(this.showIndicator, this); }; - EJBarcode.prototype.renderItem = function (customJson, target, eventData) { - if (eventData.eventName === 'begin') { - this.customJSON = customJson; - this.rootElement = target; - this.renderBarcode(); - } + EJBarcode.prototype.renderItem = function (customJson, target) { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); }; EJBarcode.prototype.renderBarcode = function () { this.customItemDiv = ej.buildTag('div.customitem', '', { @@ -84,14 +82,8 @@ var EJBarcode = (function () { break; case 'DisplayBarcodeText': this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); - break; - case 'BarcodeRotation': - this.updatePropertyVal(name, newValue ? newValue : 'None'); - break; } }; - EJBarcode.prototype.updatePropertyUIValue = function (name, value) { - }; EJBarcode.prototype.onPositionChanged = function (top, left) { }; EJBarcode.prototype.onSizeChanged = function (height, width) { @@ -112,58 +104,49 @@ var EJBarcode = (function () { }); } }; - EJBarcode.prototype.getPropertyGridItems = function (baseProperties) { - var barCodeType = this.getPropertyVal('BarcodeType'); - var itemProperties = [{ - 'CategoryId': 'basicsettings', - 'DisplayName': 'categoryBasicSettings', - 'IsExpand': true, - 'Items': [ - { - 'ItemId': 'barcodetype', - 'Name': 'BarcodeType', - 'DisplayName': 'BarcodeType', - 'Value': barCodeType, - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B', - 'Code128C', 'GS1-128', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5', - 'Standard 2 of 5', 'Pharmacode'] - }, - { - 'ItemId': 'barcodevalue', - 'Name': 'BarcodeValue', - 'DisplayName': 'barcodeValue', - 'EnableExpression': true, - 'Value': this.getPropertyVal('BarcodeValue'), - 'ItemType': 'TextBox' - }, - { - 'ItemId': 'displaybarcodetext', - 'Name': 'DisplayBarcodeText', - 'DisplayName': 'displayText', - 'Value': this.isDisplayText() ? true : false, - 'ItemType': 'Bool', - 'EnableExpression': false - }, - { - 'ItemId': 'barcoderotation', - 'Name': 'BarcodeRotation', - 'DisplayName': 'barcodeRotationLabel', - 'Value': this.getBarcodeRotation(this.getPropertyVal('BarcodeRotation')), - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': this.getRotationLevel() - } - ] - } - ]; - baseProperties.HeaderText = this.customJSON.Name; - baseProperties.PropertyType = 'barcode'; - baseProperties.SubType = 'barcode'; - baseProperties.IsEditHeader = true; - baseProperties.Items = $.merge(itemProperties, baseProperties.Items); - return baseProperties; + EJBarcode.prototype.getPropertyGridItems = function () { + var propertyItems = { + 'HeaderText': this.customJSON.Name, + 'PropertyType': 'barcode', + 'SubType': 'barcode', + 'IsEditHeader': true, + 'Items': [{ + 'CategoryId': 'basicsettings', + 'DisplayName': this.getLocale('categoryBasicSettings'), + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': this.getLocale('BarcodeType'), + 'Value': this.getPropertyVal('BarcodeType'), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': ['Code39', 'Code39Extended', 'Code11', 'Codabar', 'Code93', 'Code128A', 'Code128B', + 'Code128C', 'UpcBarcode', 'EAN-13', 'EAN-8', 'Code39 Mod 43', 'Interleaved 2 of 5', + 'Standard 2 of 5', 'Pharmacode'] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': this.getLocale('barcodeValue'), + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': this.getLocale('displayText'), + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false + } + ] + } + ] + }; + return propertyItems; }; EJBarcode.prototype.getPropertyVal = function (name) { if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { @@ -182,19 +165,13 @@ var EJBarcode = (function () { this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); }; EJBarcode.prototype.updatePropertyVal = function (propertyName, value) { - var isUpdated = false; if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { if (this.customJSON.CustomProperties[index].Name === propertyName) { this.customJSON.CustomProperties[index].Value = value; - isUpdated = true; - break; } } } - if (!isUpdated) { - this.setPropertyVal(propertyName, value); - } }; EJBarcode.prototype.getReportItemJson = function () { if (this.customJSON === null) { @@ -202,43 +179,14 @@ var EJBarcode = (function () { this.setPropertyVal('BarcodeValue', '00000'); this.setPropertyVal('BarcodeType', 'Code39'); this.setPropertyVal('DisplayBarcodeText', 'true'); - this.setPropertyVal('BarcodeRotation', 'None'); } return this.customJSON; }; - EJBarcode.prototype.getRotationLevel = function () { - return [ - { - text: 'rotationnone', value: 'None' - }, - { - text: 'rotate90degrees', value: 'Rotate90Degrees' - }, - { - text: 'rotate180degrees', value: 'Rotate180Degrees' - }, - { - text: 'rotate270degrees', value: 'Rotate270Degrees' - } - ]; - }; - EJBarcode.prototype.getBarcodeRotation = function (rotation) { - var rotationVal = rotation ? rotation.toLowerCase() : ''; - switch (rotationVal) { - case 'none': return 'None'; - case 'rotate90degrees': return 'Rotate90Degrees'; - case 'rotate180degrees': return 'Rotate180Degrees'; - case 'rotate270degrees': return 'Rotate270Degrees'; - } - return 'None'; - }; EJBarcode.prototype.setReportItemJson = function (reportItem) { this.customJSON = reportItem; }; EJBarcode.prototype.dispose = function () { }; - EJBarcode.prototype.undoRedoAction = function (args) { - }; EJBarcode.prototype.isDisplayText = function () { return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; }; @@ -273,31 +221,6 @@ var EJBarcode = (function () { return barcodeLocale.categoryBasicSettings; } return defaultLocale.categoryBasicSettings; - case 'barcoderotationlabel': - if (barcodeLocale && barcodeLocale.barcodeRotationLabel) { - return barcodeLocale.barcodeRotationLabel; - } - return defaultLocale.barcodeRotationLabel; - case 'rotationnone': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotationNone) { - return barcodeLocale.barcodeRotation.rotationNone; - } - return defaultLocale.barcodeRotation.rotationNone; - case 'rotate90degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate90degrees) { - return barcodeLocale.barcodeRotation.rotate90degrees; - } - return defaultLocale.barcodeRotation.rotate90degrees; - case 'rotate180degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate180degrees) { - return barcodeLocale.barcodeRotation.rotate180degrees; - } - return defaultLocale.barcodeRotation.rotate180degrees; - case 'rotate270degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate270degrees) { - return barcodeLocale.barcodeRotation.rotate270degrees; - } - return defaultLocale.barcodeRotation.rotate270degrees; } return text; }; @@ -311,7 +234,7 @@ var EJBarcode = (function () { this.errMsgDiv.css('display', 'none'); this.customItemDiv.css({ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', - 'background-size': '100% 100%', + 'background-size': 'auto 100%', 'background-repeat': 'no-repeat', 'background-position': 'left top' }); @@ -326,37 +249,13 @@ var EJBarcode = (function () { }; return EJBarcode; }()); +export { EJBarcode }; EJBarcode.Locale = {}; -EJBarcode.Locale['en-NZ'] = { - barcodeValue: 'Text', - barcodeType: 'Symbology Type', - textVisibility: 'Text Visibility', - categoryBasicSettings: 'Basic Settings', - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'None', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - toolTip: { - requirements: 'Display any barcode type.', - description: 'Displays the barcodes.', - title: 'Barcode' - } -}; EJBarcode.Locale['en-US'] = { barcodeValue: 'Text', barcodeType: 'Symbology Type', textVisibility: 'Text Visibility', categoryBasicSettings: 'Basic Settings', - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'None', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, toolTip: { requirements: 'Display any barcode type.', description: 'Displays the barcodes.', @@ -367,13 +266,6 @@ EJBarcode.Locale['fr-FR'] = { barcodeValue: 'Texte', barcodeType: 'Type de symbologie', textVisibility: 'Visibilite du texte', - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'Aucun', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, categoryBasicSettings: 'Paramètres de base', toolTip: { requirements: 'Afficher n\'importe quel type de code à barres.', @@ -381,113 +273,3 @@ EJBarcode.Locale['fr-FR'] = { title: 'code à barre' } }; -EJBarcode.Locale['he-IL'] = { - barcodeValue: 'טקסט', - barcodeType: 'סוג סימנים', - textVisibility: 'הצגת טקסט', - barcodeRotationLabel: 'סיבוב', - barcodeRotation: { - rotationNone: 'ללא', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: 'הגדרות בסיסיות', - toolTip: { - requirements: 'הצג כל סוג של ברקוד.', - description: 'מציג ברקודים.', - title: 'ברקוד' - } -}; -EJBarcode.Locale['ja-JP'] = { - barcodeValue: 'テキスト', - barcodeType: 'シンボロジータイプ', - textVisibility: 'テキストの表示', - barcodeRotationLabel: '回転', - barcodeRotation: { - rotationNone: 'なし', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: '基本設定', - toolTip: { - requirements: 'すべてのバーコードタイプを表示します。', - description: 'バーコードを表示します。', - title: 'バーコード' - } -}; -EJBarcode.Locale['pt-PT'] = { - barcodeValue: 'Texto', - barcodeType: 'Tipo de simbologia', - textVisibility: 'Visibilidade do texto', - barcodeRotationLabel: 'Rotação', - barcodeRotation: { - rotationNone: 'Nenhuma', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: 'Configurações básicas', - toolTip: { - requirements: 'Exibe qualquer tipo de código de barras.', - description: 'Exibe os códigos de barras.', - title: 'Código de barras' - } -}; -EJBarcode.Locale['ru-RU'] = { - barcodeValue: 'Текст', - barcodeType: 'Тип символики', - textVisibility: 'Отображение текста', - barcodeRotationLabel: 'Вращение', - barcodeRotation: { - rotationNone: 'Нет', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: 'Основные настройки', - toolTip: { - requirements: 'Отображает любой тип штрихкода.', - description: 'Отображает штрихкоды.', - title: 'Штрихкод' - } -}; -EJBarcode.Locale['zh-Hans'] = { - barcodeValue: '文本', - barcodeType: '符号类型', - textVisibility: '文本可见性', - barcodeRotationLabel: '旋转', - barcodeRotation: { - rotationNone: '无', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: '基本设置', - toolTip: { - requirements: '显示任何条码类型。', - description: '显示条码。', - title: '条码' - } -}; -EJBarcode.Locale['zh-Hant'] = { - barcodeValue: '文字', - barcodeType: '符號類型', - textVisibility: '文字可見性', - barcodeRotationLabel: '旋轉', - barcodeRotation: { - rotationNone: '無', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - }, - categoryBasicSettings: '基本設定', - toolTip: { - requirements: '顯示任何條碼類型。', - description: '顯示條碼。', - title: '條碼' - } -}; - -export { EJBarcode }; \ No newline at end of file diff --git a/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js b/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js index c2171b2..9409ce3 100644 --- a/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js +++ b/src/app/components/extensions/report-item-extensions/qrbarcode.reportitem.js @@ -1,30 +1,26 @@ var EJQRBarcode = (function () { function EJQRBarcode(rptDesigner) { this.customJSON = null; - this.propertyPanel = null; this.rootElement = null; this.customItemDiv = null; this.reportDesigner = null; this.loaderDiv = null; this.errMsgDiv = null; this.reportDesigner = rptDesigner; - this.propertyPanel = this.reportDesigner.getInstance('PropertyPanel'); } EJQRBarcode.prototype.initializeItem = function (args) { args.isBuildInService = true; args.defaultHeight = 160; args.defaultWidth = 160; args.minimumHeight = 15; - args.minimumWidth = 15; + args.minimumWidth = 90; args.renderCallback = $.proxy(this.renderData, this); args.loadingCallback = $.proxy(this.showIndicator, this); }; - EJQRBarcode.prototype.renderItem = function (customJson, target, eventData) { - if (eventData.eventName === 'begin') { - this.customJSON = customJson; - this.rootElement = target; - this.renderBarcode(); - } + EJQRBarcode.prototype.renderItem = function (customJson, target) { + this.customJSON = customJson; + this.rootElement = target; + this.renderBarcode(); }; EJQRBarcode.prototype.renderBarcode = function () { this.customItemDiv = ej.buildTag('div.customitem', '', { @@ -81,58 +77,12 @@ var EJQRBarcode = (function () { case 'BarcodeType': newValue = this.setBarcodeType(newValue); this.updatePropertyVal(name, newValue); - if (!this.reportDesigner.undoManager.isPerformAction) { - var baseInstance = this.rootElement.data('CustomItem'); - var correctionOldVal = this.getPropertyVal('CorrectionLevel'); - baseInstance.updatePropertyChange(this.getCorrectionId(oldValue), correctionOldVal, null); - var correctionId = this.getCorrectionId(newValue); - if (correctionId) { - var correctionNewVal = this.getCorrectionVal(newValue); - baseInstance.updatePropertyChange(this.getCorrectionId(newValue), null, correctionNewVal); - this.updatePropertyUIValue(correctionId, correctionNewVal); - } - } break; case 'BarcodeValue': this.updatePropertyVal(name, newValue); break; case 'DisplayBarcodeText': this.updatePropertyVal(name, (newValue === true) ? 'true' : 'false'); - break; - case 'QrcodeCorrectionLevel': - newValue = this.getQrErrCorrLevel(newValue); - this.updatePropertyVal('CorrectionLevel', newValue); - break; - case 'Pdf417CorrectionLevel': - newValue = this.getPdfErrCorrLevel(newValue); - this.updatePropertyVal('CorrectionLevel', newValue); - break; - case 'BarcodeRotation': - this.updatePropertyVal(name, newValue ? newValue : 'None'); - break; - } - }; - EJQRBarcode.prototype.updatePropertyUIValue = function (name, value) { - var customId = this.customJSON.UniqueId; - switch (name) { - case 'BarcodeType': - this.propertyPanel.updatePropertyUIValue('barcodetype', value, customId); - break; - case 'BarcodeValue': - this.propertyPanel.updatePropertyUIValue('barcodevalue', value, customId); - break; - case 'DisplayBarcodeText': - this.propertyPanel.updatePropertyUIValue('displaybarcodetext', value, customId); - break; - case 'QrcodeCorrectionLevel': - this.propertyPanel.updatePropertyUIValue('qrerrcorrlevel', value, customId); - break; - case 'Pdf417CorrectionLevel': - this.propertyPanel.updatePropertyUIValue('pdferrcorrlevel', value, customId); - break; - case 'BarcodeRotation': - this.propertyPanel.updatePropertyUIValue('barcoderotation', value, customId); - break; } }; EJQRBarcode.prototype.onPositionChanged = function (top, left) { @@ -155,93 +105,60 @@ var EJQRBarcode = (function () { }); } }; - EJQRBarcode.prototype.getPropertyGridItems = function (baseProperties) { - var itemProperties = [{ - 'CategoryId': 'basicsettings', - 'DisplayName': 'categoryBasicSettings', - 'IsExpand': true, - 'Items': [ - { - 'ItemId': 'barcodetype', - 'Name': 'BarcodeType', - 'DisplayName': 'BarcodeType', - 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')), - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'DependentItems': [ - { - 'EnableItems': ['basicsettings_qrerrcorrlevel'], - 'DisableItems': ['basicsettings_pdferrcorrlevel'], - 'Value': ['QR Barcode'] - }, - { - 'EnableItems': ['basicsettings_pdferrcorrlevel'], - 'DisableItems': ['basicsettings_qrerrcorrlevel'], - 'Value': ['PDF417'] - }, - { - 'EnableItems': [], - 'DisableItems': ['basicsettings_qrerrcorrlevel', 'basicsettings_pdferrcorrlevel'], - 'Value': ['Data Matrix'] - } - ], - 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417'] - }, - { - 'ItemId': 'barcodevalue', - 'Name': 'BarcodeValue', - 'DisplayName': 'barcodeValue', - 'EnableExpression': true, - 'Value': this.getPropertyVal('BarcodeValue'), - 'ItemType': 'TextBox' - }, - { - 'ItemId': 'displaybarcodetext', - 'Name': 'DisplayBarcodeText', - 'DisplayName': 'displayText', - 'Value': this.isDisplayText() ? true : false, - 'ItemType': 'Bool', - 'EnableExpression': false, - 'IsVisible': false - }, - { - 'ItemId': 'qrerrcorrlevel', - 'Name': 'QrcodeCorrectionLevel', - 'DisplayName': 'correctionLabel', - 'Value': this.getQrErrCorrLevel(this.getPropertyVal('CorrectionLevel')), - 'ParentId': 'basicsettings_barcodetype', - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': this.getQrcodeCorrectionLevel() - }, - { - 'ItemId': 'pdferrcorrlevel', - 'Name': 'Pdf417CorrectionLevel', - 'DisplayName': 'correctionLabel', - 'Value': this.getPdfErrCorrLevel(this.getPropertyVal('CorrectionLevel')), - 'ParentId': 'basicsettings_barcodetype', - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': this.getPDF417CorrectionLevel() - }, - { - 'ItemId': 'barcoderotation', - 'Name': 'BarcodeRotation', - 'DisplayName': 'barcodeRotationLabel', - 'Value': this.getBarcodeRotation(this.getPropertyVal('BarcodeRotation')), - 'ItemType': 'DropDown', - 'EnableExpression': false, - 'ValueList': this.getRotationLevel() - } - ] - } - ]; - baseProperties.HeaderText = this.customJSON.Name; - baseProperties.PropertyType = 'qrbarcode'; - baseProperties.SubType = 'qrbarcode'; - baseProperties.IsEditHeader = true; - baseProperties.Items = $.merge(itemProperties, baseProperties.Items); - return baseProperties; + EJQRBarcode.prototype.getPropertyGridItems = function () { + var propertyItems = { + 'HeaderText': this.customJSON.Name, + 'PropertyType': 'qrbarcode', + 'SubType': 'qrbarcode', + 'IsEditHeader': true, + 'Items': [{ + 'CategoryId': 'basicsettings', + 'DisplayName': this.getLocale('categoryBasicSettings'), + 'IsExpand': true, + 'Items': [ + { + 'ItemId': 'barcodetype', + 'Name': 'BarcodeType', + 'DisplayName': this.getLocale('BarcodeType'), + 'Value': this.getBarcodeType(this.getPropertyVal('BarcodeType')), + 'ItemType': 'DropDown', + 'EnableExpression': false, + 'ValueList': ['QR Barcode', 'Data Matrix', 'PDF417'], + 'DependentItems': [ + { + EnableItems: ['basicsettings_displaybarcodetext'], + DisableItems: [], + Value: ['QR Barcode'] + }, + { + EnableItems: [], + DisableItems: ['basicsettings_displaybarcodetext'], + Value: ['Data Matrix', 'PDF417'] + } + ] + }, + { + 'ItemId': 'barcodevalue', + 'Name': 'BarcodeValue', + 'DisplayName': this.getLocale('barcodeValue'), + 'EnableExpression': true, + 'Value': this.getPropertyVal('BarcodeValue'), + 'ItemType': 'TextBox' + }, + { + 'ItemId': 'displaybarcodetext', + 'Name': 'DisplayBarcodeText', + 'DisplayName': this.getLocale('displayText'), + 'Value': this.isDisplayText() ? true : false, + 'ItemType': 'Bool', + 'EnableExpression': false, + 'ParentId': 'basicsettings_barcodetype' + } + ] + } + ] + }; + return propertyItems; }; EJQRBarcode.prototype.getPropertyVal = function (name) { if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { @@ -253,82 +170,6 @@ var EJQRBarcode = (function () { } return null; }; - EJQRBarcode.prototype.getPDF417CorrectionLevel = function () { - return [ - { - text: 'auto', value: 'Auto' - }, - { - text: 'level0', value: 'Level0' - }, - { - text: 'level1', value: 'Level1' - }, - { - text: 'level2', value: 'Level2' - }, - { - text: 'level3', value: 'Level3' - }, - { - text: 'level4', value: 'Level4' - }, - { - text: 'level5', value: 'Level5' - }, - { - text: 'level6', value: 'Level6' - }, - { - text: 'level7', value: 'Level7' - }, - { - text: 'level8', value: 'Level8' - } - ]; - }; - EJQRBarcode.prototype.getQrcodeCorrectionLevel = function () { - return [ - { - text: 'low', value: 'Low' - }, - { - text: 'medium', value: 'Medium' - }, - { - text: 'quartile', value: 'Quartile' - }, - { - text: 'high', value: 'High' - } - ]; - }; - EJQRBarcode.prototype.getRotationLevel = function () { - return [ - { - text: 'rotationnone', value: 'None' - }, - { - text: 'rotate90degrees', value: 'Rotate90Degrees' - }, - { - text: 'rotate180degrees', value: 'Rotate180Degrees' - }, - { - text: 'rotate270degrees', value: 'Rotate270Degrees' - } - ]; - }; - EJQRBarcode.prototype.getBarcodeRotation = function (rotation) { - var rotationVal = rotation ? rotation.toLowerCase() : ''; - switch (rotationVal) { - case 'none': return 'None'; - case 'rotate90degrees': return 'Rotate90Degrees'; - case 'rotate180degrees': return 'Rotate180Degrees'; - case 'rotate270degrees': return 'Rotate270Degrees'; - } - return 'None'; - }; EJQRBarcode.prototype.getBarcodeType = function (type) { switch (type.toLowerCase()) { case 'qrbarcode': return 'QR Barcode'; @@ -337,57 +178,14 @@ var EJQRBarcode = (function () { } return type; }; - EJQRBarcode.prototype.getQrErrCorrLevel = function (level) { - var errLvl = level ? level.toLowerCase() : ''; - switch (errLvl) { - case 'low': return 'Low'; - case 'medium': return 'Medium'; - case 'quartile': return 'Quartile'; - case 'high': return 'High'; - } - return 'Low'; - }; - EJQRBarcode.prototype.getPdfErrCorrLevel = function (level) { - var errLvl = level ? level.toLowerCase() : ''; - switch (errLvl) { - case 'auto': return 'Auto'; - case 'level0': return 'Level0'; - case 'level1': return 'Level1'; - case 'level2': return 'Level2'; - case 'level3': return 'Level3'; - case 'level4': return 'Level4'; - case 'level5': return 'Level5'; - case 'level6': return 'Level6'; - case 'level7': return 'Level7'; - case 'level8': return 'Level8'; - } - return 'Auto'; - }; EJQRBarcode.prototype.setBarcodeType = function (type) { - var barcodeType = type.replace(/\s+/g, ''); - switch (barcodeType.toLowerCase()) { - case 'qrbarcode': return 'QRBarcode'; - case 'datamatrix': return 'DataMatrix'; + switch (type.toLowerCase()) { + case 'qr barcode': return 'QRBarcode'; + case 'data matrix': return 'DataMatrix'; case 'pdf417': return 'PDF417'; } return type; }; - EJQRBarcode.prototype.getCorrectionVal = function (type) { - var barcodeType = type.replace(/\s+/g, ''); - switch (barcodeType.toLowerCase()) { - case 'qrbarcode': return this.getQrcodeCorrectionLevel()[0].value; - case 'pdf417': return this.getPDF417CorrectionLevel()[0].value; - } - return null; - }; - EJQRBarcode.prototype.getCorrectionId = function (type) { - var barcodeType = type.replace(/\s+/g, ''); - switch (barcodeType.toLowerCase()) { - case 'qrbarcode': return 'QrcodeCorrectionLevel'; - case 'pdf417': return 'Pdf417CorrectionLevel'; - } - return null; - }; EJQRBarcode.prototype.setPropertyVal = function (name, val) { if (this.customJSON.CustomProperties === null) { this.customJSON.CustomProperties = []; @@ -395,19 +193,13 @@ var EJQRBarcode = (function () { this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val)); }; EJQRBarcode.prototype.updatePropertyVal = function (propertyName, value) { - var isUpdated = false; if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) { for (var index = 0; index < this.customJSON.CustomProperties.length; index++) { if (this.customJSON.CustomProperties[index].Name === propertyName) { this.customJSON.CustomProperties[index].Value = value; - isUpdated = true; - break; } } } - if (!isUpdated) { - this.setPropertyVal(propertyName, value); - } }; EJQRBarcode.prototype.getReportItemJson = function () { if (this.customJSON === null) { @@ -415,8 +207,6 @@ var EJQRBarcode = (function () { this.setPropertyVal('BarcodeValue', '00000'); this.setPropertyVal('BarcodeType', 'QRBarcode'); this.setPropertyVal('DisplayBarcodeText', 'true'); - this.setPropertyVal('CorrectionLevel', 'Low'); - this.setPropertyVal('BarcodeRotation', 'None'); } return this.customJSON; }; @@ -428,8 +218,6 @@ var EJQRBarcode = (function () { EJQRBarcode.prototype.isDisplayText = function () { return (this.getPropertyVal('DisplayBarcodeText').toLowerCase()) === 'true'; }; - EJQRBarcode.prototype.undoRedoAction = function (args) { - }; EJQRBarcode.prototype.getLocale = function (text) { var barcodeLocale; var defaultLocale = EJQRBarcode.Locale['en-US']; @@ -461,106 +249,6 @@ var EJQRBarcode = (function () { return barcodeLocale.categoryBasicSettings; } return defaultLocale.categoryBasicSettings; - case 'correctionlabel': - if (barcodeLocale && barcodeLocale.correctionLabel) { - return barcodeLocale.correctionLabel; - } - return defaultLocale.correctionLabel; - case 'low': - if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.low) { - return barcodeLocale.qrcodeCorrectionLevel.low; - } - return defaultLocale.qrcodeCorrectionLevel.low; - case 'medium': - if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.medium) { - return barcodeLocale.qrcodeCorrectionLevel.medium; - } - return defaultLocale.qrcodeCorrectionLevel.medium; - case 'quartile': - if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.quartile) { - return barcodeLocale.qrcodeCorrectionLevel.quartile; - } - return defaultLocale.qrcodeCorrectionLevel.quartile; - case 'high': - if (barcodeLocale && barcodeLocale.qrcodeCorrectionLevel.high) { - return barcodeLocale.qrcodeCorrectionLevel.high; - } - return defaultLocale.qrcodeCorrectionLevel.high; - case 'level0': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level0) { - return barcodeLocale.pdf417CorrectionLevel.level0; - } - return defaultLocale.pdf417CorrectionLevel.level0; - case 'level1': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level1) { - return barcodeLocale.pdf417CorrectionLevel.level1; - } - return defaultLocale.pdf417CorrectionLevel.level1; - case 'level2': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level2) { - return barcodeLocale.pdf417CorrectionLevel.level2; - } - return defaultLocale.pdf417CorrectionLevel.level2; - case 'level3': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level3) { - return barcodeLocale.pdf417CorrectionLevel.level3; - } - return defaultLocale.pdf417CorrectionLevel.level3; - case 'level4': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level4) { - return barcodeLocale.pdf417CorrectionLevel.level4; - } - return defaultLocale.pdf417CorrectionLevel.level4; - case 'level5': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level5) { - return barcodeLocale.pdf417CorrectionLevel.level5; - } - return defaultLocale.pdf417CorrectionLevel.level5; - case 'level6': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level6) { - return barcodeLocale.pdf417CorrectionLevel.level6; - } - return defaultLocale.pdf417CorrectionLevel.level6; - case 'level7': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level7) { - return barcodeLocale.pdf417CorrectionLevel.level7; - } - return defaultLocale.pdf417CorrectionLevel.level7; - case 'level8': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.level8) { - return barcodeLocale.pdf417CorrectionLevel.level8; - } - return defaultLocale.pdf417CorrectionLevel.level8; - case 'auto': - if (barcodeLocale && barcodeLocale.pdf417CorrectionLevel.auto) { - return barcodeLocale.pdf417CorrectionLevel.auto; - } - return defaultLocale.pdf417CorrectionLevel.auto; - case 'barcoderotationlabel': - if (barcodeLocale && barcodeLocale.barcodeRotationLabel) { - return barcodeLocale.barcodeRotationLabel; - } - return defaultLocale.barcodeRotationLabel; - case 'rotationnone': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotationNone) { - return barcodeLocale.barcodeRotation.rotationNone; - } - return defaultLocale.barcodeRotation.rotationNone; - case 'rotate90degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate90degrees) { - return barcodeLocale.barcodeRotation.rotate90degrees; - } - return defaultLocale.barcodeRotation.rotate90degrees; - case 'rotate180degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate180degrees) { - return barcodeLocale.barcodeRotation.rotate180degrees; - } - return defaultLocale.barcodeRotation.rotate180degrees; - case 'rotate270degrees': - if (barcodeLocale && barcodeLocale.barcodeRotation.rotate270degrees) { - return barcodeLocale.barcodeRotation.rotate270degrees; - } - return defaultLocale.barcodeRotation.rotate270degrees; } return text; }; @@ -574,7 +262,7 @@ var EJQRBarcode = (function () { this.errMsgDiv.css('display', 'none'); this.customItemDiv.css({ 'background-image': 'url(data:image/BMP;base64,' + args.data + ')', - 'background-size': '100% 100%', + 'background-size': 'auto 100%', 'background-repeat': 'no-repeat', 'background-position': 'left top' }); @@ -589,44 +277,8 @@ var EJQRBarcode = (function () { }; return EJQRBarcode; }()); +export { EJQRBarcode }; EJQRBarcode.Locale = {}; -EJQRBarcode.Locale['en-NZ'] = { - barcodeType: 'Symbology Type', - barcodeValue: 'Text', - textVisibility: 'Text Visibility', - categoryBasicSettings: 'Basic Settings', - toolTip: { - requirements: 'Display any barcode type.', - description: 'Displays the barcodes.', - title: 'QRBarcode' - }, - correctionLabel: 'Correction Level', - qrcodeCorrectionLevel: { - low: 'Low', - medium: 'Medium', - quartile: 'Quartile', - high: 'High' - }, - pdf417CorrectionLevel: { - auto: 'Auto', - level0: 'Level0', - level1: 'Level1', - level2: 'Level2', - level3: 'Level3', - level4: 'Level4', - level5: 'Level5', - level6: 'Level6', - level7: 'Level7', - level8: 'Level8', - }, - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'None', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; EJQRBarcode.Locale['en-US'] = { barcodeType: 'Symbology Type', barcodeValue: 'Text', @@ -636,32 +288,6 @@ EJQRBarcode.Locale['en-US'] = { requirements: 'Display any barcode type.', description: 'Displays the barcodes.', title: 'QRBarcode' - }, - correctionLabel: 'Correction Level', - qrcodeCorrectionLevel: { - low: 'Low', - medium: 'Medium', - quartile: 'Quartile', - high: 'High' - }, - pdf417CorrectionLevel: { - auto: 'Auto', - level0: 'Level0', - level1: 'Level1', - level2: 'Level2', - level3: 'Level3', - level4: 'Level4', - level5: 'Level5', - level6: 'Level6', - level7: 'Level7', - level8: 'Level8', - }, - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'None', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' } }; EJQRBarcode.Locale['fr-FR'] = { @@ -673,255 +299,5 @@ EJQRBarcode.Locale['fr-FR'] = { requirements: 'Afficher n\'importe quel type de code à barres.', description: 'Affiche les codes barres.', title: 'QRBarcode' - }, - correctionLabel: 'Niveau de correction', - qrcodeCorrectionLevel: { - low: 'Faible', - medium: 'Moyen', - quartile: 'Quartile', - high: 'Haut' - }, - pdf417CorrectionLevel: { - auto: 'Auto', - level0: 'Niveau0', - level1: 'Niveau1', - level2: 'Niveau2', - level3: 'Niveau3', - level4: 'Niveau4', - level5: 'Niveau5', - level6: 'Niveau6', - level7: 'Niveau7', - level8: 'Niveau8', - }, - barcodeRotationLabel: 'Rotation', - barcodeRotation: { - rotationNone: 'Aucun', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['he-IL'] = { - barcodeType: 'סוג סימנים', - barcodeValue: 'טקסט', - textVisibility: 'הצגת טקסט', - categoryBasicSettings: 'הגדרות בסיסיות', - toolTip: { - requirements: 'הצג כל סוג של ברקוד.', - description: 'מציג ברקודים.', - title: 'ברקוד QR' - }, - correctionLabel: 'רמת תיקון', - qrcodeCorrectionLevel: { - low: 'נמוכה', - medium: 'בינונית', - quartile: 'רמה רבעית', - high: 'גבוהה' - }, - pdf417CorrectionLevel: { - auto: 'אוטומטית', - level0: 'רמה 0', - level1: 'רמה 1', - level2: 'רמה 2', - level3: 'רמה 3', - level4: 'רמה 4', - level5: 'רמה 5', - level6: 'רמה 6', - level7: 'רמה 7', - level8: 'רמה 8', - }, - barcodeRotationLabel: 'סיבוב', - barcodeRotation: { - rotationNone: 'ללא', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['ja-JP'] = { - barcodeType: 'シンボロジータイプ', - barcodeValue: 'テキスト', - textVisibility: 'テキストの表示', - categoryBasicSettings: '基本設定', - toolTip: { - requirements: 'すべてのバーコードタイプを表示します。', - description: 'バーコードを表示します。', - title: 'QRバーコード' - }, - correctionLabel: '訂正レベル', - qrcodeCorrectionLevel: { - low: '低', - medium: '中', - quartile: '四分位', - high: '高' - }, - pdf417CorrectionLevel: { - auto: '自動', - level0: 'レベル0', - level1: 'レベル1', - level2: 'レベル2', - level3: 'レベル3', - level4: 'レベル4', - level5: 'レベル5', - level6: 'レベル6', - level7: 'レベル7', - level8: 'レベル8', - }, - barcodeRotationLabel: '回転', - barcodeRotation: { - rotationNone: 'なし', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['pt-PT'] = { - barcodeType: 'Tipo de simbologia', - barcodeValue: 'Texto', - textVisibility: 'Visibilidade do texto', - categoryBasicSettings: 'Configurações básicas', - toolTip: { - requirements: 'Exibe qualquer tipo de código de barras.', - description: 'Exibe os códigos de barras.', - title: 'Código QR' - }, - correctionLabel: 'Nível de correção', - qrcodeCorrectionLevel: { - low: 'Baixo', - medium: 'Médio', - quartile: 'Quartil', - high: 'Alto' - }, - pdf417CorrectionLevel: { - auto: 'Automático', - level0: 'Nível0', - level1: 'Nível1', - level2: 'Nível2', - level3: 'Nível3', - level4: 'Nível4', - level5: 'Nível5', - level6: 'Nível6', - level7: 'Nível7', - level8: 'Nível8', - }, - barcodeRotationLabel: 'Rotação', - barcodeRotation: { - rotationNone: 'Nenhuma', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['ru-RU'] = { - barcodeType: 'Тип символики', - barcodeValue: 'Текст', - textVisibility: 'Отображение текста', - categoryBasicSettings: 'Основные настройки', - toolTip: { - requirements: 'Отображает любой тип штрихкода.', - description: 'Отображает штрихкоды.', - title: 'QR-код' - }, - correctionLabel: 'Уровень коррекции', - qrcodeCorrectionLevel: { - low: 'Низкий', - medium: 'Средний', - quartile: 'Квартиль', - high: 'Высокий' - }, - pdf417CorrectionLevel: { - auto: 'Авто', - level0: 'Уровень0', - level1: 'Уровень1', - level2: 'Уровень2', - level3: 'Уровень3', - level4: 'Уровень4', - level5: 'Уровень5', - level6: 'Уровень6', - level7: 'Уровень7', - level8: 'Уровень8', - }, - barcodeRotationLabel: 'Вращение', - barcodeRotation: { - rotationNone: 'Нет', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['zh-Hans'] = { - barcodeType: '符号类型', - barcodeValue: '文本', - textVisibility: '文本可见性', - categoryBasicSettings: '基本设置', - toolTip: { - requirements: '显示任何条码类型。', - description: '显示条码。', - title: '二维码' - }, - correctionLabel: '纠错级别', - qrcodeCorrectionLevel: { - low: '低', - medium: '中', - quartile: '四分位', - high: '高' - }, - pdf417CorrectionLevel: { - auto: '自动', - level0: '级别0', - level1: '级别1', - level2: '级别2', - level3: '级别3', - level4: '级别4', - level5: '级别5', - level6: '级别6', - level7: '级别7', - level8: '级别8', - }, - barcodeRotationLabel: '旋转', - barcodeRotation: { - rotationNone: '无', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' - } -}; -EJQRBarcode.Locale['zh-Hant'] = { - barcodeType: '符號類型', - barcodeValue: '文字', - textVisibility: '文字可見性', - categoryBasicSettings: '基本設定', - toolTip: { - requirements: '顯示任何條碼類型。', - description: '顯示條碼。', - title: '二維碼' - }, - correctionLabel: '糾錯等級', - qrcodeCorrectionLevel: { - low: '低', - medium: '中', - quartile: '四分位', - high: '高' - }, - pdf417CorrectionLevel: { - auto: '自動', - level0: '等級0', - level1: '等級1', - level2: '等級2', - level3: '等級3', - level4: '等級4', - level5: '等級5', - level6: '等級6', - level7: '等級7', - level8: '等級8' - }, - barcodeRotationLabel: '旋轉', - barcodeRotation: { - rotationNone: '無', - rotate90degrees: '90', - rotate180degrees: '180', - rotate270degrees: '270' } }; - -export { EJQRBarcode }; \ No newline at end of file From a4b55dce37484a1a4cb90b17aa9929052419bf62 Mon Sep 17 00:00:00 2001 From: SundaresanGunasekaran Date: Fri, 2 Jan 2026 09:44:16 +0530 Subject: [PATCH 3/4] feature(REPORT-481519): Gulp Task Updated --- build/build.js | 2 +- build/serve.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/build.js b/build/build.js index a687cf8..900dced 100644 --- a/build/build.js +++ b/build/build.js @@ -7,7 +7,7 @@ const ngCli = "node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng"; gulp.task('production-build', (done) => { runSequence('update-extensions-export', 'generate-router', () => { - if (argv.prefix) { + if (argv?.prefix) { exec(`${ngCli} build -c production --base-href ${argv.prefix}`); } else { exec(`${ngCli} build -c production`); diff --git a/build/serve.js b/build/serve.js index feed116..3042156 100644 --- a/build/serve.js +++ b/build/serve.js @@ -6,7 +6,7 @@ const runSequence = require('gulp4-run-sequence'); gulp.task('serve', (done) => { runSequence('update-extensions-export', 'generate-router', () => { - exec(`${ngCli} serve --open --port ${argv.port || ''}`); + exec(`${ngCli} serve --open --port ${argv?.port || ''}`); done(); }); }); From 837ebb2b65a215b54fb1b6b766c55616592f638d Mon Sep 17 00:00:00 2001 From: SundaresanGunasekaran Date: Fri, 2 Jan 2026 10:04:58 +0530 Subject: [PATCH 4/4] feature(REPORT-481519): Feedback comments addressed --- src/app/components/globals.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/globals.ts b/src/app/components/globals.ts index 82dff8f..142e5a4 100644 --- a/src/app/components/globals.ts +++ b/src/app/components/globals.ts @@ -1,6 +1,6 @@ export const Globals = { - SERVICE_URL: 'https://demos.boldreports.com/services/api/ReportViewerWebApi', - DESIGNER_SERVICE_URL: 'https://demos.boldreports.com/services/api/ReportDesignerWebApi', + SERVICE_URL: '/services/api/ReportViewerWebApi', + DESIGNER_SERVICE_URL: '/services/api/ReportDesignerWebApi', REPORT_CONTROL_ID: 'reportdesigner', TOOLBAR_OPTIONS: { showToolbar: true,