quasar-ui-sellmate-ui-kit 3.14.42 → 3.14.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-sellmate-ui-kit",
3
- "version": "3.14.42",
3
+ "version": "3.14.48",
4
4
  "author": "Sellmate Dev Team <dev@sellmate.co.kr>",
5
5
  "description": "Sellmate UI Kit",
6
6
  "license": "MIT",
@@ -321,37 +321,33 @@
321
321
 
322
322
  .q-item--active.q-manual-focusable--focused {
323
323
  color: $brilliantblue_75 !important;
324
+ font-weight: 700 !important;
324
325
  }
325
326
 
326
327
  .q-virtual-scroll__content .custom-select-options {
328
+ min-height: $default-height;
329
+ height: auto !important;
327
330
  &.custom-select-options--selected,
328
331
  &:hover {
329
332
  background-color: $brilliantblue_75 !important;
330
333
  color: white !important;
331
334
  }
335
+ .q-item__section {
336
+ display: block;
337
+ white-space: normal;
338
+ overflow: visible;
339
+ text-overflow: unset;
340
+ word-break: break-all;
341
+ }
342
+ }
343
+ .disabled.s-select-option {
344
+ border: none;
345
+ background: none !important;
346
+ color: $grey_65 !important;
347
+ }
348
+ &.menu-fixed {
349
+ max-width: var(--dynamic-width) !important;
350
+ width: var(--dynamic-width) !important;
332
351
  }
333
- }
334
- .custom-select-options {
335
- min-height: $default-height;
336
- height: auto !important;
337
- }
338
-
339
- .disabled.s-select-option {
340
- border: none;
341
- background: none !important;
342
- color: $grey_65 !important;
343
- }
344
-
345
- .q-item__section {
346
- display: block;
347
- white-space: normal;
348
- overflow: visible;
349
- text-overflow: unset;
350
- word-break: break-all;
351
- }
352
-
353
- .menu-fixed {
354
- max-width: var(--dynamic-width) !important;
355
- width: var(--dynamic-width) !important;
356
352
  }
357
353
  </style>
@@ -13,7 +13,10 @@
13
13
  :class="{
14
14
  's-select-table': $attrs.selection && $attrs.selection !== 'none',
15
15
  'resizable-table': resizable,
16
- 'sticky-column-table': stickyColumn.leftStickyCount > 0 || stickyColumn.rightStickyCount > 0,
16
+ 'sticky-column-table':
17
+ ($attrs.selection && $attrs.selection !== 'none') ||
18
+ stickyColumn.leftStickyCount > 0 ||
19
+ stickyColumn.rightStickyCount > 0,
17
20
  'sticky-resizable-table': stickyResizable,
18
21
  'sticky-header': stickyHeader,
19
22
  'before-search': !rows.length,
@@ -301,18 +304,22 @@
301
304
  }
302
305
 
303
306
  function handleColumns() {
304
- const { addResizable, addStickyColumn, addSticky } = useResizable();
305
- const tableElement = () => sTableRef.value.$el;
307
+ const { addResizable, addStickyColumn } = useResizable();
306
308
 
307
309
  if (props.resizable) {
308
310
  addResizable(sTableRef, props.stickyColumn, props.useLastCellResizable);
309
311
  }
310
312
 
311
- const { count, direction: stickyDirection } = props.stickyColumn;
312
- const { leftStickyCount, rightStickyCount } = props.stickyColumn;
313
- if (leftStickyCount > 0 || rightStickyCount > 0) {
313
+ const hasSelection = attrs.selection && attrs.selection !== 'none';
314
+
315
+ const hasSticky =
316
+ hasSelection ||
317
+ props.stickyColumn.leftStickyCount > 0 ||
318
+ props.stickyColumn.rightStickyCount > 0;
319
+
320
+ if (hasSticky) {
314
321
  addStickyColumn(sTableRef, props.stickyColumn);
315
- observeScrollForStickyShadow(tableElement());
322
+ observeScrollForStickyShadow(sTableRef.value.$el);
316
323
  }
317
324
  }
318
325
 
@@ -172,34 +172,36 @@ export function useResizable() {
172
172
  function addStickyColumn(tableRef, stickyColumnsConfig) {
173
173
  const { leftStickyCount, rightStickyCount } = stickyColumnsConfig;
174
174
 
175
- const cols = getTableCols(tableRef.value.$el);
176
- const isSelectTable = tableRef.value.$el.classList.contains('s-select-table');
175
+ const tableEl = tableRef.value.$el;
176
+ const cols = getTableCols(tableEl);
177
+ const isSelectTable = tableEl.classList.contains('s-select-table');
178
+
179
+ let startLeftIndex = 0;
177
180
 
178
181
  // Left Sticky Columns
179
- if (leftStickyCount > 0) {
180
- // let i = isSelectTable ? 1 : 0; // Select Table일 경우 첫번째 컬럼은 스티키가 아님
181
- const count = isSelectTable ? leftStickyCount + 1 : leftStickyCount; // Select Table일 경우 +1
182
-
183
- for (let i = 0; i < count; i++) {
184
- applyStickyToColumn(tableRef.value.$el, i, true, '0px');
185
- if (isSelectTable && i > 0) {
186
- appendResizableDiv(cols[i], 'right', true); // 오른쪽에 리사이즈 핸들 추가
187
- } else {
188
- appendResizableDiv(cols[i], 'right', true); // 오른쪽에 리사이즈 핸들 추가
189
- }
190
- }
182
+ if (isSelectTable && cols[0]) {
183
+ applyStickyToColumn(tableEl, 0, true, '0px'); // 체크박스 컬럼 고정
184
+ appendResizableDiv(cols[0], 'right', true); // 오른쪽에 리사이즈 핸들 추가
185
+ startLeftIndex = 1; // 이후 데이터 컬럼은 1번부터 시작
186
+ }
191
187
 
192
- detectStickyWidth(tableRef.value.$el, true); // 좌측 스티키 너비 재계산
188
+ for (let i = 0; i < leftStickyCount; i++) {
189
+ const colIdx = startLeftIndex + i;
190
+ if (!cols[colIdx]) break;
191
+ applyStickyToColumn(tableEl, colIdx, true, '0px'); // 컬럼 고정
192
+ appendResizableDiv(cols[colIdx], 'right', true); // 오른쪽에 리사이즈 핸들 추가
193
193
  }
194
194
 
195
+ detectStickyWidth(tableEl, true); // 좌측 스티키 너비 재계산
196
+
195
197
  // Right Sticky Columns
196
198
  if (rightStickyCount > 0) {
197
199
  for (let i = cols.length - rightStickyCount; i < cols.length; i++) {
198
- applyStickyToColumn(tableRef.value.$el, i, false, '0px');
200
+ applyStickyToColumn(tableEl, i, false, '0px');
199
201
  appendResizableDiv(cols[i], 'left', true); // 왼쪽에 리사이즈 핸들 추가 (우측 스티키)
200
202
  }
201
203
 
202
- detectStickyWidth(tableRef.value.$el, false); // 우측 스티키 너비 재계산
204
+ detectStickyWidth(tableEl, false); // 우측 스티키 너비 재계산
203
205
  }
204
206
  }
205
207
  return {