diff --git a/assets/sidebar/portrait.png b/assets/sidebar/portrait.png index cb3ae12..ac5b9e9 100644 Binary files a/assets/sidebar/portrait.png and b/assets/sidebar/portrait.png differ diff --git a/build/copy.js b/build/copy.js index 1a172c1..11c6fda 100644 --- a/build/copy.js +++ b/build/copy.js @@ -3,13 +3,12 @@ const { cp, mkdir } = require('shelljs'); const fs = require('fs'); const scripts = { - common: ['common/ej2-base.min.js', 'common/ej2-data.min.js', 'common/ej2-pdf-export.min.js', 'common/ej2-svg-base.min.js'], - control: ['data-visualization/ej2-circulargauge.min.js', 'data-visualization/ej2-lineargauge.min.js', 'data-visualization/ej2-maps.min.js'], barcode: ['images', 'barcode.reportitem.css', 'barcode.reportitem.js', 'qrbarcode.reportitem.js'], signature: ['signature.reportitem.css', 'signature.dialog.css', 'signature.reportitem.js', 'signature.dialog.js'], shape: ['shape.reportitem.css', 'shape.reportitem.js'], pdf: ['document.reportitem.css', 'pdfdocument.reportitem.js'], - html: ['htmldocument.reportitem.js'] + html: ['htmldocument.reportitem.js'], + pdfSignature: ['pdf.signature.reportitem.css', 'pdf.signature.reportitem.js'] }; const srcDir = 'node_modules/@boldreports/javascript-reporting-controls/Scripts/'; @@ -23,17 +22,17 @@ const extensionsExportTemp = { 'signatureDialog': 'export { SignatureDialog }', 'shape': 'export { EJShape }', 'pdfDocument': 'export { EJPdfDocument }', - 'htmlDocument': 'export { EJHtmlDocument }' + 'htmlDocument': 'export { EJHtmlDocument }', + 'pdfSignature': 'export { EJPDFSignature }' } gulp.task('copy', (done) => { - copyFiles(scripts.common, srcDir, destDir + 'common'); - copyFiles(scripts.control, srcDir, destDir + 'data-visualization'); copyFiles(scripts.barcode, extensionsItemSrcDir, extensionsItemDir); copyFiles(scripts.signature, extensionsItemSrcDir, extensionsItemDir); copyFiles(scripts.shape, extensionsItemSrcDir, extensionsItemDir); copyFiles(scripts.html, extensionsItemSrcDir, extensionsItemDir); copyFiles(scripts.pdf, extensionsItemSrcDir, extensionsItemDir); + copyFiles(scripts.pdfSignature, extensionsItemSrcDir, extensionsItemDir); done(); }); @@ -52,7 +51,8 @@ gulp.task('update-extensions-export', (done) => { 'signatureDialog': ['signature.dialog.js', 'signatureDialog'], 'shape': ['shape.reportitem.js', 'shape'], 'pdfDocument': ['pdfdocument.reportitem.js', 'pdfDocument'], - 'htmlDocument': ['htmldocument.reportitem.js', 'htmlDocument'] + 'htmlDocument': ['htmldocument.reportitem.js', 'htmlDocument'], + 'pdfSignature': ['pdf.signature.reportitem.js', 'pdfSignature'] }; const updateFile = (key, [filename, exportKey]) => { const filePath = `${extensionsItemDir}${filename}`; diff --git a/build/templates/common/index.html b/build/templates/common/index.html index 451702c..3490edc 100644 --- a/build/templates/common/index.html +++ b/build/templates/common/index.html @@ -21,6 +21,13 @@ location.href = location.origin + '/error.html'; } } + (function addTrailingSlash() { + var path = window.location.pathname; + if (path.indexOf('/preview') !== -1 && !path.endsWith('/')) { + var newUrl = window.location.origin + path + '/'; + window.location.replace(newUrl); + } + })(); diff --git a/build/templates/common/index.js b/build/templates/common/index.js index 1eeccf7..04662c7 100644 --- a/build/templates/common/index.js +++ b/build/templates/common/index.js @@ -49,6 +49,10 @@ import { SignatureDialog } from './../extensions/report-item-extensions/signatur import './../extensions/report-item-extensions/shape.reportitem.css'; import { EJShape } from './../extensions/report-item-extensions/shape.reportitem'; +//PDF signature +import './../extensions/report-item-extensions/pdf.signature.reportitem.css'; +import { EJPDFSignature } from './../extensions/report-item-extensions/pdf.signature.reportitem'; + //globals import './../../../src/controls/globals'; @@ -70,6 +74,9 @@ let htmlDocument = 'EJHtmlDocument'; window[pdfDocument] = EJPdfDocument; window[htmlDocument] = EJHtmlDocument; +let pdfSignature = 'EJPDFSignature'; +window[pdfSignature] = EJPDFSignature; + //code-mirror import 'codemirror/lib/codemirror'; import 'codemirror/addon/hint/show-hint'; diff --git a/build/templates/report-designer/index.html b/build/templates/report-designer/index.html index 645c012..4da39ac 100644 --- a/build/templates/report-designer/index.html +++ b/build/templates/report-designer/index.html @@ -21,6 +21,13 @@ location.href = location.origin + '/error.html'; } } + (function addTrailingSlash() { + var path = window.location.pathname; + if (path === '/report-designer') { + var newUrl = window.location.origin + path + '/' + window.location.search; + window.location.replace(newUrl); + } + })(); diff --git a/build/templates/report-designer/index.js b/build/templates/report-designer/index.js index eb6f51b..2d32c76 100644 --- a/build/templates/report-designer/index.js +++ b/build/templates/report-designer/index.js @@ -45,11 +45,22 @@ $(function () { className: 'EJSignature', imageClass: 'customitem-signature', displayName: 'Electronic', - category: 'Signature', + category: 'Signatures', toolTip:{ requirements: 'Add a report item to the designer area.', description: 'This report item is used to add a graphic signature.', - title: 'Signature' + title: 'Electronic Signature' + } + }, { + name: 'PDFSignature', + className: 'EJPDFSignature', + imageClass: 'customitem-pdfsignature', + displayName: 'PDF', + category: 'Signatures', + toolTip:{ + requirements: 'Add a report item to the designer area.', + description: 'This report item is used to add a digital PDF signature.', + title: 'PDF Signature' } }, { name: 'Shape', diff --git a/build/templates/report-designer/rdlc/index.html b/build/templates/report-designer/rdlc/index.html index b4bddd5..b110525 100644 --- a/build/templates/report-designer/rdlc/index.html +++ b/build/templates/report-designer/rdlc/index.html @@ -21,6 +21,13 @@ location.href = location.origin + '/error.html'; } } + (function addTrailingSlash() { + var path = window.location.pathname; + if (path === '/report-designer/rdlc') { + var newUrl = window.location.origin + path + '/' + window.location.search; + window.location.replace(newUrl); + } + })(); diff --git a/build/templates/report-designer/rdlc/index.js b/build/templates/report-designer/rdlc/index.js index 4131dfd..5d610fa 100644 --- a/build/templates/report-designer/rdlc/index.js +++ b/build/templates/report-designer/rdlc/index.js @@ -45,11 +45,22 @@ $(function () { className: 'EJSignature', imageClass: 'customitem-signature', displayName: 'Electronic', - category: 'Signature', + category: 'Signatures', toolTip:{ requirements: 'Add a report item to the designer area.', description: 'This report item is used to add a graphic signature.', - title: 'Signature' + title: 'Electronic Signature' + } + }, { + name: 'PDFSignature', + className: 'EJPDFSignature', + imageClass: 'customitem-pdfsignature', + displayName: 'PDF', + category: 'Signatures', + toolTip:{ + requirements: 'Add a report item to the designer area.', + description: 'This report item is used to add a digital PDF signature.', + title: 'PDF Signature' } }, { name: 'Shape', diff --git a/index.html b/index.html index f829791..8d84bdf 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,15 @@ location.href = location.origin + '/error.html'; } } + function addTrailingSlash() { + var path = window.location.href; + if (path && path !== '/' && !path.endsWith('/')) { + var newUrl = path + '/'; + window.location.replace(newUrl); + } + } + addTrailingSlash(); + window.addEventListener('hashchange', addTrailingSlash, false); diff --git a/package.json b/package.json index a7b14d1..f966d78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "javascript-samples", - "version": "11.1.10", + "version": "12.1.12", "description": "", "author": "", "license": "ISC", @@ -39,8 +39,8 @@ }, "dependencies": { "@babel/polyfill": "7.2.5", - "@boldreports/javascript-reporting-controls": "11.1.10", - "@boldreports/javascript-reporting-extensions": "11.1.10", + "@boldreports/javascript-reporting-controls": "12.1.12", + "@boldreports/javascript-reporting-extensions": "12.1.12", "codemirror": "5.58.2", "hasher": "1.2.0", "jquery": "3.6.0", diff --git a/src/common/main-content/main-content.js b/src/common/main-content/main-content.js index c842c19..325ac45 100644 --- a/src/common/main-content/main-content.js +++ b/src/common/main-content/main-content.js @@ -52,7 +52,7 @@ export class MainContent { const curRouterIndex = curRouterData.curIndex; const sampleData = curRouterData.isFirst ? samples[data.samples.length - 1] : samples[curRouterIndex - 1]; const reportPath = sampleData.routerPath ? (sampleData.basePath + '/' + sampleData.routerPath) : sampleData.basePath; - hasher.setHash(reportPath); + hasher.setHash(reportPath + "/"); } onTabNext() { @@ -62,7 +62,7 @@ export class MainContent { const curRouterIndex = curRouterData.curIndex; const sampleData = curRouterData.isLast ? samples[0] : samples[curRouterIndex + 1]; const reportPath = sampleData.routerPath ? (sampleData.basePath + '/' + sampleData.routerPath) : sampleData.basePath; - hasher.setHash(reportPath); + hasher.setHash(reportPath + "/"); } getCurRouterData() { diff --git a/src/common/sidebar/sidebar.css b/src/common/sidebar/sidebar.css index 5d6b0a9..ea4c63b 100644 --- a/src/common/sidebar/sidebar.css +++ b/src/common/sidebar/sidebar.css @@ -52,7 +52,7 @@ width: 90px; margin: 8px; background-image: url('./../../../assets/sidebar/portrait.png'); - background-size: 100% 2100%; + background-size: 100% 2200%; } .ej-sidebar-content .ej-sb-toc .ej-sb-toc-card .ej-sb-toc-title { diff --git a/src/common/sidebar/sidebar.js b/src/common/sidebar/sidebar.js index 455c13d..602db1c 100644 --- a/src/common/sidebar/sidebar.js +++ b/src/common/sidebar/sidebar.js @@ -1,5 +1,6 @@ import samplesData from '../../controls/samples.json'; import * as hasher from 'hasher'; +import { normalizeHash } from '../router'; export class Sidebar { constructor(element) { @@ -54,7 +55,7 @@ export class Sidebar { let index = ele.getAttribute('data-uid'); let sampleData = samplesData.samples[index]; const reportPath = sampleData.routerPath ? (sampleData.basePath + '/' + sampleData.routerPath) : sampleData.basePath; - hasher.setHash(reportPath); + hasher.setHash(reportPath + "/"); } } diff --git a/src/controls/hr-payroll/hr-payroll.html b/src/controls/hr-payroll/hr-payroll.html new file mode 100644 index 0000000..9734340 --- /dev/null +++ b/src/controls/hr-payroll/hr-payroll.html @@ -0,0 +1,18 @@ +
++ The HR Payroll report provides a comprehensive overview of employee compensation, departmental performance, and leave management. It helps HR teams analyze payroll trends and make informed decisions. +
+gross salary, net salary, and deductions across departments.Loss of Pay (LOP)breakdown by leave type: sick, good, and compensation leave.employee demographics such as gender distribution and contract types.average performance and employee count per department.+ For more information on how dynamic image report items enhance customization in multi-company HR reports, refer to this + documentation section. +
+