devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
29 lines (28 loc) • 1.11 kB
JavaScript
/**
* DevExtreme (esm/__internal/core/r1/utils/resolve_rtl.js)
* Version: 24.2.7
* Build date: Mon Apr 28 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
config as globalConfig
} from "../../../../common";
import {
isDefined
} from "../../../../core/utils/type";
export function resolveRtlEnabled(rtlProp, config) {
if (void 0 !== rtlProp) {
return rtlProp
}
if (void 0 !== (null === config || void 0 === config ? void 0 : config.rtlEnabled)) {
return config.rtlEnabled
}
return globalConfig().rtlEnabled
}
export function resolveRtlEnabledDefinition(rtlProp, config) {
const isPropDefined = isDefined(rtlProp);
const onlyGlobalDefined = isDefined(globalConfig().rtlEnabled) && !isPropDefined && !isDefined(null === config || void 0 === config ? void 0 : config.rtlEnabled);
return isPropDefined && rtlProp !== (null === config || void 0 === config ? void 0 : config.rtlEnabled) || onlyGlobalDefined
}