UNPKG

roomkit-web-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

165 lines (164 loc) 7.71 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Vue = require("vue"); const index = require("../common/base/Select/index.js"); const index$1 = require("../common/base/Option/index.js"); require("../../services/main.js"); const roomService = require("../../services/roomService.js"); const types = require("../../services/types.js"); require("../../locales/index.js"); require("@tencentcloud/tuiroom-engine-js"); require("../../utils/environment.js"); require("mitt"); require("../../services/manager/roomActionManager.js"); require("@tencentcloud/tui-core"); const _hoisted_1 = { class: "container" }; const _sfc_main = /* @__PURE__ */ Vue.defineComponent({ __name: "TimezonePicker", props: { modelValue: {} }, emits: ["input"], setup(__props, { emit: __emit }) { const props = __props; const emit = __emit; const selectedTime = Vue.ref(props.modelValue); const currentLanguage = Vue.ref(roomService.roomService.basicStore.lang); const timeOptions = Vue.computed(() => { switch (currentLanguage.value) { case "zh-CN": return timeOptionsCh.value; case "en-US": return timeOptionsEn.value; default: return timeOptionsEn.value; } }); const timeOptionsCh = Vue.computed(() => [ { label: "GMT-12:00 世界时 - 国际日期变更线西", value: "Etc/GMT+12" }, { label: "GMT-11:00 世界时 - 协调世界时-11", value: "Etc/GMT+11" }, { label: "GMT-10:00 夏威夷 - 阿留申标准时间", value: "Pacific/Honolulu" }, { label: "GMT-09:00 阿拉斯加标准时间", value: "America/Anchorage" }, { label: "GMT-08:00 太平洋标准时间", value: "America/Los_Angeles" }, { label: "GMT-07:00 美国山地标准时间", value: "America/Denver" }, { label: "GMT-06:00 美国中部标准时间", value: "America/Chicago" }, { label: "GMT-05:00 美国东部标准时间", value: "America/New_York" }, { label: "GMT-04:00 大西洋标准时间", value: "America/Halifax" }, { label: "GMT-03:00 阿根廷标准时间", value: "America/Argentina/Buenos_Aires" }, { label: "GMT-02:00 协调世界时-02", value: "Etc/GMT+2" }, { label: "GMT-01:00 佛得角标准时间", value: "Atlantic/Cape_Verde" }, { label: "GMT+00:00 格林威治标准时间", value: "Europe/London" }, { label: "GMT+01:00 中欧标准时间", value: "Europe/Berlin" }, { label: "GMT+02:00 东欧标准时间", value: "Europe/Kiev" }, { label: "GMT+03:00 莫斯科标准时间", value: "Europe/Moscow" }, { label: "GMT+04:00 阿布扎比标准时间", value: "Asia/Dubai" }, { label: "GMT+05:00 巴基斯坦标准时间", value: "Asia/Karachi" }, { label: "GMT+05:30 印度标准时间", value: "Asia/Kolkata" }, { label: "GMT+06:00 孟加拉国标准时间", value: "Asia/Dhaka" }, { label: "GMT+07:00 泰国标准时间", value: "Asia/Bangkok" }, { label: "GMT+08:00 中国标准时间 - 北京", value: "Asia/Shanghai" }, { label: "GMT+09:00 日本标准时间", value: "Asia/Tokyo" }, { label: "GMT+10:00 澳大利亚东部标准时间 - 悉尼", value: "Australia/Sydney" }, { label: "GMT+11:00 所罗门群岛标准时间", value: "Pacific/Guadalcanal" }, { label: "GMT+12:00 新西兰标准时间", value: "Pacific/Auckland" }, { label: "GMT+13:00 汤加标准时间", value: "Pacific/Tongatapu" } ]); const timeOptionsEn = Vue.computed(() => [ { label: "GMT-12:00 International Date Line West", value: "Etc/GMT+12" }, { label: "GMT-11:00 Coordinated Universal Time-11", value: "Etc/GMT+11" }, { label: "GMT-10:00 Hawaii-Aleutian Standard Time", value: "Pacific/Honolulu" }, { label: "GMT-09:00 Alaska Standard Time", value: "America/Anchorage" }, { label: "GMT-08:00 Pacific Standard Time", value: "America/Los_Angeles" }, { label: "GMT-07:00 Mountain Standard Time", value: "America/Denver" }, { label: "GMT-06:00 Central Standard Time", value: "America/Chicago" }, { label: "GMT-05:00 Eastern Standard Time", value: "America/New_York" }, { label: "GMT-04:00 Atlantic Standard Time", value: "America/Halifax" }, { label: "GMT-03:00 Argentina Standard Time", value: "America/Argentina/Buenos_Aires" }, { label: "GMT-02:00 Coordinated Universal Time-02", value: "Etc/GMT+2" }, { label: "GMT-01:00 Cape Verde Standard Time", value: "Atlantic/Cape_Verde" }, { label: "GMT+00:00 Greenwich Mean Time", value: "Europe/London" }, { label: "GMT+01:00 Central European Standard Time", value: "Europe/Berlin" }, { label: "GMT+02:00 Eastern European Standard Time", value: "Europe/Kiev" }, { label: "GMT+03:00 Moscow Standard Time", value: "Europe/Moscow" }, { label: "GMT+04:00 Gulf Standard Time", value: "Asia/Dubai" }, { label: "GMT+05:00 Pakistan Standard Time", value: "Asia/Karachi" }, { label: "GMT+05:30 Indian Standard Time", value: "Asia/Kolkata" }, { label: "GMT+06:00 Bangladesh Standard Time", value: "Asia/Dhaka" }, { label: "GMT+07:00 Indochina Time", value: "Asia/Bangkok" }, { label: "GMT+08:00 China Standard Time - Beijing", value: "Asia/Shanghai" }, { label: "GMT+09:00 Japan Standard Time", value: "Asia/Tokyo" }, { label: "GMT+10:00 Australian Eastern Standard Time - Sydney", value: "Australia/Sydney" }, { label: "GMT+11:00 Solomon Islands Standard Time", value: "Pacific/Guadalcanal" }, { label: "GMT+12:00 New Zealand Standard Time", value: "Pacific/Auckland" }, { label: "GMT+13:00 Tonga Standard Time", value: "Pacific/Tongatapu" } ]); const handleLanguageChange = async (language) => { currentLanguage.value = language; }; Vue.onMounted(() => { roomService.roomService.on(types.EventType.LANGUAGE_CHANGED, handleLanguageChange); }); Vue.onUnmounted(() => { roomService.roomService.off(types.EventType.LANGUAGE_CHANGED, handleLanguageChange); }); const updateTime = () => { emit("input", selectedTime.value); }; Vue.watch( selectedTime, () => { updateTime(); }, { immediate: true } ); Vue.watch( () => props.modelValue, (newValue) => { selectedTime.value = newValue; }, { immediate: true } ); return (_ctx, _cache) => { return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [ Vue.createVNode(Vue.unref(index.default), { modelValue: selectedTime.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedTime.value = $event), teleported: false, "custom-select-content-style": { "font-weight": 400 }, value: selectedTime.value, onInput: _cache[1] || (_cache[1] = ($event) => selectedTime.value = $event) }, { default: Vue.withCtx(() => [ (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(timeOptions.value, (time) => { return Vue.openBlock(), Vue.createBlock(Vue.unref(index$1.default), { key: time.value, value: time.value, label: time.label, "custom-option-content-style": { "font-weight": 400 } }, null, 8, ["value", "label"]); }), 128)) ]), _: 1 }, 8, ["modelValue", "value"]) ]); }; } }); exports.default = _sfc_main;