@ihabdevteam/core 0.384.0 → 0.387.0
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/CHANGELOG.md +134 -0
- package/dist/components.cjs.js +173 -173
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +3 -3
- package/dist/i18n.cjs.js +3 -3
- package/dist/ihabdevteam-core.cjs.js +180 -180
- package/dist/ihabdevteam-core.d.ts +58 -5
- package/dist/packages/core/src/components/Table.js +8 -3
- package/dist/packages/core/src/components/Training/WordTablePopup.d.ts +16 -2
- package/dist/packages/core/src/components/Training/WordTablePopup.js +5 -3
- package/dist/packages/core/src/components/Word/TableFilterPanel.js +1 -1
- package/dist/packages/core/src/components/Word/WordSearchResultBlock.css +19 -0
- package/dist/packages/core/src/components/Word/WordSearchResultBlock.d.ts +20 -1
- package/dist/packages/core/src/components/Word/WordSearchResultBlock.js +5 -2
- package/dist/packages/core/src/components/Word/WordTableBlock.d.ts +1 -1
- package/dist/packages/core/src/components/Word/WordTableBlock.js +8 -7
- package/dist/packages/core/src/components/Word/useWordTableDisplaySettings.d.ts +8 -0
- package/dist/packages/core/src/components/Word/useWordTableDisplaySettings.js +14 -6
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +2 -0
- package/dist/packages/core/src/components/Word/wordTableSettings.d.ts +30 -1
- package/dist/packages/core/src/components/Word/wordTableSettings.js +31 -1
- package/dist/packages/core/src/components/WordTable.d.ts +11 -1
- package/dist/packages/core/src/components/WordTable.js +11 -3
- package/dist/packages/core/src/i18n/locales/en.json +2 -0
- package/dist/packages/core/src/i18n/locales/ko.json +2 -0
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +23 -23
- package/package.json +1 -1
|
@@ -277,7 +277,7 @@ function WordCell({ label, subLabel, colloquialLabel, captionLabel, captionBadge
|
|
|
277
277
|
* 표시(items)·편집(editCells) 두 모드를 지원한다.
|
|
278
278
|
* @public
|
|
279
279
|
*/
|
|
280
|
-
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
280
|
+
export default function WordTable({ title, titleIcon, disc, className, orientation = 'landscape', contentTypes = ['image', 'word', 'standardPron'], baseItem, baseContentTypes, cutLine = 'show', showOutline = true, showDivLine = true, items, editCells, count, activeCell = null, onActivateCell, onRemoveCell, onRemoveItem, onReorder, onCopyItem, indexOffset = 0, totalCount, renderCellAction, showFillerAdd = false, addableCount, contentRef, buttonSize = 40, brand, code, pageNumber, pageNumberPosition = 'right', fitHeight = false, scoring = false, marks, onMarkClick, scoreIndexOffset = 0, }) {
|
|
281
281
|
const clickMark = useCallback((cellIndex, clicked) => {
|
|
282
282
|
onMarkClick?.(scoreIndexOffset + cellIndex, clicked);
|
|
283
283
|
}, [onMarkClick, scoreIndexOffset]);
|
|
@@ -632,7 +632,7 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
|
|
|
632
632
|
...dotDashStyle(0, orientation === 'landscape' ? 2 : 1, orientation === 'landscape' ? 1 : 2, cutLine),
|
|
633
633
|
}, children: (baseItem.words ?? []).map((w, wi) => (_jsxs(Fragment, { children: [wi > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: baseShow.word, showImage: baseShow.image, showPronunciation: baseShow.pron, showColloquial: baseShow.colloq, showCaption: baseShow.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, wi))) })), (items ?? []).map((item, index) => (_jsxs("div", { "data-wordtable-cell": onReorder ? index : undefined, "data-wordtable-index": onReorder ? indexOffset + index : undefined, className: withLegacy(`word-table__card${onReorder ? ' word-table__card--draggable' : ''}${dragOver === index ? ' word-table__card--drag-over' : ''}${dragging === index ? ' word-table__card--dragging' : ''}`), style: dotDashStyle(index, itemCols, itemRows, cutLine), draggable: !!onReorder, onPointerDown: onReorder ? (e) => longPressDrag(e, index) : undefined, onKeyDown: onReorder ? (e) => moveByKey(e, index) : undefined, onDragStart: onReorder ? () => { dragIndex.current = index; } : undefined, onDragOver: onReorder ? (e) => { e.preventDefault(); setDragOver(index); } : undefined, onDragLeave: onReorder ? () => setDragOver(null) : undefined, onDrop: onReorder ? (e) => { e.preventDefault(); if (dragIndex.current !== null && dragIndex.current !== index) {
|
|
634
634
|
onReorder(dragIndex.current, index);
|
|
635
|
-
} ; dragIndex.current = null; setDragOver(null); } : undefined, onDragEnd: onReorder ? () => { dragIndex.current = null; setDragOver(null); } : undefined, children: [(item.words ?? []).map((w, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, i))), scoring && renderScore(index, (item.words ?? []).map(w => w.label).join(' / ')), (renderCellAction || onRemoveItem || onReorder) && (
|
|
635
|
+
} ; dragIndex.current = null; setDragOver(null); } : undefined, onDragEnd: onReorder ? () => { dragIndex.current = null; setDragOver(null); } : undefined, children: [(item.words ?? []).map((w, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("div", { className: withLegacy("word-table__pair-divider") }), _jsx(WordCell, { outerScale: scale, label: w.label, subLabel: w.subLabel, colloquialLabel: w.colloquialLabel, captionLabel: w.captionLabel, captionBadge: w.captionBadge, homonum: w.homonum, showWord: show.word, showImage: show.image, showPronunciation: show.pron, showColloquial: show.colloq, showCaption: show.caption, buttonSize: buttonSize, wordInfo: (w.grade || w.syllables != null || w.pos || w.wordType) ? { grade: w.grade, syllables: w.syllables, pos: w.pos, wordType: w.wordType } : undefined })] }, i))), scoring && renderScore(index, (item.words ?? []).map(w => w.label).join(' / ')), (renderCellAction || onRemoveItem || onCopyItem || onReorder) && (
|
|
636
636
|
/* **오른쪽 기둥** — 빼기 → 부르는 쪽이 얹은 것 → 옮기기 손잡이 차례로 쌓인다
|
|
637
637
|
(말귀 청 (331), 2026-10-28). 전에는 빼기와 얹은 것만 **한 줄**로 서고
|
|
638
638
|
손잡이는 왼쪽 위에 따로 섰다 — 재생 단추와 **같은 자리라 겹쳤다.**
|
|
@@ -642,7 +642,15 @@ export default function WordTable({ title, titleIcon, disc, className, orientati
|
|
|
642
642
|
단어표에 맞춘 것이라 끼어들 단추가 없는 표에서 구멍이 났다(활용표: ✕ 밑이
|
|
643
643
|
48px 비고 손잡이만 홀로 내려가 있었다).
|
|
644
644
|
**자리를 수로 못 박지 않는다** — 쌓아서 세우면 몇 개가 들든 붙어 선다. */
|
|
645
|
-
_jsxs("div", { className: withLegacy("word-table__card-actions"), children: [onRemoveItem && (_jsx("div", { className: withLegacy("word-table__card-close"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveItem(item.id) }) })),
|
|
645
|
+
_jsxs("div", { className: withLegacy("word-table__card-actions"), children: [onRemoveItem && (_jsx("div", { className: withLegacy("word-table__card-close"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "x", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), ariaLabel: (item.words ?? []).length > 1 ? t('wordPrint.removePair', '대립쌍 빼기') : t('wordPrint.removeWord', '단어 빼기'), onClick: () => onRemoveItem(item.id) }) })), onCopyItem && (
|
|
646
|
+
/* **빼기 바로 아래** — 사장님이 화면에서 그 자리에 두셨다.
|
|
647
|
+
꼴은 위아래 이웃과 **한 글자도 안 다르다**(`type="dot"` ·
|
|
648
|
+
`transparent-lightGray` · `useBorder={false}`). 셋을 한자리에 적어 두는
|
|
649
|
+
것이 맞추는 유일한 길이다 — 떨어뜨려 두면 또 어긋난다. */
|
|
650
|
+
_jsx("div", { className: withLegacy("word-table__card-copy"), children: _jsx(Button, { htmlType: "button", size: buttonSize, type: "dot", icon: "copy", variant: "transparent-lightGray", useBorder: false, showTooltipInfo: t('wordTable.copyItem', '한 칸 더'), ariaLabel: t('wordTable.copyItemAria', {
|
|
651
|
+
n: indexOffset + index + 1,
|
|
652
|
+
defaultValue: '{{n}}번 칸 낱말을 한 칸 더',
|
|
653
|
+
}), onClick: () => onCopyItem(item.id, indexOffset + index) }) })), renderCellAction?.(index, item), onReorder && (
|
|
646
654
|
/* **옮기기 손잡이.** 키보드로 순서를 바꾸려면 초점이 갈 자리가 있어야 하는데,
|
|
647
655
|
칸 자체를 초점 대상으로 만들면 칸마다 뜻 없는 탭 정지점이 하나씩 늘고
|
|
648
656
|
낭독기는 그것이 무엇인지 말할 수 없다. 이름 붙은 진짜 단추를 둔다 —
|