kendo-ui-core
Version:
Kendo UI is everything you need to build sites and apps with HTML5 & JavaScript. Kendo UI Core is the free and open-source version of Kendo UI that provides access to the web's best UI widgets and key framework features, essential for developing great exp
17 lines • 2.39 kB
JavaScript
/*!
* Copyright 2026 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import"./core-COCvCZRc.js";import"./filter-expression-no-eval-Bp5qq9qQ.js";import"./kendo.data.js";const e={id:`data.signalr`,name:`SignalR`,category:`framework`,depends:[`data`],hidden:!0};(function(e){var t=window.kendo,n=t.isFunction;function r(e){return e&&n(e.done)&&n(e.fail)}function i(e){return e&&n(e.then)&&n(e.catch)}var a=t.data.RemoteTransport.extend({init:function(e){var n=e&&e.signalr?e.signalr:{},a=n.promise;if(!a)throw Error(`The "promise" option must be set.`);if(!r(a)&&!i(a))throw Error(`The "promise" option must be a Promise.`);this.promise=a;var o=n.hub;if(!o)throw Error(`The "hub" option must be set.`);if(typeof o.on!=`function`||typeof o.invoke!=`function`)throw Error(`The "hub" option is not a valid SignalR hub proxy.`);this.hub=o,t.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(n,a){var o=this.hub,s=this.promise,c=this.options.signalr.server;if(!c||!c[a])throw Error(t.format(`The "server.{0}" option must be set.`,a));var l=[c[a]],u=this.parameterMap(n.data,a);e.isEmptyObject(u)||l.push(u),r(s)?s.done(function(){o.invoke.apply(o,l).done(n.success).fail(n.error)}):i(s)&&s.then(function(){o.invoke.apply(o,l).then(n.success).catch(n.error)})},read:function(e){this._crud(e,`read`)},create:function(e){this._crud(e,`create`)},update:function(e){this._crud(e,`update`)},destroy:function(e){this._crud(e,`destroy`)}});e.extend(!0,t.data,{transports:{signalr:a}})})(window.kendo.jQuery);var t=kendo;export{e as __meta__,t as default};
//# sourceMappingURL=kendo.data.signalr.js.map