| 1234567891011121314151617181920212223242526272829 |
- /**
- * DevExtreme (integration/knockout/variable_wrapper_utils.js)
- * Version: 19.1.16
- * Build date: Tue Oct 18 2022
- *
- * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
- * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
- */
- "use strict";
- var ko = require("knockout");
- var variableWrapper = require("../../core/utils/variable_wrapper");
- variableWrapper.inject({
- isWrapped: ko.isObservable,
- isWritableWrapped: ko.isWritableObservable,
- wrap: ko.observable,
- unwrap: function(value) {
- if (ko.isObservable(value)) {
- return ko.utils.unwrapObservable(value)
- }
- return this.callBase(value)
- },
- assign: function(variable, value) {
- if (ko.isObservable(variable)) {
- variable(value)
- } else {
- this.callBase(variable, value)
- }
- }
- });
|