Skip to content

Commit

Permalink
Core: fix artifacts of auto-replace
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanblinov2k17 committed Oct 7, 2024
1 parent bb475cd commit 1f03eb5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/devextreme/js/__internal/core/m_action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ const createValidatorByTargetElement = (condition) => (e) => {
// @ts-expect-error expect name and executor
Action.registerExecutor({
disabled: {
validate: createValidatorByTargetElement(($target) => $target.is('@js/coredx-state-disabled, .dx-state-disabled *')),
validate: createValidatorByTargetElement(($target) => $target.is('.dx-state-disabled, .dx-state-disabled *')),
},

readOnly: {
validate: createValidatorByTargetElement(($target) => $target.is('@js/coredx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)')),
validate: createValidatorByTargetElement(($target) => $target.is('.dx-state-readonly, .dx-state-readonly *:not(.dx-state-independent)')),
},
undefined: {
execute: (e) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme/js/__internal/core/m_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const config = {
defaultCurrency: 'USD',
defaultUseCurrencyAccountingStyle: true,
oDataFilterToLower: true,
serverDecimalSeparator: '@js/core',
decimalSeparator: '@js/core',
serverDecimalSeparator: '.',
decimalSeparator: '.',
thousandsSeparator: ',',
forceIsoDateParsing: true,
wrapActionsBeforeExecute: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DATETIME_SERIALIZATION_FORMAT = 'yyyy/MM/dd HH:mm:ss';
const ISO8601_PATTERN = /^(\d{4,})(-)?(\d{2})(-)?(\d{2})(?:T(\d{2})(:)?(\d{2})?(:)?(\d{2}(?:\.(\d{1,3})\d*)?)?)?(Z|([+-])(\d{2})(:)?(\d{2})?)?$/;
const ISO8601_TIME_PATTERN = /^(\d{2}):(\d{2})(:(\d{2}))?$/;

const ISO8601_PATTERN_PARTS = ['', 'yyyy', '', 'MM', '', 'dd', 'THH', '', 'mm', '', 'ss', '@js/core/utilsSSS'];
const ISO8601_PATTERN_PARTS = ['', 'yyyy', '', 'MM', '', 'dd', 'THH', '', 'mm', '', 'ss', '.SSS'];
const DATE_SERIALIZATION_PATTERN = /^(\d{4})\/(\d{2})\/(\d{2})$/;

const MILLISECOND_LENGHT = 3;
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme/js/__internal/core/utils/m_error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { extend } from '@js/core/utils/extend';
import { format } from '@js/core/utils/string';
import { version } from '@js/core/version';

const ERROR_URL = `https://js.devexpress.com/error/${version.split('@js/core/utils').slice(0, 2).join('_')}/`;
const ERROR_URL = `https://js.devexpress.com/error/${version.split('.').slice(0, 2).join('_')}/`;

function error(baseErrors, errors?) {
const exports = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const captionize = function (name) {
for (i = 0; i < name.length; i++) {
char = name.charAt(i);
isNewWord = (char === char.toUpperCase() && char !== '-' && char !== ')' && char !== '/') || (char in DIGIT_CHARS);
if (char === '_' || char === '@js/core/utils') {
if (char === '_' || char === '.') {
char = ' ';
isNewWord = true;
} else if (i === 0) {
Expand Down
10 changes: 5 additions & 5 deletions packages/devextreme/js/__internal/core/utils/m_math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function isEdgeBug() {

function adjust(value, interval) {
let precision = getPrecision(interval || 0) + 2;
const separatedValue = value.toString().split('@js/core/utils');
const separatedValue = value.toString().split('.');
const sourceValue = value;
const absValue = Math.abs(value);
let separatedAdjustedValue;
Expand All @@ -76,7 +76,7 @@ function adjust(value, interval) {
precision = (isEdgeBug() && (getExponent(value) > 6)) || precision > 7 ? 15 : 7; // fix toPrecision() bug in Edge (T570217)

if (!isExponentValue) {
separatedAdjustedValue = parseFloat(value.toPrecision(precision)).toString().split('@js/core/utils');
separatedAdjustedValue = parseFloat(value.toPrecision(precision)).toString().split('.');
if (separatedAdjustedValue[0] === integerPart.toString()) {
return parseFloat(`${separatedValue[0]}.${separatedAdjustedValue[1]}`);
}
Expand All @@ -87,11 +87,11 @@ function adjust(value, interval) {
function getPrecision(value) {
const str = value.toString();

if (str.indexOf('@js/core/utils') < 0) {
if (str.indexOf('.') < 0) {
return 0;
}

const mantissa = str.split('@js/core/utils');
const mantissa = str.split('.');
const positionOfDelimiter = mantissa[1].indexOf('e');

return positionOfDelimiter >= 0 ? positionOfDelimiter : mantissa[1].length;
Expand Down Expand Up @@ -175,7 +175,7 @@ function getRemainderByDivision(dividend, divider, digitsCount) {
function getExponentLength(value) {
const valueString = value.toString();

return valueString.split('@js/core/utils')[1]?.length
return valueString.split('.')[1]?.length
|| parseInt(valueString.split('e-')[1], 10)
|| 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const value = (function (...args) {
}());

ready(() => {
value('@js/core/utilsdx-viewport');
value('.dx-viewport');
});

export {
Expand Down

0 comments on commit 1f03eb5

Please sign in to comment.