@mptw/skylens-ui 1.5.9 → 1.5.11
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/app/assets/css/layout.css +1 -1
- package/app/components/SLAlertModal.vue +1 -1
- package/app/components/SLBreadcrumbs.vue +1 -1
- package/app/components/SLButton.vue +1 -1
- package/app/components/SLCalendarButton.vue +4 -4
- package/app/components/SLCalendarPopup.vue +4 -4
- package/app/components/SLCard.vue +1 -1
- package/app/components/SLChart.vue +1 -1
- package/app/components/SLCheckbox.vue +3 -3
- package/app/components/SLCircleButton.vue +1 -1
- package/app/components/SLCollapsableBlock.vue +1 -1
- package/app/components/SLCollapsableMulitPillSelect.vue +2 -2
- package/app/components/SLConfirmModal.vue +1 -1
- package/app/components/SLContextMenu.vue +4 -3
- package/app/components/SLDateInput.vue +2 -2
- package/app/components/SLDatePicker.vue +2 -2
- package/app/components/SLDownloadButton.vue +5 -4
- package/app/components/SLDropdown.vue +1 -1
- package/app/components/SLDropdownItem.vue +1 -1
- package/app/components/SLElementWithTitle.vue +1 -1
- package/app/components/SLEyeCheckbox.vue +2 -2
- package/app/components/SLFileInput.vue +2 -2
- package/app/components/SLGenderAgeSelect.vue +2 -2
- package/app/components/SLHourRangeInput.vue +2 -2
- package/app/components/SLIOSSwitch.vue +2 -2
- package/app/components/SLIconButton.vue +1 -1
- package/app/components/SLInfoTip.vue +1 -1
- package/app/components/SLInsightSitePage.vue +1 -1
- package/app/components/SLLegend.vue +2 -2
- package/app/components/SLLinearProgressBar.vue +1 -1
- package/app/components/SLLink.vue +1 -1
- package/app/components/SLLoading.vue +1 -1
- package/app/components/SLMapChart.vue +1 -1
- package/app/components/SLModal.vue +1 -1
- package/app/components/SLMonthCalendarButton.vue +2 -2
- package/app/components/SLMonthPicker.vue +1 -1
- package/app/components/SLMultiEmailInput.vue +2 -2
- package/app/components/SLMultiSelect.vue +2 -2
- package/app/components/SLNoData.vue +2 -2
- package/app/components/SLNotification.vue +1 -1
- package/app/components/SLPageModal.vue +1 -1
- package/app/components/SLPagination.vue +1 -1
- package/app/components/SLPillCheckbox.vue +2 -2
- package/app/components/SLPillLabel.vue +1 -1
- package/app/components/SLPopupMenuButton.vue +2 -2
- package/app/components/SLProfileButton.vue +1 -1
- package/app/components/SLProjectShareItem.vue +2 -2
- package/app/components/SLRadioButton.vue +2 -2
- package/app/components/SLRadioButtonGroup.vue +2 -2
- package/app/components/SLRadioGroup.vue +3 -3
- package/app/components/SLRangeInput.vue +1 -1
- package/app/components/SLRightSider.vue +1 -1
- package/app/components/SLSearchInput.vue +1 -1
- package/app/components/SLSelect.vue +3 -3
- package/app/components/SLSelectAllToggle.vue +1 -1
- package/app/components/SLSidebarNav.vue +7 -7
- package/app/components/SLSidebarNavGroupItem.vue +2 -2
- package/app/components/SLSidebarNavGroupItemSection.vue +2 -2
- package/app/components/SLSidebarNavLinkItem.vue +2 -5
- package/app/components/SLSidebarNavSectionItem.vue +2 -2
- package/app/components/SLSitePage.vue +1 -1
- package/app/components/SLSkyInsightSitePage.vue +1 -1
- package/app/components/SLSortByDropdown.vue +2 -2
- package/app/components/SLSpinIcon.vue +1 -1
- package/app/components/SLStayRangeInput.vue +3 -3
- package/app/components/SLTable.vue +3 -3
- package/app/components/SLTableTooltip.vue +4 -4
- package/app/components/SLTabs.vue +1 -1
- package/app/components/SLTextInput.vue +2 -2
- package/app/components/SLTextarea.vue +2 -2
- package/app/components/SLToast.vue +1 -1
- package/app/components/SLToggleButton.vue +1 -1
- package/app/components/SLTwoLayerMultiSelect.vue +1 -1
- package/app/components/SLTwoLayerSelect.vue +1 -1
- package/app/components/SLTwoLayerSingleSelect.vue +1 -1
- package/app/components/SLWarnModal.vue +1 -1
- package/app/interface/IOrganization.ts +4 -4
- package/app/models/DateRange.ts +5 -5
- package/app/utils/index.ts +4 -3
- package/nuxt.config.ts +9 -5
- package/package.json +4 -2
|
@@ -25,7 +25,7 @@ import type { PropType } from "vue";
|
|
|
25
25
|
import { fromEvent } from "rxjs";
|
|
26
26
|
import { createPopper } from "@popperjs/core";
|
|
27
27
|
import type { Options as PopperOptions } from "@popperjs/core";
|
|
28
|
-
import type IPopupMenuButton from "
|
|
28
|
+
import type IPopupMenuButton from "~app/interface/IPopupMenuButton";
|
|
29
29
|
|
|
30
30
|
export default defineComponent({
|
|
31
31
|
name: "SLPopupMenuButton",
|
|
@@ -134,7 +134,7 @@ export default defineComponent({
|
|
|
134
134
|
</script>
|
|
135
135
|
|
|
136
136
|
<style>
|
|
137
|
-
@reference '
|
|
137
|
+
@reference '~app/assets/css/main.css';
|
|
138
138
|
|
|
139
139
|
.popup-menu-button {
|
|
140
140
|
@apply inline-block relative;
|
|
@@ -175,7 +175,7 @@ export default defineComponent({
|
|
|
175
175
|
</script>
|
|
176
176
|
|
|
177
177
|
<style>
|
|
178
|
-
@reference '
|
|
178
|
+
@reference '~app/assets/css/main.css';
|
|
179
179
|
|
|
180
180
|
.profile-button .toggle-button {
|
|
181
181
|
@apply inline-flex items-center justify-center w-7 h-7 p-0 rounded-full bg-primary-400 text-lg text-white font-bold hover:bg-primary-600 active:bg-primary;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
<script lang="ts">
|
|
26
26
|
import type { PropType } from "vue";
|
|
27
|
-
import { OrgUserRole } from "
|
|
27
|
+
import { OrgUserRole } from "~app/interface/IOrganization";
|
|
28
28
|
|
|
29
29
|
export default defineComponent({
|
|
30
30
|
name: "SLProjectShareItem",
|
|
@@ -71,7 +71,7 @@ export default defineComponent({
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<style scoped>
|
|
74
|
-
@reference '
|
|
74
|
+
@reference '~app/assets/css/main.css';
|
|
75
75
|
|
|
76
76
|
.project-share-item {
|
|
77
77
|
@apply flex items-center justify-between space-x-4;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<script lang="ts">
|
|
20
20
|
import { isEqual } from "lodash-es";
|
|
21
|
-
import { getUID } from "
|
|
21
|
+
import { getUID } from "~app/utils";
|
|
22
22
|
|
|
23
23
|
export default defineComponent({
|
|
24
24
|
name: "SLRadioButton",
|
|
@@ -68,7 +68,7 @@ export default defineComponent({
|
|
|
68
68
|
</script>
|
|
69
69
|
|
|
70
70
|
<style>
|
|
71
|
-
@reference '
|
|
71
|
+
@reference '~app/assets/css/main.css';
|
|
72
72
|
|
|
73
73
|
.radio-button {
|
|
74
74
|
@apply inline-block relative text-base overflow-hidden;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<script lang="ts">
|
|
21
21
|
import type { PropType } from "vue";
|
|
22
|
-
import type IInputOption from "
|
|
22
|
+
import type IInputOption from "~app/interface/IInputOption";
|
|
23
23
|
|
|
24
24
|
export default defineComponent({
|
|
25
25
|
name: "SLRadioButtonGroup",
|
|
@@ -83,7 +83,7 @@ export default defineComponent({
|
|
|
83
83
|
</script>
|
|
84
84
|
|
|
85
85
|
<style>
|
|
86
|
-
@reference '
|
|
86
|
+
@reference '~app/assets/css/main.css';
|
|
87
87
|
|
|
88
88
|
.radio-button-group .is-invalid .invalid-feedback {
|
|
89
89
|
@apply block;
|
|
@@ -16,8 +16,8 @@ SLElementWithTitle(:title='disabled ? disabledHint : ""')
|
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
18
|
import type { PropType } from "vue";
|
|
19
|
-
import { getUID } from "
|
|
20
|
-
import type IInputOption from "
|
|
19
|
+
import { getUID } from "~app/utils";
|
|
20
|
+
import type IInputOption from "~app/interface/IInputOption";
|
|
21
21
|
|
|
22
22
|
export default defineComponent({
|
|
23
23
|
name: "SLRadioGroup",
|
|
@@ -105,7 +105,7 @@ export default defineComponent({
|
|
|
105
105
|
</script>
|
|
106
106
|
|
|
107
107
|
<style>
|
|
108
|
-
@reference '
|
|
108
|
+
@reference '~app/assets/css/main.css';
|
|
109
109
|
|
|
110
110
|
.radio-group {
|
|
111
111
|
@apply inline-flex p-0.5 bg-primary-100 border border-primary-200 rounded;
|
|
@@ -47,8 +47,8 @@ import { createPopper } from "@popperjs/core";
|
|
|
47
47
|
import type { Placement } from "@popperjs/core";
|
|
48
48
|
import { gsap } from "gsap";
|
|
49
49
|
import { ScrollToPlugin } from "gsap/ScrollToPlugin";
|
|
50
|
-
import { getUID } from "
|
|
51
|
-
import type IInputOption from "
|
|
50
|
+
import { getUID } from "~app/utils";
|
|
51
|
+
import type IInputOption from "~app/interface/IInputOption";
|
|
52
52
|
|
|
53
53
|
gsap.registerPlugin(ScrollToPlugin);
|
|
54
54
|
|
|
@@ -455,7 +455,7 @@ export default defineComponent({
|
|
|
455
455
|
</script>
|
|
456
456
|
|
|
457
457
|
<style scoped>
|
|
458
|
-
@reference '
|
|
458
|
+
@reference '~app/assets/css/main.css';
|
|
459
459
|
|
|
460
460
|
.custom-select {
|
|
461
461
|
@apply relative;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
.sidebar-wrapper
|
|
6
6
|
.sidebar-logo
|
|
7
7
|
a.logo(href="javascript:;" @click="onClickedLogo")
|
|
8
|
-
img.color-big(src="~
|
|
9
|
-
img.white-big(src="~
|
|
10
|
-
img.color-small(src='~
|
|
11
|
-
img.white-small(src='~
|
|
8
|
+
img.color-big(src="~app/assets/images/commons/app-logo-big.svg", @load='onLogoLoaded')
|
|
9
|
+
img.white-big(src="~app/assets/images/commons/app-logo-big-white.svg", @load='onLogoLoaded')
|
|
10
|
+
img.color-small(src='~app/assets/images/commons/app-logo-small.svg', @load='onLogoLoaded')
|
|
11
|
+
img.white-small(src='~app/assets/images/commons/app-logo-small-white.svg', @load='onLogoLoaded')
|
|
12
12
|
nav.site-nav
|
|
13
13
|
.nav-wrapper.custom-scrollbar-y
|
|
14
14
|
template(v-for='item in config')
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
import type { PropType } from "vue";
|
|
67
67
|
import { createPopper } from "@popperjs/core";
|
|
68
68
|
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
69
|
-
import type { NavConfigType } from "
|
|
69
|
+
import type { NavConfigType } from "~app/interface/NavConfigType";
|
|
70
70
|
|
|
71
71
|
export default defineComponent({
|
|
72
72
|
name: "SLSidebarNav",
|
|
@@ -247,7 +247,7 @@ export default defineComponent({
|
|
|
247
247
|
</script>
|
|
248
248
|
|
|
249
249
|
<style>
|
|
250
|
-
@reference '
|
|
250
|
+
@reference '~app/assets/css/main.css';
|
|
251
251
|
|
|
252
252
|
.sidebar {
|
|
253
253
|
@apply relative h-full;
|
|
@@ -472,7 +472,7 @@ export default defineComponent({
|
|
|
472
472
|
.sidebar-nav-intro-arrow,
|
|
473
473
|
.sidebar-nav-intro-arrow::before {
|
|
474
474
|
@apply absolute w-[17px] h-[20px] bg-contain;
|
|
475
|
-
background: url("~
|
|
475
|
+
background: url("~app/assets/images/commons/nav-intro-arrow.svg") top left
|
|
476
476
|
no-repeat;
|
|
477
477
|
}
|
|
478
478
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import type { NavItemGroup } from "
|
|
14
|
+
import type { NavItemGroup } from "~app/interface/NavConfigType";
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "SLSidebarNavGroupItem",
|
|
@@ -37,7 +37,7 @@ export default defineComponent({
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<style>
|
|
40
|
-
@reference '
|
|
40
|
+
@reference '~app/assets/css/main.css';
|
|
41
41
|
|
|
42
42
|
.sidebar.dark .sidebar-nav-group-item {
|
|
43
43
|
@apply bg-primary-900;
|
|
@@ -86,7 +86,7 @@ import type { Instance as PopperInstance } from "@popperjs/core";
|
|
|
86
86
|
import {
|
|
87
87
|
NavItemStatus,
|
|
88
88
|
type NavItemSection,
|
|
89
|
-
} from "
|
|
89
|
+
} from "~app/interface/NavConfigType";
|
|
90
90
|
|
|
91
91
|
export default defineComponent({
|
|
92
92
|
name: "SLSidebarNavGroupItemSection",
|
|
@@ -381,7 +381,7 @@ export default defineComponent({
|
|
|
381
381
|
</script>
|
|
382
382
|
|
|
383
383
|
<style>
|
|
384
|
-
@reference '
|
|
384
|
+
@reference '~app/assets/css/main.css';
|
|
385
385
|
|
|
386
386
|
.sidebar.closure .sidebar-nav-group-item-section {
|
|
387
387
|
@apply items-center;
|
|
@@ -66,10 +66,7 @@ NuxtLink.sidebar-nav-link-item(
|
|
|
66
66
|
import type { NuxtLink } from "#components";
|
|
67
67
|
import { createPopper } from "@popperjs/core";
|
|
68
68
|
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
69
|
-
import {
|
|
70
|
-
NavItemStatus,
|
|
71
|
-
type NavItemLink,
|
|
72
|
-
} from "ui/app/interface/NavConfigType";
|
|
69
|
+
import { NavItemStatus, type NavItemLink } from "~app/interface/NavConfigType";
|
|
73
70
|
|
|
74
71
|
type NuxtLinkType = InstanceType<typeof NuxtLink>;
|
|
75
72
|
|
|
@@ -229,7 +226,7 @@ export default defineComponent({
|
|
|
229
226
|
</script>
|
|
230
227
|
|
|
231
228
|
<style>
|
|
232
|
-
@reference '
|
|
229
|
+
@reference '~app/assets/css/main.css';
|
|
233
230
|
|
|
234
231
|
.sidebar.closure .sidebar-nav-link-item {
|
|
235
232
|
@apply lg:p-2 lg:text-lg;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
-
import type { NavItemSection } from "
|
|
15
|
+
import type { NavItemSection } from "~app/interface/NavConfigType";
|
|
16
16
|
|
|
17
17
|
export default defineComponent({
|
|
18
18
|
name: "SLSidebarNavSectionItem",
|
|
@@ -42,7 +42,7 @@ export default defineComponent({
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
<style>
|
|
45
|
-
@reference '
|
|
45
|
+
@reference '~app/assets/css/main.css';
|
|
46
46
|
|
|
47
47
|
.sidebar.closure .sidebar-nav-section-item {
|
|
48
48
|
@apply lg:items-center;
|
|
@@ -21,7 +21,7 @@ import type { PropType } from "vue";
|
|
|
21
21
|
import { createPopper } from "@popperjs/core";
|
|
22
22
|
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
23
23
|
import { fromEvent, type Subscription } from "rxjs";
|
|
24
|
-
import type IInputOption from "
|
|
24
|
+
import type IInputOption from "~app/interface/IInputOption";
|
|
25
25
|
|
|
26
26
|
export default defineComponent({
|
|
27
27
|
name: "SLSortByDropdown",
|
|
@@ -162,7 +162,7 @@ export default defineComponent({
|
|
|
162
162
|
</script>
|
|
163
163
|
|
|
164
164
|
<style scoped>
|
|
165
|
-
@reference '
|
|
165
|
+
@reference '~app/assets/css/main.css';
|
|
166
166
|
|
|
167
167
|
.sort-by-dropdown {
|
|
168
168
|
@apply inline-flex;
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
<script lang="ts">
|
|
55
55
|
import type { PropType } from "vue";
|
|
56
56
|
import type { SLSelect } from "#components";
|
|
57
|
-
import type IStayRange from "
|
|
58
|
-
import type { StayRangeLevel } from "
|
|
57
|
+
import type IStayRange from "~app/interface/IStayRange";
|
|
58
|
+
import type { StayRangeLevel } from "~app/interface/IStayRange";
|
|
59
59
|
|
|
60
60
|
type SLSelectType = InstanceType<typeof SLSelect>;
|
|
61
61
|
|
|
@@ -256,7 +256,7 @@ export default defineComponent({
|
|
|
256
256
|
</script>
|
|
257
257
|
|
|
258
258
|
<style>
|
|
259
|
-
@reference '
|
|
259
|
+
@reference '~app/assets/css/main.css';
|
|
260
260
|
|
|
261
261
|
.stay-range-input {
|
|
262
262
|
@apply flex flex-col;
|
|
@@ -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="~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(
|
|
@@ -120,7 +120,7 @@ import type { PropType } from "vue";
|
|
|
120
120
|
import { fromEvent, type Subscription } from "rxjs";
|
|
121
121
|
import { createPopper } from "@popperjs/core";
|
|
122
122
|
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
123
|
-
import type ITableField from "
|
|
123
|
+
import type ITableField from "~app/interface/ITableField";
|
|
124
124
|
|
|
125
125
|
export default defineComponent({
|
|
126
126
|
name: "SLTable",
|
|
@@ -381,7 +381,7 @@ export default defineComponent({
|
|
|
381
381
|
</script>
|
|
382
382
|
|
|
383
383
|
<style>
|
|
384
|
-
@reference '
|
|
384
|
+
@reference '~app/assets/css/main.css';
|
|
385
385
|
|
|
386
386
|
.table {
|
|
387
387
|
@apply block relative w-full overflow-hidden;
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import type { PropType } from "vue";
|
|
24
|
-
import { formatDateRange } from "
|
|
25
|
-
import type IDateRange from "
|
|
26
|
-
import type ITableField from "
|
|
24
|
+
import { formatDateRange } from "~app/utils";
|
|
25
|
+
import type IDateRange from "~app/interface/IDateRange";
|
|
26
|
+
import type ITableField from "~app/interface/ITableField";
|
|
27
27
|
|
|
28
28
|
export default defineComponent({
|
|
29
29
|
name: "SLTableTooltip",
|
|
@@ -71,7 +71,7 @@ export default defineComponent({
|
|
|
71
71
|
</script>
|
|
72
72
|
|
|
73
73
|
<style>
|
|
74
|
-
@reference '
|
|
74
|
+
@reference '~app/assets/css/main.css';
|
|
75
75
|
|
|
76
76
|
.table-tooltip {
|
|
77
77
|
@apply inline-block p-4 border border-primary-600 rounded bg-white shadow-popup-sm pointer-events-none;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
<script lang="ts">
|
|
43
43
|
import { debounce } from "lodash-es";
|
|
44
|
-
import { getUID } from "
|
|
44
|
+
import { getUID } from "~app/utils";
|
|
45
45
|
|
|
46
46
|
export default defineComponent({
|
|
47
47
|
name: "SLTextInput",
|
|
@@ -226,7 +226,7 @@ export default defineComponent({
|
|
|
226
226
|
</script>
|
|
227
227
|
|
|
228
228
|
<style>
|
|
229
|
-
@reference '
|
|
229
|
+
@reference '~app/assets/css/main.css';
|
|
230
230
|
|
|
231
231
|
.text-input.inline {
|
|
232
232
|
@apply flex;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
|
-
import { getUID } from "
|
|
24
|
+
import { getUID } from "~app/utils";
|
|
25
25
|
|
|
26
26
|
export default defineComponent({
|
|
27
27
|
name: "SLTextArea",
|
|
@@ -93,7 +93,7 @@ export default defineComponent({
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<style>
|
|
96
|
-
@reference '
|
|
96
|
+
@reference '~app/assets/css/main.css';
|
|
97
97
|
|
|
98
98
|
.textarea.inline {
|
|
99
99
|
@apply flex;
|
|
@@ -61,7 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
</script>
|
|
62
62
|
|
|
63
63
|
<style>
|
|
64
|
-
@reference '
|
|
64
|
+
@reference '~app/assets/css/main.css';
|
|
65
65
|
|
|
66
66
|
.sl-toggle-button {
|
|
67
67
|
@apply inline-flex items-center justify-center p-1.5 space-x-2 bg-primary-100 rounded text-base text-primary-600;
|
|
@@ -215,7 +215,7 @@ export default defineComponent({
|
|
|
215
215
|
</script>
|
|
216
216
|
|
|
217
217
|
<style>
|
|
218
|
-
@reference '
|
|
218
|
+
@reference '~app/assets/css/main.css';
|
|
219
219
|
|
|
220
220
|
.tw-layer-select {
|
|
221
221
|
@apply flex flex-col w-138 h-67.75 pt-2.75 px-2.75 bg-white border border-primary-100 rounded shadow-default;
|
package/app/models/DateRange.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { format } from
|
|
2
|
-
import type IDateRange from
|
|
1
|
+
import { format } from "date-fns";
|
|
2
|
+
import type IDateRange from "~app/interface/IDateRange";
|
|
3
3
|
|
|
4
4
|
class DateRange implements IDateRange {
|
|
5
5
|
start: Date;
|
|
6
6
|
end: Date;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
constructor(start: Date, end: Date) {
|
|
9
9
|
this.start = start;
|
|
10
10
|
this.end = end;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
toString() {
|
|
14
|
-
return `${format(this.start,
|
|
14
|
+
return `${format(this.start, "yyyy/MM/dd")} - ${format(
|
|
15
15
|
this.end,
|
|
16
|
-
|
|
16
|
+
"yyyy/MM/dd",
|
|
17
17
|
)}`;
|
|
18
18
|
}
|
|
19
19
|
}
|
package/app/utils/index.ts
CHANGED
|
@@ -17,11 +17,12 @@ import {
|
|
|
17
17
|
} from "date-fns";
|
|
18
18
|
import { sortBy, isEqual } from "lodash-es";
|
|
19
19
|
import { HanRegex } from "#imports";
|
|
20
|
-
import type IDateRange from "
|
|
21
|
-
import { ScreenSize } from "
|
|
20
|
+
import type IDateRange from "~app/interface/IDateRange";
|
|
21
|
+
import { ScreenSize } from "~app/interface/commons";
|
|
22
22
|
import type ExcelJS from "exceljs";
|
|
23
23
|
import { useGtm } from "@gtm-support/vue-gtm";
|
|
24
24
|
import * as htmlToImage from "html-to-image";
|
|
25
|
+
import WatermarkImage from "~public/assets/images/commons/watermark-2.svg";
|
|
25
26
|
|
|
26
27
|
export const getUID = () => {
|
|
27
28
|
return `uid-${Math.random().toString(36).substring(2)}`;
|
|
@@ -726,7 +727,7 @@ export const domToPngDataUrl = async (
|
|
|
726
727
|
padding: number = 0,
|
|
727
728
|
dateRanges: (IDateRange | null)[] = [],
|
|
728
729
|
watermark: boolean = true,
|
|
729
|
-
watermarkImg: string =
|
|
730
|
+
watermarkImg: string = WatermarkImage,
|
|
730
731
|
) => {
|
|
731
732
|
if (!imageTarget) {
|
|
732
733
|
console.log("Can not find target of htmlToImage!");
|
package/nuxt.config.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
2
3
|
import tailwindcss from "@tailwindcss/vite";
|
|
3
4
|
|
|
5
|
+
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
|
|
4
7
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
5
8
|
export default defineNuxtConfig({
|
|
6
9
|
devtools: { enabled: true },
|
|
@@ -9,7 +12,8 @@ export default defineNuxtConfig({
|
|
|
9
12
|
name: "skylens-ui",
|
|
10
13
|
},
|
|
11
14
|
alias: {
|
|
12
|
-
|
|
15
|
+
"~app": join(currentDir, "./app"),
|
|
16
|
+
"~public": join(currentDir, "./public"),
|
|
13
17
|
},
|
|
14
18
|
runtimeConfig: {
|
|
15
19
|
public: {
|
|
@@ -19,11 +23,11 @@ export default defineNuxtConfig({
|
|
|
19
23
|
},
|
|
20
24
|
},
|
|
21
25
|
css: [
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
26
|
+
"~app/assets/css/main.css",
|
|
27
|
+
"~app/assets/css/icon.css",
|
|
28
|
+
"~app/assets/css/layout.css",
|
|
25
29
|
],
|
|
26
|
-
plugins: ["
|
|
30
|
+
plugins: ["~app/plugins/v-calendar.ts"],
|
|
27
31
|
vite: {
|
|
28
32
|
plugins: [tailwindcss()],
|
|
29
33
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mptw/skylens-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.11",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "nuxi dev .playground",
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"eslint": "^10.8.0",
|
|
18
18
|
"nuxt": "^4.5.1",
|
|
19
19
|
"typescript": "^6.0.3",
|
|
20
|
-
"vue": "^3.5.40"
|
|
20
|
+
"vue": "^3.5.40"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
21
23
|
"@gtm-support/vue-gtm": "^3.2.0",
|
|
22
24
|
"@popperjs/core": "^2.11.8",
|
|
23
25
|
"@tailwindcss/vite": "^4.3.3",
|