@syncfusion/ej2-base 34.1.29 → 34.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6815,6 +6815,57 @@ const bypassKey3 = [115, 121, 110, 99, 102, 117, 115, 105,
6815
6815
  111, 110, 46, 105, 115, 69, 83, 85, 73, 118, 51, 52, 76, 105, 99, 86, 97, 108, 105, 100, 97, 116, 101, 100];
6816
6816
  const esUI = ['spreadsheet', 'DocumentEditor', 'PdfViewer', 'pdf', 'pdf-extract'];
6817
6817
  const esUIv34 = ['spreadsheet', 'DocumentEditor', 'PdfViewer', 'pdf', 'pdf-extract', 'richtexteditor', 'diagram', 'schedule', 'gantt', 'blockeditor', 'kanban'];
6818
+ /**
6819
+ * Product map with base64-encoded product names
6820
+ */
6821
+ const productMap = {
6822
+ PDFViewer: 'UERGVmlld2Vy',
6823
+ WordEditor: 'V29yZEVkaXRvcg==',
6824
+ SpreadsheetEditor: 'U3ByZWFkc2hlZXRFZGl0b3I=',
6825
+ SchedulerSDK: 'U2NoZWR1bGVyU0RL',
6826
+ GanttSDK: 'R2FudHRTREs=',
6827
+ DiagramSDK: 'RGlhZ3JhbVNESw==',
6828
+ RichTextEditorSDK: 'UmljaFRleHRFZGl0b3JTREs=',
6829
+ GridSDK: 'R3JpZFNESw==',
6830
+ ChartSDK: 'Q2hhcnRTREs=',
6831
+ FileManagerSDK: 'RmlsZU1hbmFnZXJTREs=',
6832
+ Markdown: 'TWFya2Rvd24=',
6833
+ UIComponent: 'VUlDb21wb25lbnQ='
6834
+ };
6835
+ /**
6836
+ * Product to components map - groups components by their product
6837
+ * More efficient than component-to-product as it avoids duplication
6838
+ */
6839
+ const productToComponentsMap = {
6840
+ 'PDFViewer': ['PdfViewer', 'pdf', 'pdf-extract'],
6841
+ 'WordEditor': ['DocumentEditor'],
6842
+ 'SpreadsheetEditor': ['spreadsheet'],
6843
+ 'SchedulerSDK': ['schedule', 'calendar', 'daterangepicker', 'datepicker', 'datetimepicker', 'timepicker'],
6844
+ 'GanttSDK': ['gantt', 'kanban'],
6845
+ 'DiagramSDK': ['diagram'],
6846
+ 'FileManagerSDK': ['filemanager'],
6847
+ 'GridSDK': ['grid', 'pivotview', 'treegrid'],
6848
+ 'RichTextEditorSDK': ['richtexteditor', 'blockeditor'],
6849
+ 'ChartSDK': ['barcode', 'bulletChart', 'circularchart3d', 'circulargauge', 'DashboardLayout', 'heatmap', 'lineargauge', 'maps', 'rangeNavigator', 'sankey', 'smithchart', 'sparkline', 'stockChart', 'chart3d', 'treemap', 'chart']
6850
+ };
6851
+ /**
6852
+ * Build component to product map dynamically from productToComponentsMap
6853
+ * This reduces duplication and makes maintenance easier
6854
+ */
6855
+ function buildComponentToProductMap() {
6856
+ const map = {};
6857
+ // eslint-disable-next-line security/detect-object-injection
6858
+ for (const product in productToComponentsMap) {
6859
+ if (productToComponentsMap.hasOwnProperty(product)) {
6860
+ const components = productToComponentsMap[product];
6861
+ for (const component of components) {
6862
+ map[component] = product;
6863
+ }
6864
+ }
6865
+ }
6866
+ return map;
6867
+ }
6868
+ const componentToProductMap = buildComponentToProductMap();
6818
6869
  let accountURL;
6819
6870
  let banner = true;
6820
6871
  /**
@@ -7037,7 +7088,8 @@ class LicenseValidator {
7037
7088
  if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
7038
7089
  if (component !== 'pdf' && component !== 'pdf-extract') {
7039
7090
  if (banner) {
7040
- accountURL = (validateURL && validateURL !== '') ? validateURL : 'https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MzQ=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information';
7091
+ const plValue = this.getProductCode(component);
7092
+ accountURL = (validateURL && validateURL !== '') ? validateURL : `https://www.syncfusion.com/account/claim-license-key?pl=${plValue}&vs=MzQ=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information`;
7041
7093
  const errorDiv = createElement('div', {
7042
7094
  innerH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IgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
7043
7095
  position: absolute;
@@ -7073,6 +7125,18 @@ class LicenseValidator {
7073
7125
  }
7074
7126
  return this.isLicensed;
7075
7127
  }
7128
+ /**
7129
+ * Get the product code (base64-encoded) for the component
7130
+ *
7131
+ * @param {string} component - The component name
7132
+ * @returns {string} - The base64-encoded product code
7133
+ */
7134
+ getProductCode(component) {
7135
+ // eslint-disable-next-line security/detect-object-injection
7136
+ const productName = componentToProductMap[component] || 'UIComponent';
7137
+ // eslint-disable-next-line security/detect-object-injection
7138
+ return productMap[productName] || productMap.UIComponent;
7139
+ }
7076
7140
  restrictComponent(component, platform) {
7077
7141
  const ignoreList = ['DocumentEditor', 'spreadsheet', 'PdfViewer'];
7078
7142
  if (platform === 'essentialui') {