@ldmjs/ui 1.0.50 → 1.0.51
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/dist/css/index.css +2 -2
- package/dist/index.js +349 -410
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3074,26 +3074,22 @@ function ld_edit_text_reg(vue, options) {
|
|
|
3074
3074
|
}
|
|
3075
3075
|
/* harmony default export */ const src_ld_edit_text = (ld_edit_text_reg);
|
|
3076
3076
|
|
|
3077
|
-
;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-datepicker/ld-datepicker.vue?vue&type=template&id=
|
|
3077
|
+
;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-datepicker/ld-datepicker.vue?vue&type=template&id=34ba51af&scoped=true
|
|
3078
3078
|
|
|
3079
3079
|
|
|
3080
|
-
const
|
|
3081
|
-
const ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_2 = { key: 0 }
|
|
3082
|
-
const ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_3 = { key: 1 }
|
|
3083
|
-
const ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_4 = {
|
|
3080
|
+
const ld_datepickervue_type_template_id_34ba51af_scoped_true_hoisted_1 = {
|
|
3084
3081
|
key: 1,
|
|
3085
3082
|
class: "w-100",
|
|
3086
3083
|
style: {"position":"relative"}
|
|
3087
3084
|
}
|
|
3088
3085
|
|
|
3089
|
-
function
|
|
3086
|
+
function ld_datepickervue_type_template_id_34ba51af_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3090
3087
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label")
|
|
3091
3088
|
const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon")
|
|
3092
3089
|
const _component_square_button = (0,external_vue_.resolveComponent)("square-button")
|
|
3093
3090
|
const _component_datepicker = (0,external_vue_.resolveComponent)("datepicker")
|
|
3094
3091
|
const _component_v_menu = (0,external_vue_.resolveComponent)("v-menu")
|
|
3095
3092
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col")
|
|
3096
|
-
const _component_v_card = (0,external_vue_.resolveComponent)("v-card")
|
|
3097
3093
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row")
|
|
3098
3094
|
const _component_v_container = (0,external_vue_.resolveComponent)("v-container")
|
|
3099
3095
|
|
|
@@ -3110,7 +3106,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3110
3106
|
"align-label-to-right": _ctx.alignLabelToRight
|
|
3111
3107
|
}, null, 8, ["class", "label", "required", "align-label-to-right"]))
|
|
3112
3108
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
3113
|
-
_cache[
|
|
3109
|
+
_cache[15] || (_cache[15] = (0,external_vue_.createTextVNode)()),
|
|
3114
3110
|
(0,external_vue_.createVNode)(_component_v_col, {
|
|
3115
3111
|
class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
|
|
3116
3112
|
}, {
|
|
@@ -3147,7 +3143,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3147
3143
|
onFocus: _ctx.onInputDateFocus,
|
|
3148
3144
|
onEnter: _ctx.onInputDateEnter
|
|
3149
3145
|
}, null, 40, ["model-value", "id", "placeholder", "disabled", "tabindex", "autofocus", "onFocus", "onEnter"])),
|
|
3150
|
-
_cache[
|
|
3146
|
+
_cache[5] || (_cache[5] = (0,external_vue_.createTextVNode)()),
|
|
3151
3147
|
(_ctx.canClear && !_ctx.disabled && !_ctx.readonly)
|
|
3152
3148
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
3153
3149
|
key: 0,
|
|
@@ -3161,7 +3157,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3161
3157
|
}, {
|
|
3162
3158
|
default: (0,external_vue_.withCtx)(() => [
|
|
3163
3159
|
(0,external_vue_.createVNode)(_component_ld_icon, null, {
|
|
3164
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
3160
|
+
default: (0,external_vue_.withCtx)(() => _cache[3] || (_cache[3] = [
|
|
3165
3161
|
(0,external_vue_.createTextVNode)("close")
|
|
3166
3162
|
])),
|
|
3167
3163
|
_: 1
|
|
@@ -3170,7 +3166,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3170
3166
|
_: 1
|
|
3171
3167
|
}, 8, ["style", "onClick"]))
|
|
3172
3168
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
3173
|
-
_cache[
|
|
3169
|
+
_cache[6] || (_cache[6] = (0,external_vue_.createTextVNode)()),
|
|
3174
3170
|
(_ctx.showDatePicker)
|
|
3175
3171
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
3176
3172
|
key: 1,
|
|
@@ -3183,7 +3179,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3183
3179
|
(0,external_vue_.createVNode)(_component_ld_icon, {
|
|
3184
3180
|
color: _ctx.dateMenu ? 'primary' : undefined
|
|
3185
3181
|
}, {
|
|
3186
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
3182
|
+
default: (0,external_vue_.withCtx)(() => _cache[4] || (_cache[4] = [
|
|
3187
3183
|
(0,external_vue_.createTextVNode)("event")
|
|
3188
3184
|
])),
|
|
3189
3185
|
_: 1
|
|
@@ -3195,7 +3191,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3195
3191
|
], 16)
|
|
3196
3192
|
]),
|
|
3197
3193
|
default: (0,external_vue_.withCtx)(() => [
|
|
3198
|
-
_cache[
|
|
3194
|
+
_cache[10] || (_cache[10] = (0,external_vue_.createTextVNode)()),
|
|
3199
3195
|
(0,external_vue_.createVNode)(_component_datepicker, {
|
|
3200
3196
|
mode: "date",
|
|
3201
3197
|
is24hr: "",
|
|
@@ -3219,7 +3215,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3219
3215
|
"header-prev-button": (0,external_vue_.withCtx)(() => [
|
|
3220
3216
|
(0,external_vue_.renderSlot)(_ctx.$slots, "header-prev-button", {}, () => [
|
|
3221
3217
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
3222
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
3218
|
+
default: (0,external_vue_.withCtx)(() => _cache[7] || (_cache[7] = [
|
|
3223
3219
|
(0,external_vue_.createTextVNode)("\r\n keyboard_arrow_left\r\n ")
|
|
3224
3220
|
])),
|
|
3225
3221
|
_: 1
|
|
@@ -3229,7 +3225,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3229
3225
|
"header-next-button": (0,external_vue_.withCtx)(() => [
|
|
3230
3226
|
(0,external_vue_.renderSlot)(_ctx.$slots, "header-next-button", {}, () => [
|
|
3231
3227
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
3232
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
3228
|
+
default: (0,external_vue_.withCtx)(() => _cache[8] || (_cache[8] = [
|
|
3233
3229
|
(0,external_vue_.createTextVNode)("\r\n keyboard_arrow_right\r\n ")
|
|
3234
3230
|
])),
|
|
3235
3231
|
_: 1
|
|
@@ -3244,7 +3240,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3244
3240
|
]),
|
|
3245
3241
|
_: 3
|
|
3246
3242
|
}),
|
|
3247
|
-
_cache[
|
|
3243
|
+
_cache[13] || (_cache[13] = (0,external_vue_.createTextVNode)()),
|
|
3248
3244
|
(!_ctx.dateonly)
|
|
3249
3245
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_col, {
|
|
3250
3246
|
key: 0,
|
|
@@ -3253,143 +3249,27 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3253
3249
|
}, {
|
|
3254
3250
|
default: (0,external_vue_.withCtx)(() => [
|
|
3255
3251
|
(!_ctx.readonly && !_ctx.disabled)
|
|
3256
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(
|
|
3252
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-timepicker']), {
|
|
3257
3253
|
key: 0,
|
|
3258
|
-
|
|
3259
|
-
"
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
ref: "inputTime",
|
|
3269
|
-
id: _ctx.inputTimeId,
|
|
3270
|
-
"model-value": _ctx.timeString,
|
|
3271
|
-
style: (0,external_vue_.normalizeStyle)({
|
|
3272
|
-
color: _ctx.timeString ? 'var(--text)' : 'var(--grey-l-2)',
|
|
3273
|
-
}),
|
|
3274
|
-
class: "w-100",
|
|
3275
|
-
"hide-details": "",
|
|
3276
|
-
tabindex: _ctx.timeTabIndex,
|
|
3277
|
-
disabled: _ctx.isDateEmpty,
|
|
3278
|
-
placeholder: _ctx.placeholderTimepicker,
|
|
3279
|
-
readonly: _ctx.isMobileGlobal,
|
|
3280
|
-
onFocus: _ctx.onInputTimeFocus
|
|
3281
|
-
}, null, 40, ["id", "model-value", "style", "tabindex", "disabled", "placeholder", "readonly", "onFocus"])),
|
|
3282
|
-
_cache[15] || (_cache[15] = (0,external_vue_.createTextVNode)()),
|
|
3283
|
-
(_ctx.canClear && !_ctx.disabled && !_ctx.readonly)
|
|
3284
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
3285
|
-
key: 0,
|
|
3286
|
-
icon: "",
|
|
3287
|
-
style: {"position":"absolute","top":"0","right":"calc(var(--input-height) - 4px)"},
|
|
3288
|
-
disabled: _ctx.isDateEmpty,
|
|
3289
|
-
onClick: (0,external_vue_.withModifiers)(_ctx.clearTimeValue, ["stop"])
|
|
3290
|
-
}, {
|
|
3291
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3292
|
-
(0,external_vue_.createVNode)(_component_ld_icon, null, {
|
|
3293
|
-
default: (0,external_vue_.withCtx)(() => _cache[13] || (_cache[13] = [
|
|
3294
|
-
(0,external_vue_.createTextVNode)("close")
|
|
3295
|
-
])),
|
|
3296
|
-
_: 1
|
|
3297
|
-
})
|
|
3298
|
-
]),
|
|
3299
|
-
_: 1
|
|
3300
|
-
}, 8, ["disabled", "onClick"]))
|
|
3301
|
-
: (0,external_vue_.createCommentVNode)("", true),
|
|
3302
|
-
_cache[16] || (_cache[16] = (0,external_vue_.createTextVNode)()),
|
|
3303
|
-
(0,external_vue_.createVNode)(_component_square_button, {
|
|
3304
|
-
icon: "",
|
|
3305
|
-
style: {"position":"absolute","top":"0","right":"0"},
|
|
3306
|
-
disabled: _ctx.isDateEmpty,
|
|
3307
|
-
onClick: _cache[2] || (_cache[2] = (0,external_vue_.withModifiers)($event => (_ctx.timeMenu = !_ctx.timeMenu), ["stop"]))
|
|
3308
|
-
}, {
|
|
3309
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3310
|
-
(0,external_vue_.createVNode)(_component_ld_icon, {
|
|
3311
|
-
color: _ctx.timeMenu ? 'primary' : undefined
|
|
3312
|
-
}, {
|
|
3313
|
-
default: (0,external_vue_.withCtx)(() => _cache[14] || (_cache[14] = [
|
|
3314
|
-
(0,external_vue_.createTextVNode)("access_time")
|
|
3315
|
-
])),
|
|
3316
|
-
_: 1
|
|
3317
|
-
}, 8, ["color"])
|
|
3318
|
-
]),
|
|
3319
|
-
_: 1
|
|
3320
|
-
}, 8, ["disabled"])
|
|
3321
|
-
], 16)
|
|
3322
|
-
]),
|
|
3323
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3324
|
-
_cache[20] || (_cache[20] = (0,external_vue_.createTextVNode)()),
|
|
3325
|
-
(0,external_vue_.createVNode)(_component_v_card, {
|
|
3326
|
-
elevation: "0",
|
|
3327
|
-
style: {"border":"1px solid var(--grey-l-5)"}
|
|
3328
|
-
}, {
|
|
3329
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3330
|
-
(0,external_vue_.createElementVNode)("div", ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_1, [
|
|
3331
|
-
(_ctx.isHours)
|
|
3332
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_2, (0,external_vue_.toDisplayString)(_ctx.$ldmuii18n.gettext('Hours')), 1))
|
|
3333
|
-
: (0,external_vue_.createCommentVNode)("", true),
|
|
3334
|
-
_cache[18] || (_cache[18] = (0,external_vue_.createTextVNode)()),
|
|
3335
|
-
(_ctx.isMinutes)
|
|
3336
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$ldmuii18n.gettext('Minutes')), 1))
|
|
3337
|
-
: (0,external_vue_.createCommentVNode)("", true),
|
|
3338
|
-
_cache[19] || (_cache[19] = (0,external_vue_.createTextVNode)()),
|
|
3339
|
-
(0,external_vue_.createElementVNode)("div", null, [
|
|
3340
|
-
(_ctx.isHours)
|
|
3341
|
-
? ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, { key: 0 }, (0,external_vue_.renderList)(Array.apply(null, { length: 24 }), (_, i) => {
|
|
3342
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
3343
|
-
key: i,
|
|
3344
|
-
variant: "outlined",
|
|
3345
|
-
color: i === _ctx.hours ? 'primary' : 'grey',
|
|
3346
|
-
onClick: $event => (_ctx.changeHours(i))
|
|
3347
|
-
}, {
|
|
3348
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3349
|
-
(0,external_vue_.createElementVNode)("span", {
|
|
3350
|
-
class: (0,external_vue_.normalizeClass)({ 'text-color': i !== _ctx.hours })
|
|
3351
|
-
}, (0,external_vue_.toDisplayString)(('0' + i).slice(-2)), 3)
|
|
3352
|
-
]),
|
|
3353
|
-
_: 2
|
|
3354
|
-
}, 1032, ["color", "onClick"]))
|
|
3355
|
-
}), 128))
|
|
3356
|
-
: (0,external_vue_.createCommentVNode)("", true),
|
|
3357
|
-
_cache[17] || (_cache[17] = (0,external_vue_.createTextVNode)()),
|
|
3358
|
-
(_ctx.isMinutes)
|
|
3359
|
-
? ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, { key: 1 }, (0,external_vue_.renderList)(Array.apply(null, { length: 12 }), (_, i) => {
|
|
3360
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
3361
|
-
key: i,
|
|
3362
|
-
variant: "outlined",
|
|
3363
|
-
color: i === _ctx.minuts ? 'primary' : 'grey',
|
|
3364
|
-
onClick: $event => (_ctx.changeMinutes(i))
|
|
3365
|
-
}, {
|
|
3366
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
3367
|
-
(0,external_vue_.createElementVNode)("span", {
|
|
3368
|
-
class: (0,external_vue_.normalizeClass)({ 'text-color': i !== _ctx.minuts })
|
|
3369
|
-
}, (0,external_vue_.toDisplayString)(('0' + 5 * i).slice(-2)), 3)
|
|
3370
|
-
]),
|
|
3371
|
-
_: 2
|
|
3372
|
-
}, 1032, ["color", "onClick"]))
|
|
3373
|
-
}), 128))
|
|
3374
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
3375
|
-
])
|
|
3376
|
-
])
|
|
3377
|
-
]),
|
|
3378
|
-
_: 1
|
|
3379
|
-
})
|
|
3380
|
-
]),
|
|
3381
|
-
_: 1
|
|
3382
|
-
}, 8, ["modelValue", "disabled"]))
|
|
3383
|
-
: ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_hoisted_4, [
|
|
3254
|
+
id: _ctx.inputTimeId,
|
|
3255
|
+
"model-value": _ctx.timeString,
|
|
3256
|
+
placeholder: _ctx.placeholderTimepicker,
|
|
3257
|
+
tabindex: _ctx.timeTabIndex,
|
|
3258
|
+
disabled: _ctx.isDateEmpty,
|
|
3259
|
+
readonly: _ctx.isMobileGlobal,
|
|
3260
|
+
"hide-details": "",
|
|
3261
|
+
"onUpdate:modelValue": _ctx.onSelectTime
|
|
3262
|
+
}, null, 8, ["id", "model-value", "placeholder", "tabindex", "disabled", "readonly", "onUpdate:modelValue"]))
|
|
3263
|
+
: ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_datepickervue_type_template_id_34ba51af_scoped_true_hoisted_1, [
|
|
3384
3264
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-edit-text']), {
|
|
3385
3265
|
modelValue: _ctx.timeString,
|
|
3386
|
-
"onUpdate:modelValue": _cache[
|
|
3266
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((_ctx.timeString) = $event)),
|
|
3387
3267
|
placeholder: _ctx.placeholderTimepicker,
|
|
3388
3268
|
"hide-details": "",
|
|
3389
3269
|
readonly: "",
|
|
3390
3270
|
disabled: ""
|
|
3391
3271
|
}, null, 8, ["modelValue", "placeholder"])),
|
|
3392
|
-
_cache[
|
|
3272
|
+
_cache[12] || (_cache[12] = (0,external_vue_.createTextVNode)()),
|
|
3393
3273
|
(0,external_vue_.createVNode)(_component_square_button, {
|
|
3394
3274
|
icon: "",
|
|
3395
3275
|
disabled: true,
|
|
@@ -3397,7 +3277,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3397
3277
|
}, {
|
|
3398
3278
|
default: (0,external_vue_.withCtx)(() => [
|
|
3399
3279
|
(0,external_vue_.createVNode)(_component_ld_icon, null, {
|
|
3400
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
3280
|
+
default: (0,external_vue_.withCtx)(() => _cache[11] || (_cache[11] = [
|
|
3401
3281
|
(0,external_vue_.createTextVNode)("access_time")
|
|
3402
3282
|
])),
|
|
3403
3283
|
_: 1
|
|
@@ -3413,7 +3293,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3413
3293
|
]),
|
|
3414
3294
|
_: 3
|
|
3415
3295
|
}),
|
|
3416
|
-
_cache[
|
|
3296
|
+
_cache[14] || (_cache[14] = (0,external_vue_.createTextVNode)()),
|
|
3417
3297
|
(!_ctx.hideDetails)
|
|
3418
3298
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_row, {
|
|
3419
3299
|
key: 0,
|
|
@@ -3449,7 +3329,7 @@ function ld_datepickervue_type_template_id_4c7e7aa5_scoped_true_render(_ctx, _ca
|
|
|
3449
3329
|
_: 3
|
|
3450
3330
|
}))
|
|
3451
3331
|
}
|
|
3452
|
-
;// ./src/ld-datepicker/ld-datepicker.vue?vue&type=template&id=
|
|
3332
|
+
;// ./src/ld-datepicker/ld-datepicker.vue?vue&type=template&id=34ba51af&scoped=true
|
|
3453
3333
|
|
|
3454
3334
|
;// ./node_modules/imask/esm/core/utils.js
|
|
3455
3335
|
/** Checks if value is string */
|
|
@@ -7316,22 +7196,35 @@ try {
|
|
|
7316
7196
|
var calendar_js_ = __webpack_require__(8766);
|
|
7317
7197
|
var calendar_js_default = /*#__PURE__*/__webpack_require__.n(calendar_js_);
|
|
7318
7198
|
;// ./src/utils/datetime.ts
|
|
7319
|
-
function
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7199
|
+
function parseDate(value, locale = 'ru') {
|
|
7200
|
+
let parsed = null;
|
|
7201
|
+
if (locale === 'ru') {
|
|
7202
|
+
parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
7203
|
+
}
|
|
7204
|
+
if (locale === 'en') {
|
|
7205
|
+
parsed = /^(\d\d?)\/(\d\d?)\/(\d\d\d?\d?)$/.exec(value);
|
|
7206
|
+
}
|
|
7207
|
+
const beautify = (value) => value.length === 1 ? '0' + value : value;
|
|
7208
|
+
const result = {
|
|
7209
|
+
d: null,
|
|
7210
|
+
m: null,
|
|
7211
|
+
y: null
|
|
7212
|
+
};
|
|
7324
7213
|
if (parsed[1]) {
|
|
7325
|
-
|
|
7214
|
+
result[locale === 'ru' ? 'd' : 'm'] = beautify(parsed[1]);
|
|
7326
7215
|
}
|
|
7327
7216
|
if (parsed[2]) {
|
|
7328
|
-
|
|
7217
|
+
result[locale === 'ru' ? 'm' : 'd'] = beautify(parsed[2]);
|
|
7329
7218
|
}
|
|
7330
7219
|
if (parsed[3]) {
|
|
7331
|
-
|
|
7220
|
+
result['y'] = parsed[3];
|
|
7332
7221
|
}
|
|
7333
|
-
|
|
7334
|
-
|
|
7222
|
+
return result;
|
|
7223
|
+
}
|
|
7224
|
+
function dateLocalToISO(value, locale = 'ru') {
|
|
7225
|
+
const { d, m, y } = parseDate(value);
|
|
7226
|
+
if (d && m && y) {
|
|
7227
|
+
return `${y}-${m}-${d}`;
|
|
7335
7228
|
}
|
|
7336
7229
|
return '';
|
|
7337
7230
|
}
|
|
@@ -7390,7 +7283,8 @@ function compare(a, b) {
|
|
|
7390
7283
|
const datetime = {
|
|
7391
7284
|
dateLocalToISO,
|
|
7392
7285
|
toServerString,
|
|
7393
|
-
compare
|
|
7286
|
+
compare,
|
|
7287
|
+
parseDate
|
|
7394
7288
|
};
|
|
7395
7289
|
|
|
7396
7290
|
|
|
@@ -7422,8 +7316,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7422
7316
|
constructor() {
|
|
7423
7317
|
super(...arguments);
|
|
7424
7318
|
this.date = null;
|
|
7425
|
-
this.hours = null;
|
|
7426
|
-
this.minuts = null;
|
|
7427
7319
|
this.currentYear = new Date().getUTCFullYear();
|
|
7428
7320
|
this.currentMonth = new Date().getUTCMonth() + 1;
|
|
7429
7321
|
this.dateString = null;
|
|
@@ -7431,9 +7323,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7431
7323
|
this.defaultHour = '09';
|
|
7432
7324
|
this.defaultMinuts = '00';
|
|
7433
7325
|
this.dateMask = null;
|
|
7434
|
-
this.timeMask = null;
|
|
7435
7326
|
this.dateMenu = false;
|
|
7436
|
-
this.timeMenu = false;
|
|
7437
7327
|
this.event = null;
|
|
7438
7328
|
this.errorsHandler = [];
|
|
7439
7329
|
this.isHours = true;
|
|
@@ -7461,17 +7351,18 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7461
7351
|
}
|
|
7462
7352
|
else {
|
|
7463
7353
|
this.date = new Date(newVal);
|
|
7464
|
-
this.dateString = datetime.dateLocalToISO(this.date.toLocaleDateString(this.locale));
|
|
7354
|
+
this.dateString = datetime.dateLocalToISO(this.date.toLocaleDateString(this.locale), this.locale);
|
|
7465
7355
|
}
|
|
7466
7356
|
if (this.date) {
|
|
7467
7357
|
const inputEl = this.$refs.inputDate;
|
|
7468
7358
|
if (inputEl) {
|
|
7469
7359
|
inputEl.value = this.formattedDate;
|
|
7360
|
+
this.dateMask.updateValue();
|
|
7470
7361
|
}
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7362
|
+
let hours = String(this.date.getHours());
|
|
7363
|
+
let minuts = String(this.date.getMinutes());
|
|
7364
|
+
hours = ('0' + hours).slice(-2);
|
|
7365
|
+
minuts = ('0' + minuts).slice(-2);
|
|
7475
7366
|
this.timeString = `${hours}:${minuts}`;
|
|
7476
7367
|
}
|
|
7477
7368
|
else {
|
|
@@ -7480,22 +7371,8 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7480
7371
|
}
|
|
7481
7372
|
setTimeout(() => {
|
|
7482
7373
|
this.dateMask.updateValue();
|
|
7483
|
-
if (this.timeMask) {
|
|
7484
|
-
this.timeMask.updateValue();
|
|
7485
|
-
}
|
|
7486
|
-
if (!this.isMobileGlobal) {
|
|
7487
|
-
const inputTimeEl = this.$refs.inputTime;
|
|
7488
|
-
if (inputTimeEl && inputTimeEl.value !== this.timeString) {
|
|
7489
|
-
inputTimeEl.value = this.timeString;
|
|
7490
|
-
}
|
|
7491
|
-
}
|
|
7492
7374
|
}, 100);
|
|
7493
7375
|
}
|
|
7494
|
-
onDateonlyChanged() {
|
|
7495
|
-
if (!this.dateonly) {
|
|
7496
|
-
this.setTimeMask();
|
|
7497
|
-
}
|
|
7498
|
-
}
|
|
7499
7376
|
onMinDateChanged(newVal) {
|
|
7500
7377
|
if (!newVal) {
|
|
7501
7378
|
this.currentMinDate = null;
|
|
@@ -7536,12 +7413,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7536
7413
|
}
|
|
7537
7414
|
this.dateMask.updateOptions({ max: newVal });
|
|
7538
7415
|
}
|
|
7539
|
-
onTimeMenuChanged() {
|
|
7540
|
-
if (!this.timeMenu) {
|
|
7541
|
-
this.isHours = true;
|
|
7542
|
-
this.isMinutes = false;
|
|
7543
|
-
}
|
|
7544
|
-
}
|
|
7545
7416
|
created() {
|
|
7546
7417
|
this.dateMaskPromise = new Promise(resolve => {
|
|
7547
7418
|
this.dateMaskPromiseResolve = resolve;
|
|
@@ -7550,12 +7421,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7550
7421
|
this.form.register(this, null);
|
|
7551
7422
|
}
|
|
7552
7423
|
}
|
|
7553
|
-
unmounted() {
|
|
7554
|
-
window.removeEventListener('wheel', this.datepickerScrollHandler);
|
|
7555
|
-
if (this.form) {
|
|
7556
|
-
this.form.unregister(this, null);
|
|
7557
|
-
}
|
|
7558
|
-
}
|
|
7559
7424
|
mounted() {
|
|
7560
7425
|
this.datepickerScrollHandler = this.datepickerScroll.bind(this);
|
|
7561
7426
|
window.addEventListener('wheel', this.datepickerScrollHandler);
|
|
@@ -7565,10 +7430,9 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7565
7430
|
if (inputEl) {
|
|
7566
7431
|
inputEl.value = this.formattedDate;
|
|
7567
7432
|
const options = {
|
|
7433
|
+
pattern: this.localeRu ? 'd.m.Y' : 'm/d/Y',
|
|
7568
7434
|
mask: Date,
|
|
7569
7435
|
lazy: true,
|
|
7570
|
-
overwrite: true,
|
|
7571
|
-
autofix: true,
|
|
7572
7436
|
blocks: {
|
|
7573
7437
|
d: {
|
|
7574
7438
|
mask: IMask.MaskedRange,
|
|
@@ -7586,9 +7450,14 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7586
7450
|
mask: IMask.MaskedRange,
|
|
7587
7451
|
from: 1900,
|
|
7588
7452
|
to: 2999,
|
|
7589
|
-
maxLength: 4,
|
|
7590
7453
|
},
|
|
7591
7454
|
},
|
|
7455
|
+
format: date => {
|
|
7456
|
+
return this.formattedDate;
|
|
7457
|
+
},
|
|
7458
|
+
parse: str => {
|
|
7459
|
+
return this.parseDate(str);
|
|
7460
|
+
},
|
|
7592
7461
|
min: null,
|
|
7593
7462
|
max: null,
|
|
7594
7463
|
};
|
|
@@ -7603,7 +7472,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7603
7472
|
this.dateMask._bindEvents();
|
|
7604
7473
|
this.dateMask.on('complete', () => this.onMaskedValueChanged(this.dateMask.value));
|
|
7605
7474
|
this.dateMaskPromiseResolve();
|
|
7606
|
-
this.
|
|
7475
|
+
this.dateMask.updateValue();
|
|
7607
7476
|
}
|
|
7608
7477
|
else {
|
|
7609
7478
|
throw new Error('Не найден элемент input для ввода даты');
|
|
@@ -7614,8 +7483,11 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7614
7483
|
if (this.dateMask) {
|
|
7615
7484
|
this.dateMask.off('complete', null);
|
|
7616
7485
|
}
|
|
7617
|
-
|
|
7618
|
-
|
|
7486
|
+
}
|
|
7487
|
+
unmounted() {
|
|
7488
|
+
window.removeEventListener('wheel', this.datepickerScrollHandler);
|
|
7489
|
+
if (this.form) {
|
|
7490
|
+
this.form.unregister(this, null);
|
|
7619
7491
|
}
|
|
7620
7492
|
}
|
|
7621
7493
|
// Позволяет менять месяцы в дейтпикере скроллом
|
|
@@ -7679,19 +7551,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7679
7551
|
}
|
|
7680
7552
|
}
|
|
7681
7553
|
}
|
|
7682
|
-
/**
|
|
7683
|
-
* обработчик события blur на input для ввода времени
|
|
7684
|
-
* @param e объект события
|
|
7685
|
-
*/
|
|
7686
|
-
onTimeMaskChange(e) {
|
|
7687
|
-
// проверим валидность ввода времени
|
|
7688
|
-
const value = e.target.value;
|
|
7689
|
-
const time = this.parseTime(value);
|
|
7690
|
-
if (time !== value) {
|
|
7691
|
-
this.timeString = time;
|
|
7692
|
-
e.target.value = time;
|
|
7693
|
-
}
|
|
7694
|
-
}
|
|
7695
7554
|
onMaskedValueChanged(value) {
|
|
7696
7555
|
if (!value) {
|
|
7697
7556
|
return;
|
|
@@ -7709,17 +7568,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7709
7568
|
this.dateMenu = false;
|
|
7710
7569
|
}, 100);
|
|
7711
7570
|
}
|
|
7712
|
-
onTimeMaskedValueChanged(value) {
|
|
7713
|
-
if (!this.dateString) {
|
|
7714
|
-
return;
|
|
7715
|
-
}
|
|
7716
|
-
const [hours = this.defaultHour, minutes = this.defaultMinuts] = value ? value.split(':') : [];
|
|
7717
|
-
const dt = new Date(this.dateString);
|
|
7718
|
-
dt.setHours(Number(hours));
|
|
7719
|
-
dt.setMinutes(Number(minutes));
|
|
7720
|
-
this.emitInput(dt);
|
|
7721
|
-
this.$nextTick(() => this.validate());
|
|
7722
|
-
}
|
|
7723
7571
|
onInputDateFocus(e) {
|
|
7724
7572
|
this.event = e;
|
|
7725
7573
|
}
|
|
@@ -7730,7 +7578,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7730
7578
|
if (this.timeString) {
|
|
7731
7579
|
d = this.addTimeToDate(d);
|
|
7732
7580
|
}
|
|
7733
|
-
const dt = datetime.dateLocalToISO(d.toLocaleDateString(this.locale));
|
|
7581
|
+
const dt = datetime.dateLocalToISO(d.toLocaleDateString(this.locale), this.locale);
|
|
7734
7582
|
this.onSelectDate(dt);
|
|
7735
7583
|
}
|
|
7736
7584
|
}
|
|
@@ -7744,53 +7592,29 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7744
7592
|
return;
|
|
7745
7593
|
}
|
|
7746
7594
|
this.dateMask.el.value = new Date(date).toLocaleDateString(this.locale);
|
|
7747
|
-
const d = this.minDate;
|
|
7748
|
-
// 1 Хак для https://github.com/uNmAnNeR/imaskjs/issues/100
|
|
7749
|
-
d?.setDate(d.getDate() - 1);
|
|
7750
|
-
// после этого вызова сработает onMaskedValueChanged
|
|
7751
7595
|
this.dateMenu = false;
|
|
7752
7596
|
this.onDateMaskChange(this.event);
|
|
7753
7597
|
this.event = null;
|
|
7754
|
-
// 2 Хак для https://github.com/uNmAnNeR/imaskjs/issues/100
|
|
7755
|
-
d?.setDate(d.getDate() + 1);
|
|
7756
7598
|
}
|
|
7757
|
-
|
|
7758
|
-
const h = ('0' + value).slice(-2);
|
|
7759
|
-
this.isHours = false;
|
|
7760
|
-
this.isMinutes = true;
|
|
7599
|
+
onSelectTime(value) {
|
|
7761
7600
|
if (!this.date) {
|
|
7762
7601
|
this.date = new Date();
|
|
7763
7602
|
}
|
|
7764
7603
|
const dt = new Date(this.date);
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
changeMinutes(value) {
|
|
7772
|
-
const m = ('0' + 5 * value).slice(-2);
|
|
7773
|
-
this.timeMenu = false;
|
|
7774
|
-
this.isHours = true;
|
|
7775
|
-
this.isMinutes = false;
|
|
7776
|
-
if (!this.date) {
|
|
7777
|
-
this.date = new Date();
|
|
7604
|
+
if (!value) {
|
|
7605
|
+
dt.setHours(0);
|
|
7606
|
+
dt.setMinutes(0);
|
|
7607
|
+
dt.setSeconds(0);
|
|
7608
|
+
this.emitInput(dt);
|
|
7609
|
+
return;
|
|
7778
7610
|
}
|
|
7779
|
-
const
|
|
7780
|
-
const
|
|
7781
|
-
dt.setHours(Number(
|
|
7611
|
+
const h = value ? value.split(':')[0] : this.defaultHour;
|
|
7612
|
+
const m = value ? value.split(':')[1] : this.defaultMinuts;
|
|
7613
|
+
dt.setHours(Number(h));
|
|
7782
7614
|
dt.setMinutes(Number(m));
|
|
7783
7615
|
dt.setSeconds(0);
|
|
7784
7616
|
this.emitInput(dt);
|
|
7785
7617
|
}
|
|
7786
|
-
onInputTimeFocus() {
|
|
7787
|
-
if (this.isMobileGlobal) {
|
|
7788
|
-
return;
|
|
7789
|
-
}
|
|
7790
|
-
if (!this.$refs.timeInput) {
|
|
7791
|
-
return;
|
|
7792
|
-
}
|
|
7793
|
-
}
|
|
7794
7618
|
onPickerClick(cb) {
|
|
7795
7619
|
if ((!this.disabled && !this.readonly) || !this.canClear) {
|
|
7796
7620
|
cb();
|
|
@@ -7800,31 +7624,15 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7800
7624
|
if (this.dateMask) {
|
|
7801
7625
|
this.dateMask.el.value = '';
|
|
7802
7626
|
}
|
|
7803
|
-
if (this.timeMask) {
|
|
7804
|
-
this.clearTimeValue();
|
|
7805
|
-
}
|
|
7806
7627
|
/**
|
|
7807
7628
|
* dateString сбросим к текущей дате, чтобы календарь переключился на нее
|
|
7808
7629
|
* date ставим null, чтобы обнулить модель
|
|
7809
7630
|
*/
|
|
7810
|
-
this.dateString = datetime.dateLocalToISO(new Date().toLocaleDateString(this.locale));
|
|
7631
|
+
this.dateString = datetime.dateLocalToISO(new Date().toLocaleDateString(this.locale), this.locale);
|
|
7811
7632
|
this.date = null;
|
|
7812
7633
|
this.emitUpdateModelValue(null);
|
|
7813
7634
|
this.validate();
|
|
7814
7635
|
}
|
|
7815
|
-
clearTimeValue() {
|
|
7816
|
-
if (this.isMobileGlobal) {
|
|
7817
|
-
this.timeMask.el.value = '';
|
|
7818
|
-
}
|
|
7819
|
-
if (!this.date) {
|
|
7820
|
-
this.date = new Date();
|
|
7821
|
-
}
|
|
7822
|
-
const dt = new Date(this.date);
|
|
7823
|
-
dt.setHours(0);
|
|
7824
|
-
dt.setMinutes(0);
|
|
7825
|
-
dt.setSeconds(0);
|
|
7826
|
-
this.emitInput(dt);
|
|
7827
|
-
}
|
|
7828
7636
|
validate() {
|
|
7829
7637
|
let funcResult = null;
|
|
7830
7638
|
this.validationMessage = '';
|
|
@@ -7836,44 +7644,6 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7836
7644
|
});
|
|
7837
7645
|
return !this.validationMessage;
|
|
7838
7646
|
}
|
|
7839
|
-
async setTimeMask() {
|
|
7840
|
-
if (this.isMobileGlobal) {
|
|
7841
|
-
return;
|
|
7842
|
-
}
|
|
7843
|
-
await this.$nextTick();
|
|
7844
|
-
const input = this.$refs.inputTime;
|
|
7845
|
-
if (input) {
|
|
7846
|
-
const inputEl = input.$el.querySelector('input');
|
|
7847
|
-
if (inputEl) {
|
|
7848
|
-
// const timeOptions: IOptions = {
|
|
7849
|
-
// mask: 'HH:mm',
|
|
7850
|
-
// lazy: false,
|
|
7851
|
-
// overwrite: true,
|
|
7852
|
-
// autofix: true,
|
|
7853
|
-
// blocks: {
|
|
7854
|
-
// HH: {
|
|
7855
|
-
// mask: IMask.MaskedRange,
|
|
7856
|
-
// from: 0,
|
|
7857
|
-
// to: 23,
|
|
7858
|
-
// maxLength: 2
|
|
7859
|
-
// },
|
|
7860
|
-
// mm: {
|
|
7861
|
-
// mask: IMask.MaskedRange,
|
|
7862
|
-
// from: 0,
|
|
7863
|
-
// to: 59,
|
|
7864
|
-
// maxLength: 2,
|
|
7865
|
-
// },
|
|
7866
|
-
// },
|
|
7867
|
-
// };
|
|
7868
|
-
// this.timeMask = IMask(inputEl as HTMLElement, {
|
|
7869
|
-
// mask: 'HH:mm',
|
|
7870
|
-
// });
|
|
7871
|
-
// this.timeMask._unbindEvents();
|
|
7872
|
-
// this.timeMask._bindEvents();
|
|
7873
|
-
// this.timeMask.on('complete', () => this.onTimeMaskedValueChanged(this.timeMask.value));
|
|
7874
|
-
}
|
|
7875
|
-
}
|
|
7876
|
-
}
|
|
7877
7647
|
parseDate(value) {
|
|
7878
7648
|
if (!value) {
|
|
7879
7649
|
return null;
|
|
@@ -7915,16 +7685,16 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7915
7685
|
}
|
|
7916
7686
|
}
|
|
7917
7687
|
}
|
|
7918
|
-
parseTime(value) {
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
}
|
|
7688
|
+
// private parseTime(value: string): string {
|
|
7689
|
+
// let [hours = this.defaultHour, minuts = this.defaultMinuts] = value ? value.split(':') : [];
|
|
7690
|
+
// if (!/^\d+$/.test(hours) || Number(hours) < 0 || Number(hours) > 23) {
|
|
7691
|
+
// hours = this.defaultHour;
|
|
7692
|
+
// }
|
|
7693
|
+
// if (!/^\d+$/.test(minuts) || Number(minuts) < 0 || Number(minuts) > 59) {
|
|
7694
|
+
// minuts = this.defaultMinuts;
|
|
7695
|
+
// }
|
|
7696
|
+
// return `${hours}:${minuts}`;
|
|
7697
|
+
// }
|
|
7928
7698
|
/**
|
|
7929
7699
|
* Добавляет к текущей дате время (часы, минуты)
|
|
7930
7700
|
* @param date текущая дата
|
|
@@ -7934,9 +7704,9 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7934
7704
|
return;
|
|
7935
7705
|
}
|
|
7936
7706
|
const [hours = this.defaultHour, minutes = this.defaultMinuts] = this.timeString ? this.timeString.split(':') : [];
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
date = new Date(date.getFullYear(), date.getMonth(), date.getDate(),
|
|
7707
|
+
const h = Number(hours);
|
|
7708
|
+
const m = Number(minutes);
|
|
7709
|
+
date = new Date(date.getFullYear(), date.getMonth(), date.getDate(), h, m, 0, 0);
|
|
7940
7710
|
return date;
|
|
7941
7711
|
}
|
|
7942
7712
|
get isDateEmpty() {
|
|
@@ -7946,7 +7716,13 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7946
7716
|
if (!this.date) {
|
|
7947
7717
|
return '';
|
|
7948
7718
|
}
|
|
7949
|
-
|
|
7719
|
+
if (this.localeRu) {
|
|
7720
|
+
return this.date.toLocaleDateString(this.locale);
|
|
7721
|
+
}
|
|
7722
|
+
if (this.localeEn) {
|
|
7723
|
+
const { d, m, y } = datetime.parseDate(this.date.toLocaleDateString(this.locale));
|
|
7724
|
+
return `${d}/${m}/${y}`;
|
|
7725
|
+
}
|
|
7950
7726
|
}
|
|
7951
7727
|
get minDateString() {
|
|
7952
7728
|
if (!this.currentMinDate) {
|
|
@@ -7965,8 +7741,14 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7965
7741
|
get locale() {
|
|
7966
7742
|
return this.$ldmui.options.language;
|
|
7967
7743
|
}
|
|
7744
|
+
get localeRu() {
|
|
7745
|
+
return this.locale.includes('ru');
|
|
7746
|
+
}
|
|
7747
|
+
get localeEn() {
|
|
7748
|
+
return this.locale.includes('en');
|
|
7749
|
+
}
|
|
7968
7750
|
get firstDayOfWeek() {
|
|
7969
|
-
if (this.
|
|
7751
|
+
if (this.localeEn) {
|
|
7970
7752
|
return 1;
|
|
7971
7753
|
}
|
|
7972
7754
|
return 2;
|
|
@@ -8054,12 +7836,6 @@ ld_datepickervue_type_script_lang_js_external_decorate([
|
|
|
8054
7836
|
ld_datepickervue_type_script_lang_js_external_metadata("design:paramtypes", [Object, Object]),
|
|
8055
7837
|
ld_datepickervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
8056
7838
|
], DatepickerComponent.prototype, "onValueChanged", null);
|
|
8057
|
-
ld_datepickervue_type_script_lang_js_external_decorate([
|
|
8058
|
-
(0,external_vue_property_decorator_.Watch)('dateonly'),
|
|
8059
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
8060
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
8061
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
8062
|
-
], DatepickerComponent.prototype, "onDateonlyChanged", null);
|
|
8063
7839
|
ld_datepickervue_type_script_lang_js_external_decorate([
|
|
8064
7840
|
(0,external_vue_property_decorator_.Watch)('minDate', { immediate: true }),
|
|
8065
7841
|
ld_datepickervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
@@ -8084,12 +7860,6 @@ ld_datepickervue_type_script_lang_js_external_decorate([
|
|
|
8084
7860
|
ld_datepickervue_type_script_lang_js_external_metadata("design:paramtypes", [typeof (_l = typeof Date !== "undefined" && Date) === "function" ? _l : Object]),
|
|
8085
7861
|
ld_datepickervue_type_script_lang_js_external_metadata("design:returntype", Promise)
|
|
8086
7862
|
], DatepickerComponent.prototype, "onCurrentMaxDateChanged", null);
|
|
8087
|
-
ld_datepickervue_type_script_lang_js_external_decorate([
|
|
8088
|
-
(0,external_vue_property_decorator_.Watch)('timeMenu'),
|
|
8089
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
8090
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
8091
|
-
ld_datepickervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
8092
|
-
], DatepickerComponent.prototype, "onTimeMenuChanged", null);
|
|
8093
7863
|
DatepickerComponent = ld_datepickervue_type_script_lang_js_external_decorate([
|
|
8094
7864
|
(0,external_vue_class_component_.Options)({
|
|
8095
7865
|
components: {
|
|
@@ -8110,7 +7880,7 @@ DatepickerComponent = ld_datepickervue_type_script_lang_js_external_decorate([
|
|
|
8110
7880
|
;
|
|
8111
7881
|
|
|
8112
7882
|
|
|
8113
|
-
const ld_datepicker_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_datepickervue_type_script_lang_js_external, [['render',
|
|
7883
|
+
const ld_datepicker_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_datepickervue_type_script_lang_js_external, [['render',ld_datepickervue_type_template_id_34ba51af_scoped_true_render],['__scopeId',"data-v-34ba51af"]])
|
|
8114
7884
|
|
|
8115
7885
|
/* harmony default export */ const ld_datepicker = (ld_datepicker_exports_);
|
|
8116
7886
|
;// ./src/ld-datepicker/index.ts
|
|
@@ -14017,17 +13787,18 @@ function ld_combobox_reg(vue, options) {
|
|
|
14017
13787
|
}
|
|
14018
13788
|
/* harmony default export */ const src_ld_combobox = (ld_combobox_reg);
|
|
14019
13789
|
|
|
14020
|
-
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-timepicker/ld-timepicker.vue?vue&type=template&id=
|
|
13790
|
+
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-timepicker/ld-timepicker.vue?vue&type=template&id=15511ea0&scoped=true&ts=true
|
|
14021
13791
|
|
|
14022
|
-
const
|
|
14023
|
-
const
|
|
14024
|
-
const
|
|
14025
|
-
const
|
|
14026
|
-
const
|
|
13792
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_1 = { class: "ld-timepicker" };
|
|
13793
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_2 = { class: "time-selector" };
|
|
13794
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_3 = { key: 0 };
|
|
13795
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_4 = { key: 1 };
|
|
13796
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-wrap" };
|
|
13797
|
+
const ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_6 = {
|
|
14027
13798
|
key: 0,
|
|
14028
13799
|
class: "ld-timepicker-validate"
|
|
14029
13800
|
};
|
|
14030
|
-
function
|
|
13801
|
+
function ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14031
13802
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
14032
13803
|
const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon");
|
|
14033
13804
|
const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
|
|
@@ -14035,7 +13806,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14035
13806
|
const _component_v_menu = (0,external_vue_.resolveComponent)("v-menu");
|
|
14036
13807
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
14037
13808
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
|
|
14038
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
13809
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_1, [
|
|
14039
13810
|
(0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
|
|
14040
13811
|
default: (0,external_vue_.withCtx)(() => [
|
|
14041
13812
|
(_ctx.label)
|
|
@@ -14047,14 +13818,14 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14047
13818
|
"align-label-to-right": _ctx.alignLabelToRight
|
|
14048
13819
|
}, null, 8, ["class", "label", "required", "align-label-to-right"]))
|
|
14049
13820
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
14050
|
-
_cache[
|
|
13821
|
+
_cache[15] || (_cache[15] = (0,external_vue_.createTextVNode)()),
|
|
14051
13822
|
(0,external_vue_.createVNode)(_component_v_col, {
|
|
14052
13823
|
class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
|
|
14053
13824
|
}, {
|
|
14054
13825
|
default: (0,external_vue_.withCtx)(() => [
|
|
14055
13826
|
(0,external_vue_.createVNode)(_component_v_menu, {
|
|
14056
13827
|
modelValue: _ctx.timeMenu,
|
|
14057
|
-
"onUpdate:modelValue": _cache[
|
|
13828
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => ((_ctx.timeMenu) = $event)),
|
|
14058
13829
|
"close-on-content-click": false,
|
|
14059
13830
|
transition: "toggle-slide-y-transition",
|
|
14060
13831
|
location: "bottom",
|
|
@@ -14065,7 +13836,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14065
13836
|
(0,external_vue_.createElementVNode)("div", (0,external_vue_.mergeProps)({ class: "d-flex align-center w-100" }, props, { style: { "position": "relative" } }), [
|
|
14066
13837
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-edit-text']), {
|
|
14067
13838
|
ref: "inputTime",
|
|
14068
|
-
"model-value": _ctx.
|
|
13839
|
+
"model-value": _ctx._time,
|
|
14069
13840
|
class: "w-100",
|
|
14070
13841
|
tabindex: _ctx.tabIndex,
|
|
14071
13842
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
@@ -14073,7 +13844,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14073
13844
|
"hide-details": "",
|
|
14074
13845
|
readonly: true
|
|
14075
13846
|
}, null, 8, ["model-value", "tabindex", "disabled", "placeholder"])),
|
|
14076
|
-
_cache[
|
|
13847
|
+
_cache[6] || (_cache[6] = (0,external_vue_.createTextVNode)()),
|
|
14077
13848
|
(!_ctx.disabled && !_ctx.readonly)
|
|
14078
13849
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
14079
13850
|
key: 0,
|
|
@@ -14083,7 +13854,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14083
13854
|
}, {
|
|
14084
13855
|
default: (0,external_vue_.withCtx)(() => [
|
|
14085
13856
|
(0,external_vue_.createVNode)(_component_ld_icon, null, {
|
|
14086
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
13857
|
+
default: (0,external_vue_.withCtx)(() => _cache[4] || (_cache[4] = [
|
|
14087
13858
|
(0,external_vue_.createTextVNode)("close")
|
|
14088
13859
|
])),
|
|
14089
13860
|
_: 1
|
|
@@ -14092,7 +13863,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14092
13863
|
_: 1
|
|
14093
13864
|
}, 8, ["onClick"]))
|
|
14094
13865
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
14095
|
-
_cache[
|
|
13866
|
+
_cache[7] || (_cache[7] = (0,external_vue_.createTextVNode)()),
|
|
14096
13867
|
(0,external_vue_.createVNode)(_component_square_button, {
|
|
14097
13868
|
icon: "",
|
|
14098
13869
|
style: { "position": "absolute", "top": "0", "right": "0" },
|
|
@@ -14103,7 +13874,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14103
13874
|
(0,external_vue_.createVNode)(_component_ld_icon, {
|
|
14104
13875
|
color: _ctx.timeMenu ? 'primary' : undefined
|
|
14105
13876
|
}, {
|
|
14106
|
-
default: (0,external_vue_.withCtx)(() => _cache[
|
|
13877
|
+
default: (0,external_vue_.withCtx)(() => _cache[5] || (_cache[5] = [
|
|
14107
13878
|
(0,external_vue_.createTextVNode)("access_time")
|
|
14108
13879
|
])),
|
|
14109
13880
|
_: 1
|
|
@@ -14114,41 +13885,76 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14114
13885
|
], 16)
|
|
14115
13886
|
]),
|
|
14116
13887
|
default: (0,external_vue_.withCtx)(() => [
|
|
14117
|
-
_cache[
|
|
13888
|
+
_cache[13] || (_cache[13] = (0,external_vue_.createTextVNode)()),
|
|
14118
13889
|
(0,external_vue_.createVNode)(_component_v_card, {
|
|
14119
13890
|
elevation: "0",
|
|
14120
13891
|
style: { "border": "1px solid var(--grey-l-5)" },
|
|
14121
13892
|
width: "190px"
|
|
14122
13893
|
}, {
|
|
14123
13894
|
default: (0,external_vue_.withCtx)(() => [
|
|
14124
|
-
(0,external_vue_.createElementVNode)("div",
|
|
13895
|
+
(0,external_vue_.createElementVNode)("div", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_2, [
|
|
14125
13896
|
(_ctx.isHours)
|
|
14126
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span",
|
|
13897
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$ldmuii18n.gettext('Hours')), 1))
|
|
14127
13898
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
14128
|
-
_cache[
|
|
13899
|
+
_cache[11] || (_cache[11] = (0,external_vue_.createTextVNode)()),
|
|
14129
13900
|
(_ctx.isMinutes)
|
|
14130
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span",
|
|
13901
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_4, (0,external_vue_.toDisplayString)(_ctx.$ldmuii18n.gettext('Minutes')), 1))
|
|
14131
13902
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
14132
|
-
_cache[
|
|
14133
|
-
(0,external_vue_.createElementVNode)("div",
|
|
13903
|
+
_cache[12] || (_cache[12] = (0,external_vue_.createTextVNode)()),
|
|
13904
|
+
(0,external_vue_.createElementVNode)("div", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_5, [
|
|
14134
13905
|
(_ctx.isHours)
|
|
14135
|
-
? ((0,external_vue_.openBlock)(
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
(0,external_vue_.
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
13906
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)(external_vue_.Fragment, { key: 0 }, [
|
|
13907
|
+
((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(Array.apply(null, { length: _ctx._format }), (_, i) => {
|
|
13908
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
13909
|
+
key: i,
|
|
13910
|
+
variant: i === (_ctx.is12 ? _ctx.hours - 1 : _ctx.hours) ? 'flat' : 'outlined',
|
|
13911
|
+
color: i === (_ctx.is12 ? _ctx.hours - 1 : _ctx.hours) ? 'primary' : 'grey',
|
|
13912
|
+
onClick: ($event) => (_ctx.setHours(i))
|
|
13913
|
+
}, {
|
|
13914
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
13915
|
+
(0,external_vue_.createElementVNode)("span", {
|
|
13916
|
+
class: (0,external_vue_.normalizeClass)({ 'text-color': i !== (_ctx.is12 ? _ctx.hours - 1 : _ctx.hours) })
|
|
13917
|
+
}, (0,external_vue_.toDisplayString)(('0' + (_ctx.is12 ? (i + 1) : i)).slice(-2)), 3)
|
|
13918
|
+
]),
|
|
13919
|
+
_: 2
|
|
13920
|
+
}, 1032, ["variant", "color", "onClick"]));
|
|
13921
|
+
}), 128)),
|
|
13922
|
+
_cache[8] || (_cache[8] = (0,external_vue_.createTextVNode)()),
|
|
13923
|
+
(_ctx.is12)
|
|
13924
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
13925
|
+
key: 0,
|
|
13926
|
+
variant: _ctx.isAM ? 'flat' : 'outlined',
|
|
13927
|
+
color: _ctx.isAM ? 'primary' : 'grey',
|
|
13928
|
+
style: { "margin-left": "39px" },
|
|
13929
|
+
onClick: _cache[1] || (_cache[1] = ($event) => (_ctx.setA('am')))
|
|
13930
|
+
}, {
|
|
13931
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
13932
|
+
(0,external_vue_.createElementVNode)("span", {
|
|
13933
|
+
class: (0,external_vue_.normalizeClass)({ 'text-color': _ctx.isPM })
|
|
13934
|
+
}, "am", 2)
|
|
13935
|
+
]),
|
|
13936
|
+
_: 1
|
|
13937
|
+
}, 8, ["variant", "color"]))
|
|
13938
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
13939
|
+
_cache[9] || (_cache[9] = (0,external_vue_.createTextVNode)()),
|
|
13940
|
+
(_ctx.is12)
|
|
13941
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
13942
|
+
key: 1,
|
|
13943
|
+
variant: _ctx.isPM ? 'flat' : 'outlined',
|
|
13944
|
+
color: _ctx.isPM ? 'primary' : 'grey',
|
|
13945
|
+
onClick: _cache[2] || (_cache[2] = ($event) => (_ctx.setA('pm')))
|
|
13946
|
+
}, {
|
|
13947
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
13948
|
+
(0,external_vue_.createElementVNode)("span", {
|
|
13949
|
+
class: (0,external_vue_.normalizeClass)({ 'text-color': _ctx.isAM })
|
|
13950
|
+
}, "pm", 2)
|
|
13951
|
+
]),
|
|
13952
|
+
_: 1
|
|
13953
|
+
}, 8, ["variant", "color"]))
|
|
13954
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
13955
|
+
], 64))
|
|
14150
13956
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
14151
|
-
_cache[
|
|
13957
|
+
_cache[10] || (_cache[10] = (0,external_vue_.createTextVNode)()),
|
|
14152
13958
|
(_ctx.isMinutes)
|
|
14153
13959
|
? ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, { key: 1 }, (0,external_vue_.renderList)(Array.apply(null, { length: 12 }), (_, i) => {
|
|
14154
13960
|
return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
@@ -14174,9 +13980,9 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14174
13980
|
]),
|
|
14175
13981
|
_: 1
|
|
14176
13982
|
}, 8, ["modelValue", "disabled"]),
|
|
14177
|
-
_cache[
|
|
13983
|
+
_cache[14] || (_cache[14] = (0,external_vue_.createTextVNode)()),
|
|
14178
13984
|
(!_ctx.hideDetails)
|
|
14179
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
13985
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_hoisted_6, [
|
|
14180
13986
|
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
14181
13987
|
default: (0,external_vue_.withCtx)(() => [
|
|
14182
13988
|
(0,external_vue_.createElementVNode)("span", {
|
|
@@ -14197,7 +14003,7 @@ function ld_timepickervue_type_template_id_8b370834_scoped_true_ts_true_render(_
|
|
|
14197
14003
|
]));
|
|
14198
14004
|
}
|
|
14199
14005
|
|
|
14200
|
-
;// ./src/ld-timepicker/ld-timepicker.vue?vue&type=template&id=
|
|
14006
|
+
;// ./src/ld-timepicker/ld-timepicker.vue?vue&type=template&id=15511ea0&scoped=true&ts=true
|
|
14201
14007
|
|
|
14202
14008
|
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-timepicker/ld-timepicker.ts?vue&type=script&lang=ts&external
|
|
14203
14009
|
var ld_timepickervue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -14227,18 +14033,20 @@ let TimepickerComponent = class TimepickerComponent extends (0,external_vue_clas
|
|
|
14227
14033
|
this.isMinutes = false;
|
|
14228
14034
|
this.hours = null;
|
|
14229
14035
|
this.minutes = null;
|
|
14036
|
+
this.a = 'am';
|
|
14230
14037
|
}
|
|
14231
14038
|
emitInput(value) {
|
|
14232
|
-
return value;
|
|
14039
|
+
return value ? this.emitedValue(value) : null;
|
|
14233
14040
|
}
|
|
14234
14041
|
emitBlur(value) {
|
|
14235
14042
|
return value;
|
|
14236
14043
|
}
|
|
14237
14044
|
onModelValueChanged(value) {
|
|
14238
|
-
|
|
14045
|
+
let v = this.toISO(value);
|
|
14046
|
+
if (!this.checkValue(v)) {
|
|
14239
14047
|
return;
|
|
14240
14048
|
}
|
|
14241
|
-
this.setTime(
|
|
14049
|
+
this.setTime(v);
|
|
14242
14050
|
}
|
|
14243
14051
|
onTimeMenuChanged() {
|
|
14244
14052
|
if (!this.timeMenu) {
|
|
@@ -14247,9 +14055,17 @@ let TimepickerComponent = class TimepickerComponent extends (0,external_vue_clas
|
|
|
14247
14055
|
}
|
|
14248
14056
|
}
|
|
14249
14057
|
onTimeChanged() {
|
|
14250
|
-
this.emitInput(this.
|
|
14058
|
+
this.emitInput(this._time);
|
|
14251
14059
|
this.validate();
|
|
14252
14060
|
}
|
|
14061
|
+
onFormatChanged() {
|
|
14062
|
+
this.setTime();
|
|
14063
|
+
this.emitInput(this._time);
|
|
14064
|
+
}
|
|
14065
|
+
onReturnFormatChanged() {
|
|
14066
|
+
this.setTime();
|
|
14067
|
+
this.emitInput(this._time);
|
|
14068
|
+
}
|
|
14253
14069
|
created() {
|
|
14254
14070
|
if (this.form) {
|
|
14255
14071
|
this.form.register(this, null);
|
|
@@ -14260,8 +14076,26 @@ let TimepickerComponent = class TimepickerComponent extends (0,external_vue_clas
|
|
|
14260
14076
|
this.form.unregister(this, null);
|
|
14261
14077
|
}
|
|
14262
14078
|
}
|
|
14079
|
+
checkValue(value) {
|
|
14080
|
+
if (!(/\d\d\:\d\d/.test(value))) {
|
|
14081
|
+
return false;
|
|
14082
|
+
}
|
|
14083
|
+
const [h, m] = this.toSplitted(value);
|
|
14084
|
+
if (isNaN(h) || h < 0 || h > 23) {
|
|
14085
|
+
return false;
|
|
14086
|
+
}
|
|
14087
|
+
const mm = Number(m);
|
|
14088
|
+
if (isNaN(mm) || mm < 0 || mm > 59) {
|
|
14089
|
+
return false;
|
|
14090
|
+
}
|
|
14091
|
+
return true;
|
|
14092
|
+
}
|
|
14263
14093
|
setHours(i) {
|
|
14094
|
+
if (this.is12) {
|
|
14095
|
+
i = i + 1;
|
|
14096
|
+
}
|
|
14264
14097
|
this.hours = i;
|
|
14098
|
+
this.minutes = this.minutes ? this.minutes : 0;
|
|
14265
14099
|
this.isHours = false;
|
|
14266
14100
|
this.isMinutes = true;
|
|
14267
14101
|
}
|
|
@@ -14270,24 +14104,28 @@ let TimepickerComponent = class TimepickerComponent extends (0,external_vue_clas
|
|
|
14270
14104
|
this.timeMenu = false;
|
|
14271
14105
|
}
|
|
14272
14106
|
setTime(value) {
|
|
14273
|
-
const
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
}
|
|
14277
|
-
checkValue(value) {
|
|
14278
|
-
if (!(/\d\d\:\d\d/.test(value))) {
|
|
14279
|
-
return false;
|
|
14107
|
+
const v = value || this.modelValue;
|
|
14108
|
+
if (!v) {
|
|
14109
|
+
return;
|
|
14280
14110
|
}
|
|
14281
|
-
const [h, m] =
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14111
|
+
const [h, m] = this.toSplitted(this.toISO(v));
|
|
14112
|
+
if (this.is12) {
|
|
14113
|
+
if (h > 12) {
|
|
14114
|
+
this.setA('pm');
|
|
14115
|
+
this.hours = h - 12;
|
|
14116
|
+
}
|
|
14117
|
+
if (h < 12) {
|
|
14118
|
+
this.setA('am');
|
|
14119
|
+
this.hours = h === 0 ? 12 : h;
|
|
14120
|
+
}
|
|
14121
|
+
if (h === 12) {
|
|
14122
|
+
this.hours = 12;
|
|
14123
|
+
}
|
|
14285
14124
|
}
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
return false;
|
|
14125
|
+
else {
|
|
14126
|
+
this.hours = h;
|
|
14289
14127
|
}
|
|
14290
|
-
|
|
14128
|
+
this.minutes = Number(m);
|
|
14291
14129
|
}
|
|
14292
14130
|
clear() {
|
|
14293
14131
|
this.hours = null;
|
|
@@ -14301,34 +14139,115 @@ let TimepickerComponent = class TimepickerComponent extends (0,external_vue_clas
|
|
|
14301
14139
|
let funcResult = null;
|
|
14302
14140
|
this.validationMessage = '';
|
|
14303
14141
|
this.validRules.forEach(func => {
|
|
14304
|
-
funcResult = func(this.
|
|
14142
|
+
funcResult = func(this._time);
|
|
14305
14143
|
if (funcResult !== true) {
|
|
14306
14144
|
this.validationMessage = funcResult;
|
|
14307
14145
|
}
|
|
14308
14146
|
});
|
|
14309
14147
|
return !this.validationMessage;
|
|
14310
14148
|
}
|
|
14311
|
-
|
|
14149
|
+
setA(a) {
|
|
14150
|
+
this.a = a;
|
|
14151
|
+
}
|
|
14152
|
+
emitedValue(value) {
|
|
14153
|
+
if (this.returnFormat === 12) {
|
|
14154
|
+
return this.toLocalized(value);
|
|
14155
|
+
}
|
|
14156
|
+
return this.toISO(value);
|
|
14157
|
+
}
|
|
14158
|
+
toISO(value) {
|
|
14159
|
+
let v = null;
|
|
14160
|
+
if (/am/.test(value)) {
|
|
14161
|
+
v = value.replace(/am/g, '').trim();
|
|
14162
|
+
const [h, m] = this.toSplitted(v);
|
|
14163
|
+
return h === 12 ? `00:${m}` : v;
|
|
14164
|
+
}
|
|
14165
|
+
if (/pm/.test(value)) {
|
|
14166
|
+
v = value.replace(/pm/g, '').trim();
|
|
14167
|
+
const [h, m] = this.toSplitted(v);
|
|
14168
|
+
return `${h < 12 ? h + 12 : h}:${m}`;
|
|
14169
|
+
}
|
|
14170
|
+
return value;
|
|
14171
|
+
}
|
|
14172
|
+
toLocalized(value) {
|
|
14173
|
+
if (/am|pm/.test(value)) {
|
|
14174
|
+
return value;
|
|
14175
|
+
}
|
|
14176
|
+
const [h, m] = this.toSplitted(value);
|
|
14177
|
+
if (h > 12) {
|
|
14178
|
+
return `${h - 12}:${m} pm`;
|
|
14179
|
+
}
|
|
14180
|
+
if (h < 12) {
|
|
14181
|
+
return `${h}:${m} am`;
|
|
14182
|
+
}
|
|
14183
|
+
return `${h}:${m} ${this.a}`;
|
|
14184
|
+
}
|
|
14185
|
+
toSplitted(value) {
|
|
14186
|
+
if (!(/\d\d\:\d\d/.test(value))) {
|
|
14187
|
+
return [0, 0];
|
|
14188
|
+
}
|
|
14189
|
+
const [h, m] = value.split(':');
|
|
14190
|
+
return [Number(h), Number(m)];
|
|
14191
|
+
}
|
|
14192
|
+
get _format() {
|
|
14193
|
+
if (this.$utils.isDefined(this.format)) {
|
|
14194
|
+
return this.format;
|
|
14195
|
+
}
|
|
14196
|
+
if (this.localeRu) {
|
|
14197
|
+
return 24;
|
|
14198
|
+
}
|
|
14199
|
+
if (this.localeEn) {
|
|
14200
|
+
return 12;
|
|
14201
|
+
}
|
|
14202
|
+
return 24;
|
|
14203
|
+
}
|
|
14204
|
+
get is12() {
|
|
14205
|
+
return this._format === 12;
|
|
14206
|
+
}
|
|
14207
|
+
get is24() {
|
|
14208
|
+
return this._format === 24;
|
|
14209
|
+
}
|
|
14210
|
+
get isAM() {
|
|
14211
|
+
return this.a === 'am';
|
|
14212
|
+
}
|
|
14213
|
+
get isPM() {
|
|
14214
|
+
return this.a === 'pm';
|
|
14215
|
+
}
|
|
14216
|
+
get _hours() {
|
|
14312
14217
|
if (!this.$utils.isDefined(this.hours)) {
|
|
14313
14218
|
return '';
|
|
14314
14219
|
}
|
|
14315
14220
|
return ('0' + this.hours).slice(-2);
|
|
14316
14221
|
}
|
|
14317
|
-
get
|
|
14222
|
+
get _minutes() {
|
|
14318
14223
|
if (!this.$utils.isDefined(this.minutes)) {
|
|
14319
14224
|
return '';
|
|
14320
14225
|
}
|
|
14321
14226
|
return ('0' + this.minutes).slice(-2);
|
|
14322
14227
|
}
|
|
14323
|
-
get
|
|
14324
|
-
if (!this.
|
|
14228
|
+
get _time() {
|
|
14229
|
+
if (!this._hours && !this._minutes) {
|
|
14325
14230
|
return '';
|
|
14326
14231
|
}
|
|
14327
|
-
|
|
14232
|
+
if (this.is12) {
|
|
14233
|
+
return `${this._hours}:${this._minutes} ${this.a}`;
|
|
14234
|
+
}
|
|
14235
|
+
if (this.is24) {
|
|
14236
|
+
return `${this._hours}:${this._minutes}`;
|
|
14237
|
+
}
|
|
14328
14238
|
}
|
|
14329
14239
|
get warningHint() {
|
|
14330
14240
|
return Boolean(this.validationMessage);
|
|
14331
14241
|
}
|
|
14242
|
+
get locale() {
|
|
14243
|
+
return this.$ldmui.options.language;
|
|
14244
|
+
}
|
|
14245
|
+
get localeRu() {
|
|
14246
|
+
return this.locale.includes('ru');
|
|
14247
|
+
}
|
|
14248
|
+
get localeEn() {
|
|
14249
|
+
return this.locale.includes('en');
|
|
14250
|
+
}
|
|
14332
14251
|
};
|
|
14333
14252
|
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14334
14253
|
(0,external_vue_property_decorator_.Prop)(),
|
|
@@ -14342,6 +14261,14 @@ ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
|
14342
14261
|
(0,external_vue_property_decorator_.Prop)({ type: String, default: 'ЧЧ.ММ' }),
|
|
14343
14262
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", String)
|
|
14344
14263
|
], TimepickerComponent.prototype, "placeholder", void 0);
|
|
14264
|
+
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14265
|
+
(0,external_vue_property_decorator_.Prop)({ type: Number, default: undefined }),
|
|
14266
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Number)
|
|
14267
|
+
], TimepickerComponent.prototype, "format", void 0);
|
|
14268
|
+
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14269
|
+
(0,external_vue_property_decorator_.Prop)({ type: Number, default: 24 }),
|
|
14270
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Number)
|
|
14271
|
+
], TimepickerComponent.prototype, "returnFormat", void 0);
|
|
14345
14272
|
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14346
14273
|
(0,external_vue_property_decorator_.Inject)({ from: 'form', default: null }),
|
|
14347
14274
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Object)
|
|
@@ -14371,11 +14298,23 @@ ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
|
14371
14298
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14372
14299
|
], TimepickerComponent.prototype, "onTimeMenuChanged", null);
|
|
14373
14300
|
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14374
|
-
(0,external_vue_property_decorator_.Watch)('
|
|
14301
|
+
(0,external_vue_property_decorator_.Watch)('_time'),
|
|
14375
14302
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
14376
14303
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:paramtypes", []),
|
|
14377
14304
|
ld_timepickervue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14378
14305
|
], TimepickerComponent.prototype, "onTimeChanged", null);
|
|
14306
|
+
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14307
|
+
(0,external_vue_property_decorator_.Watch)('format'),
|
|
14308
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
14309
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:paramtypes", []),
|
|
14310
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14311
|
+
], TimepickerComponent.prototype, "onFormatChanged", null);
|
|
14312
|
+
ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14313
|
+
(0,external_vue_property_decorator_.Watch)('returnFormat'),
|
|
14314
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
14315
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:paramtypes", []),
|
|
14316
|
+
ld_timepickervue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
14317
|
+
], TimepickerComponent.prototype, "onReturnFormatChanged", null);
|
|
14379
14318
|
TimepickerComponent = ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
14380
14319
|
(0,external_vue_class_component_.Options)({
|
|
14381
14320
|
components: {
|
|
@@ -14395,7 +14334,7 @@ TimepickerComponent = ld_timepickervue_type_script_lang_ts_external_decorate([
|
|
|
14395
14334
|
;
|
|
14396
14335
|
|
|
14397
14336
|
|
|
14398
|
-
const ld_timepicker_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_timepickervue_type_script_lang_ts_external, [['render',
|
|
14337
|
+
const ld_timepicker_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_timepickervue_type_script_lang_ts_external, [['render',ld_timepickervue_type_template_id_15511ea0_scoped_true_ts_true_render],['__scopeId',"data-v-15511ea0"]])
|
|
14399
14338
|
|
|
14400
14339
|
/* harmony default export */ const ld_timepicker = (ld_timepicker_exports_);
|
|
14401
14340
|
;// ./src/ld-timepicker/index.ts
|