pds-dev-kit-web-test 2.7.513 → 2.7.515
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,8 +99,14 @@ function Text(props) {
|
|
|
99
99
|
return t('str_paid');
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
if (CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA.endsWith('Date')) {
|
|
103
|
+
if (formatOption) {
|
|
104
|
+
return formatOption.formatter(convertToUTC(value));
|
|
105
|
+
}
|
|
106
|
+
return convertToLocalTime(value);
|
|
107
|
+
}
|
|
102
108
|
if (formatOption) {
|
|
103
|
-
return formatOption.formatter(value);
|
|
109
|
+
return formatOption.formatter(convertToUTC(value));
|
|
104
110
|
}
|
|
105
111
|
return value;
|
|
106
112
|
}
|
|
@@ -152,7 +158,7 @@ function Text(props) {
|
|
|
152
158
|
e.currentTarget.classList.add('hovered');
|
|
153
159
|
}, onMouseLeave: function (e) {
|
|
154
160
|
e.currentTarget.classList.remove('hovered');
|
|
155
|
-
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")"), overflowY: 'unset', scrollbarWidth: 'unset' }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: [textPrefix, textValue() === 'ERROR' ? 'EDITOR:FALLBACK_TEXT' : getTruncatedText(textValue()),
|
|
161
|
+
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")"), overflowY: 'unset', scrollbarWidth: 'unset' }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: [textPrefix, textValue() === 'ERROR' ? 'EDITOR:FALLBACK_TEXT' : getTruncatedText(textValue()), textSuffix] })) })) }))] }));
|
|
156
162
|
}
|
|
157
163
|
exports.default = Text;
|
|
158
164
|
function getTextStyles(props, device) {
|
|
@@ -245,3 +251,16 @@ function domstringToPlain(domstring, ellipsis, useEnter) {
|
|
|
245
251
|
}
|
|
246
252
|
return processedText;
|
|
247
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* UTC 날짜 문자열을 로컬 타임 문자열로 변환합니다.
|
|
256
|
+
* @param utcString - '2022-07-29 00:55:03' 형태의 문자열
|
|
257
|
+
* @returns 로컬 시간으로 변환된 문자열
|
|
258
|
+
*/
|
|
259
|
+
var convertToLocalTime = function (utcString) {
|
|
260
|
+
var date = new Date("".concat(utcString.replace(' ', 'T'), "Z"));
|
|
261
|
+
return date.toLocaleString();
|
|
262
|
+
};
|
|
263
|
+
var convertToUTC = function (string) {
|
|
264
|
+
var date = new Date("".concat(string.replace(' ', 'T'), "Z"));
|
|
265
|
+
return date.toISOString();
|
|
266
|
+
};
|
|
@@ -9,7 +9,7 @@ exports.TEXT_SPEC_FORMAT_OPRIONS = {
|
|
|
9
9
|
var num = Number(value);
|
|
10
10
|
if (isNaN(num))
|
|
11
11
|
return value; // Return original if not a number
|
|
12
|
-
return new Intl.NumberFormat(
|
|
12
|
+
return new Intl.NumberFormat(undefined, {
|
|
13
13
|
maximumFractionDigits: 0
|
|
14
14
|
}).format(num);
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@ exports.TEXT_SPEC_FORMAT_OPRIONS = {
|
|
|
21
21
|
var num = Number(value);
|
|
22
22
|
if (isNaN(num))
|
|
23
23
|
return value; // Return original if not a number
|
|
24
|
-
return new Intl.NumberFormat(
|
|
24
|
+
return new Intl.NumberFormat(undefined, {
|
|
25
25
|
minimumFractionDigits: 1,
|
|
26
26
|
maximumFractionDigits: 1
|
|
27
27
|
}).format(num);
|
|
@@ -34,7 +34,7 @@ exports.TEXT_SPEC_FORMAT_OPRIONS = {
|
|
|
34
34
|
var num = Number(value);
|
|
35
35
|
if (isNaN(num))
|
|
36
36
|
return value; // Return original if not a number
|
|
37
|
-
return new Intl.NumberFormat(
|
|
37
|
+
return new Intl.NumberFormat(undefined, {
|
|
38
38
|
minimumFractionDigits: 2,
|
|
39
39
|
maximumFractionDigits: 2
|
|
40
40
|
}).format(num);
|
|
@@ -139,7 +139,7 @@ exports.TEXT_SPEC_FORMAT_OPRIONS = {
|
|
|
139
139
|
if (isNaN(d.getTime()))
|
|
140
140
|
return value;
|
|
141
141
|
var dd = String(d.getDate()).padStart(2, '0');
|
|
142
|
-
var mmm = d.toLocaleString(
|
|
142
|
+
var mmm = d.toLocaleString(undefined, { month: 'short' });
|
|
143
143
|
return "".concat(dd, " ").concat(mmm);
|
|
144
144
|
}
|
|
145
145
|
},
|