@mptw/skylens-ui 1.5.0 → 1.5.2
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/AGENTS.md +59 -0
- package/CLAUDE.md +36 -0
- package/README.md +7 -7
- package/app/app.config.ts +11 -2
- package/app/app.vue +5 -0
- package/app/assets/css/layout.css +134 -0
- package/app/assets/css/main.css +189 -0
- package/app/components/SLAlertModal.vue +24 -16
- package/app/components/SLBreadcrumbs.vue +12 -8
- package/app/components/SLButton.vue +196 -163
- package/app/components/SLCalendarButton.vue +40 -34
- package/app/components/SLCalendarPopup.vue +79 -53
- package/app/components/SLCard.vue +57 -41
- package/app/components/SLChart.vue +6 -3
- package/app/components/SLCheckbox.vue +92 -49
- package/app/components/SLCircleButton.vue +25 -16
- package/app/components/SLCollapsableBlock.vue +44 -33
- package/app/components/SLCollapsableMulitPillSelect.vue +20 -15
- package/app/components/SLConfirmModal.vue +9 -6
- package/app/components/SLContextMenu.vue +88 -48
- package/app/components/SLDateInput.vue +109 -92
- package/app/components/SLDatePicker.vue +9 -7
- package/app/components/SLDistributor.vue +1 -1
- package/app/components/SLDownloadButton.vue +39 -29
- package/app/components/SLDraggable.vue +2 -2
- package/app/components/SLDropdown.vue +33 -25
- package/app/components/SLDropdownItem.vue +9 -5
- package/app/components/SLElementWithTitle.vue +12 -7
- package/app/components/SLEyeCheckbox.vue +44 -31
- package/app/components/SLFileInput.vue +23 -16
- package/app/components/SLGenderAgeSelect.vue +52 -36
- package/app/components/SLHourRangeInput.vue +45 -32
- package/app/components/SLIOSSwitch.vue +81 -60
- package/app/components/SLIcon.vue +4 -3
- package/app/components/SLIconButton.vue +31 -29
- package/app/components/SLInfoTip.vue +51 -40
- package/app/components/SLInsightSitePage.vue +12 -7
- package/app/components/SLLegend.vue +19 -12
- package/app/components/SLLinearProgressBar.vue +7 -20
- package/app/components/SLLink.vue +12 -8
- package/app/components/SLLoading.vue +34 -31
- package/app/components/SLMapChart.vue +5 -4
- package/app/components/SLModal.vue +90 -66
- package/app/components/SLMonthCalendarButton.vue +91 -45
- package/app/components/SLMonthPicker.vue +42 -37
- package/app/components/SLMultiEmailInput.vue +163 -113
- package/app/components/SLMultiSelect.vue +37 -26
- package/app/components/SLNoData.vue +16 -11
- package/app/components/SLNotification.vue +133 -129
- package/app/components/SLPageModal.vue +14 -9
- package/app/components/SLPagination.vue +45 -33
- package/app/components/SLPillCheckbox.vue +50 -42
- package/app/components/SLPillLabel.vue +43 -28
- package/app/components/SLPopupMenuButton.vue +26 -17
- package/app/components/SLProfileButton.vue +28 -20
- package/app/components/SLProjectShareItem.vue +30 -17
- package/app/components/SLRadioButton.vue +41 -33
- package/app/components/SLRadioButtonGroup.vue +28 -23
- package/app/components/SLRadioGroup.vue +90 -78
- package/app/components/SLRangeInput.vue +53 -38
- package/app/components/SLRegionsMapChart.vue +5 -4
- package/app/components/SLRightSider.vue +50 -40
- package/app/components/SLSearchInput.vue +24 -19
- package/app/components/SLSelect.vue +114 -87
- package/app/components/SLSelectAllToggle.vue +52 -37
- package/app/components/SLSidebarNav.vue +253 -193
- package/app/components/SLSidebarNavGroupItem.vue +13 -10
- package/app/components/SLSidebarNavGroupItemSection.vue +240 -179
- package/app/components/SLSidebarNavLinkItem.vue +131 -109
- package/app/components/SLSidebarNavSectionItem.vue +21 -18
- package/app/components/SLSitePage.vue +35 -24
- package/app/components/SLSkyInsightSitePage.vue +13 -8
- package/app/components/SLSortByDropdown.vue +35 -22
- package/app/components/SLSpinIcon.vue +6 -3
- package/app/components/SLStayRangeInput.vue +47 -36
- package/app/components/SLTab.vue +7 -2
- package/app/components/SLTable.vue +330 -313
- package/app/components/SLTableTooltip.vue +44 -30
- package/app/components/SLTabs.vue +333 -280
- package/app/components/SLTextInput.vue +162 -134
- package/app/components/SLTextarea.vue +40 -29
- package/app/components/SLToast.vue +19 -11
- package/app/components/SLToggleButton.vue +18 -11
- package/app/components/SLTwoLayerMultiSelect.vue +180 -85
- package/app/components/SLTwoLayerSelect.vue +47 -37
- package/app/components/SLTwoLayerSingleSelect.vue +52 -33
- package/app/components/SLWarnModal.vue +9 -7
- package/app/interface/commons.ts +7 -0
- package/app/utils/index.ts +213 -146
- package/eslint.config.js +3 -0
- package/nuxt.config.ts +17 -14
- package/package.json +9 -8
- package/skills-lock.json +59 -0
- package/tsconfig.json +1 -6
- package/.eslintrc.cjs +0 -4
- package/app/assets/css/layout.styl +0 -98
- package/app/assets/css/tailwind.css +0 -3
- package/app/pages/index.vue +0 -15
- package/interface/commons.ts +0 -7
- package/tailwind.config.js +0 -271
- /package/{interface → app/interface}/IDateRange.ts +0 -0
- /package/{interface → app/interface}/IHourRange.ts +0 -0
- /package/{interface → app/interface}/IInputOption.ts +0 -0
- /package/{interface → app/interface}/ILegendItem.ts +0 -0
- /package/{interface → app/interface}/IOrganization.ts +0 -0
- /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
- /package/{interface → app/interface}/IStayRange.ts +0 -0
- /package/{interface → app/interface}/ITableField.ts +0 -0
- /package/{interface → app/interface}/IWeb.ts +0 -0
- /package/{interface → app/interface}/NavConfigType.ts +0 -0
- /package/{models → app/models}/DateRange.ts +0 -0
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
div(v-if="loading", style="min-height: 200px")
|
|
91
91
|
slot(v-else name='noItems')
|
|
92
92
|
.flex.flex-col.items-center.py-8.px-4.space-y-3
|
|
93
|
-
img(src="
|
|
93
|
+
img(src="~ui/app/assets/images/commons/empty-box.png")
|
|
94
94
|
.text-lg.text-primary-600 {{ noItems }}
|
|
95
95
|
.text-sm.text-pgray-3(v-if="reason") 可能的原因:{{ reason }}
|
|
96
96
|
SLLoading(
|
|
@@ -114,342 +114,359 @@
|
|
|
114
114
|
)
|
|
115
115
|
span(v-if="option.label") {{ option.label }}
|
|
116
116
|
</template>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
|
|
118
|
+
<script lang="ts">
|
|
119
|
+
import type { PropType } from "vue";
|
|
120
|
+
import { fromEvent, Subscription } from "rxjs";
|
|
121
|
+
import { createPopper } from "@popperjs/core";
|
|
122
|
+
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
123
|
+
import type ITableField from "@/interface/ITableField";
|
|
124
|
+
|
|
125
|
+
export default defineComponent({
|
|
126
|
+
name: "SLTable",
|
|
127
|
+
components: {},
|
|
128
|
+
props: {
|
|
129
|
+
componentClass: {
|
|
130
|
+
type: [String, Array, Object],
|
|
131
|
+
default: "",
|
|
128
132
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
default: '',
|
|
133
|
-
},
|
|
134
|
-
items: {
|
|
135
|
-
type: Array,
|
|
136
|
-
default: () => [],
|
|
137
|
-
},
|
|
138
|
-
bodyHeaderItems: {
|
|
139
|
-
type: Array,
|
|
140
|
-
default: () => [],
|
|
141
|
-
},
|
|
142
|
-
fields: {
|
|
143
|
-
type: Array as PropType<Array<ITableField>>,
|
|
144
|
-
default: () => [],
|
|
145
|
-
},
|
|
146
|
-
sortBy: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: '',
|
|
149
|
-
},
|
|
150
|
-
sortDesc: {
|
|
151
|
-
type: Boolean,
|
|
152
|
-
default: false,
|
|
153
|
-
},
|
|
154
|
-
filterBy: {
|
|
155
|
-
type: String,
|
|
156
|
-
default: '',
|
|
157
|
-
},
|
|
158
|
-
hoverableRows: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
default: false,
|
|
161
|
-
},
|
|
162
|
-
clickableRows: {
|
|
163
|
-
type: Boolean,
|
|
164
|
-
default: false,
|
|
165
|
-
},
|
|
166
|
-
loading: {
|
|
167
|
-
type: Boolean,
|
|
168
|
-
default: false,
|
|
169
|
-
},
|
|
170
|
-
responsive: {
|
|
171
|
-
type: Boolean,
|
|
172
|
-
default: true,
|
|
173
|
-
},
|
|
174
|
-
tdBorderColor: {
|
|
175
|
-
type: String,
|
|
176
|
-
default: 'border-primary-600',
|
|
177
|
-
},
|
|
178
|
-
tdHoverColor: {
|
|
179
|
-
type: String,
|
|
180
|
-
default: 'bg-primary-100',
|
|
181
|
-
},
|
|
182
|
-
noItems: {
|
|
183
|
-
type: String,
|
|
184
|
-
default: 'No Items',
|
|
185
|
-
},
|
|
186
|
-
reason: {
|
|
187
|
-
type: String,
|
|
188
|
-
default: '',
|
|
189
|
-
},
|
|
133
|
+
items: {
|
|
134
|
+
type: Array,
|
|
135
|
+
default: () => [],
|
|
190
136
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
137
|
+
bodyHeaderItems: {
|
|
138
|
+
type: Array,
|
|
139
|
+
default: () => [],
|
|
140
|
+
},
|
|
141
|
+
fields: {
|
|
142
|
+
type: Array as PropType<Array<ITableField>>,
|
|
143
|
+
default: () => [],
|
|
144
|
+
},
|
|
145
|
+
sortBy: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: "",
|
|
148
|
+
},
|
|
149
|
+
sortDesc: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: false,
|
|
152
|
+
},
|
|
153
|
+
filterBy: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: "",
|
|
156
|
+
},
|
|
157
|
+
hoverableRows: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: false,
|
|
160
|
+
},
|
|
161
|
+
clickableRows: {
|
|
162
|
+
type: Boolean,
|
|
163
|
+
default: false,
|
|
164
|
+
},
|
|
165
|
+
loading: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false,
|
|
168
|
+
},
|
|
169
|
+
responsive: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
default: true,
|
|
172
|
+
},
|
|
173
|
+
tdBorderColor: {
|
|
174
|
+
type: String,
|
|
175
|
+
default: "border-primary-600",
|
|
176
|
+
},
|
|
177
|
+
tdHoverColor: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: "bg-primary-100",
|
|
180
|
+
},
|
|
181
|
+
noItems: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: "No Items",
|
|
184
|
+
},
|
|
185
|
+
reason: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: "",
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
emits: [
|
|
191
|
+
"update:sortDesc",
|
|
192
|
+
"update:sortBy",
|
|
193
|
+
"update:filterBy",
|
|
194
|
+
"row-clicked",
|
|
195
|
+
"row-mouseentered",
|
|
196
|
+
"row-mouseleaved",
|
|
197
|
+
"table-mousemoved",
|
|
198
|
+
],
|
|
199
|
+
setup(props, { emit }) {
|
|
200
|
+
const { fields, sortBy, sortDesc, clickableRows, hoverableRows } =
|
|
201
|
+
toRefs(props);
|
|
202
|
+
|
|
203
|
+
const el = shallowRef<HTMLElement | null>(null);
|
|
204
|
+
const popupEl = shallowRef<HTMLElement | null>(null);
|
|
205
|
+
const hoverRowIndex = ref(-1);
|
|
206
|
+
const filterOptions = ref<
|
|
207
|
+
{
|
|
208
|
+
key: string;
|
|
209
|
+
label?: string;
|
|
210
|
+
icon?: string;
|
|
211
|
+
}[]
|
|
212
|
+
>([]);
|
|
213
|
+
|
|
214
|
+
let popperInstance: PopperInstance | null = null;
|
|
215
|
+
let clickSubscriber: Subscription | null = null;
|
|
216
|
+
let filterHeaderCol: HTMLElement | null = null;
|
|
217
|
+
|
|
218
|
+
const headerColumnSpans = computed(() => {
|
|
219
|
+
return fields.value.map((field) => {
|
|
220
|
+
if (!field.colspan) return 1;
|
|
221
|
+
return field.colspan;
|
|
224
222
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
223
|
+
});
|
|
224
|
+
const columnSpans = computed(() => {
|
|
225
|
+
return fields.value.map((field) => {
|
|
226
|
+
if (!field.col) return 1;
|
|
227
|
+
if (!field.col.span) return 1;
|
|
228
|
+
return field.col.span;
|
|
231
229
|
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
function sort(fieldKey: string) {
|
|
233
|
+
if (fieldKey === sortBy.value) {
|
|
234
|
+
emit("update:sortDesc", !sortDesc.value);
|
|
235
|
+
} else {
|
|
236
|
+
emit("update:sortBy", fieldKey);
|
|
239
237
|
}
|
|
238
|
+
}
|
|
240
239
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
function onClickedHeaderCol(fieldKey: string) {
|
|
241
|
+
const field = fields.value.find((f) => f.key === fieldKey);
|
|
242
|
+
if (!field || (!field.sortable && !field.filterable)) return;
|
|
244
243
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (field.filterable) {
|
|
250
|
-
filterOptions.value = [...field.filterOptions];
|
|
251
|
-
filterHeaderCol = el.value.querySelector(`th[name=${field.key}-header]`)
|
|
252
|
-
.children[0] as HTMLElement;
|
|
253
|
-
show();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function rowClicked(item: any, index: number, e: Event) {
|
|
258
|
-
if (!clickableRows.value) return;
|
|
259
|
-
|
|
260
|
-
emit('row-clicked', item, index, e);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
function rowMouseEntered(item: any, index: number, e: Event) {
|
|
264
|
-
if (!hoverableRows.value) return;
|
|
265
|
-
|
|
266
|
-
hoverRowIndex.value = index;
|
|
267
|
-
emit('row-mouseentered', item, index, e);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function rowMouseLeaved(item: any, index: number, e: Event) {
|
|
271
|
-
if (!hoverableRows.value) return;
|
|
272
|
-
|
|
273
|
-
hoverRowIndex.value = -1;
|
|
274
|
-
emit('row-mouseleaved', item, index, e);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
function onMousemoved(e: Event) {
|
|
278
|
-
if (!hoverableRows.value) return;
|
|
279
|
-
|
|
280
|
-
emit('table-mousemoved', e);
|
|
244
|
+
if (field.sortable) {
|
|
245
|
+
sort(field.key);
|
|
281
246
|
}
|
|
282
247
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
popupEl.value &&
|
|
289
|
-
!filterHeaderCol.contains(target as HTMLElement) &&
|
|
290
|
-
!popupEl.value.contains(target as HTMLElement)
|
|
291
|
-
) {
|
|
292
|
-
hide();
|
|
293
|
-
}
|
|
294
|
-
});
|
|
248
|
+
if (field.filterable) {
|
|
249
|
+
filterOptions.value = [...field.filterOptions];
|
|
250
|
+
filterHeaderCol = el.value.querySelector(`th[name=${field.key}-header]`)
|
|
251
|
+
.children[0] as HTMLElement;
|
|
252
|
+
show();
|
|
295
253
|
}
|
|
254
|
+
}
|
|
296
255
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
256
|
+
function rowClicked(item: any, index: number, e: Event) {
|
|
257
|
+
if (!clickableRows.value) return;
|
|
258
|
+
|
|
259
|
+
emit("row-clicked", item, index, e);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function rowMouseEntered(item: any, index: number, e: Event) {
|
|
263
|
+
if (!hoverableRows.value) return;
|
|
264
|
+
|
|
265
|
+
hoverRowIndex.value = index;
|
|
266
|
+
emit("row-mouseentered", item, index, e);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
function rowMouseLeaved(item: any, index: number, e: Event) {
|
|
270
|
+
if (!hoverableRows.value) return;
|
|
271
|
+
|
|
272
|
+
hoverRowIndex.value = -1;
|
|
273
|
+
emit("row-mouseleaved", item, index, e);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function onMousemoved(e: Event) {
|
|
277
|
+
if (!hoverableRows.value) return;
|
|
278
|
+
|
|
279
|
+
emit("table-mousemoved", e);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function subscribeClick() {
|
|
283
|
+
clickSubscriber = fromEvent(window, "click").subscribe((e) => {
|
|
284
|
+
const { target } = e;
|
|
285
|
+
if (
|
|
286
|
+
filterHeaderCol &&
|
|
287
|
+
popupEl.value &&
|
|
288
|
+
!filterHeaderCol.contains(target as HTMLElement) &&
|
|
289
|
+
!popupEl.value.contains(target as HTMLElement)
|
|
290
|
+
) {
|
|
291
|
+
hide();
|
|
300
292
|
}
|
|
301
|
-
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function unsubscribeClick() {
|
|
297
|
+
if (clickSubscriber) {
|
|
298
|
+
clickSubscriber.unsubscribe();
|
|
302
299
|
}
|
|
300
|
+
clickSubscriber = null;
|
|
301
|
+
}
|
|
303
302
|
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
function show() {
|
|
304
|
+
if (!popupEl.value || !filterHeaderCol || !popperInstance) return;
|
|
306
305
|
|
|
307
|
-
|
|
306
|
+
popupEl.value.setAttribute("data-show", "");
|
|
308
307
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
},
|
|
308
|
+
subscribeClick();
|
|
309
|
+
popperInstance.state.elements.reference = filterHeaderCol;
|
|
310
|
+
popperInstance.setOptions({
|
|
311
|
+
modifiers: [
|
|
312
|
+
{
|
|
313
|
+
name: "offset",
|
|
314
|
+
options: {
|
|
315
|
+
offset: [0, 4],
|
|
318
316
|
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
317
|
+
},
|
|
318
|
+
{ name: "eventListeners", enabled: true },
|
|
319
|
+
],
|
|
320
|
+
});
|
|
321
|
+
popperInstance.update();
|
|
322
|
+
}
|
|
324
323
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
324
|
+
function hide() {
|
|
325
|
+
if (
|
|
326
|
+
!popupEl.value ||
|
|
327
|
+
popupEl.value.getAttribute("data-show") === null ||
|
|
328
|
+
!popperInstance
|
|
329
|
+
)
|
|
330
|
+
return;
|
|
332
331
|
|
|
333
|
-
|
|
332
|
+
unsubscribeClick();
|
|
334
333
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
if (popupEl.value) {
|
|
335
|
+
popupEl.value.removeAttribute("data-show");
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
popperInstance.setOptions({
|
|
339
|
+
modifiers: [{ name: "eventListeners", enabled: false }],
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function onClickedFilter(filterKey: string) {
|
|
344
|
+
emit("update:filterBy", filterKey);
|
|
345
|
+
hide();
|
|
346
|
+
}
|
|
338
347
|
|
|
339
|
-
|
|
340
|
-
|
|
348
|
+
onMounted(() => {
|
|
349
|
+
if (el.value && popupEl.value) {
|
|
350
|
+
popperInstance = createPopper(el.value, popupEl.value, {
|
|
351
|
+
placement: "bottom-end",
|
|
352
|
+
modifiers: [{ name: "eventListeners", enabled: false }],
|
|
341
353
|
});
|
|
342
354
|
}
|
|
355
|
+
});
|
|
343
356
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
357
|
+
onBeforeUnmount(() => {
|
|
358
|
+
if (popperInstance) {
|
|
359
|
+
popperInstance.destroy();
|
|
347
360
|
}
|
|
361
|
+
popperInstance = null;
|
|
362
|
+
});
|
|
348
363
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
364
|
+
return {
|
|
365
|
+
el,
|
|
366
|
+
popupEl,
|
|
367
|
+
hoverRowIndex,
|
|
368
|
+
filterOptions,
|
|
369
|
+
headerColumnSpans,
|
|
370
|
+
columnSpans,
|
|
371
|
+
onClickedHeaderCol,
|
|
372
|
+
sort,
|
|
373
|
+
rowClicked,
|
|
374
|
+
rowMouseEntered,
|
|
375
|
+
rowMouseLeaved,
|
|
376
|
+
onMousemoved,
|
|
377
|
+
onClickedFilter,
|
|
378
|
+
};
|
|
379
|
+
},
|
|
380
|
+
});
|
|
381
|
+
</script>
|
|
357
382
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
.icon
|
|
450
|
-
@apply text-primary
|
|
451
|
-
|
|
452
|
-
.icon
|
|
453
|
-
@apply text-base leading-none
|
|
454
|
-
</style>
|
|
455
|
-
|
|
383
|
+
<style>
|
|
384
|
+
@reference '~ui/app/assets/css/main.css';
|
|
385
|
+
|
|
386
|
+
.table {
|
|
387
|
+
@apply block relative w-full overflow-hidden;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.table.table-responsive {
|
|
391
|
+
@apply overflow-auto;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.table.table-responsive table {
|
|
395
|
+
@apply table-auto;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.table table {
|
|
399
|
+
@apply w-full table-fixed;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.table table thead tr {
|
|
403
|
+
@apply border-b border-primary-600 bg-white;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.table table thead tr th {
|
|
407
|
+
@apply px-2 pb-2 text-base font-normal text-primary whitespace-nowrap;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.table table thead tr th.sortable,
|
|
411
|
+
.table table thead tr th.filterable {
|
|
412
|
+
@apply cursor-pointer;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.table table thead tr th .sort-icon {
|
|
416
|
+
@apply opacity-0;
|
|
417
|
+
transition: transform 0.2s ease, opacity 0.1s ease;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.table table thead tr th:hover .sort-icon,
|
|
421
|
+
.table table thead tr th.sorting .sort-icon {
|
|
422
|
+
@apply opacity-100;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.table table thead tr th.filterable .filter-icon {
|
|
426
|
+
@apply opacity-100;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.table table tbody.clickable tr {
|
|
430
|
+
@apply cursor-pointer;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.table table tbody tr.body-header-row td {
|
|
434
|
+
@apply bg-primary-50 text-lg font-bold shadow-inline;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.table table tbody tr td {
|
|
438
|
+
@apply p-2 border-b border-opacity-50 text-base text-pgray-2;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.table table tbody tr td.text-right.sortable {
|
|
442
|
+
@apply pr-8;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.table-header-filter-popup {
|
|
446
|
+
@apply z-10 flex border border-primary-600 rounded overflow-hidden invisible pointer-events-none;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.table-header-filter-popup[data-show] {
|
|
450
|
+
@apply visible pointer-events-auto;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.table-header-filter-popup-content {
|
|
454
|
+
@apply flex flex-col;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.table-header-filter-popup-content .table-header-filter-item {
|
|
458
|
+
@apply inline-flex justify-center p-2 bg-white text-sm text-pgray-3 hover:bg-primary-50;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.table-header-filter-popup-content .table-header-filter-item.active {
|
|
462
|
+
@apply bg-primary-100 text-primary;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.table-header-filter-popup-content .table-header-filter-item.active .icon {
|
|
466
|
+
@apply text-primary;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.table-header-filter-popup-content .table-header-filter-item .icon {
|
|
470
|
+
@apply text-base leading-none;
|
|
471
|
+
}
|
|
472
|
+
</style>
|