UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

93 lines (91 loc) • 3.01 kB
/** * DevExtreme (cjs/__internal/core/config.js) * Version: 26.1.6 * Build date: Fri Oct 16 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _errors = _interopRequireDefault(require("../../core/errors")); var _extend = require("../../core/utils/extend"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e } } const normalizeToJSONString = optionsString => optionsString.replace(/'/g, '"').replace(/,\s*([\]}])/g, "$1").replace(/([{,])\s*([^":\s]+)\s*:/g, '$1"$2":'); const config = { rtlEnabled: false, defaultCurrency: "USD", defaultUseCurrencyAccountingStyle: true, oDataFilterToLower: true, serverDecimalSeparator: ".", decimalSeparator: ".", thousandsSeparator: ",", forceIsoDateParsing: true, wrapActionsBeforeExecute: true, useLegacyStoreResult: false, useJQuery: void 0, editorStylingMode: void 0, useLegacyVisibleIndex: false, versionAssertions: [], copyStylesToShadowDom: true, dateFormat: void 0, timeFormat: void 0, dateTimeFormat: void 0, numberFormat: void 0, dateTimeFormatPresets: void 0, licenseKey: "/* ___$$$$$___devextreme___lcp___placeholder____$$$$$ */", floatingActionButtonConfig: { icon: "add", closeIcon: "close", label: "", position: { at: "right bottom", my: "right bottom", offset: { x: -16, y: -16 } }, maxSpeedDialActionCount: 5, shading: false, direction: "auto" }, optionsParser: optionsString => { const normalizedString = !optionsString.trim().startsWith("{") ? `{${optionsString}}` : optionsString; try { return JSON.parse(normalizedString) } catch (ex) { try { return JSON.parse(normalizeToJSONString(normalizedString)) } catch (exNormalize) { throw _errors.default.Error("E3018", ex, normalizedString) } } } }; const deprecatedFields = ["decimalSeparator", "thousandsSeparator"]; const configMethod = function() { if (!arguments.length) { return config } const newConfig = arguments.length <= 0 ? void 0 : arguments[0]; deprecatedFields.forEach(deprecatedField => { if (newConfig[deprecatedField]) { const message = `Now, the ${deprecatedField} is selected based on the specified locale.`; _errors.default.log("W0003", "config", deprecatedField, "19.2", message) } }); (0, _extend.extend)(config, newConfig); return }; if ("undefined" !== typeof DevExpress && DevExpress.config) { configMethod(DevExpress.config) } var _default = exports.default = configMethod;