UNPKG

tdesign-vue

Version:
44 lines (36 loc) 1.45 kB
/** * tdesign v1.15.0 * (c) 2026 tdesign * @license MIT */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); var _common_js_components = require('../../../js/components.js'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray); var convert2PascalCase = function convert2PascalCase(name) { return name.split("-").map(function (part) { return part.charAt(0).toUpperCase() + part.slice(1); }).join(""); }; var COMPONENT_MAPS = { web: _common_js_components.WEB_COMPONENT_MAP, mobile: _common_js_components.MOBILE_COMPONENT_MAP, chat: _common_js_components.CHAT_COMPONENT_MAP }; var mapToParentName = function mapToParentName(name, platform) { var targetMap = COMPONENT_MAPS[platform]; var found = Object.entries(targetMap).find(function (_ref) { var _ref2 = _slicedToArray__default["default"](_ref, 2); _ref2[0]; var values = _ref2[1]; return values.includes(name); }); if (found) return _common_js_components.NON_PASCAL_CASE_NAMES[found[0]] || convert2PascalCase(found[0]); return null; }; exports.COMPONENT_MAPS = COMPONENT_MAPS; exports.convert2PascalCase = convert2PascalCase; exports.mapToParentName = mapToParentName; //# sourceMappingURL=libs.js.map