pds-dev-kit-web-test 2.5.502 → 2.5.503
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.
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +0 -135
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +1 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +5 -22
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +0 -10
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +0 -2
- package/package.json +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.js +0 -211
|
@@ -178,8 +178,6 @@ export declare const MOCK_COMPONENT_BLOCKS: ({
|
|
|
178
178
|
};
|
|
179
179
|
CB_CONTENT_PROP_TEXT: {
|
|
180
180
|
CB_CONTENT_PROP_TEXT_SPEC_TEXT: string;
|
|
181
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX?: undefined;
|
|
182
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX?: undefined;
|
|
183
181
|
};
|
|
184
182
|
CB_CONTENT_PROP_VISIBILITY: {
|
|
185
183
|
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
|
|
@@ -390,137 +388,6 @@ export declare const MOCK_COMPONENT_BLOCKS: ({
|
|
|
390
388
|
};
|
|
391
389
|
CB_CONTENT_PROP_TEXT: {
|
|
392
390
|
CB_CONTENT_PROP_TEXT_SPEC_TEXT: string;
|
|
393
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX: string;
|
|
394
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX: string;
|
|
395
|
-
};
|
|
396
|
-
CB_CONTENT_PROP_VISIBILITY: {
|
|
397
|
-
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
|
|
398
|
-
CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: boolean;
|
|
399
|
-
};
|
|
400
|
-
CB_EFFECT_PROP_ENTANIM: {
|
|
401
|
-
CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: number;
|
|
402
|
-
'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null;
|
|
403
|
-
CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: number;
|
|
404
|
-
'CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT:MOBILE': null;
|
|
405
|
-
CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC: string;
|
|
406
|
-
'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null;
|
|
407
|
-
CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: string;
|
|
408
|
-
'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': null;
|
|
409
|
-
};
|
|
410
|
-
CB_EFFECT_PROP_HOVERANIM: {
|
|
411
|
-
CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION: number;
|
|
412
|
-
'CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION:MOBILE': null;
|
|
413
|
-
CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT: number;
|
|
414
|
-
'CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT:MOBILE': null;
|
|
415
|
-
CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC: string;
|
|
416
|
-
'CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC:MOBILE': null;
|
|
417
|
-
CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE: string;
|
|
418
|
-
'CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE:MOBILE': null;
|
|
419
|
-
};
|
|
420
|
-
CB_LAYOUT_PROP_PADDING: {
|
|
421
|
-
CB_LAYOUT_PROP_PADDING_SPEC_FIX: boolean;
|
|
422
|
-
'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': null;
|
|
423
|
-
CB_LAYOUT_PROP_PADDING_SPEC_PADDING: {
|
|
424
|
-
bottom: number;
|
|
425
|
-
left: number;
|
|
426
|
-
right: number;
|
|
427
|
-
top: number;
|
|
428
|
-
};
|
|
429
|
-
'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': {
|
|
430
|
-
bottom: number;
|
|
431
|
-
left: number;
|
|
432
|
-
right: number;
|
|
433
|
-
top: number;
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
|
-
CB_PLACEMENT_PROP_PLACEMENT: {
|
|
437
|
-
CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: number;
|
|
438
|
-
'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': number;
|
|
439
|
-
CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: number;
|
|
440
|
-
'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': number;
|
|
441
|
-
CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: number;
|
|
442
|
-
'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': number;
|
|
443
|
-
CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: number;
|
|
444
|
-
'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': number;
|
|
445
|
-
CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: number;
|
|
446
|
-
'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': number;
|
|
447
|
-
};
|
|
448
|
-
CB_STYLE_PROP_OPACITY: {
|
|
449
|
-
CB_STYLE_PROP_OPACITY_SPEC_OPACITY: number;
|
|
450
|
-
'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:HOVER': null;
|
|
451
|
-
'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE': null;
|
|
452
|
-
'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE:HOVER': null;
|
|
453
|
-
};
|
|
454
|
-
CB_STYLE_PROP_TEXT: {
|
|
455
|
-
CB_STYLE_PROP_TEXT_SPEC_COLOR: string;
|
|
456
|
-
'CB_STYLE_PROP_TEXT_SPEC_COLOR:HOVER': null;
|
|
457
|
-
'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE': null;
|
|
458
|
-
'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE:HOVER': null;
|
|
459
|
-
CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL: string;
|
|
460
|
-
'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:HOVER': null;
|
|
461
|
-
'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE': null;
|
|
462
|
-
'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE:HOVER': null;
|
|
463
|
-
CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING: number;
|
|
464
|
-
'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:HOVER': null;
|
|
465
|
-
'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE': null;
|
|
466
|
-
'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE:HOVER': null;
|
|
467
|
-
CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT: number;
|
|
468
|
-
'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:HOVER': null;
|
|
469
|
-
'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE': null;
|
|
470
|
-
'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE:HOVER': null;
|
|
471
|
-
CB_STYLE_PROP_TEXT_SPEC_SIZE: number;
|
|
472
|
-
'CB_STYLE_PROP_TEXT_SPEC_SIZE:HOVER': null;
|
|
473
|
-
'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE': null;
|
|
474
|
-
'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE:HOVER': null;
|
|
475
|
-
CB_STYLE_PROP_TEXT_SPEC_TYPEFACE: string;
|
|
476
|
-
'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER': null;
|
|
477
|
-
'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE': null;
|
|
478
|
-
'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE:HOVER': null;
|
|
479
|
-
CB_STYLE_PROP_TEXT_SPEC_VERTICAL: string;
|
|
480
|
-
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:HOVER': null;
|
|
481
|
-
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE': null;
|
|
482
|
-
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE:HOVER': null;
|
|
483
|
-
CB_STYLE_PROP_TEXT_SPEC_WEIGHT: number;
|
|
484
|
-
'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:HOVER': null;
|
|
485
|
-
'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE': null;
|
|
486
|
-
'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE:HOVER': null;
|
|
487
|
-
};
|
|
488
|
-
CB_CONTENT_PROP_IMAGE?: undefined;
|
|
489
|
-
CB_STYLE_PROP_BORDER?: undefined;
|
|
490
|
-
CB_STYLE_PROP_IMAGE?: undefined;
|
|
491
|
-
CB_STYLE_PROP_SHADOW?: undefined;
|
|
492
|
-
CB_STYLE_PROP_COLOR?: undefined;
|
|
493
|
-
};
|
|
494
|
-
minVersion: string;
|
|
495
|
-
version: string;
|
|
496
|
-
};
|
|
497
|
-
queryableDefinitionPreset: string;
|
|
498
|
-
queryableTapSrc: string;
|
|
499
|
-
updatedAt: string;
|
|
500
|
-
} | {
|
|
501
|
-
availablePlugins: never[];
|
|
502
|
-
blockId: string;
|
|
503
|
-
componentBlockCode: string;
|
|
504
|
-
componentBlockType: string;
|
|
505
|
-
dynamicLayoutSectionId: number;
|
|
506
|
-
id: number;
|
|
507
|
-
insertedAt: string;
|
|
508
|
-
jsonProperties: {
|
|
509
|
-
currentVersion: string;
|
|
510
|
-
data: {
|
|
511
|
-
CB_CONTENT_PROP_CLINK: {
|
|
512
|
-
CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC: string;
|
|
513
|
-
CB_CONTENT_PROP_CLINK_SPEC_NEWTAB: boolean;
|
|
514
|
-
CB_CONTENT_PROP_CLINK_SPEC_SRC: string;
|
|
515
|
-
CB_CONTENT_PROP_CLINK_SPEC_TYPE: string;
|
|
516
|
-
};
|
|
517
|
-
CB_CONTENT_PROP_HOVER: {
|
|
518
|
-
CB_CONTENT_PROP_HOVER_SPEC_MUSE: boolean;
|
|
519
|
-
};
|
|
520
|
-
CB_CONTENT_PROP_TEXT: {
|
|
521
|
-
CB_CONTENT_PROP_TEXT_SPEC_TEXT: string;
|
|
522
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX?: undefined;
|
|
523
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX?: undefined;
|
|
524
391
|
};
|
|
525
392
|
CB_CONTENT_PROP_VISIBILITY: {
|
|
526
393
|
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
|
|
@@ -806,8 +673,6 @@ export declare const MOCK_COMPONENT_BLOCKS: ({
|
|
|
806
673
|
};
|
|
807
674
|
CB_CONTENT_PROP_TEXT: {
|
|
808
675
|
CB_CONTENT_PROP_TEXT_SPEC_TEXT: string;
|
|
809
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX?: undefined;
|
|
810
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX?: undefined;
|
|
811
676
|
};
|
|
812
677
|
CB_CONTENT_PROP_VISIBILITY: {
|
|
813
678
|
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
|
|
@@ -1171,9 +1171,7 @@ exports.MOCK_COMPONENT_BLOCKS = [
|
|
|
1171
1171
|
CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
|
|
1172
1172
|
},
|
|
1173
1173
|
CB_CONTENT_PROP_TEXT: {
|
|
1174
|
-
CB_CONTENT_PROP_TEXT_SPEC_TEXT: "Today's Book Highlight"
|
|
1175
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX: '[Prefix]',
|
|
1176
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX: '[Suffix]'
|
|
1174
|
+
CB_CONTENT_PROP_TEXT_SPEC_TEXT: "Today's Book Highlight"
|
|
1177
1175
|
},
|
|
1178
1176
|
CB_CONTENT_PROP_VISIBILITY: {
|
|
1179
1177
|
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
|
|
@@ -145,7 +145,7 @@ function ContentsList(props) {
|
|
|
145
145
|
})] })) })) })));
|
|
146
146
|
}
|
|
147
147
|
var S_ContentsListLayout = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n margin: 0 auto;\n position: relative;\n width: 100%;\n"], ["\n height: 100%;\n margin: 0 auto;\n position: relative;\n width: 100%;\n"])));
|
|
148
|
-
var S_ContentsListWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: ", ";\n display: grid;\n
|
|
148
|
+
var S_ContentsListWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: ", ";\n display: grid;\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n\n ", ";\n ", ";\n"], ["\n bottom: ", ";\n display: grid;\n left: ", ";\n position: absolute;\n right: ", ";\n top: ", ";\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
149
149
|
var ccbInset = _a.ccbInset;
|
|
150
150
|
return ccbInset.bottom;
|
|
151
151
|
}, function (_a) {
|
|
@@ -28,11 +28,10 @@ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverB
|
|
|
28
28
|
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
29
29
|
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
30
30
|
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
31
|
-
var textSpecFormatOptions_1 = require("./textSpecFormatOptions");
|
|
32
31
|
function Text(props) {
|
|
33
32
|
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
34
33
|
var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
|
|
35
|
-
var index = props.index, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE, CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, _c = props.CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE, CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA
|
|
34
|
+
var index = props.index, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE, CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, _c = props.CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE, CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA;
|
|
36
35
|
var cLinkValue = function () {
|
|
37
36
|
if (CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DATA' ||
|
|
38
37
|
CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DELEGATEDDATA') {
|
|
@@ -77,15 +76,9 @@ function Text(props) {
|
|
|
77
76
|
CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE === 'DELEGATEDDATA';
|
|
78
77
|
if (isDataConnected) {
|
|
79
78
|
if (queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData) {
|
|
80
|
-
|
|
81
|
-
var formatOption = textSpecFormatOptions_1.TEXT_SPEC_FORMAT_OPRIONS[FORMATOPTION];
|
|
82
|
-
var value = queryContext.queryData[CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA];
|
|
83
|
-
if (formatOption) {
|
|
84
|
-
return formatOption.formatter(value);
|
|
85
|
-
}
|
|
86
|
-
return value;
|
|
79
|
+
return queryContext.queryData[CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA];
|
|
87
80
|
}
|
|
88
|
-
return 'ERROR
|
|
81
|
+
return 'ERROR';
|
|
89
82
|
}
|
|
90
83
|
if (device === 'MOBILE' &&
|
|
91
84
|
mode !== 'EDIT' &&
|
|
@@ -106,25 +99,15 @@ function Text(props) {
|
|
|
106
99
|
}
|
|
107
100
|
return props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT;
|
|
108
101
|
};
|
|
109
|
-
var getTruncatedText = function (text) {
|
|
110
|
-
var maxLength = props.CB_STYLE_PROP_TEXT.CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS;
|
|
111
|
-
if (!maxLength) {
|
|
112
|
-
return text;
|
|
113
|
-
}
|
|
114
|
-
if (text.length > maxLength) {
|
|
115
|
-
return "".concat(text.slice(0, maxLength), "...");
|
|
116
|
-
}
|
|
117
|
-
return text;
|
|
118
|
-
};
|
|
119
102
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ style: {
|
|
120
103
|
height: '100%',
|
|
121
104
|
display: 'flex',
|
|
122
105
|
alignItems: textStyle.alignItems
|
|
123
|
-
}, ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.
|
|
106
|
+
}, ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ onMouseEnter: function (e) {
|
|
124
107
|
e.currentTarget.classList.add('hovered');
|
|
125
108
|
}, onMouseLeave: function (e) {
|
|
126
109
|
e.currentTarget.classList.remove('hovered');
|
|
127
|
-
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children:
|
|
110
|
+
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: textValue() === 'ERROR' ? 'EDITOR:FALLBACK_TEXT' : textValue() })) }))] }));
|
|
128
111
|
}
|
|
129
112
|
function getTextStyles(props, device) {
|
|
130
113
|
var availableSpecCodes = [
|
|
@@ -9,8 +9,6 @@ export type CB_CONTENT_PROP_TEXT = {
|
|
|
9
9
|
CB_CONTENT_PROP_TEXT_SPEC_TEXTMOBILEALTERNATIVE: STRING_PLAIN;
|
|
10
10
|
CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE: CCB_VALUE_TYPE | CB_VALUE_TYPE;
|
|
11
11
|
CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA: STRING_PLAIN;
|
|
12
|
-
CB_CONTENT_PROP_TEXT_SPEC_PREFIX: STRING_PLAIN;
|
|
13
|
-
CB_CONTENT_PROP_TEXT_SPEC_SUFFIX: STRING_PLAIN;
|
|
14
12
|
};
|
|
15
13
|
export type CB_CONTENT_PROP_CLINK = {
|
|
16
14
|
CB_CONTENT_PROP_CLINK_SPEC_TYPE: 'INTERNAL' | 'EXTERNAL' | 'DISABLED';
|
|
@@ -79,8 +77,6 @@ export type CB_STYLE_PROP_TEXT_SPECS_BASE = {
|
|
|
79
77
|
CB_STYLE_PROP_TEXT_SPEC_COLOR: STRING_8DIGIT_HEX;
|
|
80
78
|
CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL: ENUM_STRING;
|
|
81
79
|
CB_STYLE_PROP_TEXT_SPEC_VERTICAL: ENUM_STRING;
|
|
82
|
-
CB_STYLE_PROP_TEXT_SPEC_FORMAT: ENUM_STRING;
|
|
83
|
-
CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS: NUMBER_INTEGER;
|
|
84
80
|
};
|
|
85
81
|
export type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
|
|
86
82
|
'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER': ENUM_STRING | null | undefined;
|
|
@@ -107,12 +103,6 @@ export type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
|
|
|
107
103
|
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:HOVER': ENUM_STRING | null | undefined;
|
|
108
104
|
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE': ENUM_STRING | null | undefined;
|
|
109
105
|
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
110
|
-
'CB_STYLE_PROP_TEXT_SPEC_FORMAT:HOVER': ENUM_STRING | null | undefined;
|
|
111
|
-
'CB_STYLE_PROP_TEXT_SPEC_FORMAT:MOBILE': ENUM_STRING | null | undefined;
|
|
112
|
-
'CB_STYLE_PROP_TEXT_SPEC_FORMAT:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
113
|
-
'CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS:HOVER': NUMBER_INTEGER | null | undefined;
|
|
114
|
-
'CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
115
|
-
'CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
116
106
|
};
|
|
117
107
|
export type CBColorPropsKeys = keyof CB_STYLE_PROP_COLOR_SPECS;
|
|
118
108
|
export type CBColorValueSetType = Partial<Record<keyof CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_COLOR_ENUM_GRADIENT | NUMBER_INTEGER | ENUM_STRING | undefined>>;
|
package/package.json
CHANGED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TEXT_SPEC_FORMAT_OPRIONS = void 0;
|
|
4
|
-
exports.TEXT_SPEC_FORMAT_OPRIONS = {
|
|
5
|
-
TYPE1: {
|
|
6
|
-
name: 'Thousands comma, No decimal',
|
|
7
|
-
description: '천단위 콤마, 소숫점 없음 (반올림)',
|
|
8
|
-
formatter: function (value) {
|
|
9
|
-
var num = Number(value);
|
|
10
|
-
if (isNaN(num))
|
|
11
|
-
return value; // Return original if not a number
|
|
12
|
-
return new Intl.NumberFormat('en-US', {
|
|
13
|
-
maximumFractionDigits: 0
|
|
14
|
-
}).format(num);
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
TYPE2: {
|
|
18
|
-
name: 'Thousands comma, 1 decimal place',
|
|
19
|
-
description: '천단위 콤마, 소숫점 1자리 (반올림)',
|
|
20
|
-
formatter: function (value) {
|
|
21
|
-
var num = Number(value);
|
|
22
|
-
if (isNaN(num))
|
|
23
|
-
return value; // Return original if not a number
|
|
24
|
-
return new Intl.NumberFormat('en-US', {
|
|
25
|
-
minimumFractionDigits: 1,
|
|
26
|
-
maximumFractionDigits: 1
|
|
27
|
-
}).format(num);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
TYPE3: {
|
|
31
|
-
name: 'Thousands comma, 2 decimal places',
|
|
32
|
-
description: '천단위 콤마, 소숫점 2자리 (반올림)',
|
|
33
|
-
formatter: function (value) {
|
|
34
|
-
var num = Number(value);
|
|
35
|
-
if (isNaN(num))
|
|
36
|
-
return value; // Return original if not a number
|
|
37
|
-
return new Intl.NumberFormat('en-US', {
|
|
38
|
-
minimumFractionDigits: 2,
|
|
39
|
-
maximumFractionDigits: 2
|
|
40
|
-
}).format(num);
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
TYPE4: {
|
|
44
|
-
name: 'Date (YYYY/MM/DD)',
|
|
45
|
-
description: '날짜 (YYYY/MM/dd)',
|
|
46
|
-
formatter: function (value) {
|
|
47
|
-
var d = new Date(value);
|
|
48
|
-
if (isNaN(d.getTime()))
|
|
49
|
-
return value; // Return original if invalid date
|
|
50
|
-
var yyyy = d.getFullYear();
|
|
51
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
52
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
53
|
-
return "".concat(yyyy, "/").concat(mm, "/").concat(dd);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
TYPE5: {
|
|
57
|
-
name: 'Date (YYYY-MM-DD)',
|
|
58
|
-
description: '날짜 (YYYY-MM-dd)',
|
|
59
|
-
formatter: function (value) {
|
|
60
|
-
var d = new Date(value);
|
|
61
|
-
if (isNaN(d.getTime()))
|
|
62
|
-
return value;
|
|
63
|
-
var yyyy = d.getFullYear();
|
|
64
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
65
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
66
|
-
return "".concat(yyyy, "-").concat(mm, "-").concat(dd);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
TYPE6: {
|
|
70
|
-
name: 'Date (YYYY. MM. DD)',
|
|
71
|
-
description: '날짜 (YYYY. MM. dd)',
|
|
72
|
-
formatter: function (value) {
|
|
73
|
-
var d = new Date(value);
|
|
74
|
-
if (isNaN(d.getTime()))
|
|
75
|
-
return value;
|
|
76
|
-
var yyyy = d.getFullYear();
|
|
77
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
78
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
79
|
-
return "".concat(yyyy, ". ").concat(mm, ". ").concat(dd);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
TYPE7: {
|
|
83
|
-
name: 'Date (YY/MM/DD)',
|
|
84
|
-
description: '날짜 (YY/MM/dd)',
|
|
85
|
-
formatter: function (value) {
|
|
86
|
-
var d = new Date(value);
|
|
87
|
-
if (isNaN(d.getTime()))
|
|
88
|
-
return value;
|
|
89
|
-
var yy = String(d.getFullYear()).slice(-2);
|
|
90
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
91
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
92
|
-
return "".concat(yy, "/").concat(mm, "/").concat(dd);
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
TYPE8: {
|
|
96
|
-
name: 'Date (MM/DD/YY)',
|
|
97
|
-
description: '날짜 (MM/dd/YY)',
|
|
98
|
-
formatter: function (value) {
|
|
99
|
-
var d = new Date(value);
|
|
100
|
-
if (isNaN(d.getTime()))
|
|
101
|
-
return value;
|
|
102
|
-
var yy = String(d.getFullYear()).slice(-2);
|
|
103
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
104
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
105
|
-
return "".concat(mm, "/").concat(dd, "/").concat(yy);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
TYPE9: {
|
|
109
|
-
name: 'Date (DD/MM/YY)',
|
|
110
|
-
description: '날짜 (dd/MM/YY)',
|
|
111
|
-
formatter: function (value) {
|
|
112
|
-
var d = new Date(value);
|
|
113
|
-
if (isNaN(d.getTime()))
|
|
114
|
-
return value;
|
|
115
|
-
var yy = String(d.getFullYear()).slice(-2);
|
|
116
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
117
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
118
|
-
return "".concat(dd, "/").concat(mm, "/").concat(yy);
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
TYPE10: {
|
|
122
|
-
name: 'Date (YYYY-MM-DD Korean)',
|
|
123
|
-
description: '날짜 (YYYY년 MM월 dd일)',
|
|
124
|
-
formatter: function (value) {
|
|
125
|
-
var d = new Date(value);
|
|
126
|
-
if (isNaN(d.getTime()))
|
|
127
|
-
return value;
|
|
128
|
-
var yyyy = d.getFullYear();
|
|
129
|
-
var mm = d.getMonth() + 1;
|
|
130
|
-
var dd = d.getDate();
|
|
131
|
-
return "".concat(yyyy, "\uB144 ").concat(mm, "\uC6D4 ").concat(dd, "\uC77C");
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
TYPE11: {
|
|
135
|
-
name: 'Date (DD MMM)',
|
|
136
|
-
description: '날짜 (dd MMM)',
|
|
137
|
-
formatter: function (value) {
|
|
138
|
-
var d = new Date(value);
|
|
139
|
-
if (isNaN(d.getTime()))
|
|
140
|
-
return value;
|
|
141
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
142
|
-
var mmm = d.toLocaleString('en-US', { month: 'short' });
|
|
143
|
-
return "".concat(dd, " ").concat(mmm);
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
TYPE12: {
|
|
147
|
-
name: 'Date (MM. DD)',
|
|
148
|
-
description: '날짜 (MM. dd)',
|
|
149
|
-
formatter: function (value) {
|
|
150
|
-
var d = new Date(value);
|
|
151
|
-
if (isNaN(d.getTime()))
|
|
152
|
-
return value;
|
|
153
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
154
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
155
|
-
return "".concat(mm, ". ").concat(dd);
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
TYPE13: {
|
|
159
|
-
name: 'Datetime (YYYY.MM.DD HH:mm:ss)',
|
|
160
|
-
description: '날짜 (YYYY.MM.dd hh:mm:ss)',
|
|
161
|
-
formatter: function (value) {
|
|
162
|
-
// FIX: Return original value if time info is missing.
|
|
163
|
-
if (!value.includes('T') && !value.includes(':')) {
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
var d = new Date(value);
|
|
167
|
-
if (isNaN(d.getTime()))
|
|
168
|
-
return value;
|
|
169
|
-
var yyyy = d.getFullYear();
|
|
170
|
-
var mm = String(d.getMonth() + 1).padStart(2, '0');
|
|
171
|
-
var dd = String(d.getDate()).padStart(2, '0');
|
|
172
|
-
var hh = String(d.getHours()).padStart(2, '0');
|
|
173
|
-
var min = String(d.getMinutes()).padStart(2, '0');
|
|
174
|
-
var ss = String(d.getSeconds()).padStart(2, '0');
|
|
175
|
-
return "".concat(yyyy, ".").concat(mm, ".").concat(dd, " ").concat(hh, ":").concat(min, ":").concat(ss);
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
TYPE14: {
|
|
179
|
-
name: 'Time (HH:mm:ss)',
|
|
180
|
-
description: '시간 (hh:mm:ss)',
|
|
181
|
-
formatter: function (value) {
|
|
182
|
-
// FIX: Return original value if time info is missing.
|
|
183
|
-
if (!value.includes('T') && !value.includes(':')) {
|
|
184
|
-
return value;
|
|
185
|
-
}
|
|
186
|
-
var d = new Date(value);
|
|
187
|
-
if (isNaN(d.getTime()))
|
|
188
|
-
return value;
|
|
189
|
-
var hh = String(d.getHours()).padStart(2, '0');
|
|
190
|
-
var min = String(d.getMinutes()).padStart(2, '0');
|
|
191
|
-
var ss = String(d.getSeconds()).padStart(2, '0');
|
|
192
|
-
return "".concat(hh, ":").concat(min, ":").concat(ss);
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
TYPE15: {
|
|
196
|
-
name: 'Time (HH:mm)',
|
|
197
|
-
description: '시간 (hh:mm)',
|
|
198
|
-
formatter: function (value) {
|
|
199
|
-
// FIX: Return original value if time info is missing.
|
|
200
|
-
if (!value.includes('T') && !value.includes(':')) {
|
|
201
|
-
return value;
|
|
202
|
-
}
|
|
203
|
-
var d = new Date(value);
|
|
204
|
-
if (isNaN(d.getTime()))
|
|
205
|
-
return value;
|
|
206
|
-
var hh = String(d.getHours()).padStart(2, '0');
|
|
207
|
-
var min = String(d.getMinutes()).padStart(2, '0');
|
|
208
|
-
return "".concat(hh, ":").concat(min);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
};
|