Skip to content

Commit

Permalink
Sync with Kendo UI Professional
Browse files Browse the repository at this point in the history
  • Loading branch information
kendo-bot committed Oct 24, 2024
1 parent 57d6438 commit 903cb6a
Showing 7 changed files with 59 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/api/javascript/ui/pager.md
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ Specifies a template used to populate the value of the aria-label attribute of t
dataSource.read();

$("#pager").kendoPager({
ARIATemplate: "Current page is #=page#"
ARIATemplate: "Current page is #=page#",
dataSource: dataSource
});
</script>
2 changes: 1 addition & 1 deletion docs/api/javascript/ui/panelbar.md
Original file line number Diff line number Diff line change
@@ -865,7 +865,7 @@ A string, DOM element or jQuery object which represents the item. A string is tr
});

var panelBar = $("#panelBar").data("kendoPanelBar");
var dataItem = panelBar.dataItem(".k-item:first");
var dataItem = panelBar.dataItem(".k-panelbar-item:first");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(dataItem.text); // displays "foo"
</script>
12 changes: 12 additions & 0 deletions docs/api/javascript/ui/pdfviewer.md
Original file line number Diff line number Diff line change
@@ -186,6 +186,7 @@ The width of the PDFViewer.

#### Example - customizing the width of the viewer

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -199,6 +200,7 @@ The height of the PDFViewer.

#### Example - customizing the height of the viewer

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -212,6 +214,7 @@ Specifies the default page size if no PDF is displayed in the PDFViewer. The pag

#### Example - customizing the default page sizes

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -236,6 +239,7 @@ Specifies the default scale of the pages.

#### Example - customizing the scale

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -252,6 +256,7 @@ Specifies the minimum zoom that could be applied to the pages.

#### Example - customizing the zoomMin

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -268,6 +273,7 @@ Specifies the maximum zoom that could be applied to the pages.

#### Example - customizing the zoomMax

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -284,6 +290,7 @@ Specifies the zoom rate that could be applied to the pages. Used when zooming on

#### Example - customizing the zoomRate

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -304,6 +311,7 @@ Defines the surface type. It accepts `canvas` or `svg`. This option is supported

#### Example - customizing the type of pages' surfaces

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -335,6 +343,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t

#### Example - customizing the toolbar items

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -349,6 +358,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t

#### Example - customizing the pager default tool

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -362,6 +372,7 @@ For DPL Processing `exportAs` tool could be configured to export a single page t

#### Example - customizing the zoom default tool

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
@@ -413,6 +424,7 @@ Specifies what element will be added in the ToolBar wrapper. Items with template

#### Example

<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<div id="pdf-viewer"></div>
<script>
$("#pdf-viewer").kendoPDFViewer({
25 changes: 4 additions & 21 deletions src/kendo.core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defaultBreakpoints, mediaQuery } from './utils/mediaquery.js';
import { fromESClass } from './utils/convert-class.js';

export const __meta__ = {
id: "core",
@@ -257,27 +258,7 @@ var packageMetadata = {
return deferred.promise();
};

kendo.ConvertClass = function(proto) {
let all = kendo.getAllMethods(proto);
let baseClass = kendo.getBaseClass(proto);

while (baseClass) {
all = all.concat(kendo.getAllMethods(baseClass));
baseClass = kendo.getBaseClass(baseClass);
}

let extended = Class.extend({
init: function() {
this._instance = new proto(...arguments);
}
});

for (var idx = 0; idx < all.length; idx++) {
kendo.createProxyMember(extended, all[idx]);
}

return extended;
};
kendo.ConvertClass = fromESClass;

const isPresent = kendo.isPresent = (value) => value !== null && value !== undefined;
const isBlank = kendo.isBlank = (value) => value === null || value === undefined;
@@ -5616,4 +5597,6 @@ function pad(number, digits, end) {
}

})(jQuery, window);

export { fromESClass };
export default kendo;
2 changes: 1 addition & 1 deletion src/kendo.multiselect.js
Original file line number Diff line number Diff line change
@@ -1556,7 +1556,7 @@ export const __meta__ = {
}

element.removeAttr("accesskey");
input.attr("data-validate", false);
input.attr("data-validate", "false");

that._focused = that.input = input.attr({
"autocomplete": AUTOCOMPLETEVALUE,
2 changes: 1 addition & 1 deletion src/kendo.numerictextbox.js
Original file line number Diff line number Diff line change
@@ -580,7 +580,7 @@ export const __meta__ = {

if (text.length < 2) {
text = $('<input type="text"/>')
.attr(kendo.attr("validate"), false)
.attr(kendo.attr("validate"), "false")
.insertBefore(element);
}

39 changes: 39 additions & 0 deletions src/utils/convert-class.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export function fromESClass(ESClass) {
class ExtendedClass extends ESClass {
static extend(proto) {
const subclass = class extends ExtendedClass {
constructor() {
super();
if (proto && proto.init) {
proto.init.apply(this, arguments);
}
}
};

// Copy the prototype so that the constructor is not overwritten
Object.assign(subclass.prototype, proto);

addInstanceGetter(subclass.prototype);

// Apply the prototype to fn to allow for chaining
subclass.fn = subclass.prototype;

return subclass;
}
}

addInstanceGetter(ExtendedClass.prototype);

// Apply the prototype to fn to allow for chaining
ExtendedClass.fn = ExtendedClass.prototype;

return ExtendedClass;
}

function addInstanceGetter(proto) {
Object.defineProperty(proto, '_instance', {
get: function() {
return this;
}
});
}

0 comments on commit 903cb6a

Please sign in to comment.