@simplysm/angular 14.2.1 → 14.2.3
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/controls/button/sd-anchor.d.ts +1 -1
- package/dist/controls/button/sd-anchor.d.ts.map +1 -1
- package/dist/controls/button/sd-anchor.js +2 -2
- package/dist/controls/button/sd-button.d.ts +1 -1
- package/dist/controls/button/sd-button.d.ts.map +1 -1
- package/dist/controls/button/sd-button.js +2 -2
- package/dist/controls/checkbox/sd-checkbox.d.ts +1 -1
- package/dist/controls/checkbox/sd-checkbox.d.ts.map +1 -1
- package/dist/controls/checkbox/sd-checkbox.js +2 -2
- package/dist/controls/checkbox/sd-switch.d.ts +1 -1
- package/dist/controls/checkbox/sd-switch.d.ts.map +1 -1
- package/dist/controls/checkbox/sd-switch.js +2 -2
- package/dist/controls/dropdown/sd-dropdown.d.ts +3 -0
- package/dist/controls/dropdown/sd-dropdown.d.ts.map +1 -1
- package/dist/controls/dropdown/sd-dropdown.js +29 -9
- package/dist/controls/input/sd-textarea.d.ts +1 -1
- package/dist/controls/input/sd-textarea.d.ts.map +1 -1
- package/dist/controls/input/sd-textarea.js +2 -2
- package/dist/controls/input/sd-textfield-type-handlers.js +1 -1
- package/dist/controls/input/sd-textfield.d.ts +1 -1
- package/dist/controls/input/sd-textfield.d.ts.map +1 -1
- package/dist/controls/input/sd-textfield.js +9 -10
- package/dist/controls/list/sd-list.d.ts.map +1 -1
- package/dist/controls/list/sd-list.js +4 -6
- package/dist/controls/select/sd-select-button.d.ts.map +1 -1
- package/dist/controls/select/sd-select-button.js +3 -5
- package/dist/controls/select/sd-select.js +2 -2
- package/dist/core/error-handler/sd-global-error-handler.plugin.js +1 -1
- package/dist/core/modal/sd-modal.provider.js +1 -1
- package/dist/core/provideSdAngular.d.ts.map +1 -1
- package/dist/core/provideSdAngular.js +1 -13
- package/dist/core/setupBgTheme.d.ts +1 -1
- package/dist/core/setupBgTheme.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.js +2 -2
- package/dist/core/toast/sd-toast.provider.d.ts +1 -1
- package/dist/core/toast/sd-toast.provider.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.provider.js +1 -1
- package/dist/data/crud/sd-base-container.d.ts +1 -1
- package/dist/data/crud/sd-base-container.d.ts.map +1 -1
- package/dist/data/crud/sd-base-container.js +2 -2
- package/dist/data/crud/sd-crud-detail.d.ts +1 -1
- package/dist/data/crud/sd-crud-detail.d.ts.map +1 -1
- package/dist/data/crud/sd-crud-list.d.ts +3 -3
- package/dist/data/crud/sd-crud-list.d.ts.map +1 -1
- package/dist/data/shared-data/sd-shared-data-select.d.ts +2 -2
- package/dist/data/shared-data/sd-shared-data-select.d.ts.map +1 -1
- package/dist/data/sheet/injectSheetDomAccessor.d.ts +1 -0
- package/dist/data/sheet/injectSheetDomAccessor.d.ts.map +1 -1
- package/dist/data/sheet/injectSheetDomAccessor.js +7 -0
- package/dist/data/sheet/injectSheetDragSelection.d.ts +18 -0
- package/dist/data/sheet/injectSheetDragSelection.d.ts.map +1 -0
- package/dist/data/sheet/injectSheetDragSelection.js +193 -0
- package/dist/data/sheet/sd-sheet.d.ts +3 -0
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +17 -6
- package/dist/data/state-preset/sd-state-preset.d.ts +2 -2
- package/dist/data/state-preset/sd-state-preset.d.ts.map +1 -1
- package/dist/features/editor/sd-tiptap-editor.js +2 -2
- package/dist/features/theme/sd-theme-provider.d.ts +0 -2
- package/dist/features/theme/sd-theme-provider.d.ts.map +1 -1
- package/dist/features/theme/sd-theme-provider.js +0 -5
- package/dist/features/theme/sd-theme-selector.d.ts +1 -1
- package/dist/features/theme/sd-theme-selector.d.ts.map +1 -1
- package/dist/features/theme/sd-theme-selector.js +5 -22
- package/dist/features/visual/sd-label.d.ts +1 -1
- package/dist/features/visual/sd-label.d.ts.map +1 -1
- package/dist/features/visual/sd-label.js +2 -2
- package/dist/features/visual/sd-note.d.ts +1 -1
- package/dist/features/visual/sd-note.d.ts.map +1 -1
- package/dist/features/visual/sd-note.js +2 -2
- package/dist/features/visual/sd-progress.d.ts +1 -1
- package/dist/features/visual/sd-progress.d.ts.map +1 -1
- package/dist/features/visual/sd-progress.js +2 -2
- package/dist/layout/sidebar/sd-sidebar.d.ts.map +1 -1
- package/dist/layout/sidebar/sd-sidebar.js +3 -5
- package/dist/layout/topbar/sd-topbar.d.ts.map +1 -1
- package/dist/layout/topbar/sd-topbar.js +3 -3
- package/package.json +26 -26
- package/scss/commons/_mixins.scss +1 -1
- package/scss/commons/_theme-variables.scss +0 -8
- package/scss/commons/_variables.scss +114 -121
- package/scss/themes/_variables-blueprint.scss +65 -63
- package/scss/themes/_variables-ide-dark.scss +166 -144
- package/src/controls/button/sd-anchor.ts +3 -3
- package/src/controls/button/sd-button.ts +1 -3
- package/src/controls/checkbox/sd-checkbox.ts +2 -10
- package/src/controls/checkbox/sd-switch.ts +2 -4
- package/src/controls/dropdown/sd-dropdown.ts +33 -9
- package/src/controls/input/sd-textarea.ts +2 -4
- package/src/controls/input/sd-textfield-type-handlers.ts +1 -1
- package/src/controls/input/sd-textfield.ts +9 -12
- package/src/controls/list/sd-list.ts +3 -5
- package/src/controls/select/sd-select-button.ts +2 -4
- package/src/controls/select/sd-select.ts +1 -1
- package/src/core/error-handler/sd-global-error-handler.plugin.ts +1 -1
- package/src/core/modal/sd-modal.provider.ts +1 -1
- package/src/core/provideSdAngular.ts +1 -15
- package/src/core/setupBgTheme.ts +1 -2
- package/src/core/toast/sd-toast.provider.ts +5 -3
- package/src/data/crud/sd-base-container.ts +1 -1
- package/src/data/sheet/injectSheetDomAccessor.ts +7 -0
- package/src/data/sheet/injectSheetDragSelection.ts +226 -0
- package/src/data/sheet/sd-sheet.ts +16 -3
- package/src/features/editor/sd-tiptap-editor.ts +1 -1
- package/src/features/theme/sd-theme-provider.ts +0 -9
- package/src/features/theme/sd-theme-selector.ts +1 -10
- package/src/features/visual/sd-label.ts +1 -3
- package/src/features/visual/sd-note.ts +1 -3
- package/src/features/visual/sd-progress.ts +2 -2
- package/src/layout/sidebar/sd-sidebar.ts +2 -3
- package/src/layout/topbar/sd-topbar.ts +1 -0
- package/styles.css +278 -567
- package/scss/commons/_colors.scss +0 -301
- package/scss/commons/_density.scss +0 -23
- package/scss/sd-tokens.md +0 -132
|
@@ -37,6 +37,12 @@ export function injectSheetDomAccessor() {
|
|
|
37
37
|
return null;
|
|
38
38
|
return tbody.querySelector(`tr[data-r='${r}']`);
|
|
39
39
|
}
|
|
40
|
+
function getRows() {
|
|
41
|
+
const tbody = getTable().querySelector("tbody");
|
|
42
|
+
if (tbody == null)
|
|
43
|
+
return [];
|
|
44
|
+
return Array.from(tbody.querySelectorAll("tr[data-r]"));
|
|
45
|
+
}
|
|
40
46
|
function getCell(r, c) {
|
|
41
47
|
const row = getRow(r);
|
|
42
48
|
if (row == null)
|
|
@@ -55,6 +61,7 @@ export function injectSheetDomAccessor() {
|
|
|
55
61
|
getSelectRowIndicators,
|
|
56
62
|
getColumnResizeIndicator,
|
|
57
63
|
getRow,
|
|
64
|
+
getRows,
|
|
58
65
|
getCell,
|
|
59
66
|
};
|
|
60
67
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Signal } from "@angular/core";
|
|
2
|
+
export declare function injectSheetDragSelection<TItem>(options: {
|
|
3
|
+
domAccessor: {
|
|
4
|
+
getRows(): HTMLTableRowElement[];
|
|
5
|
+
getContainer(): HTMLElement;
|
|
6
|
+
getTHead(): HTMLTableSectionElement;
|
|
7
|
+
};
|
|
8
|
+
displayItems: Signal<TItem[]>;
|
|
9
|
+
selection: {
|
|
10
|
+
isSelected(item: TItem): boolean;
|
|
11
|
+
getSelectable(item: TItem): true | string | undefined;
|
|
12
|
+
select(item: TItem): void;
|
|
13
|
+
deselect(item: TItem): void;
|
|
14
|
+
};
|
|
15
|
+
}): {
|
|
16
|
+
onSelectorPointerDown: (event: PointerEvent, r: number) => void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=injectSheetDragSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectSheetDragSelection.d.ts","sourceRoot":"","sources":["../../../src/data/sheet/injectSheetDragSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAEhE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,EAAE;IACvD,WAAW,EAAE;QACX,OAAO,IAAI,mBAAmB,EAAE,CAAC;QACjC,YAAY,IAAI,WAAW,CAAC;QAC5B,QAAQ,IAAI,uBAAuB,CAAC;KACrC,CAAC;IACF,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IAC9B,SAAS,EAAE;QACT,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;QACjC,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;QACtD,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;QAC1B,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;KAC7B,CAAC;CACH;mCA+DuC,YAAY,KAAK,MAAM,KAAG,IAAI;EAmJrE"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { DestroyRef, inject } from "@angular/core";
|
|
2
|
+
export function injectSheetDragSelection(options) {
|
|
3
|
+
const destroyRef = inject(DestroyRef);
|
|
4
|
+
let dragCleanup = null;
|
|
5
|
+
destroyRef.onDestroy(() => {
|
|
6
|
+
dragCleanup?.();
|
|
7
|
+
});
|
|
8
|
+
// 벗어난 1px 당 초당 스크롤 px, 그리고 초당 스크롤 상한
|
|
9
|
+
const AUTO_SCROLL_SPEED_PER_PX = 8;
|
|
10
|
+
const AUTO_SCROLL_MAX_SPEED = 2000;
|
|
11
|
+
// 고정 헤더에 가려지거나 컨테이너 밖에 있는 행은 소비자에게 안 보인다
|
|
12
|
+
function visibleBand() {
|
|
13
|
+
const containerRect = options.domAccessor.getContainer().getBoundingClientRect();
|
|
14
|
+
return {
|
|
15
|
+
top: containerRect.top + options.domAccessor.getTHead().offsetHeight,
|
|
16
|
+
bottom: containerRect.bottom,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function rowIndexOf(rowEl) {
|
|
20
|
+
const attr = rowEl.getAttribute("data-r");
|
|
21
|
+
const rowIdx = attr == null ? Number.NaN : parseInt(attr, 10);
|
|
22
|
+
if (Number.isNaN(rowIdx)) {
|
|
23
|
+
throw new Error(`시트 행 인덱스를 읽을 수 없습니다: data-r=${attr}`);
|
|
24
|
+
}
|
|
25
|
+
return rowIdx;
|
|
26
|
+
}
|
|
27
|
+
// 보이는 행 중 clientY 가 속한 행. 위아래로 벗어나면 가장 가까운 끝 행으로 맞춘다
|
|
28
|
+
function resolveRowIndex(clientY) {
|
|
29
|
+
const band = visibleBand();
|
|
30
|
+
const visibleRows = options.domAccessor.getRows().filter((rowEl) => {
|
|
31
|
+
const rect = rowEl.getBoundingClientRect();
|
|
32
|
+
return rect.bottom > band.top && rect.top < band.bottom;
|
|
33
|
+
});
|
|
34
|
+
if (visibleRows.length === 0)
|
|
35
|
+
return null;
|
|
36
|
+
const firstRect = visibleRows[0].getBoundingClientRect();
|
|
37
|
+
const lastRect = visibleRows[visibleRows.length - 1].getBoundingClientRect();
|
|
38
|
+
if (clientY < Math.max(firstRect.top, band.top))
|
|
39
|
+
return rowIndexOf(visibleRows[0]);
|
|
40
|
+
if (clientY >= Math.min(lastRect.bottom, band.bottom)) {
|
|
41
|
+
return rowIndexOf(visibleRows[visibleRows.length - 1]);
|
|
42
|
+
}
|
|
43
|
+
for (const rowEl of visibleRows) {
|
|
44
|
+
const rect = rowEl.getBoundingClientRect();
|
|
45
|
+
if (clientY < rect.top || clientY >= rect.bottom)
|
|
46
|
+
continue;
|
|
47
|
+
return rowIndexOf(rowEl);
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
// 가장자리를 넘어선 거리. 위로 벗어나면 음수, 아래로 벗어나면 양수
|
|
52
|
+
function overshootOf(clientY) {
|
|
53
|
+
const band = visibleBand();
|
|
54
|
+
if (clientY < band.top)
|
|
55
|
+
return clientY - band.top;
|
|
56
|
+
if (clientY >= band.bottom)
|
|
57
|
+
return clientY - band.bottom;
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
function onSelectorPointerDown(event, r) {
|
|
61
|
+
if (event.button !== 0)
|
|
62
|
+
return;
|
|
63
|
+
if (event.shiftKey)
|
|
64
|
+
return;
|
|
65
|
+
if (event.pointerType === "touch")
|
|
66
|
+
return;
|
|
67
|
+
dragCleanup?.();
|
|
68
|
+
const startItem = options.displayItems()[r];
|
|
69
|
+
if (startItem == null)
|
|
70
|
+
return;
|
|
71
|
+
// 시작 행을 누른 결과 상태가 곧 페인트 목표. 체크박스 자체 토글보다 먼저 스냅샷해야 뒤집히지 않는다
|
|
72
|
+
const isSelectTarget = !options.selection.isSelected(startItem);
|
|
73
|
+
const startEl = event.currentTarget;
|
|
74
|
+
let dragged = false;
|
|
75
|
+
// 칠하기 전 상태. 드래그를 되돌려 범위를 벗어난 행은 이 값으로 복원한다
|
|
76
|
+
const stateBeforePaint = new Map();
|
|
77
|
+
const setSelected = (rowIdx, selected) => {
|
|
78
|
+
const item = options.displayItems()[rowIdx];
|
|
79
|
+
if (item == null)
|
|
80
|
+
return;
|
|
81
|
+
if (options.selection.getSelectable(item) !== true)
|
|
82
|
+
return;
|
|
83
|
+
if (selected) {
|
|
84
|
+
options.selection.select(item);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
options.selection.deselect(item);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const paint = (rowIdx) => {
|
|
91
|
+
const item = options.displayItems()[rowIdx];
|
|
92
|
+
if (item == null)
|
|
93
|
+
return;
|
|
94
|
+
if (options.selection.getSelectable(item) !== true)
|
|
95
|
+
return;
|
|
96
|
+
if (!stateBeforePaint.has(rowIdx)) {
|
|
97
|
+
stateBeforePaint.set(rowIdx, options.selection.isSelected(item));
|
|
98
|
+
}
|
|
99
|
+
setSelected(rowIdx, isSelectTarget);
|
|
100
|
+
};
|
|
101
|
+
// 시작 행부터 현재 행까지가 칠할 범위. 범위를 벗어난 행은 원래대로 되돌린다
|
|
102
|
+
const applyRange = (currentRow) => {
|
|
103
|
+
const from = Math.min(r, currentRow);
|
|
104
|
+
const to = Math.max(r, currentRow);
|
|
105
|
+
for (const rowIdx of [...stateBeforePaint.keys()]) {
|
|
106
|
+
if (rowIdx >= from && rowIdx <= to)
|
|
107
|
+
continue;
|
|
108
|
+
setSelected(rowIdx, stateBeforePaint.get(rowIdx));
|
|
109
|
+
stateBeforePaint.delete(rowIdx);
|
|
110
|
+
}
|
|
111
|
+
for (let i = from; i <= to; i++) {
|
|
112
|
+
paint(i);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const applyRangeAt = (clientY) => {
|
|
116
|
+
const rowIdx = resolveRowIndex(clientY);
|
|
117
|
+
if (rowIdx == null)
|
|
118
|
+
return;
|
|
119
|
+
if (rowIdx === r && !dragged)
|
|
120
|
+
return;
|
|
121
|
+
dragged = true;
|
|
122
|
+
applyRange(rowIdx);
|
|
123
|
+
};
|
|
124
|
+
// 가장자리를 넘긴 동안 벗어난 거리에 비례해 스크롤하며 계속 칠한다
|
|
125
|
+
let pointerY = event.clientY;
|
|
126
|
+
let rafId = null;
|
|
127
|
+
let lastFrameTime = null;
|
|
128
|
+
const autoScrollFrame = (time) => {
|
|
129
|
+
const overshoot = overshootOf(pointerY);
|
|
130
|
+
if (overshoot === 0) {
|
|
131
|
+
rafId = null;
|
|
132
|
+
lastFrameTime = null;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const elapsedSec = lastFrameTime == null ? 0 : (time - lastFrameTime) / 1000;
|
|
136
|
+
lastFrameTime = time;
|
|
137
|
+
const speed = Math.sign(overshoot) *
|
|
138
|
+
Math.min(Math.abs(overshoot) * AUTO_SCROLL_SPEED_PER_PX, AUTO_SCROLL_MAX_SPEED);
|
|
139
|
+
options.domAccessor.getContainer().scrollTop += speed * elapsedSec;
|
|
140
|
+
applyRangeAt(pointerY);
|
|
141
|
+
rafId = requestAnimationFrame(autoScrollFrame);
|
|
142
|
+
};
|
|
143
|
+
const onPointerMove = (e) => {
|
|
144
|
+
pointerY = e.clientY;
|
|
145
|
+
applyRangeAt(pointerY);
|
|
146
|
+
if (overshootOf(pointerY) !== 0 && rafId == null) {
|
|
147
|
+
rafId = requestAnimationFrame(autoScrollFrame);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const onPointerUp = () => {
|
|
151
|
+
dragCleanup?.();
|
|
152
|
+
if (!dragged)
|
|
153
|
+
return;
|
|
154
|
+
// 시작 행은 이미 페인트로 확정됐으므로 SdCheckbox 자체 토글이 되돌리지 못하게 막는다.
|
|
155
|
+
// capture 로 걸어야 SdCheckbox 의 host (click) 보다 먼저 실행된다
|
|
156
|
+
if (!(startEl instanceof HTMLElement))
|
|
157
|
+
return;
|
|
158
|
+
const blockClick = (e) => {
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
e.stopImmediatePropagation();
|
|
161
|
+
};
|
|
162
|
+
startEl.addEventListener("click", blockClick, { once: true, capture: true });
|
|
163
|
+
// 다른 행에서 뗀 드래그는 시작 체크박스에 click 이 오지 않는다.
|
|
164
|
+
// 남겨두면 이후의 정상 클릭 1회를 삼키므로 이번 턴이 지나면 걷어낸다
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
startEl.removeEventListener("click", blockClick, { capture: true });
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
// 드래그 중 브라우저 텍스트 선택 억제.
|
|
170
|
+
// pointerdown 을 preventDefault 하면 클릭 포커스까지 사라져 shift 범위 선택의 기준 행이 깨지므로,
|
|
171
|
+
// 선택 시작 자체만 막는다
|
|
172
|
+
const blockSelectStart = (e) => {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
};
|
|
175
|
+
document.addEventListener("selectstart", blockSelectStart);
|
|
176
|
+
document.addEventListener("pointermove", onPointerMove);
|
|
177
|
+
document.addEventListener("pointerup", onPointerUp);
|
|
178
|
+
// 브라우저발 강제 종료(창 전환, 시스템 제스처)도 뗀 것과 동일하게 확정 처리
|
|
179
|
+
document.addEventListener("pointercancel", onPointerUp);
|
|
180
|
+
dragCleanup = () => {
|
|
181
|
+
if (rafId != null) {
|
|
182
|
+
cancelAnimationFrame(rafId);
|
|
183
|
+
rafId = null;
|
|
184
|
+
}
|
|
185
|
+
document.removeEventListener("selectstart", blockSelectStart);
|
|
186
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
187
|
+
document.removeEventListener("pointerup", onPointerUp);
|
|
188
|
+
document.removeEventListener("pointercancel", onPointerUp);
|
|
189
|
+
dragCleanup = null;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return { onSelectorPointerDown };
|
|
193
|
+
}
|
|
@@ -44,6 +44,7 @@ export declare class SdSheet<TItem> {
|
|
|
44
44
|
getSelectRowIndicators: () => HTMLElement[];
|
|
45
45
|
getColumnResizeIndicator: () => HTMLElement;
|
|
46
46
|
getRow: (r: number) => HTMLTableRowElement | null;
|
|
47
|
+
getRows: () => HTMLTableRowElement[];
|
|
47
48
|
getCell: (r: number, c: number) => HTMLTableCellElement | null;
|
|
48
49
|
};
|
|
49
50
|
cellAgent: {
|
|
@@ -119,6 +120,7 @@ export declare class SdSheet<TItem> {
|
|
|
119
120
|
toggleAll(): void;
|
|
120
121
|
isSelected(item: TItem): boolean;
|
|
121
122
|
};
|
|
123
|
+
private readonly _dragSelection;
|
|
122
124
|
icons: {
|
|
123
125
|
tablerSettings: string;
|
|
124
126
|
tablerCaretRight: string;
|
|
@@ -153,6 +155,7 @@ export declare class SdSheet<TItem> {
|
|
|
153
155
|
onContainerScroll(): void;
|
|
154
156
|
onTableResize(event: SdResizeEvent): void;
|
|
155
157
|
onFixedCellResize(event: SdResizeEvent, key: number): void;
|
|
158
|
+
onSelectorPointerDown(event: PointerEvent, r: number): void;
|
|
156
159
|
onSelectorMouseDown(event: MouseEvent, r: number): void;
|
|
157
160
|
private _autoScrollOnFocus;
|
|
158
161
|
onItemKeydown(event: KeyboardEvent, item: TItem): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-sheet.d.ts","sourceRoot":"","sources":["../../../src/data/sheet/sd-sheet.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAclD,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,wCAAwC,CAAC;AAI5F,OAAO,KAAK,EACV,4BAA4B,EAE5B,gBAAgB,EAChB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;;;
|
|
1
|
+
{"version":3,"file":"sd-sheet.d.ts","sourceRoot":"","sources":["../../../src/data/sheet/sd-sheet.ts"],"names":[],"mappings":"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"}
|
|
@@ -20,6 +20,7 @@ import { useSheetDisplayPipeline } from "./useSheetDisplayPipeline";
|
|
|
20
20
|
import { useSheetCellStyling } from "./useSheetCellStyling";
|
|
21
21
|
import { useSheetFocusIndicator } from "./useSheetFocusIndicator";
|
|
22
22
|
import { injectSheetSelectRowIndicator } from "./injectSheetSelectRowIndicator";
|
|
23
|
+
import { injectSheetDragSelection } from "./injectSheetDragSelection";
|
|
23
24
|
import { SdModalProvider } from "../../core/modal/sd-modal.provider";
|
|
24
25
|
import { SdSheetConfigModal } from "./sd-sheet-config.modal";
|
|
25
26
|
import { SdEvents } from "../../core/events/sd-events";
|
|
@@ -279,7 +280,7 @@ function SdSheet_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
279
280
|
function SdSheet_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
280
281
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
281
282
|
i0.ɵɵelementStart(0, "sd-checkbox", 35);
|
|
282
|
-
i0.ɵɵlistener("valueChange", function SdSheet_For_9_Conditional_2_Template_sd_checkbox_valueChange_0_listener() { i0.ɵɵrestoreView(_r21); const item_r20 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selection.toggle(item_r20)); })("mousedown", function SdSheet_For_9_Conditional_2_Template_sd_checkbox_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r21); const ɵ$index_95_r22 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectorMouseDown($event, ɵ$index_95_r22)); });
|
|
283
|
+
i0.ɵɵlistener("valueChange", function SdSheet_For_9_Conditional_2_Template_sd_checkbox_valueChange_0_listener() { i0.ɵɵrestoreView(_r21); const item_r20 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selection.toggle(item_r20)); })("mousedown", function SdSheet_For_9_Conditional_2_Template_sd_checkbox_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r21); const ɵ$index_95_r22 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectorMouseDown($event, ɵ$index_95_r22)); })("pointerdown", function SdSheet_For_9_Conditional_2_Template_sd_checkbox_pointerdown_0_listener($event) { i0.ɵɵrestoreView(_r21); const ɵ$index_95_r22 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectorPointerDown($event, ɵ$index_95_r22)); });
|
|
283
284
|
i0.ɵɵelementEnd();
|
|
284
285
|
} if (rf & 2) {
|
|
285
286
|
const item_r20 = i0.ɵɵnextContext().$implicit;
|
|
@@ -545,6 +546,12 @@ export class SdSheet {
|
|
|
545
546
|
getItemSelectableFn: this.getItemSelectableFn,
|
|
546
547
|
trackByFn: this.trackByFn,
|
|
547
548
|
});
|
|
549
|
+
// Drag(paint) selection
|
|
550
|
+
_dragSelection = injectSheetDragSelection({
|
|
551
|
+
domAccessor: this.domAccessor,
|
|
552
|
+
displayItems: this.displayItems,
|
|
553
|
+
selection: this.selection,
|
|
554
|
+
});
|
|
548
555
|
// Icons
|
|
549
556
|
icons = {
|
|
550
557
|
tablerSettings,
|
|
@@ -669,6 +676,9 @@ export class SdSheet {
|
|
|
669
676
|
return newMap;
|
|
670
677
|
});
|
|
671
678
|
}
|
|
679
|
+
onSelectorPointerDown(event, r) {
|
|
680
|
+
this._dragSelection.onSelectorPointerDown(event, r);
|
|
681
|
+
}
|
|
672
682
|
onSelectorMouseDown(event, r) {
|
|
673
683
|
if (!event.shiftKey)
|
|
674
684
|
return;
|
|
@@ -758,7 +768,7 @@ export class SdSheet {
|
|
|
758
768
|
i0.ɵɵlistener("keydown.capture", function SdSheet_keydown_capture_HostBindingHandler($event) { return ctx.onKeydownCapture($event); })("focus.capture", function SdSheet_focus_capture_HostBindingHandler($event) { return ctx.onFocusCapture($event); })("dblclick", function SdSheet_dblclick_HostBindingHandler($event) { return ctx.onDblClick($event); })("blur.capture", function SdSheet_blur_capture_HostBindingHandler($event) { return ctx.onBlurCapture($event); });
|
|
759
769
|
} if (rf & 2) {
|
|
760
770
|
i0.ɵɵattribute("data-sd-inset", ctx.inset())("data-sd-focus-mode", ctx.focusMode());
|
|
761
|
-
} }, inputs: { key: [1, "key"], items: [1, "items"], trackByFn: [1, "trackByFn"], selectMode: [1, "selectMode"], autoSelect: [1, "autoSelect"], getItemSelectableFn: [1, "getItemSelectableFn"], getChildrenFn: [1, "getChildrenFn"], useAutoSort: [1, "useAutoSort"], visiblePageCount: [1, "visiblePageCount"], totalPageCount: [1, "totalPageCount"], itemsPerPage: [1, "itemsPerPage"], focusMode: [1, "focusMode"], inset: [1, "inset"], contentStyle: [1, "contentStyle"], getItemCellClassFn: [1, "getItemCellClassFn"], getItemCellStyleFn: [1, "getItemCellStyleFn"], hideConfigBar: [1, "hideConfigBar"], selectedKeys: [1, "selectedKeys"], expandedItems: [1, "expandedItems"], sorts: [1, "sorts"], currentPage: [1, "currentPage"], columnControlsInput: [1, "columnControlsInput"] }, outputs: { itemKeydown: "itemKeydown", cellKeydown: "cellKeydown", selectedKeys: "selectedKeysChange", expandedItems: "expandedItemsChange", sorts: "sortsChange", currentPage: "currentPageChange" }, features: [i0.ɵɵHostDirectivesFeature([{ directive: i1.SdEvents, outputs: ["keydown.capture", "keydown.capture", "focus.capture", "focus.capture", "blur.capture", "blur.capture"] }])], decls: 14, vars: 8, consts: [[1, "_tool", "flex-row", "gap-sm", "p-xs"], [1, "_sheet-container", "flex-fill", 3, "scroll.passive"], [3, "sdResize"], [1, "_summary-row"], [1, "_focus-row-indicator"], [1, "_focus-cell-indicator"], [1, "_resize-indicator"], [1, "_select-row-indicator-container"], [3, "theme", "size"], [1, "flex-fill", 3, "currentPage", "totalPageCount", "visiblePageCount"], [3, "click", "theme", "size"], [3, "svg"], [1, "flex-fill", 3, "currentPageChange", "currentPage", "totalPageCount", "visiblePageCount"], [1, "_fixed", "_feature-cell", "_last-depth", 3, "sdResize"], [3, "value", "inline", "theme"], [1, "_fixed", "_feature-cell", "_last-depth", 3, "left"], [3, "valueChange", "value", "inline", "theme"], [3, "click", "svg"], [3, "_fixed", "left"], [1, "_last-depth", 3, "_fixed", "_sort", "help", "style"], [1, "_p-sheet"], [1, "_last-depth", 3, "sdResize", "click"], [1, "_headerContent", "flex-row"], [1, "flex-fill"], [1, "flex-fill", "_p-sheet"], [1, "_sort-icon"], [1, "_resizer"], [3, "ngTemplateOutlet"], [1, "tx-faint", 3, "svg"], [1, "_resizer", 3, "mousedown", "dblclick"], [1, "_fixed", "_feature-cell"], [1, "_fixed", "_feature-cell", 3, "left"], [3, "click", "keydown"], [3, "value", "canChangeFn", "inline", "theme", "disabled"], ["tabindex", "0", 3, "_fixed", "class", "style"], [3, "valueChange", "mousedown", "value", "canChangeFn", "inline", "theme", "disabled"], [3, "theme"], [3, "pointerdown", "click", "theme"], [1, "_depth-indicator", 3, "margin-left"], [3, "svg", "transform", "tx-primary"], [1, "_depth-indicator"], ["tabindex", "0", 3, "click", "focus", "keydown"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function SdSheet_Template(rf, ctx) { if (rf & 1) {
|
|
771
|
+
} }, inputs: { key: [1, "key"], items: [1, "items"], trackByFn: [1, "trackByFn"], selectMode: [1, "selectMode"], autoSelect: [1, "autoSelect"], getItemSelectableFn: [1, "getItemSelectableFn"], getChildrenFn: [1, "getChildrenFn"], useAutoSort: [1, "useAutoSort"], visiblePageCount: [1, "visiblePageCount"], totalPageCount: [1, "totalPageCount"], itemsPerPage: [1, "itemsPerPage"], focusMode: [1, "focusMode"], inset: [1, "inset"], contentStyle: [1, "contentStyle"], getItemCellClassFn: [1, "getItemCellClassFn"], getItemCellStyleFn: [1, "getItemCellStyleFn"], hideConfigBar: [1, "hideConfigBar"], selectedKeys: [1, "selectedKeys"], expandedItems: [1, "expandedItems"], sorts: [1, "sorts"], currentPage: [1, "currentPage"], columnControlsInput: [1, "columnControlsInput"] }, outputs: { itemKeydown: "itemKeydown", cellKeydown: "cellKeydown", selectedKeys: "selectedKeysChange", expandedItems: "expandedItemsChange", sorts: "sortsChange", currentPage: "currentPageChange" }, features: [i0.ɵɵHostDirectivesFeature([{ directive: i1.SdEvents, outputs: ["keydown.capture", "keydown.capture", "focus.capture", "focus.capture", "blur.capture", "blur.capture"] }])], decls: 14, vars: 8, consts: [[1, "_tool", "flex-row", "gap-sm", "p-xs"], [1, "_sheet-container", "flex-fill", 3, "scroll.passive"], [3, "sdResize"], [1, "_summary-row"], [1, "_focus-row-indicator"], [1, "_focus-cell-indicator"], [1, "_resize-indicator"], [1, "_select-row-indicator-container"], [3, "theme", "size"], [1, "flex-fill", 3, "currentPage", "totalPageCount", "visiblePageCount"], [3, "click", "theme", "size"], [3, "svg"], [1, "flex-fill", 3, "currentPageChange", "currentPage", "totalPageCount", "visiblePageCount"], [1, "_fixed", "_feature-cell", "_last-depth", 3, "sdResize"], [3, "value", "inline", "theme"], [1, "_fixed", "_feature-cell", "_last-depth", 3, "left"], [3, "valueChange", "value", "inline", "theme"], [3, "click", "svg"], [3, "_fixed", "left"], [1, "_last-depth", 3, "_fixed", "_sort", "help", "style"], [1, "_p-sheet"], [1, "_last-depth", 3, "sdResize", "click"], [1, "_headerContent", "flex-row"], [1, "flex-fill"], [1, "flex-fill", "_p-sheet"], [1, "_sort-icon"], [1, "_resizer"], [3, "ngTemplateOutlet"], [1, "tx-faint", 3, "svg"], [1, "_resizer", 3, "mousedown", "dblclick"], [1, "_fixed", "_feature-cell"], [1, "_fixed", "_feature-cell", 3, "left"], [3, "click", "keydown"], [3, "value", "canChangeFn", "inline", "theme", "disabled"], ["tabindex", "0", 3, "_fixed", "class", "style"], [3, "valueChange", "mousedown", "pointerdown", "value", "canChangeFn", "inline", "theme", "disabled"], [3, "theme"], [3, "pointerdown", "click", "theme"], [1, "_depth-indicator", 3, "margin-left"], [3, "svg", "transform", "tx-primary"], [1, "_depth-indicator"], ["tabindex", "0", 3, "click", "focus", "keydown"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function SdSheet_Template(rf, ctx) { if (rf & 1) {
|
|
762
772
|
i0.ɵɵconditionalCreate(0, SdSheet_Conditional_0_Template, 3, 2, "div", 0);
|
|
763
773
|
i0.ɵɵelementStart(1, "div", 1);
|
|
764
774
|
i0.ɵɵlistener("scroll.passive", function SdSheet_Template_div_scroll_passive_1_listener() { return ctx.onContainerScroll(); });
|
|
@@ -794,7 +804,7 @@ export class SdSheet {
|
|
|
794
804
|
SdPagination,
|
|
795
805
|
SdAnchor,
|
|
796
806
|
SdButton,
|
|
797
|
-
SdResizeDirective], styles: ["sd-sheet {\n border: 1px solid var(--sd-bd-soft);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._tool {\n background-color: var(--sd-bg-
|
|
807
|
+
SdResizeDirective], styles: ["sd-sheet {\n border: 1px solid var(--sd-bd-soft);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._tool {\n background-color: var(--sd-bg-canvas);\n border-top-left-radius: var(--sd-radius-default);\n border-top-right-radius: var(--sd-radius-default);\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container {\n position: relative;\n background-color: var(--sd-bg-sheet);\n background-image: var(--sd-bg-sheet-image);\n border-bottom-left-radius: var(--sd-radius-default);\n border-bottom-right-radius: var(--sd-radius-default);\n overflow: auto;\n}\nsd-sheet > ._sheet-container > table {\n border-spacing: 0;\n table-layout: fixed;\n margin-right: 2px;\n margin-bottom: 2px;\n border-bottom-right-radius: var(--sd-radius-default);\n box-shadow: var(--sd-sheet-shadow);\n}\nsd-sheet > ._sheet-container > table > * > tr > *:last-child {\n border-right: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > * > tr:last-child > * {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > *:last-child > tr:last-child > td:last-child {\n border-bottom-right-radius: var(--sd-radius-default);\n overflow: hidden;\n}\nsd-sheet > ._sheet-container > table > * > tr > * {\n border-right: 1px solid var(--sd-bd-soft);\n border-bottom: 1px solid var(--sd-bd-soft);\n white-space: nowrap;\n overflow: hidden;\n padding: 0;\n position: relative;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed:has(+ :not(._fixed)) + :not(._fixed):not([data-c=\"0\"]) {\n border-left: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > * > tr > *._feature-cell {\n background-color: var(--sd-bg-gray-subtle);\n min-width: calc(var(--sd-font-size-default) + 2px + var(--sd-sheet-ph) * 2);\n padding: var(--sd-sheet-pv) var(--sd-sheet-ph);\n text-align: left;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._feature-cell > ng-icon {\n cursor: pointer;\n color: var(--sd-tx-faint);\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed {\n position: sticky;\n left: 0;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed:has(+ :not(._fixed)) {\n border-right: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead {\n position: sticky;\n top: 0;\n z-index: 3;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th {\n position: relative;\n background-color: var(--sd-bg-gray-subtle);\n vertical-align: middle;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._fixed {\n z-index: 4;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._last-depth {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._feature-cell {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._sort {\n cursor: pointer;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._sort:hover {\n text-decoration: underline;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th > ._headerContent > ._sort-icon {\n padding: var(--sd-gap-xs) var(--sd-gap-xs) var(--sd-gap-xs) 0;\n background-color: var(--sd-bg-gray-subtle);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th > ._resizer {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 2px;\n cursor: ew-resize;\n}\nsd-sheet > ._sheet-container > table > thead:has(> tr._summary-row) > tr > th._last-depth {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead:has(> tr._summary-row) > tr._summary-row > th {\n background-color: var(--sd-bg-warning-subtle);\n text-align: left;\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td {\n font-family: var(--sd-font-family-field);\n background-color: var(--sd-bg-content);\n vertical-align: top;\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td._fixed {\n z-index: 2;\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td > ._depth-indicator {\n display: inline-block;\n margin-top: 0.4em;\n width: 0.5em;\n height: 0.5em;\n border-left: 1px solid currentColor;\n border-bottom: 1px solid currentColor;\n vertical-align: top;\n}\nsd-sheet > ._sheet-container > ._focus-row-indicator {\n display: none;\n position: absolute;\n pointer-events: none;\n background-color: var(--sd-bg-state-active);\n z-index: 6;\n}\nsd-sheet > ._sheet-container > ._focus-row-indicator > ._focus-cell-indicator {\n position: absolute;\n border: 2px solid var(--sd-focus-ring-color);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._sheet-container > ._resize-indicator {\n display: none;\n position: absolute;\n pointer-events: none;\n top: 0;\n height: 100%;\n border: 1px dotted var(--sd-bd-default);\n z-index: 7;\n}\nsd-sheet > ._sheet-container > ._select-row-indicator-container {\n display: none;\n position: absolute;\n pointer-events: none;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n}\nsd-sheet > ._sheet-container > ._select-row-indicator-container > ._select-row-indicator {\n display: block;\n left: 0;\n position: absolute;\n pointer-events: none;\n background-color: var(--sd-bg-primary-solid);\n opacity: 0.1;\n}\nsd-sheet ._p-sheet {\n padding: var(--sd-sheet-pv) var(--sd-sheet-ph);\n}\nsd-sheet[data-sd-focus-mode=row] > ._sheet-container > ._focus-row-indicator > ._focus-cell-indicator {\n display: none !important;\n}\nsd-sheet[data-sd-inset=true] {\n border: none;\n border-radius: 0;\n}"], encapsulation: 2 });
|
|
798
808
|
}
|
|
799
809
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdSheet, [{
|
|
800
810
|
type: Component,
|
|
@@ -809,7 +819,7 @@ export class SdSheet {
|
|
|
809
819
|
], hostDirectives: [
|
|
810
820
|
{ directive: SdEvents, outputs: ["keydown.capture", "focus.capture", "blur.capture"] },
|
|
811
821
|
], host: {
|
|
812
|
-
|
|
822
|
+
class: "flex-column fill",
|
|
813
823
|
"[attr.data-sd-inset]": "inset()",
|
|
814
824
|
"[attr.data-sd-focus-mode]": "focusMode()",
|
|
815
825
|
"(keydown.capture)": "onKeydownCapture($event)",
|
|
@@ -1002,6 +1012,7 @@ export class SdSheet {
|
|
|
1002
1012
|
[canChangeFn]="selection.getCanChangeFn(item)"
|
|
1003
1013
|
(valueChange)="selection.toggle(item)"
|
|
1004
1014
|
(mousedown)="onSelectorMouseDown($event, rowIdx)"
|
|
1015
|
+
(pointerdown)="onSelectorPointerDown($event, rowIdx)"
|
|
1005
1016
|
[inline]="true"
|
|
1006
1017
|
[theme]="'white'"
|
|
1007
1018
|
[disabled]="_selectable !== true"
|
|
@@ -1087,6 +1098,6 @@ export class SdSheet {
|
|
|
1087
1098
|
></div>
|
|
1088
1099
|
<div class="_select-row-indicator-container"></div>
|
|
1089
1100
|
</div>
|
|
1090
|
-
`, styles: ["sd-sheet {\n border: 1px solid var(--sd-bd-soft);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._tool {\n background-color: var(--sd-bg-
|
|
1101
|
+
`, styles: ["sd-sheet {\n border: 1px solid var(--sd-bd-soft);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._tool {\n background-color: var(--sd-bg-canvas);\n border-top-left-radius: var(--sd-radius-default);\n border-top-right-radius: var(--sd-radius-default);\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container {\n position: relative;\n background-color: var(--sd-bg-sheet);\n background-image: var(--sd-bg-sheet-image);\n border-bottom-left-radius: var(--sd-radius-default);\n border-bottom-right-radius: var(--sd-radius-default);\n overflow: auto;\n}\nsd-sheet > ._sheet-container > table {\n border-spacing: 0;\n table-layout: fixed;\n margin-right: 2px;\n margin-bottom: 2px;\n border-bottom-right-radius: var(--sd-radius-default);\n box-shadow: var(--sd-sheet-shadow);\n}\nsd-sheet > ._sheet-container > table > * > tr > *:last-child {\n border-right: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > * > tr:last-child > * {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > *:last-child > tr:last-child > td:last-child {\n border-bottom-right-radius: var(--sd-radius-default);\n overflow: hidden;\n}\nsd-sheet > ._sheet-container > table > * > tr > * {\n border-right: 1px solid var(--sd-bd-soft);\n border-bottom: 1px solid var(--sd-bd-soft);\n white-space: nowrap;\n overflow: hidden;\n padding: 0;\n position: relative;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed:has(+ :not(._fixed)) + :not(._fixed):not([data-c=\"0\"]) {\n border-left: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > * > tr > *._feature-cell {\n background-color: var(--sd-bg-gray-subtle);\n min-width: calc(var(--sd-font-size-default) + 2px + var(--sd-sheet-ph) * 2);\n padding: var(--sd-sheet-pv) var(--sd-sheet-ph);\n text-align: left;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._feature-cell > ng-icon {\n cursor: pointer;\n color: var(--sd-tx-faint);\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed {\n position: sticky;\n left: 0;\n}\nsd-sheet > ._sheet-container > table > * > tr > *._fixed:has(+ :not(._fixed)) {\n border-right: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead {\n position: sticky;\n top: 0;\n z-index: 3;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th {\n position: relative;\n background-color: var(--sd-bg-gray-subtle);\n vertical-align: middle;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._fixed {\n z-index: 4;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._last-depth {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._feature-cell {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._sort {\n cursor: pointer;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th._sort:hover {\n text-decoration: underline;\n}\nsd-sheet > ._sheet-container > table > thead > tr > th > ._headerContent > ._sort-icon {\n padding: var(--sd-gap-xs) var(--sd-gap-xs) var(--sd-gap-xs) 0;\n background-color: var(--sd-bg-gray-subtle);\n}\nsd-sheet > ._sheet-container > table > thead > tr > th > ._resizer {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 2px;\n cursor: ew-resize;\n}\nsd-sheet > ._sheet-container > table > thead:has(> tr._summary-row) > tr > th._last-depth {\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > thead:has(> tr._summary-row) > tr._summary-row > th {\n background-color: var(--sd-bg-warning-subtle);\n text-align: left;\n border-bottom: 1px solid var(--sd-bd-soft);\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td {\n font-family: var(--sd-font-family-field);\n background-color: var(--sd-bg-content);\n vertical-align: top;\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td._fixed {\n z-index: 2;\n}\nsd-sheet > ._sheet-container > table > tbody > tr > td > ._depth-indicator {\n display: inline-block;\n margin-top: 0.4em;\n width: 0.5em;\n height: 0.5em;\n border-left: 1px solid currentColor;\n border-bottom: 1px solid currentColor;\n vertical-align: top;\n}\nsd-sheet > ._sheet-container > ._focus-row-indicator {\n display: none;\n position: absolute;\n pointer-events: none;\n background-color: var(--sd-bg-state-active);\n z-index: 6;\n}\nsd-sheet > ._sheet-container > ._focus-row-indicator > ._focus-cell-indicator {\n position: absolute;\n border: 2px solid var(--sd-focus-ring-color);\n border-radius: var(--sd-radius-default);\n}\nsd-sheet > ._sheet-container > ._resize-indicator {\n display: none;\n position: absolute;\n pointer-events: none;\n top: 0;\n height: 100%;\n border: 1px dotted var(--sd-bd-default);\n z-index: 7;\n}\nsd-sheet > ._sheet-container > ._select-row-indicator-container {\n display: none;\n position: absolute;\n pointer-events: none;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 5;\n}\nsd-sheet > ._sheet-container > ._select-row-indicator-container > ._select-row-indicator {\n display: block;\n left: 0;\n position: absolute;\n pointer-events: none;\n background-color: var(--sd-bg-primary-solid);\n opacity: 0.1;\n}\nsd-sheet ._p-sheet {\n padding: var(--sd-sheet-pv) var(--sd-sheet-ph);\n}\nsd-sheet[data-sd-focus-mode=row] > ._sheet-container > ._focus-row-indicator > ._focus-cell-indicator {\n display: none !important;\n}\nsd-sheet[data-sd-inset=true] {\n border: none;\n border-radius: 0;\n}"] }]
|
|
1091
1102
|
}], null, { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], getItemSelectableFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemSelectableFn", required: false }] }], getChildrenFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenFn", required: false }] }], useAutoSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "useAutoSort", required: false }] }], visiblePageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "visiblePageCount", required: false }] }], totalPageCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPageCount", required: false }] }], itemsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPage", required: false }] }], focusMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusMode", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], contentStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentStyle", required: false }] }], getItemCellClassFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellClassFn", required: false }] }], getItemCellStyleFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "getItemCellStyleFn", required: false }] }], hideConfigBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideConfigBar", required: false }] }], itemKeydown: [{ type: i0.Output, args: ["itemKeydown"] }], cellKeydown: [{ type: i0.Output, args: ["cellKeydown"] }], selectedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedKeys", required: false }] }, { type: i0.Output, args: ["selectedKeysChange"] }], expandedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedItems", required: false }] }, { type: i0.Output, args: ["expandedItemsChange"] }], sorts: [{ type: i0.Input, args: [{ isSignal: true, alias: "sorts", required: false }] }, { type: i0.Output, args: ["sortsChange"] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], columnControls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSheetColumn), { isSignal: true }] }], columnControlsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnControlsInput", required: false }] }] }); })();
|
|
1092
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSheet, { className: "SdSheet", filePath: "packages/angular/src/data/sheet/sd-sheet.ts", lineNumber:
|
|
1103
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdSheet, { className: "SdSheet", filePath: "packages/angular/src/data/sheet/sd-sheet.ts", lineNumber: 589 }); })();
|
|
@@ -9,8 +9,8 @@ export declare class SdStatePreset<TState> {
|
|
|
9
9
|
key: import("@angular/core").InputSignal<string>;
|
|
10
10
|
state: import("@angular/core").ModelSignal<TState>;
|
|
11
11
|
size: import("@angular/core").InputSignal<"sm" | "lg" | undefined>;
|
|
12
|
-
protected readonly tablerStar = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.
|
|
13
|
-
protected readonly tablerDeviceFloppy = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2\"></path><path d=\"
|
|
12
|
+
protected readonly tablerStar = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245\"></path></svg>";
|
|
13
|
+
protected readonly tablerDeviceFloppy = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2\"></path><path d=\"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\"></path><path d=\"M14 4l0 4l-6 0l0 -4\"></path></svg>";
|
|
14
14
|
protected readonly tablerX = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M18 6l-12 12\"></path><path d=\"M6 6l12 12\"></path></svg>";
|
|
15
15
|
private readonly _configResource;
|
|
16
16
|
_presets: import("@angular/core").Signal<SdStatePresetDef<TState>[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-state-preset.d.ts","sourceRoot":"","sources":["../../../src/data/state-preset/sd-state-preset.ts"],"names":[],"mappings":";AAmBA,MAAM,WAAW,gBAAgB,CAAC,MAAM;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBA0Fa,aAAa,CAAC,MAAM;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IAEpD,GAAG,8CAA4B;IAC/B,KAAK,8CAA4B;IACjC,IAAI,+DAAwB;IAE5B,SAAS,CAAC,QAAQ,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"sd-state-preset.d.ts","sourceRoot":"","sources":["../../../src/data/state-preset/sd-state-preset.ts"],"names":[],"mappings":";AAmBA,MAAM,WAAW,gBAAgB,CAAC,MAAM;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBA0Fa,aAAa,CAAC,MAAM;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IAEpD,GAAG,8CAA4B;IAC/B,KAAK,8CAA4B;IACjC,IAAI,+DAAwB;IAE5B,SAAS,CAAC,QAAQ,CAAC,UAAU,qaAAc;IAC3C,SAAS,CAAC,QAAQ,CAAC,kBAAkB,idAAsB;IAC3D,SAAS,CAAC,QAAQ,CAAC,OAAO,yVAAW;IAErC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAE7B;IAEH,QAAQ,6DAAsD;IAExD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BjC,aAAa,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,IAAI;IAMrD,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,IAAI;IAS7C,aAAa,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;yCA7DzD,aAAa;2CAAb,aAAa;CA6EzB"}
|
|
@@ -336,7 +336,7 @@ export class SdTiptapEditor {
|
|
|
336
336
|
i0.ɵɵdomElement(1, "div", 0);
|
|
337
337
|
} if (rf & 2) {
|
|
338
338
|
i0.ɵɵconditional(!ctx.disabled() ? 0 : -1);
|
|
339
|
-
} }, styles: ["sd-tiptap-editor {\n display: block;\n position: relative;\n border: 1px solid var(--sd-bd-field);\n border-radius: var(--sd-radius-default);\n background-color: var(--sd-bg-field);\n}\nsd-tiptap-editor > ._toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: var(--sd-gap-xs);\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group {\n display: flex;\n gap: 1px;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button {\n padding: var(--sd-gap-xs) var(--sd-gap-sm);\n border: 1px solid var(--sd-bd-hairline);\n border-radius: var(--sd-radius-default);\n background-color: transparent;\n cursor: pointer;\n font-size: var(--sd-font-size-default);\n line-height: 1;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active {\n background-color: var(--sd-bg-primary-solid);\n color: var(--sd-tx-primary-solid);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button:hover {\n background-color: var(--sd-bg-state-hover);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active:hover {\n background-color: var(--sd-bg-primary-solid);\n}\nsd-tiptap-editor > ._color-picker {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch {\n width: 1.25rem;\n height: 1.25rem;\n border: 1px solid var(--sd-bd-hairline);\n border-radius: 2px;\n cursor: pointer;\n padding: 0;\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch._no-color {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--sd-bg-
|
|
339
|
+
} }, styles: ["sd-tiptap-editor {\n display: block;\n position: relative;\n border: 1px solid var(--sd-bd-field);\n border-radius: var(--sd-radius-default);\n background-color: var(--sd-bg-field);\n}\nsd-tiptap-editor > ._toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: var(--sd-gap-xs);\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group {\n display: flex;\n gap: 1px;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button {\n padding: var(--sd-gap-xs) var(--sd-gap-sm);\n border: 1px solid var(--sd-bd-hairline);\n border-radius: var(--sd-radius-default);\n background-color: transparent;\n cursor: pointer;\n font-size: var(--sd-font-size-default);\n line-height: 1;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active {\n background-color: var(--sd-bg-primary-solid);\n color: var(--sd-tx-primary-solid);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button:hover {\n background-color: var(--sd-bg-state-hover);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active:hover {\n background-color: var(--sd-bg-primary-solid);\n}\nsd-tiptap-editor > ._color-picker {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch {\n width: 1.25rem;\n height: 1.25rem;\n border: 1px solid var(--sd-bd-hairline);\n border-radius: 2px;\n cursor: pointer;\n padding: 0;\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch._no-color {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--sd-bg-content);\n font-size: 0.625rem;\n}\nsd-tiptap-editor > ._editor-container {\n padding: var(--sd-gap-sm);\n min-height: 6.25rem;\n font-family: var(--sd-font-family-field);\n}\nsd-tiptap-editor > ._editor-container > .tiptap {\n outline: none;\n}\nsd-tiptap-editor > ._editor-container > .tiptap:focus {\n outline: none;\n}\nsd-tiptap-editor[data-sd-disabled=true] {\n background-color: var(--sd-bg-disabled);\n color: var(--sd-tx-disabled);\n}\nsd-tiptap-editor[data-sd-disabled=true] > ._editor-container > .tiptap {\n cursor: not-allowed;\n}\nsd-tiptap-editor[data-sd-readonly=true] > ._editor-container > .tiptap {\n cursor: default;\n}\nsd-tiptap-editor ._color-btn {\n position: relative;\n}\nsd-tiptap-editor ._color-btn > ._color-indicator {\n display: block;\n height: 2px;\n width: 100%;\n position: absolute;\n bottom: 2px;\n left: 0;\n}"], encapsulation: 2 });
|
|
340
340
|
}
|
|
341
341
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SdTiptapEditor, [{
|
|
342
342
|
type: Component,
|
|
@@ -512,6 +512,6 @@ export class SdTiptapEditor {
|
|
|
512
512
|
`, host: {
|
|
513
513
|
"[attr.data-sd-disabled]": "disabled()",
|
|
514
514
|
"[attr.data-sd-readonly]": "readonly()",
|
|
515
|
-
}, styles: ["sd-tiptap-editor {\n display: block;\n position: relative;\n border: 1px solid var(--sd-bd-field);\n border-radius: var(--sd-radius-default);\n background-color: var(--sd-bg-field);\n}\nsd-tiptap-editor > ._toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: var(--sd-gap-xs);\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group {\n display: flex;\n gap: 1px;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button {\n padding: var(--sd-gap-xs) var(--sd-gap-sm);\n border: 1px solid var(--sd-bd-hairline);\n border-radius: var(--sd-radius-default);\n background-color: transparent;\n cursor: pointer;\n font-size: var(--sd-font-size-default);\n line-height: 1;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active {\n background-color: var(--sd-bg-primary-solid);\n color: var(--sd-tx-primary-solid);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button:hover {\n background-color: var(--sd-bg-state-hover);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active:hover {\n background-color: var(--sd-bg-primary-solid);\n}\nsd-tiptap-editor > ._color-picker {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch {\n width: 1.25rem;\n height: 1.25rem;\n border: 1px solid var(--sd-bd-hairline);\n border-radius: 2px;\n cursor: pointer;\n padding: 0;\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch._no-color {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--sd-bg-
|
|
515
|
+
}, styles: ["sd-tiptap-editor {\n display: block;\n position: relative;\n border: 1px solid var(--sd-bd-field);\n border-radius: var(--sd-radius-default);\n background-color: var(--sd-bg-field);\n}\nsd-tiptap-editor > ._toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: var(--sd-gap-xs);\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group {\n display: flex;\n gap: 1px;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button {\n padding: var(--sd-gap-xs) var(--sd-gap-sm);\n border: 1px solid var(--sd-bd-hairline);\n border-radius: var(--sd-radius-default);\n background-color: transparent;\n cursor: pointer;\n font-size: var(--sd-font-size-default);\n line-height: 1;\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active {\n background-color: var(--sd-bg-primary-solid);\n color: var(--sd-tx-primary-solid);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button:hover {\n background-color: var(--sd-bg-state-hover);\n}\nsd-tiptap-editor > ._toolbar > ._btn-group > button._active:hover {\n background-color: var(--sd-bg-primary-solid);\n}\nsd-tiptap-editor > ._color-picker {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n padding: var(--sd-gap-xs);\n border-bottom: 1px solid var(--sd-bd-hairline);\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch {\n width: 1.25rem;\n height: 1.25rem;\n border: 1px solid var(--sd-bd-hairline);\n border-radius: 2px;\n cursor: pointer;\n padding: 0;\n}\nsd-tiptap-editor > ._color-picker > ._color-swatch._no-color {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--sd-bg-content);\n font-size: 0.625rem;\n}\nsd-tiptap-editor > ._editor-container {\n padding: var(--sd-gap-sm);\n min-height: 6.25rem;\n font-family: var(--sd-font-family-field);\n}\nsd-tiptap-editor > ._editor-container > .tiptap {\n outline: none;\n}\nsd-tiptap-editor > ._editor-container > .tiptap:focus {\n outline: none;\n}\nsd-tiptap-editor[data-sd-disabled=true] {\n background-color: var(--sd-bg-disabled);\n color: var(--sd-tx-disabled);\n}\nsd-tiptap-editor[data-sd-disabled=true] > ._editor-container > .tiptap {\n cursor: not-allowed;\n}\nsd-tiptap-editor[data-sd-readonly=true] > ._editor-container > .tiptap {\n cursor: default;\n}\nsd-tiptap-editor ._color-btn {\n position: relative;\n}\nsd-tiptap-editor ._color-btn > ._color-indicator {\n display: block;\n height: 2px;\n width: 100%;\n position: absolute;\n bottom: 2px;\n left: 0;\n}"] }]
|
|
516
516
|
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], validatorFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "validatorFn", required: false }] }], extensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "extensions", required: false }] }] }); })();
|
|
517
517
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SdTiptapEditor, { className: "SdTiptapEditor", filePath: "packages/angular/src/features/editor/sd-tiptap-editor.ts", lineNumber: 335 }); })();
|
|
@@ -10,14 +10,12 @@ export declare const SD_THEMES: readonly [{
|
|
|
10
10
|
readonly label: "IDE 다크";
|
|
11
11
|
}];
|
|
12
12
|
export type SdThemeName = (typeof SD_THEMES)[number]["value"];
|
|
13
|
-
export type SdDensity = "normal" | "compact";
|
|
14
13
|
export declare class SdThemeProvider {
|
|
15
14
|
readonly themes: readonly {
|
|
16
15
|
value: SdThemeName;
|
|
17
16
|
label: string;
|
|
18
17
|
}[];
|
|
19
18
|
theme: import("@angular/core").WritableSignal<"light" | "blueprint" | "ide-dark">;
|
|
20
|
-
density: import("@angular/core").WritableSignal<SdDensity>;
|
|
21
19
|
readonly fontSizePresets: readonly number[];
|
|
22
20
|
fontSize: import("@angular/core").WritableSignal<number>;
|
|
23
21
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-theme-provider.d.ts","sourceRoot":"","sources":["../../../src/features/theme/sd-theme-provider.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,SAAS;;;;;;;;;EAIZ,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sd-theme-provider.d.ts","sourceRoot":"","sources":["../../../src/features/theme/sd-theme-provider.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,SAAS;;;;;;;;;EAIZ,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAE9D,qBACa,eAAe;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAa;IAG9E,KAAK,6EAAgC;IAErC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAA4B;IAEvE,QAAQ,iDAAsB;;IAkB9B,gBAAgB,IAAI,IAAI;IAOxB,gBAAgB,IAAI,IAAI;yCAjCb,eAAe;6CAAf,eAAe;CA6C3B"}
|
|
@@ -14,8 +14,6 @@ export class SdThemeProvider {
|
|
|
14
14
|
// 라이트(기본) / 블루프린트(도면) / IDE 다크
|
|
15
15
|
theme = signal("light", /* @ts-ignore */
|
|
16
16
|
...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
17
|
-
density = signal("normal", /* @ts-ignore */
|
|
18
|
-
...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
19
17
|
fontSizePresets = [12, 14, 16, 20, 24, 28];
|
|
20
18
|
fontSize = signal(12, /* @ts-ignore */
|
|
21
19
|
...(ngDevMode ? [{ debugName: "fontSize" }] : /* istanbul ignore next */ []));
|
|
@@ -29,9 +27,6 @@ export class SdThemeProvider {
|
|
|
29
27
|
document.body.classList.toggle(`sd-theme-${def.value}`, def.value === theme);
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
|
-
effect(() => {
|
|
33
|
-
document.body.classList.toggle("sd-density-compact", this.density() === "compact");
|
|
34
|
-
});
|
|
35
30
|
effect(() => {
|
|
36
31
|
document.documentElement.style.fontSize = `${this.fontSize()}px`;
|
|
37
32
|
});
|
|
@@ -6,7 +6,7 @@ export declare class SdThemeSelector {
|
|
|
6
6
|
isMaxFontSize: import("@angular/core").Signal<boolean>;
|
|
7
7
|
protected readonly tablerPlus = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M12 5l0 14\"></path><path d=\"M5 12l14 0\"></path></svg>";
|
|
8
8
|
protected readonly tablerMinus = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M5 12l14 0\"></path></svg>";
|
|
9
|
-
protected readonly tablerPalette = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25\"></path><path d=\"
|
|
9
|
+
protected readonly tablerPalette = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"stroke-width:var(--ng-icon__stroke-width, 2)\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25\"></path><path d=\"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\"></path><path d=\"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\"></path><path d=\"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\"></path></svg>";
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdThemeSelector, never>;
|
|
11
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdThemeSelector, "sd-theme-selector", never, {}, {}, never, never, true, never>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-theme-selector.d.ts","sourceRoot":"","sources":["../../../src/features/theme/sd-theme-selector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sd-theme-selector.d.ts","sourceRoot":"","sources":["../../../src/features/theme/sd-theme-selector.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAGtD,qBA0Da,eAAe;IAC1B,SAAS,CAAC,QAAQ,CAAC,QAAQ,kBAA2B;IAEtD,aAAa,0CAAgF;IAE7F,aAAa,0CAIX;IAEF,SAAS,CAAC,QAAQ,CAAC,UAAU,uVAAc;IAC3C,SAAS,CAAC,QAAQ,CAAC,WAAW,yTAAe;IAC7C,SAAS,CAAC,QAAQ,CAAC,aAAa,wnBAAiB;yCAbtC,eAAe;2CAAf,eAAe;CAc3B"}
|