renusify 2.0.4 → 2.1.0
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/components/app/index.js +5 -0
- package/components/app/index.vue +0 -2
- package/components/avatar/index.js +3 -0
- package/components/bar/bottomNav.js +1 -0
- package/components/bar/bottomNavigationCircle.js +2 -0
- package/components/bar/bottomNavigationCircle.vue +1 -1
- package/components/bar/toolbar/index.js +8 -0
- package/components/bar/toolbar/laptop.vue +2 -2
- package/components/bar/toolbar/menuLaptop.vue +2 -2
- package/components/bar/toolbar/menuMob.vue +28 -28
- package/components/bar/toolbar/mobile.vue +2 -2
- package/components/breadcrumb/index.js +3 -0
- package/components/breadcrumb/index.vue +0 -2
- package/components/button/buttonConfirm.js +3 -0
- package/components/button/buttonConfirm.vue +1 -1
- package/components/button/buttonGroup.js +7 -0
- package/components/button/index.js +3 -0
- package/components/calendar/index.js +10 -0
- package/components/calendar/index.vue +4 -7
- package/components/card/index.js +3 -0
- package/components/card/style.scss +2 -3
- package/components/chart/chart.js +1 -0
- package/components/chart/chart.vue +8 -5
- package/components/chart/worldMap.js +2 -0
- package/components/chart/worldMap.vue +1 -1
- package/components/chat/MessageList.vue +2 -6
- package/components/chat/chatInput.vue +1 -1
- package/components/chat/index.js +11 -0
- package/components/chat/index.vue +2 -5
- package/components/chip/index.js +3 -0
- package/components/codeEditor/highlightCss.vue +1 -1
- package/components/codeEditor/highlightHtml.vue +1 -1
- package/components/codeEditor/highlightJs.vue +1 -1
- package/components/codeEditor/index.js +3 -0
- package/components/codeEditor/index.vue +206 -199
- package/components/confirm/index.js +10 -0
- package/components/container/col.js +1 -0
- package/components/container/divider.js +1 -0
- package/components/container/index.js +1 -0
- package/components/container/row.js +1 -0
- package/components/container/spacer.js +1 -0
- package/components/content/index.js +1 -0
- package/components/countdown/index.js +1 -0
- package/components/cropper/index.js +3 -0
- package/components/cropper/index.vue +1 -1
- package/components/float/index.js +1 -0
- package/components/form/addressInput/index.js +4 -0
- package/components/form/camInput/index.js +4 -0
- package/components/form/{camInput.vue → camInput/index.vue} +1 -1
- package/components/form/checkInput/index.js +4 -0
- package/components/form/{check-input.vue → checkInput/index.vue} +1 -1
- package/components/form/checkboxInput/index.js +3 -0
- package/components/form/{checkbox.vue → checkboxInput/index.vue} +1 -1
- package/components/form/colorInput/index.js +7 -0
- package/components/form/{colorPicker → colorInput}/index.vue +2 -2
- package/components/form/{colorPicker → colorInput}/picker.vue +5 -9
- package/components/form/dateInput/index.js +8 -0
- package/components/form/dateInput/index.vue +475 -0
- package/components/form/fileInput/index.js +8 -0
- package/components/form/{fileUploader → fileInput}/index.vue +2 -2
- package/components/form/groupInput/index.js +4 -0
- package/components/form/{group-input.vue → groupInput/index.vue} +1 -1
- package/components/form/index.js +1 -0
- package/components/form/input/index.js +3 -0
- package/components/form/{input.vue → input/index.vue} +1 -1
- package/components/form/{json → jsonInput}/JsonView.vue +1 -1
- package/components/form/jsonInput/index.js +7 -0
- package/components/form/{json → jsonInput}/index.vue +7 -7
- package/components/form/maskInput/index.js +3 -0
- package/components/form/numberInput/index.js +4 -0
- package/components/form/{number.vue → numberInput/index.vue} +1 -1
- package/components/form/passwordInput/index.js +3 -0
- package/components/form/radioInput/index.js +3 -0
- package/components/form/{radioInput.vue → radioInput/index.vue} +1 -1
- package/components/form/rangeInput/index.js +3 -0
- package/components/form/{range.vue → rangeInput/index.vue} +1 -1
- package/components/form/ratingInput/index.js +4 -0
- package/components/form/{rating.vue → ratingInput/index.vue} +1 -1
- package/components/form/selectInput/index.js +8 -0
- package/components/form/{select.vue → selectInput/index.vue} +34 -2
- package/components/form/switchInput/index.js +2 -0
- package/components/form/{switch.vue → switchInput/index.vue} +1 -1
- package/components/form/telInput/index.js +7 -0
- package/components/form/{inputTel → telInput}/index.vue +5 -5
- package/components/form/text-editor/index.js +15 -0
- package/components/form/text-editor/preview.js +1 -0
- package/components/form/text-editor/preview.vue +14 -13
- package/components/form/text-editor/style.scss +4 -2
- package/components/form/textArea/index.js +2 -0
- package/components/form/{text-area.vue → textArea/index.vue} +1 -1
- package/components/form/textInput/index.js +2 -0
- package/components/form/timeInput/index.js +5 -0
- package/components/form/{timepicker → timeInput}/index.vue +2 -2
- package/components/form/timeInput/range.js +5 -0
- package/components/form/{timepicker → timeInput}/range.vue +2 -2
- package/components/form/uniqueInput/index.js +2 -0
- package/components/form/unitInput/index.js +3 -0
- package/components/form/{unit-input.vue → unitInput/index.vue} +1 -1
- package/components/formCreator/index.js +8 -0
- package/components/html2pdf/index.js +4 -0
- package/components/html2pdf/pageBreak.js +1 -0
- package/components/icon/index.js +1 -0
- package/components/img/index.js +2 -0
- package/components/img/index.vue +2 -2
- package/components/img/svgImg.vue +1 -1
- package/components/index.js +100 -191
- package/components/infinite/div.js +6 -0
- package/components/infinite/index.js +7 -0
- package/components/infinite/page.js +3 -0
- package/components/list/index.js +3 -0
- package/components/map/index.js +5 -0
- package/components/map/index.vue +8 -7
- package/components/map/route.js +9 -0
- package/components/map/route.vue +1 -1
- package/components/map/select.js +2 -0
- package/components/menu/index.js +5 -0
- package/components/message/index.js +4 -0
- package/components/meta/index.js +1 -1
- package/components/modal/index.js +3 -0
- package/components/modal/index.vue +6 -2
- package/components/modal/style.scss +1 -0
- package/components/nestable/NestableItem.vue +163 -0
- package/components/nestable/editable.js +44 -0
- package/components/nestable/index.js +1 -0
- package/components/nestable/index.vue +109 -0
- package/components/nestable/methods.js +397 -0
- package/components/notify/index.js +3 -0
- package/components/notify/index.vue +2 -2
- package/components/progress/circle.js +1 -0
- package/components/progress/line.js +1 -0
- package/components/searchBox/index.js +8 -0
- package/components/searchBox/index.vue +1 -1
- package/components/skeleton/index.js +1 -0
- package/components/skeleton/index.vue +1 -1
- package/components/slider/index.js +6 -0
- package/components/swiper/index.js +2 -0
- package/components/table/crud/index.js +20 -0
- package/components/table/crud/index.vue +459 -453
- package/components/table/index.js +11 -0
- package/components/table/index.vue +10 -17
- package/components/tabs/index.js +3 -0
- package/components/timeAgo/index.js +1 -0
- package/components/timeline/index.js +6 -0
- package/components/timeline/index.vue +1 -1
- package/components/tour/index.js +4 -0
- package/components/tour/index.vue +225 -221
- package/components/tree/index.js +9 -0
- package/components/tree/index.vue +120 -120
- package/components/tree/tree-element.vue +5 -18
- package/directive/index.js +17 -18
- package/package.json +1 -1
- package/components/form/address_ir.vue +0 -106
- package/components/form/datePicker/index.vue +0 -473
- package/components/iframe/index.vue +0 -67
- /package/components/form/{address.vue → addressInput/index.vue} +0 -0
- /package/components/form/{colorPicker → colorInput}/Alpha.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Hue.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Preview.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Saturation.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/mixin.js +0 -0
- /package/components/form/{datePicker → dateInput}/month.vue +0 -0
- /package/components/form/{datePicker → dateInput}/year.vue +0 -0
- /package/components/form/{fileUploader → fileInput}/file.js +0 -0
- /package/components/form/{fileUploader → fileInput}/single.vue +0 -0
- /package/components/form/{form.vue → index.vue} +0 -0
- /package/components/form/{mask-input.vue → maskInput/index.vue} +0 -0
- /package/components/form/{password.vue → passwordInput/index.vue} +0 -0
- /package/components/form/{inputTel → telInput}/assets/all-countries.js +0 -0
- /package/components/form/{inputTel → telInput}/assets/flags.png +0 -0
- /package/components/form/{inputTel → telInput}/assets/flags@2x.png +0 -0
- /package/components/form/{inputTel → telInput}/assets/sprite.css +0 -0
- /package/components/form/{text-input.vue → textInput/index.vue} +0 -0
- /package/components/form/{timepicker → timeInput}/timepicker.vue +0 -0
- /package/components/form/{unique → uniqueInput}/index.vue +0 -0
|
@@ -1,473 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<r-input v-bind="$attrs" :readonly="readonly" :model-value="modelValue" @click.prevent="show=true">
|
|
3
|
-
<input
|
|
4
|
-
:value="modelValue?$d(modelValueDate,withTime?'long':'medium',locale):null"
|
|
5
|
-
/>
|
|
6
|
-
</r-input>
|
|
7
|
-
<r-modal :model-value="show" @update:model-value="close()" :closebtn="false" closable class="text-center">
|
|
8
|
-
<div v-if="!showTime" :class="`${$r.prefix}date-input`">
|
|
9
|
-
<div>
|
|
10
|
-
<r-container>
|
|
11
|
-
<r-row>
|
|
12
|
-
<r-col class="col-auto">
|
|
13
|
-
<r-btn v-if="tab!=='month'" icon
|
|
14
|
-
@click.prevent="tab==='day'?incrementMonth(-1):incrementYear(-12)">
|
|
15
|
-
<r-icon v-html="$r.icons.arrow_left"></r-icon>
|
|
16
|
-
</r-btn>
|
|
17
|
-
</r-col>
|
|
18
|
-
<r-col class="text-center">
|
|
19
|
-
<r-btn class="me-2" text @click.prevent="tab==='month'?tab='day':tab='month'">
|
|
20
|
-
<r-icon v-html="tab==='month'?$r.icons.chevron_up:$r.icons.chevron_down"></r-icon>
|
|
21
|
-
{{
|
|
22
|
-
$d(new
|
|
23
|
-
Date(currentPeriod.year, currentPeriod.month, 1, 0, lang_zone_offset - timezoneOffset), 'month', locale)
|
|
24
|
-
}}
|
|
25
|
-
</r-btn>
|
|
26
|
-
|
|
27
|
-
<r-btn text @click.prevent="tab==='year'?tab='day':tab='year'">
|
|
28
|
-
<r-icon v-html="tab==='year'?$r.icons.chevron_up:$r.icons.chevron_down"></r-icon>
|
|
29
|
-
{{
|
|
30
|
-
$d(new
|
|
31
|
-
Date(currentPeriod.year, currentPeriod.month, 1, 0, lang_zone_offset - timezoneOffset), 'year', locale)
|
|
32
|
-
}}
|
|
33
|
-
</r-btn>
|
|
34
|
-
</r-col>
|
|
35
|
-
<r-col class="col-auto">
|
|
36
|
-
<r-btn v-if="tab!=='month'" icon
|
|
37
|
-
@click.prevent="tab==='day'?incrementMonth(1):incrementYear(12)">
|
|
38
|
-
<r-icon v-html="$r.icons.arrow_right"></r-icon>
|
|
39
|
-
</r-btn>
|
|
40
|
-
</r-col>
|
|
41
|
-
</r-row>
|
|
42
|
-
</r-container>
|
|
43
|
-
<year-tab v-if="tab==='year'"
|
|
44
|
-
:model-value='currentPeriod.year'
|
|
45
|
-
@update:model-value="(tab='month',setYear($event))"
|
|
46
|
-
:timezoneOffset="lang_zone_offset-timezoneOffset"
|
|
47
|
-
:locale="locale"
|
|
48
|
-
:month="currentPeriod.month"></year-tab>
|
|
49
|
-
<month-tab v-if="tab==='month'"
|
|
50
|
-
:model-value='currentPeriod.month'
|
|
51
|
-
@update:model-value="(tab='day',setMonth($event))"
|
|
52
|
-
:timezoneOffset="lang_zone_offset-timezoneOffset"
|
|
53
|
-
:locale="locale"
|
|
54
|
-
:year="currentPeriod.year"></month-tab>
|
|
55
|
-
<table v-if="tab==='day'" class="table">
|
|
56
|
-
<thead>
|
|
57
|
-
<tr>
|
|
58
|
-
<th class="headCell" v-for="(weekday, weekdayIndex) in weekDays" :key="weekdayIndex">
|
|
59
|
-
<span class="headCellContent">{{ weekday }}</span>
|
|
60
|
-
</th>
|
|
61
|
-
</tr>
|
|
62
|
-
</thead>
|
|
63
|
-
<transition :name="direction==='next'?'slide-start-to-end':'slide-end-to-start'" mode="out-in">
|
|
64
|
-
<tbody
|
|
65
|
-
:key="currentPeriod.year + '-' + currentPeriod.month"
|
|
66
|
-
>
|
|
67
|
-
<tr class="table-row" v-for="(week, weekIndex) in currentPeriodDates" :key="weekIndex">
|
|
68
|
-
<td
|
|
69
|
-
class="cell"
|
|
70
|
-
v-for="item in week"
|
|
71
|
-
:class="{
|
|
72
|
-
selectable: !readonly && !item.disabled,
|
|
73
|
-
selected: item.selected,
|
|
74
|
-
disabled: item.disabled,
|
|
75
|
-
today: item.today
|
|
76
|
-
}"
|
|
77
|
-
:key="item.date"
|
|
78
|
-
@click.prevent="item.date!==0 &&!readonly&& selectDateItem(item)"
|
|
79
|
-
>
|
|
80
|
-
<div
|
|
81
|
-
class="cellContent d-flex h-center v-center"
|
|
82
|
-
v-if="item.date!==0"
|
|
83
|
-
>
|
|
84
|
-
{{ $d(item.date, 'day', locale) }}
|
|
85
|
-
</div>
|
|
86
|
-
</td>
|
|
87
|
-
</tr>
|
|
88
|
-
</tbody>
|
|
89
|
-
</transition>
|
|
90
|
-
</table>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
<div v-else class="d-flex flex-column h-center v-center pa-5">
|
|
94
|
-
<timepicker
|
|
95
|
-
is24-hour
|
|
96
|
-
withSec
|
|
97
|
-
v-model="time"
|
|
98
|
-
></timepicker>
|
|
99
|
-
<div class="mt-5">
|
|
100
|
-
<r-btn class="color-success mx-5" @click.prevent="selectTime">{{ $t('ok', 'renusify') }}</r-btn>
|
|
101
|
-
<r-btn class="color-error mx-5" @click.prevent="close">{{ $t('cancel', 'renusify') }}</r-btn>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
</r-modal>
|
|
107
|
-
|
|
108
|
-
</template>
|
|
109
|
-
|
|
110
|
-
<script>
|
|
111
|
-
import Timepicker from "../timepicker/timepicker";
|
|
112
|
-
import YearTab from "./year";
|
|
113
|
-
import MonthTab from "./month";
|
|
114
|
-
|
|
115
|
-
export default {
|
|
116
|
-
name: 'datePicker',
|
|
117
|
-
components: {MonthTab, YearTab, Timepicker},
|
|
118
|
-
inheritAttrs: false,
|
|
119
|
-
props: {
|
|
120
|
-
modelValue: {
|
|
121
|
-
type: String
|
|
122
|
-
},
|
|
123
|
-
lang: {
|
|
124
|
-
type: String
|
|
125
|
-
},
|
|
126
|
-
readonly: Boolean,
|
|
127
|
-
withTime: Boolean,
|
|
128
|
-
isDateDisabled: {
|
|
129
|
-
type: Function,
|
|
130
|
-
default: () => false
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
emits:['update:modelValue'],
|
|
134
|
-
data() {
|
|
135
|
-
return {
|
|
136
|
-
tab: 'day',
|
|
137
|
-
show: false,
|
|
138
|
-
showTime: false,
|
|
139
|
-
time: null,
|
|
140
|
-
date: null,
|
|
141
|
-
direction: undefined,
|
|
142
|
-
currentPeriod: {
|
|
143
|
-
month: (new Date()).getMonth() + 1,
|
|
144
|
-
year: (new Date()).getFullYear()
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
created() {
|
|
149
|
-
this.$dateTime.set_format({
|
|
150
|
-
'de': {
|
|
151
|
-
day: 'numeric',
|
|
152
|
-
numberingSystem: 'latn'
|
|
153
|
-
},
|
|
154
|
-
'me': {
|
|
155
|
-
month: 'numeric',
|
|
156
|
-
numberingSystem: 'latn'
|
|
157
|
-
}
|
|
158
|
-
})
|
|
159
|
-
this.currentPeriod = {
|
|
160
|
-
month: this.modelValueDate.getMonth() + 1,
|
|
161
|
-
year: this.modelValueDate.getFullYear()
|
|
162
|
-
}
|
|
163
|
-
if (this.rangeLocalDate.start > this.modelValueDate) {
|
|
164
|
-
this.incrementMonth(-1)
|
|
165
|
-
}
|
|
166
|
-
if (this.rangeLocalDate.end < this.modelValueDate) {
|
|
167
|
-
this.incrementMonth(1)
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
computed: {
|
|
171
|
-
firstDayOfWeek() {
|
|
172
|
-
return this.$helper.ifHas(this.$dateTime.langs, 0, this.locale, 'first_day')
|
|
173
|
-
},
|
|
174
|
-
locale() {
|
|
175
|
-
return this.lang || this.$r.lang
|
|
176
|
-
},
|
|
177
|
-
today() {
|
|
178
|
-
return new Date()
|
|
179
|
-
},
|
|
180
|
-
timezoneOffset() {
|
|
181
|
-
return (new Date(this.currentPeriod.year, this.currentPeriod.month, 10)).getTimezoneOffset()
|
|
182
|
-
},
|
|
183
|
-
weekDays() {
|
|
184
|
-
const first = parseInt(this.firstDayOfWeek, 10)
|
|
185
|
-
|
|
186
|
-
return this.createRange(7).map(i => this.$d(new Date(2020, 2, first + i + 2, 0, this.timezoneOffset, 0), 'narrow', this.locale)) // 2017-02-02 is Sunday
|
|
187
|
-
},
|
|
188
|
-
modelValueDate() {
|
|
189
|
-
if (!this.modelValue || !new Date(this.modelValue)) {
|
|
190
|
-
return new Date()
|
|
191
|
-
}
|
|
192
|
-
return new Date(this.modelValue)
|
|
193
|
-
},
|
|
194
|
-
rangeLocalDate() {
|
|
195
|
-
const {year, month} = this.currentPeriod
|
|
196
|
-
let firstDay = 1
|
|
197
|
-
let firstmonth = month
|
|
198
|
-
let firstyear = year
|
|
199
|
-
|
|
200
|
-
let first = new Date(firstyear, firstmonth, firstDay, 0, this.lang_zone_offset - this.timezoneOffset, 0)
|
|
201
|
-
let lc = parseInt(this.$d(first, 'de', this.locale))
|
|
202
|
-
first = new Date(firstyear, firstmonth, firstDay - lc + 1, 0, this.lang_zone_offset - this.timezoneOffset, 0)
|
|
203
|
-
|
|
204
|
-
firstDay = 1
|
|
205
|
-
firstmonth = month + 1
|
|
206
|
-
firstyear = year
|
|
207
|
-
let last = new Date(firstyear, firstmonth, firstDay, 0, this.lang_zone_offset - this.timezoneOffset, 0)
|
|
208
|
-
lc = parseInt(this.$d(last, 'de', this.locale))
|
|
209
|
-
last = new Date(firstyear, firstmonth, firstDay - lc, 23, 59 + this.lang_zone_offset - this.timezoneOffset, 59)
|
|
210
|
-
|
|
211
|
-
return {start: first, end: last}
|
|
212
|
-
},
|
|
213
|
-
weekDaysBeforeFirstDayOfTheMonth() {
|
|
214
|
-
const {start} = this.rangeLocalDate
|
|
215
|
-
const weekDay = start.getDay()
|
|
216
|
-
return (weekDay - parseInt(this.firstDayOfWeek) + 7) % 7
|
|
217
|
-
},
|
|
218
|
-
currentPeriodDates() {
|
|
219
|
-
const {start, end} = this.rangeLocalDate
|
|
220
|
-
const children = []
|
|
221
|
-
let firstday = start.getDate()
|
|
222
|
-
let firstmonth = start.getMonth()
|
|
223
|
-
let firstyear = start.getFullYear()
|
|
224
|
-
let rows = []
|
|
225
|
-
let day = this.weekDaysBeforeFirstDayOfTheMonth
|
|
226
|
-
|
|
227
|
-
while (day--) {
|
|
228
|
-
rows.push({
|
|
229
|
-
date: 0,
|
|
230
|
-
disabled: true,
|
|
231
|
-
selected: false,
|
|
232
|
-
today: false
|
|
233
|
-
})
|
|
234
|
-
}
|
|
235
|
-
let doJob = true
|
|
236
|
-
while (doJob) {
|
|
237
|
-
const date = new Date(firstyear, firstmonth, 1, 24, this.lang_zone_offset - this.timezoneOffset, 0)
|
|
238
|
-
date.setDate(firstday)
|
|
239
|
-
firstmonth = date.getMonth()
|
|
240
|
-
firstyear = date.getFullYear()
|
|
241
|
-
firstday = date.getDate() + 1
|
|
242
|
-
if (date.getTime() > end.getTime()) {
|
|
243
|
-
doJob = false
|
|
244
|
-
} else {
|
|
245
|
-
rows.push({
|
|
246
|
-
date: date,
|
|
247
|
-
disabled: this.isDateDisabled(date),
|
|
248
|
-
selected: this.areSameDates(date, this.modelValueDate),
|
|
249
|
-
today: this.areSameDates(date, this.today)
|
|
250
|
-
})
|
|
251
|
-
|
|
252
|
-
if (rows.length % 7 === 0) {
|
|
253
|
-
children.push(rows)
|
|
254
|
-
rows = []
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (rows.length) {
|
|
260
|
-
children.push(rows)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return children
|
|
264
|
-
},
|
|
265
|
-
lang_zone_offset() {
|
|
266
|
-
let offset = this.$helper.ifHas(this.$dateTime.langs, 0, this.locale, 'time_zone_offset')
|
|
267
|
-
let dst = this.$helper.ifHas(this.$dateTime.langs, false, this.locale, 'daylight_saving_time')
|
|
268
|
-
|
|
269
|
-
const m = this.$d(new Date(this.currentPeriod.year, this.currentPeriod.month, 10), 'me', this.locale)
|
|
270
|
-
if (parseInt(m) < 7 && dst) {
|
|
271
|
-
offset += 60
|
|
272
|
-
}
|
|
273
|
-
return offset * -1
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
watch: {
|
|
277
|
-
modelValueDate(newVal) {
|
|
278
|
-
this.currentPeriod = {
|
|
279
|
-
month: newVal.getMonth() + 1,
|
|
280
|
-
year: newVal.getFullYear()
|
|
281
|
-
}
|
|
282
|
-
if (this.rangeLocalDate.start > this.modelValueDate) {
|
|
283
|
-
this.incrementMonth(-1)
|
|
284
|
-
}
|
|
285
|
-
if (this.rangeLocalDate.end < this.modelValueDate) {
|
|
286
|
-
this.incrementMonth(1)
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
currentPeriod(currentPeriod, oldPeriod) {
|
|
290
|
-
const currentDate = new Date(currentPeriod.year, currentPeriod.month).getTime()
|
|
291
|
-
const oldDate = new Date(oldPeriod.year, oldPeriod.month).getTime()
|
|
292
|
-
this.direction = currentDate !== oldDate
|
|
293
|
-
? (currentDate > oldDate ? 'next' : 'prev')
|
|
294
|
-
: undefined
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
methods: {
|
|
298
|
-
close() {
|
|
299
|
-
this.show = false
|
|
300
|
-
this.showTime = false
|
|
301
|
-
},
|
|
302
|
-
createRange(number) {
|
|
303
|
-
const res = []
|
|
304
|
-
for (let i = 0; i < number; i++) {
|
|
305
|
-
res.push(i)
|
|
306
|
-
}
|
|
307
|
-
return res
|
|
308
|
-
},
|
|
309
|
-
incrementMonth(increment = 1) {
|
|
310
|
-
const incrementDate = new Date(this.currentPeriod.year, this.currentPeriod.month + increment)
|
|
311
|
-
this.currentPeriod = {
|
|
312
|
-
month: incrementDate.getMonth(),
|
|
313
|
-
year: incrementDate.getFullYear()
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
incrementYear(increment = 1) {
|
|
317
|
-
const incrementDate = new Date(this.currentPeriod.year + increment, this.currentPeriod.month)
|
|
318
|
-
this.currentPeriod = {
|
|
319
|
-
month: incrementDate.getMonth(),
|
|
320
|
-
year: incrementDate.getFullYear()
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
setMonth(increment) {
|
|
324
|
-
const incrementDate = new Date(this.currentPeriod.year, increment)
|
|
325
|
-
this.currentPeriod = {
|
|
326
|
-
month: incrementDate.getMonth(),
|
|
327
|
-
year: incrementDate.getFullYear()
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
setYear(increment) {
|
|
331
|
-
const incrementDate = new Date(increment, this.currentPeriod.month)
|
|
332
|
-
this.currentPeriod = {
|
|
333
|
-
month: incrementDate.getMonth(),
|
|
334
|
-
year: incrementDate.getFullYear()
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
selectTime() {
|
|
338
|
-
const times = (this.time ? this.time : '00:00:00').split(':')
|
|
339
|
-
let d = (new Date(this.date.getFullYear(), this.date.getMonth(), this.date.getDate(),
|
|
340
|
-
this.date.getHours() + parseInt(times[0]),
|
|
341
|
-
this.date.getMinutes() + parseInt(times[1]),
|
|
342
|
-
this.date.getSeconds() + parseInt(times[2])))
|
|
343
|
-
|
|
344
|
-
this.$emit('update:modelValue', d.toISOString())
|
|
345
|
-
this.close()
|
|
346
|
-
},
|
|
347
|
-
selectDateItem(item) {
|
|
348
|
-
if (!item.disabled) {
|
|
349
|
-
if (this.withTime) {
|
|
350
|
-
this.date = item.date
|
|
351
|
-
this.showTime = true
|
|
352
|
-
} else {
|
|
353
|
-
this.$emit('update:modelValue', item.date.toISOString())
|
|
354
|
-
this.close()
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
areSameDates(date1, date2) {
|
|
359
|
-
if (typeof date1.getDate === 'function' && typeof date2.getDate === 'function') {
|
|
360
|
-
return (date1.getDate() === date2.getDate()) &&
|
|
361
|
-
(date1.getMonth() === date2.getMonth()) &&
|
|
362
|
-
(date1.getFullYear() === date2.getFullYear())
|
|
363
|
-
}
|
|
364
|
-
return false
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
</script>
|
|
370
|
-
|
|
371
|
-
<style lang="scss">
|
|
372
|
-
@import "../../../style/include";
|
|
373
|
-
|
|
374
|
-
.#{$prefix}date-input {
|
|
375
|
-
position: relative;
|
|
376
|
-
display: inline-block;
|
|
377
|
-
font-size: 10px;
|
|
378
|
-
color: var(--color-on-sheet);
|
|
379
|
-
background-color: var(--color-sheet-container-high);
|
|
380
|
-
|
|
381
|
-
.cell {
|
|
382
|
-
&.today {
|
|
383
|
-
color: var(--color-one);
|
|
384
|
-
|
|
385
|
-
.cellContent {
|
|
386
|
-
border: solid 1px var(--color-one);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
&.selected {
|
|
391
|
-
.cellContent {
|
|
392
|
-
color: var(--color-on-one);
|
|
393
|
-
background: var(--color-one);
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
&.selectable:hover {
|
|
399
|
-
.cellContent {
|
|
400
|
-
|
|
401
|
-
color: var(--color-on-one);
|
|
402
|
-
background: var(--color-one);
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
.table {
|
|
411
|
-
|
|
412
|
-
width: 100%;
|
|
413
|
-
table-layout: fixed;
|
|
414
|
-
position: relative;
|
|
415
|
-
z-index: 5;
|
|
416
|
-
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.cell, .headCell {
|
|
420
|
-
|
|
421
|
-
text-align: center;
|
|
422
|
-
box-sizing: border-box;
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.cell {
|
|
427
|
-
|
|
428
|
-
padding: 0.5em 0;
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.headCell {
|
|
433
|
-
|
|
434
|
-
padding: 0.3em 0.5em 1.8em;
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.headCellContent {
|
|
439
|
-
|
|
440
|
-
font-size: 1.3em;
|
|
441
|
-
font-weight: normal;
|
|
442
|
-
color: var(--color-on-sheet-low);
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.cellContent {
|
|
447
|
-
padding: 5px;
|
|
448
|
-
font-size: 1.4em;
|
|
449
|
-
margin: 0 auto;
|
|
450
|
-
width: 30px;
|
|
451
|
-
height: 30px;
|
|
452
|
-
text-align: center;
|
|
453
|
-
border-radius: 100%;
|
|
454
|
-
transition: background 0.1s, color 0.1s;
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.cell.outOfRange {
|
|
459
|
-
color: var(--color-sheet-low);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.cell.selectable {
|
|
463
|
-
|
|
464
|
-
cursor: pointer;
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.cell.disabled {
|
|
469
|
-
opacity: 0.38;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
</style>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {createApp, h} from 'vue'
|
|
3
|
-
import renusify from "renusify";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'r-frame',
|
|
7
|
-
props: {
|
|
8
|
-
head: String,
|
|
9
|
-
plugins: Array,
|
|
10
|
-
renusifyConfig: {
|
|
11
|
-
type: Object,
|
|
12
|
-
default: () => {
|
|
13
|
-
return {
|
|
14
|
-
prefix: "sm-",
|
|
15
|
-
lang: "en",
|
|
16
|
-
package: 'renusify',
|
|
17
|
-
directives: []
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
render() {
|
|
23
|
-
return h('iframe', {
|
|
24
|
-
onLoad: this.renderChildren
|
|
25
|
-
})
|
|
26
|
-
},
|
|
27
|
-
beforeUpdate() {
|
|
28
|
-
const head = this.$el.contentDocument.head
|
|
29
|
-
head.innerHTML = this.head
|
|
30
|
-
this.iApp.children = this.$slots.default()
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
renderChildren() {
|
|
34
|
-
const children = this.$slots.default()
|
|
35
|
-
const head = this.$el.contentDocument.head
|
|
36
|
-
head.innerHTML = this.head
|
|
37
|
-
const body = this.$el.contentDocument.body
|
|
38
|
-
const el = document.createElement('DIV')
|
|
39
|
-
body.appendChild(el)
|
|
40
|
-
const iApp = createApp({
|
|
41
|
-
name: 'iApp',
|
|
42
|
-
data: function () {
|
|
43
|
-
return {children: children};
|
|
44
|
-
},
|
|
45
|
-
render() {
|
|
46
|
-
return h('div', this.children)
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
if (this.plugins) {
|
|
50
|
-
this.plugins.forEach((item) => {
|
|
51
|
-
iApp.use(item)
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
iApp.use(renusify, this.renusifyConfig)
|
|
55
|
-
iApp.mount(el)
|
|
56
|
-
|
|
57
|
-
this.iApp = iApp
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</script>
|
|
62
|
-
<style>
|
|
63
|
-
iframe {
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
}
|
|
67
|
-
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|