@stonecrop/atable 0.3.2 → 0.3.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.
@@ -85,23 +85,25 @@ export declare const createTableStore: (initData: {
85
85
  modal: import("vue").Ref<{
86
86
  colIndex?: number;
87
87
  event?: string;
88
+ height?: number;
88
89
  left?: number;
89
90
  parent?: HTMLElement;
90
91
  rowIndex?: number;
91
92
  top?: number;
92
93
  visible?: boolean;
93
- width?: string;
94
+ width?: number;
94
95
  component?: string;
95
96
  componentProps?: Record<string, any>;
96
97
  }, TableModal | {
97
98
  colIndex?: number;
98
99
  event?: string;
100
+ height?: number;
99
101
  left?: number;
100
102
  parent?: HTMLElement;
101
103
  rowIndex?: number;
102
104
  top?: number;
103
105
  visible?: boolean;
104
- width?: string;
106
+ width?: number;
105
107
  component?: string;
106
108
  componentProps?: Record<string, any>;
107
109
  }>;
@@ -187,23 +189,25 @@ export declare const createTableStore: (initData: {
187
189
  modal: import("vue").Ref<{
188
190
  colIndex?: number;
189
191
  event?: string;
192
+ height?: number;
190
193
  left?: number;
191
194
  parent?: HTMLElement;
192
195
  rowIndex?: number;
193
196
  top?: number;
194
197
  visible?: boolean;
195
- width?: string;
198
+ width?: number;
196
199
  component?: string;
197
200
  componentProps?: Record<string, any>;
198
201
  }, TableModal | {
199
202
  colIndex?: number;
200
203
  event?: string;
204
+ height?: number;
201
205
  left?: number;
202
206
  parent?: HTMLElement;
203
207
  rowIndex?: number;
204
208
  top?: number;
205
209
  visible?: boolean;
206
- width?: string;
210
+ width?: number;
207
211
  component?: string;
208
212
  componentProps?: Record<string, any>;
209
213
  }>;
@@ -289,23 +293,25 @@ export declare const createTableStore: (initData: {
289
293
  modal: import("vue").Ref<{
290
294
  colIndex?: number;
291
295
  event?: string;
296
+ height?: number;
292
297
  left?: number;
293
298
  parent?: HTMLElement;
294
299
  rowIndex?: number;
295
300
  top?: number;
296
301
  visible?: boolean;
297
- width?: string;
302
+ width?: number;
298
303
  component?: string;
299
304
  componentProps?: Record<string, any>;
300
305
  }, TableModal | {
301
306
  colIndex?: number;
302
307
  event?: string;
308
+ height?: number;
303
309
  left?: number;
304
310
  parent?: HTMLElement;
305
311
  rowIndex?: number;
306
312
  top?: number;
307
313
  visible?: boolean;
308
- width?: string;
314
+ width?: number;
309
315
  component?: string;
310
316
  componentProps?: Record<string, any>;
311
317
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/stores/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEzG;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAc;IAC1C,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;IAC9B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,KAAK,CAAC,EAAE,UAAU,CAAA;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmJ4B,UAAU;kBA7EhB,CAAC,kBAAkB,MAAM,YAAY,MAAM,KAAG,CAAC;oCAmD7B,MAAM,YAAY,MAAM;kCAK1B,MAAM,YAAY,MAAM,SAAS,GAAG;iCA3CrC,WAAW,KAAG,aAAa;0BA0ElC,MAAM,gBAAgB,MAAM;mCAhEnB,MAAM;6BAJZ,MAAM;4BAlBP,MAAM,YAAY,MAAM,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WAAW,KAAG,aAAa;0BA0ElC,MAAM,gBAAgB,MAAM;mCAhEnB,MAAM;6BAJZ,MAAM;4BAlBP,MAAM,YAAY,MAAM,SAAS,GAAG;gCAkChC,MAAM;gMAyF1C,CAAA"}
@@ -87,12 +87,13 @@ export type TableRow = {
87
87
  export type TableModal = {
88
88
  colIndex?: number;
89
89
  event?: string;
90
+ height?: number;
90
91
  left?: number;
91
92
  parent?: HTMLElement;
92
93
  rowIndex?: number;
93
94
  top?: number;
94
95
  visible?: boolean;
95
- width?: string;
96
+ width?: number;
96
97
  component?: string;
97
98
  componentProps?: Record<string, any>;
98
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC,CAAA;IAC5D,wBAAwB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAE9C,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,KAAK,MAAM,CAAC,CAAA;IAChE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;C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",
6
6
  "author": {
@@ -38,8 +38,8 @@
38
38
  "@vueuse/core": "^12.0.0",
39
39
  "pinia": "^2.3.0",
40
40
  "vue": "^3.5.11",
41
- "@stonecrop/themes": "0.3.2",
42
- "@stonecrop/utilities": "0.3.2"
41
+ "@stonecrop/themes": "0.3.3",
42
+ "@stonecrop/utilities": "0.3.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@microsoft/api-documenter": "^7.26.2",
@@ -49,7 +49,7 @@ const {
49
49
  }>()
50
50
 
51
51
  const cellRef = useTemplateRef<HTMLTableCellElement>('cell')
52
- const { bottom, left } = useElementBounding(cellRef)
52
+ const { width, height } = useElementBounding(cellRef)
53
53
 
54
54
  // keep a shallow copy of the original cell value for comparison
55
55
  const originalData = store.getCellData(colIndex, rowIndex)
@@ -97,9 +97,10 @@ const showModal = () => {
97
97
  state.modal.colIndex = colIndex
98
98
  state.modal.rowIndex = rowIndex
99
99
  state.modal.parent = cellRef.value
100
- state.modal.top = bottom.value
101
- state.modal.left = left.value
102
- state.modal.width = cellWidth
100
+ state.modal.top = cellRef.value.offsetTop + cellRef.value.offsetHeight
101
+ state.modal.left = cellRef.value.offsetLeft
102
+ state.modal.width = width.value
103
+ state.modal.height = height.value
103
104
 
104
105
  if (typeof column.modalComponent === 'function') {
105
106
  state.modal.component = column.modalComponent({ table: state.table, row, column })
@@ -37,11 +37,7 @@
37
37
  :colIndex="store.modal.colIndex"
38
38
  :rowIndex="store.modal.rowIndex"
39
39
  :store="store"
40
- :style="{
41
- left: store.modal.left + 'px',
42
- top: store.modal.top + 'px',
43
- maxWidth: store.modal.width + 'px',
44
- }">
40
+ :container="tableRef">
45
41
  <template #default>
46
42
  <component
47
43
  :key="`${store.modal.rowIndex}:${store.modal.colIndex}`"
@@ -249,6 +245,7 @@ td.sticky-index {
249
245
  <style scoped>
250
246
  @import url('@stonecrop/themes/default.css');
251
247
  .atable {
248
+ position: relative;
252
249
  font-family: var(--sc-atable-font-family);
253
250
  -webkit-font-smoothing: antialiased;
254
251
  -moz-osx-font-smoothing: grayscale;
@@ -1,26 +1,49 @@
1
1
  <template>
2
- <div class="amodal" tabindex="-1" @click="handleInput" @input="handleInput">
2
+ <div class="amodal" ref="amodal" tabindex="-1" @click="handleInput" @input="handleInput" :style="amodalStyles">
3
3
  <slot />
4
4
  </div>
5
5
  </template>
6
6
 
7
7
  <script setup lang="ts">
8
+ import { useElementBounding } from '@vueuse/core'
9
+ import { useTemplateRef, computed } from 'vue'
10
+
8
11
  import { createTableStore } from '../stores/table'
9
12
 
10
- /* const { colIndex, rowIndex, store } = */ defineProps<{
13
+ const { store, container } = defineProps<{
11
14
  colIndex?: number
12
15
  rowIndex?: number
13
16
  store?: ReturnType<typeof createTableStore>
17
+ container?: HTMLElement
14
18
  }>()
15
19
 
16
- // const cellBackgroundColor = computed(() => {
17
- // if (store.modal.parent) {
18
- // let computedstyle = window.getComputedStyle(store.modal.parent)
19
- // return 'blue'
20
- // } else {
21
- // return 'inherit'
22
- // }
23
- // })
20
+ const amodalRef = useTemplateRef('amodal')
21
+ const { width, height } = useElementBounding(amodalRef)
22
+
23
+ const amodalStyles = computed(() => {
24
+ // the modal usually will appear left align with and below the element it is associated with,
25
+ // but needs to detect and adjust its position if it would overflow the rightr or bottom edges
26
+
27
+ // get the dimensions of whatever container is holding this modal, e.g. Table, Window, div so the modal can detect edges
28
+ const containerWidth = container?.offsetWidth || 0
29
+ const containerHeight = container?.offsetHeight || 0
30
+
31
+ // if this modal would go outside the edge of its container, instead place it above the element (Y) or along the right side (X)
32
+ const modalLeft =
33
+ store.modal.left + width.value > containerWidth
34
+ ? store.modal.left - (width.value - store.modal.width)
35
+ : store.modal.left
36
+
37
+ const modalTop =
38
+ store.modal.top + height.value > containerHeight
39
+ ? store.modal.top - height.value - store.modal.height
40
+ : store.modal.top
41
+
42
+ return {
43
+ left: `${modalLeft}px`,
44
+ top: `${modalTop}px`,
45
+ }
46
+ })
24
47
 
25
48
  const handleInput = (event: Event) => {
26
49
  event.stopPropagation()
@@ -31,7 +54,7 @@ const handleInput = (event: Event) => {
31
54
  @import url('@stonecrop/themes/default.css');
32
55
 
33
56
  .amodal {
34
- position: fixed;
57
+ position: absolute;
35
58
  background-color: var(--sc-row-color-zebra-dark);
36
59
  z-index: 100;
37
60
  }
@@ -93,12 +93,13 @@ export type TableRow = {
93
93
  export type TableModal = {
94
94
  colIndex?: number
95
95
  event?: string
96
+ height?: number
96
97
  left?: number
97
98
  parent?: HTMLElement
98
99
  rowIndex?: number
99
100
  top?: number
100
101
  visible?: boolean
101
- width?: string
102
+ width?: number
102
103
 
103
104
  component?: string
104
105
  componentProps?: Record<string, any>