@skyservice-developers/vue-dev-kit 1.5.12 → 2.0.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/README.md +96 -15
- package/dist/api-BOvdjB3h.js +266 -0
- package/dist/api-D5C6FvTr.cjs +1 -0
- package/dist/components/BaseTeleport.vue.d.ts +14 -0
- package/dist/components/Dialog.vue.d.ts +28 -0
- package/dist/components/DialogModal.vue.d.ts +28 -0
- package/dist/components/DialogNext.vue.d.ts +28 -0
- package/dist/components/Header.vue.d.ts +37 -0
- package/dist/components/Modal.vue.d.ts +30 -0
- package/dist/components/SkyButton.vue.d.ts +22 -0
- package/dist/components/SkySelect.vue.d.ts +16 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/sdk/api.d.ts +54 -0
- package/dist/sdk/bridge.d.ts +43 -0
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/types.d.ts +73 -0
- package/dist/sdk/webview.d.ts +16 -0
- package/dist/sdk.cjs +1 -0
- package/dist/sdk.js +33 -0
- package/dist/style.css +1 -0
- package/dist/vue-dev-kit.cjs +1 -0
- package/dist/vue-dev-kit.js +903 -0
- package/package.json +32 -43
- package/dist/vue2/style.css +0 -1
- package/dist/vue2/vue-dev-kit.cjs +0 -1
- package/dist/vue2/vue-dev-kit.js +0 -2622
- package/dist/vue3/style.css +0 -1
- package/dist/vue3/vue-dev-kit.cjs +0 -1
- package/dist/vue3/vue-dev-kit.js +0 -2277
- package/src/index.js +0 -9
- package/src/shared/index.js +0 -1
- package/src/shared/types/index.d.ts +0 -72
- package/src/shared/utils/index.js +0 -2
- package/src/shared/utils/parentBridge.js +0 -84
- package/src/shared/utils/webviewCheck.js +0 -54
- package/src/styles/scrollbar.css +0 -17
- package/src/vue2/components/BaseTeleport.vue +0 -16
- package/src/vue2/components/Dialog.vue +0 -106
- package/src/vue2/components/DialogModal.vue +0 -439
- package/src/vue2/components/DialogNext.vue +0 -379
- package/src/vue2/components/Header.vue +0 -466
- package/src/vue2/components/Modal.vue +0 -252
- package/src/vue2/components/SkyButton.vue +0 -144
- package/src/vue2/components/SkySelect.vue +0 -327
- package/src/vue2/components/index.js +0 -6
- package/src/vue2/index.js +0 -2
- package/src/vue3/components/BaseTeleport.vue +0 -16
- package/src/vue3/components/Dialog.vue +0 -97
- package/src/vue3/components/DialogModal.vue +0 -458
- package/src/vue3/components/DialogNext.vue +0 -427
- package/src/vue3/components/Header.vue +0 -505
- package/src/vue3/components/Modal.vue +0 -253
- package/src/vue3/components/SkyButton.vue +0 -140
- package/src/vue3/components/SkySelect.vue +0 -266
- package/src/vue3/components/index.js +0 -8
- package/src/vue3/index.js +0 -2
|
@@ -1,379 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="modelValue"
|
|
4
|
-
class="sky-dialogbox sky-dialogbox-next"
|
|
5
|
-
:style="[zIndex ? { 'z-index': zIndex } : null]"
|
|
6
|
-
>
|
|
7
|
-
<div class="sky-dialog-overlay">
|
|
8
|
-
<div ref="dialogContent" class="sky-dialog-content">
|
|
9
|
-
<!-- Header -->
|
|
10
|
-
<div class="sky-dialog-header">
|
|
11
|
-
<button class="sky-dialog-back" :title="closeText" @click="close">
|
|
12
|
-
<svg width="15" height="15" viewBox="0 0 451.847 451.847" style="transform: rotate(90deg)">
|
|
13
|
-
<path fill="currentColor" d="M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z"/>
|
|
14
|
-
</svg>
|
|
15
|
-
</button>
|
|
16
|
-
<div class="sky-dialog-title" :class="{ 'sky-dialog-title-with-subtitle': subtitle }">
|
|
17
|
-
{{ title }}
|
|
18
|
-
<span v-if="subtitle" class="sky-dialog-subtitle">{{ subtitle }}</span>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<!-- Body -->
|
|
23
|
-
<div
|
|
24
|
-
ref="dialogPaper"
|
|
25
|
-
class="sky-dialog-paper"
|
|
26
|
-
:class="{ 'sky-dialog-paper-no-footer': !showFooter }"
|
|
27
|
-
@touchstart="handleTouchStart"
|
|
28
|
-
@touchend="handleTouchEnd"
|
|
29
|
-
>
|
|
30
|
-
<!-- iOS swipe back area -->
|
|
31
|
-
<div v-if="isIos" class="sky-dialog-swipe-area" />
|
|
32
|
-
<slot></slot>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<!-- Footer -->
|
|
36
|
-
<div v-if="showFooter" class="sky-dialog-footer">
|
|
37
|
-
<slot name="buttons"></slot>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
import { isIosWebview, isAndroidWebview } from '../../shared/utils/webviewCheck'
|
|
47
|
-
|
|
48
|
-
export default {
|
|
49
|
-
name: 'DialogNext',
|
|
50
|
-
props: {
|
|
51
|
-
modelValue: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: false
|
|
54
|
-
},
|
|
55
|
-
title: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: ''
|
|
58
|
-
},
|
|
59
|
-
subtitle: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: ''
|
|
62
|
-
},
|
|
63
|
-
zIndex: {
|
|
64
|
-
type: [Number, String],
|
|
65
|
-
default: null
|
|
66
|
-
},
|
|
67
|
-
closeText: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: 'Назад'
|
|
70
|
-
},
|
|
71
|
-
closeOnEsc: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: true
|
|
74
|
-
},
|
|
75
|
-
hasButtons: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: null
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
data() {
|
|
81
|
-
return {
|
|
82
|
-
touchStartX: 0
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
computed: {
|
|
86
|
-
isIos() {
|
|
87
|
-
try {
|
|
88
|
-
return isIosWebview()
|
|
89
|
-
} catch {
|
|
90
|
-
return false
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
isAndroid() {
|
|
94
|
-
try {
|
|
95
|
-
return isAndroidWebview()
|
|
96
|
-
} catch {
|
|
97
|
-
return false
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
// Determine if footer should be shown
|
|
101
|
-
showFooter() {
|
|
102
|
-
// If hasButtons prop is explicitly set, use it
|
|
103
|
-
if (this.hasButtons !== null) {
|
|
104
|
-
return this.hasButtons
|
|
105
|
-
}
|
|
106
|
-
// Fallback to slot check (for direct usage without Dialog wrapper)
|
|
107
|
-
return !!this.$slots.buttons
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
watch: {
|
|
111
|
-
// Body scroll lock
|
|
112
|
-
modelValue(value) {
|
|
113
|
-
if (value) {
|
|
114
|
-
document.body.style.overflow = 'hidden'
|
|
115
|
-
this.$nextTick(() => {
|
|
116
|
-
this.androidFix()
|
|
117
|
-
})
|
|
118
|
-
} else {
|
|
119
|
-
document.body.style.overflow = ''
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
mounted() {
|
|
124
|
-
document.addEventListener('keydown', this.handleKeydown)
|
|
125
|
-
window.addEventListener('resize', this.androidFix)
|
|
126
|
-
},
|
|
127
|
-
beforeDestroy() {
|
|
128
|
-
document.removeEventListener('keydown', this.handleKeydown)
|
|
129
|
-
window.removeEventListener('resize', this.androidFix)
|
|
130
|
-
document.body.style.overflow = ''
|
|
131
|
-
},
|
|
132
|
-
methods: {
|
|
133
|
-
close() {
|
|
134
|
-
this.$emit('update:modelValue', false)
|
|
135
|
-
this.$emit('close')
|
|
136
|
-
},
|
|
137
|
-
handleKeydown(e) {
|
|
138
|
-
if (e.key === 'Escape' && this.closeOnEsc && this.modelValue) {
|
|
139
|
-
this.close()
|
|
140
|
-
}
|
|
141
|
-
if (e.key === 'Enter' && this.modelValue) {
|
|
142
|
-
this.$emit('save')
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
// Touch handling for iOS swipe back
|
|
146
|
-
handleTouchStart(e) {
|
|
147
|
-
if (e.touches[0].clientX < 35) {
|
|
148
|
-
this.touchStartX = e.touches[0].clientX
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
handleTouchEnd(e) {
|
|
152
|
-
if (this.touchStartX > 0 && this.touchStartX < 35) {
|
|
153
|
-
const touchEndX = e.changedTouches[0].clientX
|
|
154
|
-
if (touchEndX - this.touchStartX > 50) {
|
|
155
|
-
this.close()
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
this.touchStartX = 0
|
|
159
|
-
},
|
|
160
|
-
// Android notch fix
|
|
161
|
-
androidFix() {
|
|
162
|
-
if (!this.isAndroid || !this.$refs.dialogContent) return
|
|
163
|
-
|
|
164
|
-
try {
|
|
165
|
-
if (typeof Android !== 'undefined' && Android.getDisplayCutoutTop) {
|
|
166
|
-
const cutoutTop = Android.getDisplayCutoutTop()
|
|
167
|
-
if (cutoutTop && window.devicePixelRatio > 1.0) {
|
|
168
|
-
const paddingTop = cutoutTop / window.devicePixelRatio
|
|
169
|
-
this.$refs.dialogContent.style.paddingTop = paddingTop + 'px'
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
} catch (err) {
|
|
173
|
-
// Android interface not available
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
</script>
|
|
179
|
-
|
|
180
|
-
<style>
|
|
181
|
-
/* Global styles (не scoped через баг з Teleport) */
|
|
182
|
-
.sky-dialogbox-next {
|
|
183
|
-
display: block;
|
|
184
|
-
position: fixed;
|
|
185
|
-
padding: 0;
|
|
186
|
-
top: 0;
|
|
187
|
-
left: 0;
|
|
188
|
-
width: 100%;
|
|
189
|
-
height: 100%;
|
|
190
|
-
z-index: var(--sky-dialog-z-index, 9998);
|
|
191
|
-
background: rgba(0, 0, 0, 0.6);
|
|
192
|
-
backdrop-filter: blur(2px);
|
|
193
|
-
}
|
|
194
|
-
</style>
|
|
195
|
-
|
|
196
|
-
<style scoped>
|
|
197
|
-
.sky-dialog-overlay {
|
|
198
|
-
display: flex;
|
|
199
|
-
justify-content: center;
|
|
200
|
-
align-items: center;
|
|
201
|
-
position: fixed;
|
|
202
|
-
padding: 0;
|
|
203
|
-
top: 0;
|
|
204
|
-
left: 0;
|
|
205
|
-
width: 100%;
|
|
206
|
-
height: 100%;
|
|
207
|
-
z-index: 9999;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.sky-dialog-content {
|
|
211
|
-
background: var(--sky-dialog-bg, white);
|
|
212
|
-
width: 100%;
|
|
213
|
-
height: 100%;
|
|
214
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
215
|
-
display: flex;
|
|
216
|
-
flex-direction: column;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.sky-dialog-header {
|
|
220
|
-
display: flex;
|
|
221
|
-
align-items: center;
|
|
222
|
-
padding: 10px 14px;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.sky-dialog-back {
|
|
226
|
-
display: flex;
|
|
227
|
-
align-items: center;
|
|
228
|
-
justify-content: center;
|
|
229
|
-
width: 32px;
|
|
230
|
-
height: 32px;
|
|
231
|
-
padding: 0;
|
|
232
|
-
background: transparent;
|
|
233
|
-
border: none;
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
border-radius: 6px;
|
|
236
|
-
color: var(--sky-dialog-back-color, #374151);
|
|
237
|
-
transition: background-color 0.2s;
|
|
238
|
-
margin-right: 12px;
|
|
239
|
-
flex-shrink: 0;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.sky-dialog-back svg {
|
|
243
|
-
display: block;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.sky-dialog-back:hover {
|
|
247
|
-
background-color: var(--sky-dialog-back-hover-bg, #f8f9fa);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.sky-dialog-back:active {
|
|
251
|
-
background-color: var(--sky-dialog-back-active-bg, #e9ecef);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.sky-dialog-title {
|
|
255
|
-
font-size: var(--sky-dialog-title-size, 13pt);
|
|
256
|
-
white-space: nowrap;
|
|
257
|
-
overflow: hidden;
|
|
258
|
-
text-overflow: ellipsis;
|
|
259
|
-
color: var(--sky-dialog-title-color, #252525);
|
|
260
|
-
min-width: 0;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.sky-dialog-title-with-subtitle {
|
|
264
|
-
line-height: 1.2;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.sky-dialog-subtitle {
|
|
268
|
-
display: block;
|
|
269
|
-
font-size: var(--sky-dialog-subtitle-size, 12pt);
|
|
270
|
-
line-height: 24px;
|
|
271
|
-
color: var(--sky-dialog-subtitle-color, #6c757d);
|
|
272
|
-
white-space: nowrap;
|
|
273
|
-
overflow: hidden;
|
|
274
|
-
text-overflow: ellipsis;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
.sky-dialog-paper {
|
|
279
|
-
flex: 1;
|
|
280
|
-
overflow-y: auto;
|
|
281
|
-
overflow-x: hidden;
|
|
282
|
-
-webkit-overflow-scrolling: touch;
|
|
283
|
-
position: relative;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.sky-dialog-swipe-area {
|
|
287
|
-
position: absolute;
|
|
288
|
-
width: 35px;
|
|
289
|
-
height: 100%;
|
|
290
|
-
left: 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.sky-dialog-footer {
|
|
294
|
-
padding: 5px 10px;
|
|
295
|
-
display: flex;
|
|
296
|
-
justify-content: center;
|
|
297
|
-
width: 100%;
|
|
298
|
-
flex-shrink: 0;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.sky-dialog-footer > * + * {
|
|
302
|
-
margin-left: 10px;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/* Кнопки в футері: 1 = 100%, 2 = по 50% */
|
|
306
|
-
.sky-dialog-footer > :deep(*) {
|
|
307
|
-
flex: 1;
|
|
308
|
-
min-width: 0;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.sky-dialog-footer:has(> :deep(*:only-child)) > :deep(*) {
|
|
312
|
-
max-width: 100%;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.sky-dialog-footer:has(> :deep(*:nth-child(2)):not(:has(> :deep(*:nth-child(3))))) > :deep(*) {
|
|
316
|
-
flex: 1 1 50%;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/* Desktop */
|
|
320
|
-
@media only screen and (min-width: 1400px) {
|
|
321
|
-
.sky-dialog-content {
|
|
322
|
-
width: 100%;
|
|
323
|
-
margin: 0 auto;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/* Tablet and Desktop */
|
|
328
|
-
@media screen and (min-width: 710px) {
|
|
329
|
-
.sky-dialog-paper {
|
|
330
|
-
background-color: #fff;
|
|
331
|
-
margin: 0 10px 10px 10px;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/* Mobile */
|
|
336
|
-
@media screen and (max-width: 709px) {
|
|
337
|
-
.sky-dialog-paper {
|
|
338
|
-
background-color: #fff;
|
|
339
|
-
margin: 0 10px 10px 10px;
|
|
340
|
-
max-width: 100vw !important;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
@media screen and (max-width: 500px) {
|
|
345
|
-
.sky-dialog-subtitle {
|
|
346
|
-
display: block;
|
|
347
|
-
white-space: nowrap;
|
|
348
|
-
overflow: hidden;
|
|
349
|
-
text-overflow: ellipsis;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.sky-dialog-title-with-subtitle {
|
|
353
|
-
padding: 12px 24px !important;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
@media screen and (max-width: 374px) {
|
|
358
|
-
.sky-dialog-subtitle {
|
|
359
|
-
font-size: 9pt;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/* iPhone safe area support */
|
|
364
|
-
@supports (padding-top: env(safe-area-inset-top)) {
|
|
365
|
-
.sky-dialog-footer {
|
|
366
|
-
padding-bottom: calc(env(safe-area-inset-bottom) + 5px);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/* iOS safe area */
|
|
371
|
-
@supports (padding-top: env(safe-area-inset-top)) {
|
|
372
|
-
.sky-dialog-header {
|
|
373
|
-
padding-top: calc(10px + env(safe-area-inset-top));
|
|
374
|
-
}
|
|
375
|
-
.sky-dialog-paper {
|
|
376
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
</style>
|