From 499d620d936b2fc52d07c0850b5a3f5868c5c9fe Mon Sep 17 00:00:00 2001 From: kendo-bot Date: Mon, 9 Dec 2024 04:19:56 +0000 Subject: [PATCH] Sync with Kendo UI Professional --- .eslintignore | 1 + .eslintrc.json | 3 ++- src/kendo.core.js | 33 +++++---------------------------- src/kendo.dateinput.js | 3 ++- src/kendo.datepicker.js | 3 ++- src/kendo.datetimepicker.js | 3 ++- src/kendo.editable.js | 3 ++- src/kendo.licensing.js | 13 +++++++++++++ src/kendo.listview.js | 3 ++- src/kendo.timepicker.js | 3 ++- src/kendo.ui.core.js | 3 ++- src/utils/dropdowns-loader.js | 2 ++ src/utils/valueMapper.js | 2 ++ 13 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 src/kendo.licensing.js diff --git a/.eslintignore b/.eslintignore index 26937431014..a1ec552bc71 100644 --- a/.eslintignore +++ b/.eslintignore @@ -23,3 +23,4 @@ src/pdf src/spreadsheet src/util src-modules +core-files diff --git a/.eslintrc.json b/.eslintrc.json index 2aeaee210d2..6525bc552c4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,8 @@ "globals": { "define": "writable", "kendo": "writable", - "jQuery": "readonly" + "jQuery": "readonly", + "KendoLicensing": "readonly" }, "rules": { "array-bracket-spacing": "off", //["error", "always"], diff --git a/src/kendo.core.js b/src/kendo.core.js index bde25fcc613..f87b550da80 100644 --- a/src/kendo.core.js +++ b/src/kendo.core.js @@ -1,23 +1,15 @@ import { defaultBreakpoints, mediaQuery } from './utils/mediaquery.js'; import { fromESClass } from './utils/convert-class.js'; +import * as licensing from './kendo.licensing.js'; export const __meta__ = { id: "core", name: "Core", category: "framework", - description: "The core of the Kendo framework." + description: "The core of the Kendo framework.", + depends: ["licensing"], }; -var packageMetadata = { - name: '@progress/kendo-ui', - productName: 'Kendo UI', - productCodes: ['KENDOUICOMPLETE', 'KENDOUI', 'UIASPCORE', 'KENDOMVC', 'KENDOUIMVC'], - publishDate: 0, - version: '$KENDO_VERSION'.replace(/^\s+|\s+$/g, ''), - licensingDocsUrl: 'https://docs.telerik.com/kendo-ui/intro/installation/using-license-code?utm_medium=product&utm_source=kendojquery&utm_campaign=kendo-ui-jquery-purchase-license-keys-warning' -}; - - (function($, window, undefined) { var kendo = window.kendo = window.kendo || { cultures: {} }, extend = $.extend, @@ -3277,8 +3269,8 @@ function pad(number, digits, end) { init: function(element, options) { var that = this; - if (!validatePackage()) { - that._showWatermarkOverlay = addWatermarkOverlay; + if (!licensing.validatePackage()) { + that._showWatermarkOverlay = licensing.addWatermarkOverlayAndBanner; } that.element = kendo.jQuery(element).handler(that); @@ -5759,21 +5751,6 @@ function pad(number, digits, end) { }; }()); - var KendoLicensing = { validatePackage: function() { return true; },setScriptKey: function() {} }; - - window.KendoLicensing = { - setScriptKey: KendoLicensing.setScriptKey - }; - - function validatePackage() { - return KendoLicensing.validatePackage(packageMetadata); - } - - function addWatermarkOverlay(el) { - KendoLicensing.addWatermarkOverlay && KendoLicensing.addWatermarkOverlay(el, packageMetadata); - KendoLicensing.showBanner && KendoLicensing.showBanner(packageMetadata); - } - })(jQuery, window); export { fromESClass }; diff --git a/src/kendo.dateinput.js b/src/kendo.dateinput.js index aa3fa1e77c9..86a2b421aac 100644 --- a/src/kendo.dateinput.js +++ b/src/kendo.dateinput.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.core.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.core.js"; import "./kendo.label.js"; import "./kendo.icons.js"; diff --git a/src/kendo.datepicker.js b/src/kendo.datepicker.js index 8e02d9dd554..1cf88130278 100644 --- a/src/kendo.datepicker.js +++ b/src/kendo.datepicker.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.calendar.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.calendar.js"; import "./kendo.popup.js"; import "./kendo.dateinput.js"; import "./kendo.html.button.js"; diff --git a/src/kendo.datetimepicker.js b/src/kendo.datetimepicker.js index 94ee8cb06d0..54bc8c86427 100644 --- a/src/kendo.datetimepicker.js +++ b/src/kendo.datetimepicker.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.datepicker.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.datepicker.js"; import "./kendo.timepicker.js"; import "./kendo.html.button.js"; import "./kendo.label.js"; diff --git a/src/kendo.editable.js b/src/kendo.editable.js index 6b0207b5b38..0bf175d2e49 100644 --- a/src/kendo.editable.js +++ b/src/kendo.editable.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.checkbox.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.checkbox.js"; import "./kendo.dropdownlist.js"; import "./kendo.datepicker.js"; import "./kendo.numerictextbox.js"; diff --git a/src/kendo.licensing.js b/src/kendo.licensing.js new file mode 100644 index 00000000000..be4be3e6889 --- /dev/null +++ b/src/kendo.licensing.js @@ -0,0 +1,13 @@ +// The current file development is no longer in active phase but the code will be kept as is. +// Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. + +export const __meta__ = { + id: "licensing", + name: "Licensing", + category: "framework", + description: "The licensing mechanism for Kendo UI for jQuery.", + depends: [] +}; +export const addWatermarkOverlayAndBanner = () => {}; +export const validatePackage = () => {}; \ No newline at end of file diff --git a/src/kendo.listview.js b/src/kendo.listview.js index 965852a9e4e..22742984c21 100644 --- a/src/kendo.listview.js +++ b/src/kendo.listview.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.data.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.data.js"; import "./kendo.editable.js"; import "./kendo.selectable.js"; import "./kendo.pager.js"; diff --git a/src/kendo.timepicker.js b/src/kendo.timepicker.js index 8e89cbab5d0..0605062ac68 100644 --- a/src/kendo.timepicker.js +++ b/src/kendo.timepicker.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.calendar.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.calendar.js"; import "./kendo.popup.js"; import "./kendo.dateinput.js"; import "./kendo.html.button.js"; diff --git a/src/kendo.ui.core.js b/src/kendo.ui.core.js index 4c7c2a84ac0..248e2adcc5d 100644 --- a/src/kendo.ui.core.js +++ b/src/kendo.ui.core.js @@ -1,6 +1,7 @@ // The current file development is no longer in active phase but the code will be kept as is. // Please be advised that we have discontinued the sync for this file with the commercial version of Kendo UI for jQuery. -// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license.import "./kendo.core.js"; +// To take advantage of new features please visit (https://www.telerik.com/kendo-jquery-ui) and consider upgrading to a commercial license. +import "./kendo.core.js"; import "./kendo.router.js"; import "./kendo.touch.js"; import "./kendo.view.js"; diff --git a/src/utils/dropdowns-loader.js b/src/utils/dropdowns-loader.js index 698e8d30227..ceb7f69846e 100644 --- a/src/utils/dropdowns-loader.js +++ b/src/utils/dropdowns-loader.js @@ -1,3 +1,5 @@ +import "../kendo.core.js"; + let $ = kendo.jQuery; const LOADING = "k-loading", diff --git a/src/utils/valueMapper.js b/src/utils/valueMapper.js index b1ff4edb22c..da38e91e3f0 100644 --- a/src/utils/valueMapper.js +++ b/src/utils/valueMapper.js @@ -1,3 +1,5 @@ +import "../kendo.core.js"; + let $ = kendo.jQuery; export function valueMapperOptions(options, value, callback) {