{"version":3,"file":"bell-ui-rollup.min.js","sources":["../src/component/constant.ts","../src/component/util.ts","../src/component/grid/util.ts","../src/component/grid/Row.ts","../src/component/grid/Col.ts","../src/component/icon/Icon.ts","../src/component/add/Add.ts","../src/component/color-swatch/ColorSwatch.ts","../src/component/countdown/Countdown.ts","../src/component/closable/Closable.ts","../src/component/footer-bar/FooterBar.ts","../src/component/resize-observer/ResizeObserver.ts","../src/component/menu/Menu.ts","../src/component/menu/MenuItem.ts","../src/component/menu/MenuGroup.ts","../src/component/event.ts","../src/component/popover/Popover.ts","../src/component/menu/SubMenu.ts","../src/component/text/Text.ts","../src/component/drawer/Drawer.ts","../src/component/guide/Guide.ts","../src/component/breadcrumb/Breadcrumb.ts","../src/component/breadcrumb/BreadcrumbItem.ts","../src/component/button/Button.ts","../src/component/button/ButtonGroup.ts","../src/component/input/Input.ts","../src/component/input-number/util.ts","../src/component/input-number/InputNumber.ts","../src/component/textarea/Textarea.ts","../src/component/radio/Radio.ts","../src/component/radio/RadioGroup.ts","../src/component/checkbox/Checkbox.ts","../src/component/checkbox/CheckboxGroup.ts","../src/component/color-picker/ColorThumb.ts","../src/component/color-picker/util.ts","../src/component/color-picker/HexInput.ts","../src/component/color-picker/RgbInput.ts","../src/component/color-picker/ColorPanel.ts","../src/component/color-picker/ColorPicker.ts","../src/component/tooltip/Tooltip.ts","../src/component/slider/Slider.ts","../src/component/space/Space.ts","../src/component/skeleton/Skeleton.ts","../src/component/statistic/Statistic.ts","../src/component/switch/Switch.ts","../src/component/steps/Steps.ts","../src/component/steps/util.ts","../src/component/steps/Step.ts","../src/component/tag/Tag.ts","../src/component/empty/Empty.ts","../src/component/select/util.ts","../src/component/select/Option.ts","../src/component/select/Select.ts","../src/component/select/OptionGroup.ts","../src/component/pagination/PrevPage.ts","../src/component/pagination/NextPage.ts","../src/component/pagination/Pagination.ts","../src/component/upload/Upload.ts","../src/component/alert/Alert.ts","../src/component/article/Article.ts","../src/component/analysis/Analysis.ts","../src/component/analysis/AnalysisField.ts","../src/component/spin/Spin.ts","../src/component/split-button/SplitButton.ts","../src/component/backtop/BackTop.ts","../src/component/avatar/Avatar.ts","../src/component/badge/Badge.ts","../src/component/date-picker/util.ts","../src/component/date-picker/component/DateYear.ts","../src/component/date-picker/component/DateMonth.ts","../src/component/date-picker/component/Date.ts","../src/component/date-picker/component/DateRange.ts","../src/component/date-picker/component/DateWeek.ts","../src/component/date-picker/DatePicker.ts","../src/component/time-picker/util.ts","../src/component/time-picker/TimePanel.ts","../src/component/time-picker/TimePicker.ts","../src/component/loading-bar/LoadingBar.ts","../src/component/image-picker/util.ts","../src/component/image-picker/ImagePicker.ts","../src/component/image/Image.ts","../src/component/carousel/Carousel.ts","../src/component/collapse/Collapse.ts","../src/component/collapse/CollapseItem.ts","../src/component/card/Card.ts","../src/component/card/CardHeader.ts","../src/component/card/CardMedia.ts","../src/component/card/CardBody.ts","../src/component/card/CardFooter.ts","../src/component/cascader/CascaderOption.ts","../src/component/cascader/CascaderOptions.ts","../src/component/cascader/util.ts","../src/component/cascader/Cascader.ts","../src/component/page-header/PageHeader.ts","../src/component/layout/Layout.ts","../src/component/layout/LayoutHeader.ts","../src/component/layout/LayoutContent.ts","../src/component/layout/LayoutFooter.ts","../src/component/layout/LayoutSider.ts","../src/component/link/Link.ts","../src/component/list/ListEmpty.ts","../src/component/list/List.ts","../src/component/list/ListItem.ts","../src/component/result/Result.ts","../src/component/exception/Exception.ts","../src/component/divider/Divider.ts","../src/component/circle/Circle.ts","../src/component/popconfirm/Popconfirm.ts","../src/component/progress/ProgressTrack.ts","../src/component/progress/Progress.ts","../src/component/tree/TreeNode.ts","../src/component/tree/util.ts","../src/component/tree/Tree.ts","../src/component/rate/Rate.ts","../src/component/tabs/Tabs.ts","../src/component/tabs/TabPanel.ts","../src/component/dropdown/Dropdown.ts","../src/component/dropdown/DropdownItem.ts","../src/component/dropdown/DropdownMenu.ts","../src/component/description/Description.ts","../src/component/description/util.ts","../src/component/description/DescriptionItem.ts","../src/component/timeline/Timeline.ts","../src/component/timeline/TimelineItem.ts","../src/component/form/util.ts","../src/component/form/Form.ts","../src/component/form/FormItem.ts","../src/component/dialog/Dialog.ts","../src/component/table/Table.ts","../src/component/loading-bar/index.ts","../src/component/message/Message.ts","../src/component/message/util.ts","../src/component/message/index.ts","../src/component/modal/Alert.ts","../src/component/modal/Confirm.ts","../src/component/modal/index.ts","../src/component/notification/Notification.ts","../src/component/notification/index.ts","../src/index.ts"],"sourcesContent":["export const TRUE = true\nexport const FALSE = false\nexport const NULL = null\nexport const UNDEFINED = void 0\n\nexport const RAW_DATE = 'date'\nexport const RAW_ARRAY = 'array'\nexport const RAW_STRING = 'string'\nexport const RAW_BOOLEAN = 'boolean'\nexport const RAW_NUMERIC = 'numeric'\nexport const RAW_NUMBER = 'number'\nexport const RAW_OBJECT = 'object'\nexport const RAW_FUNCTION = 'function'\n\nexport const RAW_HORIZONTAL = 'horizontal'\nexport const RAW_VERTICAL = 'vertical'\nexport const RAW_INLINE = 'inline'\n\nexport const RAW_SMALL = 'small'\nexport const RAW_DEFAULT = 'default'\nexport const RAW_LARGE = 'large'\n\nexport const RAW_ALWAYS = 'always'\nexport const RAW_NEVER = 'never'\n\nexport const RAW_HOVER = 'hover'\nexport const RAW_CLICK = 'click'\nexport const RAW_CUSTOM = 'custom'\nexport const RAW_RESIZE = 'resize'\n\nexport const RAW_CENTER = 'center'\nexport const RAW_MIDDLE = 'middle'\n\nexport const RAW_WAIT = 'wait'\nexport const RAW_PROCESS = 'process'\nexport const RAW_FINISH = 'finish'\n\nexport const RAW_STRETCH = 'stretch'\nexport const RAW_CONTAIN = 'contain'\n// 以后再支持 cover\n\nexport const RAW_TOP = 'top'\nexport const RAW_TOP_START = 'top-start'\nexport const RAW_TOP_END = 'top-end'\nexport const RAW_BOTTOM = 'bottom'\nexport const RAW_BOTTOM_START = 'bottom-start'\nexport const RAW_BOTTOM_END = 'bottom-end'\nexport const RAW_LEFT = 'left'\nexport const RAW_LEFT_START = 'left-start'\nexport const RAW_LEFT_END = 'left-end'\nexport const RAW_RIGHT = 'right'\nexport const RAW_RIGHT_START = 'right-start'\nexport const RAW_RIGHT_END = 'right-end'\n\nexport const RAW_TYPE_PRIMARY = 'primary'\nexport const RAW_TYPE_SUCCESS = 'success'\nexport const RAW_TYPE_WARNING = 'warning'\nexport const RAW_TYPE_ERROR = 'error'\nexport const RAW_TYPE_INFO = 'info'\nexport const RAW_TYPE_DASHED = 'dashed'\nexport const RAW_TYPE_LINK = 'link'\nexport const RAW_TYPE_TEXT = 'text'\nexport const RAW_TYPE_TITLE = 'title'\nexport const RAW_TYPE_CONTENT = 'content'\nexport const RAW_TYPE_MUTED = 'muted'\nexport const RAW_TYPE_PURE = 'pure'\n\nexport const RAW_SHAPE_CIRCLE = 'circle'\nexport const RAW_SHAPE_ROUND = 'round'\n\nexport const RAW_ALL = 'all'\nexport const RAW_PARENT = 'parent'\nexport const RAW_CHILD = 'child'\n\nexport const RAW_EVENT_KEYPRESS = 'keypress'\nexport const RAW_EVENT_KEYDOWN = 'keydown'\nexport const RAW_EVENT_KEYUP = 'keyup'\nexport const RAW_EVENT_MOUSEDOWN = 'mousedown'\nexport const RAW_EVENT_MOUSEMOVE = 'mousemove'\nexport const RAW_EVENT_MOUSEUP = 'mouseup'\nexport const RAW_EVENT_SCROLL = 'scroll'\nexport const RAW_EVENT_RESIZE = 'resize'\nexport const RAW_EVENT_BEFORE_DESTROY = 'beforeDestroy'\n\nexport const RAW_SLOT_PREFIX = '$slot_'\nexport const RAW_SLOT_CHILDREN = RAW_SLOT_PREFIX + 'children'\n\nexport const RAW_DARK = 'dark'\nexport const RAW_LIGHT = 'light'\n\nexport const RAW_IMAGE_ACCEPT = 'image/png,image/jpeg,image/jpg,image/gif'\n\nexport const RAW_THEME_ARRAY = [\n RAW_DARK,\n RAW_LIGHT,\n]\n\nexport const RAW_STATUS_ARRAY = [\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n]\n\nexport const RAW_TYPE_ARRAY = [\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n]\n\nexport const RAW_SIZE_ARRAY = [\n RAW_SMALL,\n RAW_DEFAULT,\n RAW_LARGE,\n]\n\nexport const RAW_PLACEMENT_ARRAY = [\n RAW_TOP,\n RAW_TOP_START,\n RAW_TOP_END,\n RAW_BOTTOM,\n RAW_BOTTOM_START,\n RAW_BOTTOM_END,\n RAW_LEFT,\n RAW_LEFT_START,\n RAW_LEFT_END,\n RAW_RIGHT,\n RAW_RIGHT_START,\n RAW_RIGHT_END\n]\n\nexport const RAW_STYLE_TYPE = [\n RAW_STRING,\n RAW_OBJECT,\n RAW_ARRAY,\n]\n\nexport const WINDOW = window\nexport const DOCUMENT = document\nexport const BODY = DOCUMENT.body\n\nexport const HOVER_DELAY = 100","import { UNDEFINED, NULL, DOCUMENT, TRUE, FALSE, WINDOW, BODY, RAW_TYPE_SUCCESS, RAW_TYPE_WARNING, RAW_TYPE_ERROR } from './constant'\nimport Yox, { Listener } from 'yox'\n\nconst element = DOCUMENT.createElement('div')\n\nconst prefixs = ['Webkit', 'Moz', 'O', 'ms']\n\nfunction testCSS(property: string) {\n\n const upperCase = property.charAt(0).toUpperCase()\n + property.slice(1)\n\n const list = (property\n + ' '\n + prefixs.join(upperCase + ' ')\n + upperCase).split(' ')\n\n for (let i = 0, len = list.length; i < len; i++) {\n if (list[i] in element.style) {\n return list[i]\n }\n }\n\n}\n\nexport const screenWidth = WINDOW.screen.availWidth\n\nconst transitionEnd = testCSS('transition') ? 'transitionend' : ''\n\nexport const isMac = /Macintosh/i.test(navigator.userAgent)\nexport const supportTransform = testCSS('transform') ? TRUE : FALSE\nexport const supportFlexGap = testCSS('gap') ? TRUE : FALSE\n\nexport function onTransitionEnd(el: HTMLElement, callback: () => void) {\n // 如果 el 已经被隐藏,则直接调用 callback\n if (transitionEnd && (el.offsetWidth || el.offsetHeight)) {\n const listener = function () {\n Yox.dom.off(el, transitionEnd, listener as Listener)\n callback()\n }\n Yox.dom.on(\n el,\n transitionEnd,\n listener\n )\n }\n else {\n Yox.nextTick(callback)\n }\n}\n\n\nconst supportPageOffset = WINDOW.pageXOffset !== UNDEFINED\nconst isCSS1Compat = DOCUMENT.compatMode === 'CSS1Compat'\n\nexport function getPageX() {\n return supportPageOffset\n ? WINDOW.pageXOffset\n : isCSS1Compat\n ? DOCUMENT.documentElement.scrollLeft\n : BODY.scrollLeft\n}\n\nexport function getPageY() {\n return supportPageOffset\n ? WINDOW.pageYOffset\n : isCSS1Compat\n ? DOCUMENT.documentElement.scrollTop\n : BODY.scrollTop\n}\n\nexport const requestAnimationFrame = (\n WINDOW.requestAnimationFrame ||\n WINDOW['webkitRequestAnimationFrame'] ||\n WINDOW['mozRequestAnimationFrame'] ||\n WINDOW['msRequestAnimationFrame'] ||\n function (callback) {\n return WINDOW.setTimeout(callback, 1000 / 60)\n }\n)\n\nexport function readElementRectInfo(element: HTMLElement, callback: (rect: object) => void) {\n\n const rectInfo = element.getBoundingClientRect()\n if (rectInfo.width > 0 || rectInfo.height > 0) {\n callback(rectInfo)\n return\n }\n\n setTimeout(\n function () {\n readElementRectInfo(element, callback)\n },\n 20\n )\n\n}\n\nexport function contains(element: HTMLElement, target: HTMLElement) {\n if (element.contains && element.contains(target)) {\n return TRUE\n }\n else if (element.compareDocumentPosition && element.compareDocumentPosition(target) > 16) {\n return TRUE\n }\n return FALSE\n}\n\nexport function toNumber(value: any, defaultValue?: any): any {\n return Yox.is.numeric(value)\n ? +value\n : defaultValue !== UNDEFINED\n ? defaultValue\n : 0\n}\n\nexport function toString(value: any, defaultValue?: any) {\n if (value == NULL) {\n return defaultValue !== UNDEFINED\n ? defaultValue as string\n : ''\n }\n return '' + value\n}\n\nexport function toBoolean(value: any) {\n return Yox.is.boolean(value)\n ? value\n : FALSE\n}\n\nexport function toPixel(value: number) {\n return value + 'px'\n}\n\nexport function toPercent(value: number) {\n return value + '%'\n}\n\nexport function findComponentUpward(parent, componentName: string | string[]) {\n if (typeof componentName === 'string') {\n componentName = [ componentName ]\n }\n else {\n componentName = componentName\n }\n\n while (parent) {\n let { name } = parent.$options\n if (name && Yox.array.has(componentName, name)) {\n break\n }\n else {\n parent = parent.$parent\n }\n }\n\n return parent\n}\n\nexport function oneOf(values: any[]) {\n return function (key: string, value: any, componentName: string | undefined) {\n\n // 只需要检测有值的情况\n if (value === UNDEFINED) {\n return\n }\n\n // 传值在枚举值中\n if (Yox.array.has(values, value, FALSE)) {\n return\n }\n\n Yox.logger.warn(`${key} 期望是 ${values.join(',')} 中的值,实际传值 [${value}]。`, componentName)\n\n }\n}\n\nexport function getNowTime() {\n return Date.now()\n}\n\nconst SECOND = 1000\nconst MINUTE = 60 * SECOND\nconst HOUR = 60 * MINUTE\nconst DAY = 24 * HOUR\n\nexport function formatMillisecond(\n value: number,\n options: {\n format: string,\n trimDay?: boolean,\n trimHour?: boolean,\n }\n) {\n\n let { format, trimDay, trimHour } = options\n\n const showDay = format.indexOf('d') >= 0\n const showHour = format.indexOf('H') >= 0\n const showMinute = format.indexOf('m') >= 0\n const showSecond = format.indexOf('s') >= 0\n\n let day = 0\n if (showDay) {\n day = Math.floor(value / DAY)\n value %= DAY\n }\n\n let hour = 0\n if (showHour) {\n hour = Math.floor(value / HOUR)\n value %= HOUR\n }\n\n let minute = 0\n if (showMinute) {\n minute = Math.floor(value / MINUTE)\n value %= MINUTE\n }\n\n let second = 0\n if (showSecond) {\n second = Math.floor(value / SECOND)\n value %= SECOND\n }\n\n if (!day && trimDay) {\n format = format.replace(/dd:/, '').replace(/d:/, '')\n if (!hour && trimHour) {\n format = format.replace(/HH:/, '').replace(/H:/, '')\n }\n }\n\n return format\n .replace(/dd/, padStart(day))\n .replace(/d/, toString(day))\n .replace(/HH/, padStart(hour))\n .replace(/H/, toString(hour))\n .replace(/mm/, padStart(minute))\n .replace(/m/, toString(minute))\n .replace(/SSS/, padStart(value, 3))\n .replace(/ss/, padStart(second))\n .replace(/s/, toString(second))\n\n}\n\nexport function padStart(value: number, length = 2) {\n\n const text = toString(value)\n\n const arrayLength = length - text.length + 1\n if (arrayLength > 0) {\n return new Array(arrayLength).join('0') + value\n }\n\n return text\n\n}\n\nexport function scrollTo(\n element: HTMLElement | Window,\n from: number = 0,\n to: number,\n duration: number = 500,\n callback?: () => void\n) {\n\n const difference = Math.abs(from - to)\n const step = duration > 0 ? Math.ceil(difference / duration * 50) : difference\n\n function scroll(start, end, step) {\n if (start === end) {\n if (callback) {\n callback()\n }\n return\n }\n\n let duration = (start + step > end) ? end : start + step\n if (start > end) {\n duration = (start - step < end) ? end : start - step\n }\n\n if (element === WINDOW) {\n WINDOW.scrollTo(duration, duration)\n }\n else {\n (element as HTMLElement).scrollTop = duration\n }\n requestAnimationFrame(function () {\n scroll(duration, end, step)\n })\n }\n scroll(from, to, step)\n}\n\nexport function getStatusIconName(status: string) {\n return status === RAW_TYPE_SUCCESS\n ? 'checkbox-circle-fill'\n : status === RAW_TYPE_WARNING\n ? 'error-warning-fill'\n : status === RAW_TYPE_ERROR\n ? 'close-circle-fill'\n : 'information-fill'\n}\n\nexport function spaceListStyle(gaps: number[] | void, vertical: boolean, autoWrap: boolean, style?: any): object[] | void {\n const result: object[] = []\n\n if (gaps) {\n const gapStyle: Record = {}\n const horizontalGap = gaps[0]\n const verticalGap = gaps[1]\n if (supportFlexGap) {\n if (horizontalGap > 0) {\n gapStyle.columnGap = toPixel(horizontalGap)\n }\n if (verticalGap > 0) {\n gapStyle.rowGap = toPixel(verticalGap)\n }\n }\n else if (vertical\n || (verticalGap > 0 && autoWrap)\n ) {\n gapStyle.marginBottom = toPixel(-verticalGap)\n }\n if (Yox.object.keys(gapStyle).length > 0) {\n result.push(gapStyle)\n }\n }\n\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n}\n\nexport function spaceItemStyle(gaps: number[] | void, vertical: boolean, autoWrap: boolean, style?: Record): Record | void {\n const result: Record = style || {}\n if (!supportFlexGap && gaps) {\n const horizontalGap = gaps[0]\n const verticalGap = gaps[1]\n if (vertical) {\n if (verticalGap > 0) {\n result.marginBottom = toPixel(verticalGap)\n }\n }\n else {\n if (horizontalGap > 0) {\n result.marginRight = toPixel(horizontalGap)\n }\n if (verticalGap > 0 && autoWrap) {\n result.marginBottom = toPixel(verticalGap)\n }\n }\n }\n if (Yox.object.keys(result).length > 0) {\n return result\n }\n}\n\nexport function getNodesProps(nodes: any[], propName: string) {\n\n const result: any[] = []\n\n Yox.array.each(\n nodes,\n function (node: any) {\n result.push(\n Yox.is.array(node)\n ? getNodesProps(node, propName)\n : node[propName]\n )\n }\n )\n\n return result\n\n}\n\nexport function renderNodesProps(value: any) {\n if (Yox.is.array(value)) {\n return value.join(' / ')\n }\n return value\n}\n\nexport function setTreeCheckedKey(\n treeData: any[],\n keyName: string,\n checked: boolean,\n interact: boolean,\n isTarget: (key: string, options: any[]) => boolean,\n isChecked: (key: string, options: any[]) => boolean,\n addChecked: (key: string, options: any[]) => void,\n removeChecked: (key: string, options: any[]) => void,\n isIndeterminate: (key: string, options: any[]) => boolean,\n addIndeterminate: (key: string, options: any[]) => void,\n removeIndeterminate: (key: string, options: any[]) => void) {\n\n let node: any\n\n const parents: any[] = []\n\n const callFunc = function (node: any, func: (key: string, options: any[]) => any) {\n\n const nodes = [node]\n const keys = [node[keyName]]\n\n Yox.array.each(\n parents,\n function (parent) {\n nodes.unshift(parent)\n keys.unshift(parent[keyName])\n }\n )\n\n return func(renderNodesProps(keys), nodes)\n\n }\n\n const handleNode = function (child: any) {\n\n if (callFunc(child, isTarget)) {\n node = child\n return FALSE\n }\n\n parents.unshift(child)\n if (child.children) {\n let result = UNDEFINED\n Yox.array.each(\n child.children,\n function (child) {\n return result = handleNode(child)\n }\n )\n if (result === FALSE) {\n return FALSE\n }\n }\n parents.shift()\n\n }\n\n Yox.array.each(\n treeData,\n handleNode\n )\n\n if (!node) {\n return\n }\n\n const addNode = function (node: any, addChildren?: boolean) {\n if (node.disabled) {\n return\n }\n if (!callFunc(node, isChecked)) {\n callFunc(node, addChecked)\n }\n if (addChildren === TRUE && node.children) {\n parents.unshift(node)\n Yox.array.each(\n node.children,\n function (node) {\n addNode(node, TRUE)\n }\n )\n parents.shift()\n setNodeIndeterminate(node, FLAG_ALL_SELECTED)\n }\n }\n\n const removeNode = function (node: any, removeChildren?: boolean) {\n if (node.disabled) {\n return\n }\n callFunc(node, removeChecked)\n if (removeChildren === TRUE && node.children) {\n parents.unshift(node)\n Yox.array.each(\n node.children,\n function (node) {\n removeNode(node, TRUE)\n }\n )\n parents.shift()\n setNodeIndeterminate(node, FLAG_NONE_SELECTED)\n }\n }\n\n const FLAG_ALL_SELECTED = 1\n const FLAG_NONE_SELECTED = -1\n const FLAG_PART_SELECTED = 0\n\n const getNodeIndeterminate = function (node: any) {\n\n // 看下兄弟节点是否全部勾选\n const { children } = node\n const { length } = children\n\n let checkedCount = 0\n let indeterminateCount = 0\n\n for (let i = 0; i < length; i++) {\n if (callFunc(children[i], isChecked)) {\n checkedCount++\n }\n if (callFunc(children[i], isIndeterminate)) {\n indeterminateCount++\n }\n }\n\n if (checkedCount === 0) {\n return indeterminateCount > 0\n ? FLAG_PART_SELECTED\n : FLAG_NONE_SELECTED\n }\n\n if (checkedCount === length) {\n return FLAG_ALL_SELECTED\n }\n\n return FLAG_PART_SELECTED\n\n }\n\n const setNodeIndeterminate = function (node: any, indeterminate: number) {\n\n if (!interact) {\n return\n }\n\n if (indeterminate === FLAG_PART_SELECTED) {\n if (!callFunc(node, isIndeterminate)) {\n callFunc(node, addIndeterminate)\n }\n }\n else {\n callFunc(node, removeIndeterminate)\n }\n\n }\n\n if (checked) {\n addNode(node, interact)\n if (interact) {\n Yox.array.each(\n parents.slice(),\n function (parent: any) {\n\n if (parent.disabled) {\n return FALSE\n }\n\n const indeterminate = getNodeIndeterminate(parent)\n\n parents.shift()\n\n if (indeterminate === FLAG_ALL_SELECTED) {\n addNode(parent)\n }\n else {\n removeNode(parent)\n }\n\n setNodeIndeterminate(parent, indeterminate)\n\n }\n )\n }\n }\n else {\n removeNode(node, interact)\n if (interact) {\n Yox.array.each(\n parents.slice(),\n function (parent) {\n\n if (parent.disabled) {\n return FALSE\n }\n\n const indeterminate = getNodeIndeterminate(parent)\n\n parents.shift()\n\n removeNode(parent)\n\n setNodeIndeterminate(parent, indeterminate)\n\n }\n )\n }\n }\n\n}","import Yox, { Watcher } from 'yox'\n\ntype breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs'\n\nconst responsiveMap: Record = {\n xs: '(max-width: 575px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n xxl: '(min-width: 1600px)',\n}\n\nexport const responsiveArray: breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']\n\nfunction eachBreakpoints(callback: (breakpoint: breakpoint, mql: MediaQueryList) => void) {\n Yox.array.each(\n responsiveArray,\n function (key) {\n callback(\n key,\n window.matchMedia(responsiveMap[key])\n )\n }\n )\n}\n\nfunction getCurrentBreakpoint() {\n let result: breakpoint\n eachBreakpoints(\n function (breakpoint, mql) {\n if (mql.matches) {\n result = breakpoint\n }\n }\n )\n return result\n}\n\nconst store = new Yox({\n data: {\n breakpoint: getCurrentBreakpoint(),\n }\n})\n\neachBreakpoints(\n function (breakpoint, mql) {\n const listener = function (event: { matches: boolean }) {\n if (event.matches) {\n store.set('breakpoint', breakpoint)\n }\n else if (store.get('breakpoint') === breakpoint) {\n store.set(\n 'breakpoint',\n getCurrentBreakpoint()\n )\n }\n }\n mql.addListener(listener)\n }\n)\n\nexport function getBreakpoint() {\n return store.get('breakpoint')\n}\n\nexport function watchBreakpoint(watcher: Watcher) {\n store.watch('breakpoint', watcher)\n}\n\nexport function unwatchBreakpoint(watcher: Watcher) {\n store.unwatch('breakpoint', watcher)\n}\n\nexport function parseGutter(breakpoint: breakpoint | void, gutter: string | number | object | void) {\n\n if (gutter > 0) {\n return gutter\n }\n else if (breakpoint && Yox.is.object(gutter)) {\n // 找最接近的\n const startIndex = responsiveArray.indexOf(breakpoint)\n if (startIndex >= 0) {\n for (let i = startIndex; i >= 0; i--) {\n const value = gutter[responsiveArray[i]]\n if (value > 0) {\n return value\n }\n }\n }\n }\n\n}","import Yox from 'yox'\n\nimport template from './template/Row.hbs'\n\nimport {\n TRUE,\n RAW_ARRAY,\n RAW_OBJECT,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_TOP,\n RAW_MIDDLE,\n RAW_BOTTOM,\n RAW_STYLE_TYPE,\n RAW_EVENT_BEFORE_DESTROY,\n RAW_BOOLEAN,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n supportFlexGap,\n} from '../util'\n\nimport {\n parseGutter,\n getBreakpoint,\n watchBreakpoint,\n unwatchBreakpoint,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Row',\n\n propTypes: {\n gutter: {\n type: [RAW_NUMERIC, RAW_OBJECT, RAW_ARRAY],\n },\n justify: {\n type: oneOf(['start', 'end', 'center', 'space-around', 'space-between']),\n value: 'start',\n },\n align: {\n type: oneOf([RAW_TOP, RAW_MIDDLE, RAW_BOTTOM]),\n value: RAW_TOP,\n },\n autoWrap: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n breakpoint: getBreakpoint(),\n }\n },\n\n computed: {\n responsiveGutter() {\n let gutter = this.get('gutter')\n if (gutter) {\n if (!Yox.is.array(gutter)) {\n gutter = [gutter]\n }\n const breakpoint = this.get('breakpoint')\n return [\n parseGutter(breakpoint, gutter[0]),\n parseGutter(breakpoint, gutter[1]),\n ]\n }\n },\n inlineStyle(): object[] | void {\n\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const responsiveGutter = this.get('responsiveGutter')\n if (responsiveGutter) {\n if (responsiveGutter[0] > 0) {\n const horizontalGutter = toPixel(responsiveGutter[0] / -2)\n customStyle.marginLeft = horizontalGutter\n customStyle.marginRight = horizontalGutter\n }\n if (responsiveGutter[1] > 0) {\n if (supportFlexGap) {\n customStyle.rowGap = toPixel(responsiveGutter[1])\n }\n else {\n const verticalGutter = toPixel(responsiveGutter[1] / -2)\n customStyle.marginTop = verticalGutter\n customStyle.marginBottom = verticalGutter\n }\n }\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n\n }\n },\n\n watchers: {\n autoWrap(autoWrap) {\n this.fire(\n {\n type: 'change',\n ns: 'row',\n },\n {\n autoWrap,\n },\n TRUE\n )\n },\n breakpoint(breakpoint) {\n this.fire(\n {\n type: 'change',\n ns: 'row',\n },\n {\n breakpoint,\n },\n TRUE\n )\n },\n responsiveGutter(responsiveGutter) {\n this.fire(\n {\n type: 'change',\n ns: 'row',\n },\n {\n responsiveGutter,\n },\n TRUE\n )\n }\n },\n\n afterMount() {\n\n const me = this\n const watcher = function (value) {\n me.set('breakpoint', value)\n }\n\n watchBreakpoint(watcher)\n\n const destroy = function (component) {\n if (component === me) {\n unwatchBreakpoint(watcher)\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n})\n","import Yox, { Data } from 'yox'\n\nimport template from './template/Col.hbs'\n\nimport {\n RAW_STRING,\n RAW_NUMBER,\n RAW_NUMERIC,\n RAW_OBJECT,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n supportFlexGap,\n findComponentUpward,\n} from '../util'\n\nimport {\n responsiveArray\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Col',\n\n propTypes: {\n flex: {\n type: [RAW_NUMBER, RAW_STRING],\n },\n span: {\n type: RAW_NUMERIC,\n },\n order: {\n type: RAW_NUMERIC,\n },\n offset: {\n type: RAW_NUMERIC,\n },\n pull: {\n type: RAW_NUMERIC,\n },\n push: {\n type: RAW_NUMERIC,\n },\n xs: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n sm: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n md: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n lg: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n xl: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n xxl: {\n type: [RAW_NUMERIC, RAW_OBJECT],\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const row = findComponentUpward(options.parent, '${prefix}Row')\n return {\n autoWrap: row.get('autoWrap'),\n breakpoint: row.get('breakpoint'),\n responsiveGutter: row.get('responsiveGutter'),\n }\n },\n\n events: {\n change: {\n listener(_, data) {\n this.set(data)\n },\n ns: 'row',\n }\n },\n\n computed: {\n responsiveClass() {\n const me = this\n const breakpoint = me.get('breakpoint')\n\n const breakpointList = responsiveArray.map(\n function (breakpoint) {\n return me.get(breakpoint)\n }\n )\n\n let breakpointName: string | void\n let breakpointConfig: Data | void\n const startIndex = responsiveArray.indexOf(breakpoint)\n if (startIndex >= 0) {\n for (let i = startIndex; i >= 0; i--) {\n const value = breakpointList[i]\n if (value) {\n breakpointName = responsiveArray[i]\n breakpointConfig = value\n break\n }\n }\n }\n\n if (breakpointConfig) {\n const result: string[] = []\n if (Yox.is.object(breakpointConfig)) {\n const { span, order, offset, pull, push } = breakpointConfig\n if (span) {\n result.push('${prefix}col-' + breakpointName + '-' + span)\n }\n if (order) {\n result.push('${prefix}col-' + breakpointName + '-order-' + order)\n }\n if (offset) {\n result.push('${prefix}col-' + breakpointName + '-offset-' + offset)\n }\n if (pull) {\n result.push('${prefix}col-' + breakpointName + '-pull-' + pull)\n }\n if (push) {\n result.push('${prefix}col-' + breakpointName + '-push-' + push)\n }\n }\n else if (Yox.is.numeric(breakpointConfig)) {\n result.push('${prefix}col-' + breakpointName + '-' + breakpointConfig)\n }\n if (result.length) {\n return result.join(' ')\n }\n }\n\n },\n inlineStyle(): object[] | void {\n\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const flex = this.get('flex')\n if (Yox.is.numeric(flex)) {\n customStyle.flex = `${flex} ${flex} auto`\n }\n else if (flex && Yox.is.string(flex)) {\n customStyle.flex = /^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(flex)\n ? `0 0 ${flex}`\n : flex\n }\n\n const autoWrap = this.get('autoWrap')\n // Hack for Firefox to avoid size issue\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n if (!autoWrap && customStyle.flex) {\n customStyle.minWidth = 0\n }\n\n const responsiveGutter = this.get('responsiveGutter')\n if (responsiveGutter) {\n if (responsiveGutter[0] > 0) {\n const horizontalGutter = toPixel(responsiveGutter[0] / 2)\n customStyle.paddingLeft = horizontalGutter\n customStyle.paddingRight = horizontalGutter\n }\n if (responsiveGutter[1] > 0 && !supportFlexGap) {\n const verticalGutter = toPixel(responsiveGutter[1] / 2)\n customStyle.paddingTop = verticalGutter\n customStyle.paddingBottom = verticalGutter\n }\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n\n }\n },\n})\n","import Yox from 'yox'\n\nimport template from './template/Icon.hbs'\n// import './style/Icon.styl'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Icon',\n\n propTypes: {\n name: {\n type: RAW_STRING,\n required: TRUE,\n },\n size: {\n type: RAW_NUMERIC,\n },\n color: {\n type: RAW_STRING,\n },\n spin: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const color = this.get('color')\n const size = this.get('size')\n\n if (color) {\n customStyle.color = color\n }\n if (size > 0) {\n customStyle.fontSize = toPixel(size)\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n }\n})","import Yox from 'yox'\n\nimport template from './template/Add.hbs'\n// import './style/Add.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport { toPixel } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Add',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n width: {\n type: RAW_NUMERIC,\n value: 100,\n },\n height: {\n type: RAW_NUMERIC,\n value: 100,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n\n const result: object[] = []\n\n const width = this.get('width')\n const height = this.get('height')\n\n if (this.get('block')) {\n result.push({\n height: toPixel(height),\n })\n }\n else {\n result.push({\n width: toPixel(width),\n height: toPixel(height),\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/ColorSwatch.hbs'\n// import './style/ColorSwatch.styl'\n\nimport {\n TRUE,\n FALSE,\n RAW_ARRAY,\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n spaceListStyle,\n spaceItemStyle,\n} from '../util'\n\nconst swatchGaps = [10, 8]\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ColorSwatch',\n\n propTypes: {\n swatches: {\n type: RAW_ARRAY,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n swatchListStyle(): object[] | void {\n return spaceListStyle(\n swatchGaps,\n FALSE,\n TRUE,\n this.get('style')\n )\n },\n swatchItemStyle(): Record | void {\n return spaceItemStyle(\n swatchGaps,\n FALSE,\n TRUE\n )\n },\n },\n\n methods: {\n onColorClick(color: string) {\n this.fire(\n {\n type: 'change',\n ns: 'colorSwatch',\n },\n {\n color,\n }\n )\n },\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Countdown.hbs'\n// import './style/Countdown.styl'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n RAW_EVENT_BEFORE_DESTROY,\n} from '../constant'\n\nimport {\n toNumber,\n formatMillisecond,\n} from '../util'\n\nconst SECOND = 1000\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Countdown',\n\n propTypes: {\n value: {\n type: RAW_NUMERIC,\n },\n step: {\n type: RAW_NUMERIC,\n },\n format: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n formatedValue() {\n const value = toNumber(this.get('value'))\n const format = this.get('format') || 'HH:mm:ss'\n return formatMillisecond(value, { format })\n }\n },\n\n afterMount() {\n\n const me = this\n\n let timer: number | void\n let step: number\n\n const clearTimer = function () {\n if (timer) {\n clearInterval(timer)\n timer = UNDEFINED\n }\n }\n\n const next = function () {\n const value = toNumber(me.get('value'))\n let isFinish: boolean\n if (value > 0) {\n const newValue = Math.max(value - step, 0)\n me.set('value', newValue)\n isFinish = newValue == 0\n me.fire(\n {\n type: 'change',\n ns: 'countdown'\n },\n {\n value: newValue,\n }\n )\n }\n else {\n isFinish = TRUE\n }\n\n if (isFinish) {\n clearTimer()\n me.fire(\n {\n type: 'finish',\n ns: 'countdown'\n }\n )\n }\n }\n\n me.watch(\n 'step',\n function (newValue) {\n step = toNumber(newValue, SECOND)\n clearTimer()\n if (step > 0) {\n timer = window.setInterval(next, step)\n }\n },\n TRUE\n )\n\n const destroy = function (component) {\n if (component === me) {\n clearTimer()\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Closable.hbs'\n// import './style/Closable.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_ALWAYS,\n RAW_HOVER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport { oneOf } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Closable',\n\n propTypes: {\n needClose: {\n type: RAW_BOOLEAN,\n },\n showClose: {\n type: oneOf([RAW_ALWAYS, RAW_HOVER]),\n },\n draggable: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_ALWAYS,\n RAW_HOVER,\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/FooterBar.hbs'\n// import './style/FooterBar.styl'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport { oneOf } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}FooterBar',\n\n propTypes: {\n align: {\n type: oneOf(['start', 'end', 'center']),\n value: 'center',\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/ResizeObserver.hbs'\n// import './style/ResizeObserver.styl'\n\nimport {\n RAW_NUMERIC,\n RAW_EVENT_BEFORE_DESTROY,\n} from '../constant'\n\nimport {\n toNumber,\n getNowTime,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ResizeObserver',\n\n propTypes: {\n delay: {\n type: RAW_NUMERIC,\n }\n },\n\n afterMount() {\n\n const me = this\n const element = me.$el\n const delay = toNumber(me.get('delay'), 0)\n\n let timerRef: any\n let timerTimestamp: number\n let actualWidth: number\n let actualHeight: number\n\n const handleResize = function (width: number, height: number) {\n if (width > 0 || height > 0) {\n actualWidth = width\n actualHeight = height\n\n // 需要延时的情况下,\n if (delay > 0) {\n const now = getNowTime()\n const rest = timerTimestamp > 0 ? now - timerTimestamp : delay\n if (!timerRef) {\n timerTimestamp = now\n timerRef = setTimeout(\n fireResize,\n rest\n )\n return\n }\n if (rest > 0) {\n clearTimeout(timerRef)\n timerRef = setTimeout(\n fireResize,\n delay\n )\n return\n }\n }\n fireResize()\n\n }\n }\n\n const fireResize = function () {\n if (timerRef) {\n timerTimestamp = 0\n clearTimeout(timerRef)\n }\n me.fire(\n {\n type: 'resize',\n ns: 'resizeObserver',\n },\n {\n width: actualWidth,\n height: actualHeight,\n }\n )\n }\n\n handleResize(element.clientWidth, element.clientHeight)\n\n // @ts-ignore\n if (typeof ResizeObserver !== 'undefined') {\n // @ts-ignore\n const resizeObserver = new ResizeObserver(\n function (entries) {\n const { width, height } = entries[0].contentRect\n handleResize(width, height)\n }\n )\n resizeObserver.observe(element)\n\n const destroy = function (component) {\n if (component === me) {\n resizeObserver.disconnect()\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Menu.hbs'\n// import './style/Menu.styl'\n\nimport {\n TRUE,\n\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n\n RAW_HORIZONTAL,\n RAW_VERTICAL,\n RAW_INLINE,\n RAW_LIGHT,\n RAW_THEME_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Menu',\n\n propTypes: {\n mode: {\n type: oneOf([RAW_HORIZONTAL, RAW_VERTICAL, RAW_INLINE]),\n value: RAW_HORIZONTAL,\n },\n theme: {\n type: oneOf(RAW_THEME_ARRAY),\n value: RAW_LIGHT,\n },\n collapsed: {\n type: RAW_BOOLEAN,\n },\n activeName: {\n type: RAW_STRING,\n },\n openNames: {\n type: RAW_ARRAY,\n value() {\n return []\n }\n },\n inner: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n watchers: {\n activeName(activeName: boolean) {\n this.fire(\n {\n type: 'activeName',\n ns: 'menu',\n },\n { activeName },\n TRUE\n )\n },\n openNames(openNames: boolean) {\n this.fire(\n {\n type: 'openNames',\n ns: 'menu',\n },\n { openNames },\n TRUE\n )\n },\n collapsed(collapsed: boolean) {\n this.fire(\n {\n type: 'change',\n ns: 'menu',\n },\n { collapsed },\n TRUE\n )\n },\n theme(theme) {\n this.fire(\n {\n type: 'change',\n ns: 'menu',\n },\n { theme },\n TRUE\n )\n },\n mode(mode) {\n this.fire(\n {\n type: 'change',\n ns: 'menu',\n },\n { mode },\n TRUE\n )\n },\n },\n\n events: {\n click: {\n listener(event, data) {\n if (event.phase === Yox.Event.PHASE_UPWARD\n && !this.get('inner')\n ) {\n this.fire(\n {\n type: 'change',\n ns: 'menu',\n },\n {\n activeName: data.name\n }\n )\n }\n },\n ns: 'menuItem',\n },\n isOpen: {\n listener(event, data) {\n if (event.phase === Yox.Event.PHASE_UPWARD\n && !this.get('inner')\n ) {\n\n const { isOpen, name } = data\n\n let openNames = this.get('openNames')\n if (openNames) {\n openNames = this.copy(openNames)\n }\n else {\n openNames = []\n }\n\n if (isOpen) {\n openNames.push(name)\n }\n else {\n Yox.array.remove(openNames, name)\n }\n\n this.fire(\n {\n type: 'change',\n ns: 'menu',\n },\n {\n openNames,\n }\n )\n\n }\n },\n ns: 'subMenu',\n }\n }\n})","import Yox from 'yox'\n\nimport template from './template/MenuItem.hbs'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}MenuItem',\n\n propTypes: {\n name: {\n type: RAW_STRING,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const menu = findComponentUpward(options.parent, '${prefix}Menu')\n return {\n isActive: menu.get('activeName') === this.get('name'),\n }\n },\n\n events: {\n activeName: {\n listener(_, data) {\n this.set('isActive', data.activeName === this.get('name'))\n },\n ns: 'menu',\n },\n },\n\n methods: {\n click() {\n this.fire(\n {\n type: 'click',\n ns: 'menuItem',\n },\n {\n name: this.get('name')\n }\n )\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/MenuGroup.hbs'\n\nimport {\n RAW_STRING,\n RAW_INLINE,\n RAW_VERTICAL,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}MenuGroup',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const menu = findComponentUpward(options.parent, '${prefix}Menu')\n return {\n RAW_INLINE,\n RAW_VERTICAL,\n mode: menu.get('mode'),\n }\n },\n\n})","import Yox, { CustomEventInterface, Listener } from 'yox'\nimport { DOCUMENT, RAW_EVENT_BEFORE_DESTROY, RAW_EVENT_KEYDOWN, TRUE, UNDEFINED } from './constant'\n\nconst emitter = new Yox()\n\n/**\n * 有些组件会调用 `event.stop()` 阻止事件冒泡\n *\n * 但是,有些地方需要监听全局点击事件,这些组件的点击事件不能被忽略\n *\n * 因此,我们加一个全局方法,让组件再调用 `event.stop()` 之后再调用 `fireClickEvent()`\n *\n * @param event\n */\nexport function fireClickEvent(event?: CustomEventInterface, isFromPopover?: boolean) {\n // event 一般会被调用 `event.stop()`\n // 如果直接 fire 原事件,相当于 fire 了一个 stoped 事件,这是不对的\n emitter.fire(\n new Yox.Event('click', event ? event.originalEvent : UNDEFINED),\n { isFromPopover }\n )\n}\n\nexport function onClickEvent(listener: Listener) {\n emitter.on('click', listener)\n}\n\nexport function offClickEvent(listener: Listener) {\n emitter.off('click', listener)\n}\n\nlet startDragTime = 0\nlet endDragTime = 0\n\nexport function startDrag() {\n startDragTime = Date.now()\n endDragTime = 0\n}\n\nexport function endDrag() {\n endDragTime = Date.now()\n}\n\nexport function isClickEvent() {\n // 拖拽结束时,mouseup 之后会紧接着触发 click,此时要判断间隔,如果大于 200ms 才算是 click\n if (endDragTime > 0) {\n return Date.now() - endDragTime > 200\n }\n return TRUE\n}\n\nexport function onClickEventByEnterPress(instance: any, handler?: () => void) {\n\n const onKeydown = function (event: CustomEventInterface) {\n const originalEvent = event.originalEvent as KeyboardEvent\n if (originalEvent.keyCode === 13) {\n if (handler) {\n handler()\n }\n else if (instance.get('isFocus')) {\n instance.onClick()\n }\n }\n }\n Yox.dom.on(DOCUMENT, RAW_EVENT_KEYDOWN, onKeydown)\n\n const onDestroy = function (component: Yox) {\n if (component === instance) {\n Yox.dom.off(DOCUMENT, RAW_EVENT_KEYDOWN, onKeydown)\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, onDestroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, onDestroy)\n\n}","import Yox, { YoxInterface, CustomEventInterface, Data } from 'yox'\n\nimport template from './template/Popover.hbs'\n// import './style/Popover.styl'\n\nimport {\n NULL,\n TRUE,\n FALSE,\n UNDEFINED,\n WINDOW,\n DOCUMENT,\n RAW_NUMERIC,\n RAW_HOVER,\n RAW_CLICK,\n RAW_CUSTOM,\n RAW_RESIZE,\n RAW_BOOLEAN,\n RAW_EVENT_BEFORE_DESTROY,\n RAW_BOTTOM,\n RAW_TOP,\n RAW_LEFT,\n RAW_RIGHT,\n RAW_PLACEMENT_ARRAY,\n RAW_TOP_START,\n RAW_TOP_END,\n RAW_LEFT_START,\n RAW_LEFT_END,\n RAW_RIGHT_START,\n RAW_RIGHT_END,\n RAW_BOTTOM_START,\n RAW_BOTTOM_END,\n HOVER_DELAY,\n RAW_SLOT_CHILDREN,\n} from '../constant'\n\nimport {\n oneOf,\n contains,\n toPixel,\n toNumber,\n getPageX,\n getPageY,\n onTransitionEnd,\n readElementRectInfo,\n} from '../util'\n\nimport {\n fireClickEvent,\n offClickEvent,\n onClickEvent,\n isClickEvent,\n} from '../event'\n\nconst CLASS_POPOVER = '${prefix}popover'\nconst CLASS_POPOVER_TRANSITION = '${prefix}popover-transition'\nconst CLASS_POPOVER_FADE = '${prefix}popover-fade'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Popover',\n\n propTypes: {\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM,\n },\n trigger: {\n type: oneOf([RAW_HOVER, RAW_CLICK, RAW_CUSTOM]),\n value: RAW_HOVER,\n },\n triggerMutable: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n visible: {\n type: RAW_BOOLEAN,\n },\n widthAlign: {\n type: RAW_BOOLEAN,\n },\n showArrow: {\n type: RAW_BOOLEAN,\n },\n showDelay: {\n type: RAW_NUMERIC,\n value: HOVER_DELAY,\n },\n hideDelay: {\n type: RAW_NUMERIC,\n value: 300,\n },\n offsetX: {\n type: RAW_NUMERIC,\n },\n offsetY: {\n type: RAW_NUMERIC,\n },\n gap: {\n type: RAW_NUMERIC,\n },\n },\n\n data() {\n return {\n isHover: FALSE,\n RAW_HOVER,\n RAW_CLICK,\n RAW_CUSTOM,\n }\n },\n\n watchers: {\n disabled(value) {\n if (value && this.get('visible')) {\n this.fireClose()\n }\n }\n },\n\n methods: {\n onOverlayClick(event: CustomEventInterface) {\n event.stop()\n fireClickEvent(event, TRUE)\n },\n enter() {\n const me = this as any\n me.set('isHover', TRUE)\n\n if (me.leaveTimer) {\n clearTimeout(me.leaveTimer)\n me.leaveTimer = UNDEFINED\n return\n }\n\n const showDelay = toNumber(me.get('showDelay'))\n if (showDelay > 0) {\n me.enterTimer = setTimeout(\n function () {\n me.enterTimer = UNDEFINED\n if (me.get('isHover')) {\n me.fireOpen()\n }\n },\n showDelay\n )\n }\n else {\n me.fireOpen()\n }\n },\n leave() {\n const me = this as any\n me.set('isHover', FALSE)\n\n const hideDelay = toNumber(me.get('hideDelay'))\n if (hideDelay > 0) {\n me.leaveTimer = setTimeout(\n function () {\n me.leaveTimer = UNDEFINED\n me.fireClose()\n },\n hideDelay\n )\n }\n else {\n me.fireClose()\n }\n },\n fireOpen() {\n\n const me = this as any\n\n if (me.enterTimer) {\n clearTimeout(me.enterTimer)\n me.enterTimer = UNDEFINED\n }\n\n me.fire({\n type: 'open',\n ns: 'popover',\n })\n\n },\n fireClose() {\n\n const me = this as any\n\n if (me.leaveTimer) {\n clearTimeout(me.leaveTimer)\n me.leaveTimer = UNDEFINED\n }\n\n me.fire({\n type: 'close',\n ns: 'popover',\n })\n\n },\n toggleVisible() {\n if (this.get('visible')) {\n this.fireClose()\n }\n else {\n this.fireOpen()\n }\n },\n\n getOverlayRect() {\n\n const me = this as any\n\n const widthAlign = me.get('widthAlign')\n const placement = me.get('placement') || RAW_BOTTOM\n const offsetX = toNumber(me.get('offsetX'), 0)\n const offsetY = toNumber(me.get('offsetY'), 0)\n const gap = toNumber(me.get('gap'), 0)\n\n const triggerElement = me.$refs.trigger as HTMLElement\n const triggerRect = triggerElement.getBoundingClientRect()\n const triggerLeft = getPageX() + triggerRect.left\n const triggerTop = getPageY() + triggerRect.top\n\n let x = 0, y = 0, isVertical = FALSE\n\n if (placement === RAW_TOP\n || placement === RAW_TOP_START\n || placement === RAW_TOP_END\n ) {\n y = triggerTop - gap\n isVertical = TRUE\n }\n else if (placement === RAW_BOTTOM\n || placement === RAW_BOTTOM_START\n || placement === RAW_BOTTOM_END\n ) {\n y = triggerTop + triggerRect.height + gap\n isVertical = TRUE\n }\n else if (placement === RAW_LEFT\n || placement === RAW_LEFT_START\n || placement === RAW_LEFT_END\n ) {\n x = triggerLeft - gap\n }\n else if (placement === RAW_RIGHT\n || placement === RAW_RIGHT_START\n || placement === RAW_RIGHT_END\n ) {\n x = triggerLeft + triggerRect.width + gap\n }\n\n if (placement === RAW_TOP\n || placement === RAW_BOTTOM\n ) {\n x = triggerLeft + 0.5 * triggerRect.width\n }\n else if (placement === RAW_TOP_START\n || placement === RAW_BOTTOM_START\n ) {\n x = triggerLeft\n }\n else if (placement === RAW_TOP_END\n || placement === RAW_BOTTOM_END\n ) {\n x = triggerLeft + triggerRect.width\n }\n else if (placement === RAW_LEFT\n || placement === RAW_RIGHT\n ) {\n y = triggerTop + 0.5 * triggerRect.height\n }\n else if (placement === RAW_LEFT_START\n || placement === RAW_RIGHT_START\n ) {\n y = triggerTop\n }\n else if (placement === RAW_LEFT_END\n || placement === RAW_RIGHT_END\n ) {\n y = triggerTop + triggerRect.height\n }\n\n return {\n x: x + offsetX,\n y: y + offsetY,\n width: isVertical && widthAlign ? triggerRect.width : UNDEFINED,\n }\n\n },\n\n refreshOverlayRect() {\n\n const overlayElement = this.$refs.overlay as HTMLElement\n if (!overlayElement) {\n return\n }\n\n const overlayRect = this.getOverlayRect()\n this.setOverlayRect(\n overlayElement,\n overlayRect.x,\n overlayRect.y,\n overlayRect.width\n )\n\n },\n\n setOverlayRect(el: HTMLElement, x: number | void, y: number | void, width: number | void) {\n const target = el.style\n target.left = x != NULL ? toPixel(x as number) : ''\n target.top = y != NULL ? toPixel(y as number) : ''\n target.width = width != NULL ? toPixel(width as number) : ''\n },\n\n },\n\n transitions: {\n overlay: {\n enter(node) {\n\n const me = this as any\n\n const triggerElement = me.$refs.trigger as HTMLElement\n const placement = me.get('placement') || RAW_BOTTOM\n\n readElementRectInfo(\n triggerElement,\n function () {\n\n if (!me.$el || !me.get('visible')) {\n return\n }\n\n Yox.dom.addClass(node, CLASS_POPOVER)\n Yox.dom.addClass(node, '${prefix}popover-' + placement)\n if (me.get('showArrow')) {\n Yox.dom.addClass(node, '${prefix}popover-with-arrow')\n }\n\n const overlayRect = me.getOverlayRect()\n me.setOverlayRect(\n node,\n overlayRect.x,\n overlayRect.y,\n overlayRect.width\n )\n\n me.animateTimer = setTimeout(\n function () {\n Yox.dom.addClass(node, CLASS_POPOVER_TRANSITION)\n\n me.animateTimer = setTimeout(\n function () {\n Yox.dom.addClass(node, CLASS_POPOVER_FADE)\n },\n 20\n )\n },\n 30\n )\n\n }\n )\n\n },\n leave(node, done) {\n\n const me = this\n\n Yox.dom.removeClass(node, CLASS_POPOVER_FADE)\n\n onTransitionEnd(\n node,\n function () {\n me.setOverlayRect(node, UNDEFINED, UNDEFINED, UNDEFINED)\n Yox.dom.removeClass(node, CLASS_POPOVER_TRANSITION)\n Yox.dom.removeClass(node, CLASS_POPOVER)\n done()\n }\n )\n\n }\n }\n },\n\n afterMount() {\n\n const me = this as any\n\n const onWindowResize = function () {\n me.refreshOverlayRect()\n }\n\n const onNativeClick = function (event: CustomEventInterface) {\n if (!me.get('visible') || !isClickEvent()) {\n return\n }\n const trigger = me.$refs.trigger as HTMLElement\n const overlay = me.$refs.overlay as HTMLElement\n const target = event.originalEvent && event.originalEvent.target as HTMLElement\n if (target && (contains(trigger, target) || contains(overlay, target))) {\n return\n }\n if (me.get('trigger') === RAW_CUSTOM) {\n me.fire({\n type: 'outside',\n ns: 'popover',\n })\n }\n else {\n me.fireClose()\n }\n }\n\n const onGlobalClick = function (event: CustomEventInterface, data: Data) {\n if (!data.isFromPopover) {\n onNativeClick(event)\n }\n }\n\n Yox.dom.on(\n WINDOW,\n RAW_RESIZE,\n onWindowResize\n )\n\n Yox.dom.on(\n DOCUMENT,\n RAW_CLICK,\n onNativeClick\n )\n\n onClickEvent(onGlobalClick)\n\n me.watch(\n RAW_SLOT_CHILDREN,\n function () {\n if (me.get('visible') && me.get('triggerMutable')) {\n me.nextTick(\n function () {\n me.refreshOverlayRect()\n }\n )\n }\n }\n )\n\n const destroy = function (component: YoxInterface) {\n if (component === me) {\n if (me.enterTimer) {\n clearTimeout(me.enterTimer)\n }\n if (me.leaveTimer) {\n clearTimeout(me.leaveTimer)\n }\n if (me.animateTimer) {\n clearTimeout(me.animateTimer)\n }\n offClickEvent(onGlobalClick)\n Yox.dom.off(WINDOW, RAW_RESIZE, onWindowResize)\n Yox.dom.off(DOCUMENT, RAW_CLICK, onNativeClick)\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n\n})\n","import Yox from 'yox'\n\nimport Icon from '../icon/Icon'\nimport Popover from '../popover/Popover'\nimport template from './template/SubMenu.hbs'\n\nimport {\n FALSE,\n RAW_STRING,\n RAW_CUSTOM,\n RAW_INLINE,\n RAW_HORIZONTAL,\n RAW_BOTTOM,\n RAW_RIGHT_START,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}SubMenu',\n\n propTypes: {\n name: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const menu = findComponentUpward(options.parent, '${prefix}Menu')\n const name = this.get('name')\n const openNames = menu.get('openNames')\n return {\n RAW_CUSTOM,\n RAW_INLINE,\n RAW_HORIZONTAL,\n RAW_BOTTOM,\n RAW_RIGHT_START,\n isOpen: openNames && Yox.array.has(openNames, name),\n isActive: menu.get('activeName') === name,\n mode: menu.get('mode'),\n theme: menu.get('theme'),\n collapsed: menu.get('collapsed'),\n }\n },\n\n watchers: {\n isOpen(isOpen) {\n const name = this.get('name')\n if (name) {\n this.fire(\n {\n type: 'isOpen',\n ns: 'subMenu',\n },\n {\n isOpen,\n name,\n }\n )\n }\n }\n },\n\n events: {\n activeName: {\n listener(_, data) {\n this.set('isActive', data.activeName === this.get('name'))\n },\n ns: 'menu',\n },\n openNames: {\n listener(_, data) {\n this.set('isOpen', data.openNames && Yox.array.has(data.openNames, this.get('name')))\n },\n ns: 'menu',\n },\n change: {\n listener(_, data) {\n this.set(data)\n },\n ns: 'menu',\n },\n click: {\n listener() {\n if (this.get('mode') !== RAW_INLINE) {\n this.set('isOpen', FALSE)\n }\n },\n ns: 'menuItem',\n },\n outside: {\n listener(event) {\n\n event.stop()\n\n this.set('isOpen', FALSE)\n\n },\n ns: 'popover',\n }\n },\n\n components: {\n Icon,\n Popover,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Text.hbs'\n// import './style/Text.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_SMALL,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_CONTENT,\n RAW_TYPE_TITLE,\n RAW_TYPE_MUTED,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Text',\n\n propTypes: {\n type: {\n type: oneOf([\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_TITLE,\n RAW_TYPE_CONTENT,\n RAW_TYPE_MUTED,\n ]),\n },\n size: {\n type: oneOf([RAW_SMALL]),\n },\n bold: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n }\n})\n","import Yox from 'yox'\n\nimport template from './template/Drawer.hbs'\n// import './style/Drawer.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n BODY,\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_LEFT,\n RAW_RIGHT,\n RAW_BOTTOM,\n RAW_TOP,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n onTransitionEnd,\n} from '../util'\n\nconst CLASS_VISIBLE = '${prefix}drawer-visible'\nconst CLASS_FADE = '${prefix}drawer-fade'\n\nexport default Yox.define({\n\n template,\n\n model: 'visible',\n\n name: '${prefix}Drawer',\n\n propTypes: {\n width: {\n type: RAW_STRING,\n value: 378,\n },\n height: {\n type: RAW_STRING,\n value: 378,\n },\n placement: {\n type: oneOf([RAW_LEFT, RAW_RIGHT, RAW_TOP, RAW_BOTTOM]),\n value: RAW_LEFT,\n },\n closable: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n showMask: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n maskClosable: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n visible: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n wrapperStyle() {\n const placement = this.get('placement')\n if (placement === RAW_LEFT\n || placement === RAW_RIGHT\n ) {\n const width = toNumber(this.get('width'))\n return {\n width: toPixel(width)\n }\n }\n const height = toNumber(this.get('height'))\n return {\n height: toPixel(height)\n }\n }\n },\n\n watchers: {\n visible(visible) {\n const bodyStyle = BODY.style\n if (visible) {\n this.set('bodyOverflow', bodyStyle.overflow)\n bodyStyle.overflow = 'hidden'\n }\n else {\n bodyStyle.overflow = this.get('bodyOverflow')\n }\n }\n },\n\n methods: {\n open() {\n this.set('visible', TRUE)\n },\n close() {\n this.set('visible', FALSE)\n }\n },\n\n transitions: {\n drawer: {\n enter(node) {\n\n const me = this as any\n const drawer = node as HTMLElement\n const wrapper = me.$refs.wrapper as HTMLElement\n me.wrapperElement = wrapper\n\n // 设置为 display block\n Yox.dom.addClass(drawer, CLASS_VISIBLE)\n me.fire({\n type: 'open',\n ns: 'drawer',\n })\n\n setTimeout(\n function () {\n if (!me.get('visible')) {\n return\n }\n\n Yox.dom.addClass(drawer, CLASS_FADE)\n onTransitionEnd(\n wrapper,\n function () {\n if (!me.get('visible')) {\n return\n }\n me.fire({\n type: 'opened',\n ns: 'drawer',\n })\n }\n )\n },\n 50\n )\n\n },\n leave(node, done) {\n\n const me = this as any\n const drawer = node as HTMLElement\n const wrapper = me.wrapperElement as HTMLElement\n me.wrapperElement = UNDEFINED\n\n Yox.dom.removeClass(drawer, CLASS_FADE)\n me.fire({\n type: 'close',\n ns: 'drawer',\n })\n\n onTransitionEnd(\n wrapper,\n function () {\n if (me.get('visible')) {\n return\n }\n Yox.dom.removeClass(drawer, CLASS_VISIBLE)\n me.fire({\n type: 'closed',\n ns: 'drawer',\n })\n done()\n }\n )\n\n }\n },\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Guide.hbs'\n// import './style/Guide.styl'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport { oneOf } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Guide',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/Breadcrumb.hbs'\n// import './style/Breadcrumb.styl'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Breadcrumb',\n\n propTypes: {\n separator: {\n type: RAW_STRING,\n value: '/',\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/BreadcrumbItem.hbs'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}BreadcrumbItem',\n\n propTypes: {\n last: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const breadcrumb = findComponentUpward(options.parent, '${prefix}Breadcrumb')\n return {\n separator: breadcrumb.get('separator')\n }\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Button.hbs'\n// import './style/Button.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n FALSE,\n UNDEFINED,\n RAW_SMALL,\n RAW_LARGE,\n RAW_DEFAULT,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_SHAPE_ROUND,\n RAW_SHAPE_CIRCLE,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_DASHED,\n RAW_TYPE_LINK,\n RAW_TYPE_TEXT,\n RAW_TYPE_PURE,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Button',\n\n propTypes: {\n type: {\n type: oneOf([\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_DASHED,\n RAW_TYPE_LINK,\n RAW_TYPE_TEXT,\n RAW_TYPE_PURE,\n ]),\n value: RAW_TYPE_PURE,\n },\n size: {\n type: oneOf([RAW_DEFAULT, RAW_LARGE, RAW_SMALL]),\n value: RAW_DEFAULT,\n },\n shape: {\n type: oneOf([RAW_SHAPE_ROUND, RAW_SHAPE_CIRCLE]),\n },\n ghost: {\n type: RAW_BOOLEAN,\n },\n autoFocus: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n methods: {\n onClick() {\n this.fire(\n {\n type: 'click',\n ns: 'button',\n }\n )\n }\n },\n\n components: {\n Icon,\n },\n\n beforeCreate(options) {\n\n const props = options.props || (options.props = {})\n\n const buttonGroup = findComponentUpward(options.parent, '${prefix}ButtonGroup')\n if (buttonGroup) {\n\n // 有 group,则 size、shape 全听 group 的\n if (props.size !== UNDEFINED) {\n delete props.size\n }\n if (props.shape !== UNDEFINED) {\n delete props.shape\n }\n\n if (props.disabled === UNDEFINED) {\n props.disabled = buttonGroup.get('disabled')\n }\n }\n else {\n // 没有 group,则要给 type 和 size 默认值\n if (props.size === UNDEFINED) {\n props.size = RAW_DEFAULT\n }\n }\n\n },\n\n afterMount() {\n if (this.get('autoFocus')) {\n this.$el.focus()\n }\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/ButtonGroup.hbs'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_SMALL,\n RAW_LARGE,\n RAW_DEFAULT,\n RAW_SHAPE_CIRCLE,\n RAW_SHAPE_ROUND,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ButtonGroup',\n\n propTypes: {\n size: {\n type: oneOf([RAW_DEFAULT, RAW_LARGE, RAW_SMALL]),\n value: RAW_DEFAULT,\n },\n shape: {\n type: oneOf([RAW_SHAPE_ROUND, RAW_SHAPE_CIRCLE]),\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Input.hbs'\n// import './style/Input.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n FALSE,\n DOCUMENT,\n RAW_BOOLEAN,\n RAW_STRING,\n RAW_NUMBER,\n RAW_NUMERIC,\n RAW_LEFT,\n RAW_CENTER,\n RAW_RIGHT,\n RAW_EVENT_KEYDOWN,\n RAW_EVENT_KEYPRESS,\n RAW_EVENT_KEYUP,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_EVENT_BEFORE_DESTROY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nconst TEXT_TYPE_PASSWORD = 'password'\nconst TEXT_TYPE_TEXT = 'text'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Input',\n\n propTypes: {\n value: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n type: {\n type: oneOf([TEXT_TYPE_TEXT, TEXT_TYPE_PASSWORD]),\n value: TEXT_TYPE_TEXT,\n },\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n align: {\n type: oneOf([RAW_LEFT, RAW_CENTER, RAW_RIGHT]),\n },\n placeholder: {\n type: RAW_STRING,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n showClear: {\n type: RAW_BOOLEAN,\n },\n secure: {\n type: RAW_BOOLEAN,\n },\n prefix: {\n type: RAW_STRING,\n },\n suffix: {\n type: RAW_STRING,\n },\n autoFocus: {\n type: RAW_BOOLEAN,\n },\n spellCheck: {\n type: RAW_BOOLEAN,\n },\n readOnly: {\n type: RAW_BOOLEAN,\n },\n showCount: {\n type: RAW_BOOLEAN,\n },\n maxLength: {\n type: RAW_NUMERIC,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n },\n },\n\n data() {\n return {\n isSecure: TRUE,\n isFocus: FALSE,\n currentType: this.get('type'),\n\n TEXT_TYPE_TEXT,\n TEXT_TYPE_PASSWORD,\n }\n },\n\n computed: {\n hasCount() {\n return this.get('showCount') && this.get('maxLength') > 0\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n }\n },\n\n filters: {\n formatValueLength(value) {\n return value\n ? value.length\n : 0\n }\n },\n\n watchers: {\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'input',\n },\n { value }\n )\n },\n isSecure(isSecure) {\n this.set({\n currentType: isSecure\n ? TEXT_TYPE_PASSWORD\n : TEXT_TYPE_TEXT\n })\n }\n },\n\n methods: {\n handleFocus() {\n this.set('isFocus', TRUE)\n this.fire({\n type: 'focus',\n ns: 'input',\n })\n },\n handleBlur() {\n this.set('isFocus', FALSE)\n this.fire({\n type: 'blur',\n ns: 'input',\n })\n },\n handleClearClick() {\n this.set('value', '')\n this.fire({\n type: 'clear',\n ns: 'input',\n })\n },\n },\n\n components: {\n Icon,\n },\n\n afterMount() {\n\n const me = this\n\n const onKeydown = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keydown.input', originalEvent)\n )\n\n switch (originalEvent.keyCode) {\n case 13:\n me.fire({\n type: 'enter',\n ns: 'input',\n })\n break\n\n case 38:\n // 避免光标跑到最前面\n event.prevent()\n me.fire({\n type: 'up',\n ns: 'input',\n })\n break\n\n case 40:\n // 避免光标跑到最后面\n event.prevent()\n me.fire({\n type: 'down',\n ns: 'input',\n })\n break\n }\n\n }\n const onKeyup = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keyup.input', originalEvent)\n )\n\n }\n const onKeypress = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keypress.input', originalEvent)\n )\n\n }\n\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYDOWN,\n onKeydown\n )\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYUP,\n onKeyup\n )\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYPRESS,\n onKeypress\n )\n\n const destroy = function (component) {\n if (component === me) {\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYDOWN,\n onKeydown\n )\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYUP,\n onKeyup\n )\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYPRESS,\n onKeypress\n )\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n})\n","// 数字键 48-57\n// 大键盘 .(190) -(189)\n// 小键盘 .(110) -(109)\n// 删除键 8\n// shift 16\n// ctrl 17\n// alt 18\n// tab 9\n// capslock 20\n// cmd 91、93\n// 方向键 37-40\n// 小键盘数字键 96-105\nexport function isHelper(keyCode: number) {\n return keyCode >= 37 && keyCode <= 40\n || keyCode >= 16 && keyCode <= 18\n || keyCode === 8\n || keyCode === 9\n || keyCode === 20\n || keyCode === 91\n || keyCode === 93\n}\n\nexport function isDot(keyCode: number) {\n return keyCode === 110 || keyCode === 190\n}\n\nexport function isMinus(keyCode: number) {\n return keyCode === 109 || keyCode === 189\n}\n\nexport function isNumber(keyCode: number) {\n return (keyCode >= 48 && keyCode <= 57)\n || (keyCode >= 96 && keyCode <= 105)\n}","import Yox, { CustomEventInterface, YoxInterface } from 'yox'\n\nimport template from './template/InputNumber.hbs'\n// import './style/InputNumber.styl'\n\nimport Icon from '../icon/Icon'\nimport Input from '../input/Input'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toNumber,\n toString,\n} from '../util'\n\nimport {\n isHelper,\n isDot,\n isMinus,\n isNumber,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}InputNumber',\n\n propTypes: {\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n max: {\n type: RAW_NUMERIC,\n },\n min: {\n type: RAW_NUMERIC,\n },\n value: {\n type: RAW_NUMERIC,\n },\n step: {\n type: RAW_NUMERIC,\n value: 1,\n },\n precision: {\n type: RAW_NUMERIC,\n },\n showStep: {\n type: RAW_BOOLEAN,\n },\n autoFocus: {\n type: RAW_BOOLEAN,\n },\n readOnly: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n placeholder: {\n type: RAW_STRING,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n return {\n isComposition: FALSE,\n inputStringValue: toString(props.value),\n }\n },\n\n computed: {\n customClassName(): string {\n const classNames = ['${prefix}input-number']\n const className = this.get('className')\n if (className) {\n classNames.push(className)\n }\n return classNames.join(' ')\n },\n customPrecision(): number {\n return toNumber(\n this.get('precision'),\n -1\n )\n },\n customMin(): number {\n return toNumber(\n this.get('min'),\n Number.NEGATIVE_INFINITY\n )\n },\n customMax(): number {\n return toNumber(\n this.get('max'),\n Number.POSITIVE_INFINITY\n )\n },\n upDisabled(): boolean {\n if (this.get('disabled') || this.get('readOnly')) {\n return TRUE\n }\n return this.get('customMax') - this.get('value') < this.get('step')\n },\n downDisabled(): boolean {\n if (this.get('disabled') || this.get('readOnly')) {\n return TRUE\n }\n return this.get('value') - this.get('customMin') < this.get('step')\n }\n },\n\n watchers: {\n value(value) {\n this.updateInputValue(value)\n },\n },\n\n methods: {\n\n handleFocus(event: CustomEventInterface) {\n event.stop()\n this.fire({\n type: 'focus',\n ns: 'inputNumber',\n })\n },\n handleBlur(event: CustomEventInterface) {\n event.stop()\n this.correctValue()\n this.fire({\n type: 'blur',\n ns: 'inputNumber',\n })\n },\n handleInput(event: CustomEventInterface) {\n event.stop()\n if (this.get('isComposition')) {\n return\n }\n this.changeValue()\n },\n handleKeydown(event: CustomEventInterface) {\n event.stop()\n\n if (this.get('isComposition')) {\n return\n }\n\n const { metaKey, ctrlKey, shiftKey, keyCode } = event.originalEvent as KeyboardEvent\n // 组合键可放行\n if (metaKey || ctrlKey || shiftKey || isHelper(keyCode)) {\n return\n }\n\n // 在这控制一些非法字符,可以避免光标因为重置 value 而跳到最后的问题\n\n const textInputElement = this.getTextInput()\n\n const isFirstChar = textInputElement.selectionStart === textInputElement.selectionEnd\n && textInputElement.selectionStart === 0\n\n const inputStringValue = this.get('inputStringValue')\n\n if (isFirstChar) {\n if (inputStringValue.indexOf('-') < 0) {\n // 第一个字符,只能输入 - 和 数字\n if (isNumber(keyCode) || isMinus(keyCode)) {\n return\n }\n }\n event.prevent()\n }\n else {\n const dotIndex = inputStringValue.indexOf('.')\n\n // 不在首位时,只能输入 . 和数字\n if (isNumber(keyCode)) {\n const customPrecision = this.get('customPrecision')\n const precisionLength = dotIndex > 0 ? inputStringValue.substr(dotIndex + 1).length : 0\n if (customPrecision >= 0 && precisionLength >= customPrecision) {\n event.prevent()\n }\n }\n else if (isDot(keyCode)) {\n if (dotIndex > 0) {\n event.prevent()\n }\n }\n else {\n event.prevent()\n }\n }\n\n },\n handleKeyup(event: CustomEventInterface) {\n event.stop()\n },\n handleEnter(event: CustomEventInterface) {\n event.stop()\n this.correctValue()\n this.fire({\n type: 'enter',\n ns: 'inputNumber',\n })\n },\n handleUp(event: CustomEventInterface) {\n event.stop()\n\n if (this.get('isComposition')) {\n return\n }\n\n const numberInputElement = this.getNumberInput()\n\n numberInputElement.stepUp()\n this.getTextInput().value = numberInputElement.value\n\n this.changeValue()\n\n },\n handleDown(event: CustomEventInterface) {\n event.stop()\n\n if (this.get('isComposition')) {\n return\n }\n\n const numberInputElement = this.getNumberInput()\n\n numberInputElement.stepDown()\n this.getTextInput().value = numberInputElement.value\n\n this.changeValue()\n\n },\n handleCompositionStart(event: CustomEventInterface) {\n event.stop()\n this.set('isComposition', TRUE)\n },\n handleCompositionEnd(event: CustomEventInterface) {\n event.stop()\n this.set('isComposition', FALSE)\n this.getTextInput().value = this.get('inputStringValue')\n },\n\n updateInputValue(value: any) {\n this.set({\n inputStringValue: toString(value),\n value: toNumber(value, value),\n })\n },\n\n changeValue() {\n\n const textInputElement = this.getTextInput()\n\n const oldStringValue = this.get('inputStringValue')\n const newStringValue = textInputElement.value\n\n if (newStringValue !== oldStringValue\n && newStringValue\n && newStringValue !== '-'\n && toNumber(newStringValue, FALSE) === FALSE\n ) {\n // 输入了错误字符\n textInputElement.value = oldStringValue\n return\n }\n\n const oldValue = this.get('value')\n\n this.updateInputValue(newStringValue)\n\n const newValue = this.get('value')\n\n if (newValue !== oldValue) {\n this.fireChange(newValue)\n }\n\n },\n\n correctValue() {\n\n const value = this.get('value')\n\n let newValue = ''\n\n if (Yox.is.number(value)) {\n const min = this.get('customMin')\n const max = this.get('customMax')\n if (value < min) {\n newValue = min\n }\n else if (value > max) {\n newValue = max\n }\n else {\n return\n }\n }\n\n this.updateInputValue(newValue)\n\n if (newValue !== value) {\n this.fireChange(newValue)\n }\n\n },\n\n fireChange(value) {\n this.fire(\n {\n type: 'change',\n ns: 'inputNumber',\n },\n {\n value,\n }\n )\n },\n\n getTextInput() {\n return (this.$refs.input as YoxInterface).$refs.input as HTMLInputElement\n },\n\n getNumberInput() {\n return this.$refs.numberInput as HTMLInputElement\n }\n\n },\n\n components: {\n Icon,\n Input,\n },\n\n afterMount() {\n\n this.watch(\n 'inputStringValue',\n function (value) {\n this.getTextInput().value = value\n this.getNumberInput().value = value\n },\n TRUE\n )\n\n }\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Textarea.hbs'\n// import './style/Textarea.styl'\n\nimport {\n TRUE,\n FALSE,\n DOCUMENT,\n RAW_BOOLEAN,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_OBJECT,\n RAW_HORIZONTAL,\n RAW_VERTICAL,\n RAW_EVENT_KEYDOWN,\n RAW_EVENT_KEYPRESS,\n RAW_EVENT_KEYUP,\n RAW_SIZE_ARRAY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_DEFAULT,\n RAW_SMALL,\n RAW_LARGE,\n RAW_EVENT_BEFORE_DESTROY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf, toPixel,\n} from '../util'\n\nconst sizes = {}\nconst fontSizes = {}\n\nsizes[RAW_DEFAULT] = 5\nsizes[RAW_SMALL] = 3\nsizes[RAW_LARGE] = 8\n\nfontSizes[RAW_DEFAULT] = 14\nfontSizes[RAW_SMALL] = 12\nfontSizes[RAW_LARGE] = 16\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Textarea',\n\n propTypes: {\n value: {\n type: RAW_STRING,\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n autoSize: {\n type: [RAW_BOOLEAN, RAW_OBJECT],\n },\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n placeholder: {\n type: RAW_STRING,\n },\n rows: {\n type: RAW_NUMERIC,\n value: 3\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n resize: {\n type: oneOf([RAW_HORIZONTAL, RAW_VERTICAL]),\n },\n wrap: {\n type: oneOf(['hard', 'soft']),\n },\n autoFocus: {\n type: RAW_BOOLEAN,\n },\n spellCheck: {\n type: RAW_BOOLEAN,\n },\n readOnly: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n showCount: {\n type: RAW_BOOLEAN,\n },\n maxLength: {\n type: RAW_NUMERIC,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n },\n },\n\n data() {\n return {\n RAW_HORIZONTAL,\n RAW_VERTICAL,\n isFocus: FALSE,\n }\n },\n\n computed: {\n hasCount() {\n return this.get('showCount') && this.get('maxLength') > 0\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n textareaStyle() {\n\n let rows = this.get('rows')\n let size = this.get('size')\n let autoSize = this.get('autoSize')\n\n // 单行的高度\n const ROW_HEIGHT = fontSizes[size] * 1.5\n\n // 上下 padding + border\n const PADDING_VERTICAL = 2 * (1 + sizes[size])\n\n if (autoSize) {\n let value = this.get('value')\n if (Yox.is.object(autoSize)) {\n rows = value ? value.split('\\n').length : autoSize.minRows\n return {\n minHeight: toPixel(autoSize.minRows * ROW_HEIGHT + PADDING_VERTICAL),\n maxHeight: toPixel(autoSize.maxRows * ROW_HEIGHT + PADDING_VERTICAL),\n height: toPixel(rows * ROW_HEIGHT + PADDING_VERTICAL),\n }\n }\n\n rows = value ? value.split('\\n').length : 1\n return {\n minHeight: toPixel(ROW_HEIGHT + PADDING_VERTICAL),\n height: toPixel(rows * ROW_HEIGHT + PADDING_VERTICAL),\n }\n }\n\n return {\n height: toPixel(rows * ROW_HEIGHT + PADDING_VERTICAL),\n }\n\n }\n },\n\n watchers: {\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'textarea',\n },\n { value }\n )\n },\n },\n\n filters: {\n formatValueLength(value) {\n return value\n ? value.length\n : 0\n }\n },\n\n methods: {\n handleFocus() {\n this.set('isFocus', TRUE)\n this.fire({\n type: 'focus',\n ns: 'textarea',\n })\n },\n handleBlur() {\n this.set('isFocus', FALSE)\n this.fire({\n type: 'blur',\n ns: 'textarea',\n })\n },\n },\n\n afterMount() {\n\n const me = this\n\n const onKeydown = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keydown.input', originalEvent)\n )\n\n if (originalEvent.keyCode === 13) {\n me.fire({\n type: 'enter',\n ns: 'textarea',\n })\n }\n\n }\n const onKeyup = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keyup.input', originalEvent)\n )\n\n }\n const onKeypress = function (event: CustomEventInterface) {\n\n if (!me.get('isFocus')) {\n return\n }\n\n const originalEvent = event.originalEvent as KeyboardEvent\n me.fire(\n new Yox.Event('keypress.input', originalEvent)\n )\n\n }\n\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYDOWN,\n onKeydown\n )\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYUP,\n onKeyup\n )\n Yox.dom.on(\n DOCUMENT,\n RAW_EVENT_KEYPRESS,\n onKeypress\n )\n\n const destroy = function (component) {\n if (component === me) {\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYDOWN,\n onKeydown\n )\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYUP,\n onKeyup\n )\n Yox.dom.off(\n DOCUMENT,\n RAW_EVENT_KEYPRESS,\n onKeypress\n )\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Radio.hbs'\n// import './style/Radio.styl'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_NUMBER,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nimport {\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n model: 'checked',\n\n name: '${prefix}Radio',\n\n propTypes: {\n value: {\n type: [RAW_NUMBER, RAW_BOOLEAN, RAW_STRING],\n required: TRUE,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n checked: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isFocus: FALSE,\n }\n },\n\n events: {\n change: {\n listener(_, data) {\n if (data.value !== UNDEFINED) {\n const value = this.get('value')\n const checked = data.value == value\n this.setChecked(checked)\n }\n if (data.disabled !== UNDEFINED) {\n this.set('disabled', data.disabled)\n }\n },\n ns: 'radioGroup',\n }\n },\n\n methods: {\n onClick(event?: CustomEventInterface) {\n if (event) {\n event.stop()\n }\n this.setChecked(TRUE)\n },\n setChecked(checked: boolean) {\n if (this.get('checked') === checked) {\n return\n }\n this.set({\n checked,\n })\n this.fire(\n {\n type: 'change',\n ns: 'radio',\n },\n {\n checked,\n value: this.get('value'),\n }\n )\n },\n },\n\n beforeCreate(options) {\n\n const props = options.props || (options.props = {})\n\n const radioGroup = findComponentUpward(options.parent, '${prefix}RadioGroup')\n if (radioGroup) {\n if (props.disabled === UNDEFINED) {\n props.disabled = radioGroup.get('disabled')\n }\n\n if (props.checked === UNDEFINED) {\n props.checked = radioGroup.get('value') == props.value\n }\n }\n\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/RadioGroup.hbs'\n\nimport {\n TRUE,\n RAW_NUMBER,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_DEFAULT,\n RAW_SIZE_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}RadioGroup',\n\n propTypes: {\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n value: {\n type: [RAW_NUMBER, RAW_BOOLEAN, RAW_STRING],\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n button: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n },\n },\n\n watchers: {\n disabled(disabled) {\n this.fire(\n {\n type: 'change',\n ns: 'radioGroup',\n },\n {\n disabled,\n },\n TRUE\n )\n },\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'radioGroup',\n },\n {\n value,\n },\n TRUE\n )\n }\n },\n events: {\n change: {\n listener(event, data) {\n event.stop()\n // 只关心选中的\n if (!data.checked) {\n return\n }\n const oldValue = this.get('value')\n const newValue = data.value\n if (oldValue !== newValue) {\n this.set('value', newValue)\n this.fire(\n {\n type: 'change',\n ns: 'radioGroup',\n },\n {\n value: newValue,\n }\n )\n }\n },\n ns: 'radio',\n }\n }\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Checkbox.hbs'\n// import './style/Checkbox.styl'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMBER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nimport {\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n model: 'checked',\n\n name: '${prefix}Checkbox',\n\n propTypes: {\n value: {\n type: [RAW_STRING, RAW_NUMBER, RAW_BOOLEAN],\n required: TRUE,\n },\n indeterminate: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n checked: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isFocus: FALSE,\n }\n },\n\n events: {\n change: {\n listener(_, data) {\n if (data.value !== UNDEFINED) {\n const value = this.get('value')\n const checked = Yox.array.has(data.value, value)\n this.setChecked(checked)\n }\n if (data.disabled !== UNDEFINED) {\n this.set('disabled', data.disabled)\n }\n },\n ns: 'checkboxGroup',\n }\n },\n\n methods: {\n onClick(event?: CustomEventInterface) {\n if (event) {\n event.stop()\n }\n this.setChecked(!this.get('checked'))\n },\n setChecked(checked: boolean) {\n if (this.get('checked') === checked) {\n return\n }\n this.set({\n checked,\n })\n this.fire(\n {\n type: 'change',\n ns: 'checkbox',\n },\n {\n checked,\n value: this.get('value'),\n }\n )\n },\n },\n\n beforeCreate(options) {\n\n const props = options.props || (options.props = {})\n\n const checkboxGroup = findComponentUpward(options.parent, '${prefix}CheckboxGroup')\n if (checkboxGroup) {\n if (props.disabled === UNDEFINED) {\n props.disabled = checkboxGroup.get('disabled')\n }\n\n if (props.checked === UNDEFINED) {\n props.checked = Yox.array.has(checkboxGroup.get('value'), props.value)\n }\n }\n\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/CheckboxGroup.hbs'\n\nimport {\n TRUE,\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CheckboxGroup',\n\n propTypes: {\n value: {\n type: RAW_ARRAY,\n value() {\n return []\n }\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n watchers: {\n disabled(disabled) {\n this.fire(\n {\n type: 'change',\n ns: 'checkboxGroup',\n },\n {\n disabled,\n },\n TRUE\n )\n },\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'checkboxGroup',\n },\n {\n value\n },\n TRUE\n )\n }\n },\n events: {\n change: {\n listener(event, data) {\n event.stop()\n\n const value = this.copy(this.get('value'))\n const { length } = value\n\n if (data.checked) {\n if (!Yox.array.has(value, data.value)) {\n value.push(data.value)\n }\n }\n else {\n Yox.array.remove(value, data.value)\n }\n\n if (value.length !== length) {\n this.set({ value })\n this.fire(\n {\n type: 'change',\n ns: 'checkboxGroup',\n },\n {\n value\n },\n )\n }\n },\n ns: 'checkbox',\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/ColorThumb.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ColorThumb',\n\n propTypes: {\n color: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n colorStyle() {\n const color = this.get('color')\n return {\n backgroundColor: color,\n }\n },\n },\n\n})\n","import { DOCUMENT, NULL } from '../constant'\nimport { toNumber } from '../util'\n\nexport const MODE_HEX = 'hex'\nexport const MODE_RGB = 'rgb'\nexport const COLOR_DEFAULT = '#000'\n\n// 0 ≤ hue < 360\nexport function normalizeHue(hue: number) {\n return 359.9999 * (hue > 1 ? 1 : hue < 0 ? 0 : hue)\n}\n\n// 0 ≤ saturation ≤ 1\nexport function normalizeSaturation(saturation: number) {\n return saturation > 1 ? 1 : saturation < 0 ? 0 : saturation\n}\n\n// 0 ≤ value ≤ 1\nexport function normalizeValue(value: number) {\n return normalizeSaturation(value)\n}\n\nexport function normalizeAlpha(alpha: number) {\n return alpha > 1 ? 1 : alpha < 0 ? 0 : alpha\n}\n\nexport function getColorByName(color: string) {\n const ctx = DOCUMENT\n .createElement('canvas')\n .getContext('2d') as CanvasRenderingContext2D\n ctx.fillStyle = color\n return ctx.fillStyle\n}\n\nexport function getModeByColor(color: string) {\n if (typeof color === 'string') {\n if (/^\\s*#/.test(color)) {\n return MODE_HEX\n }\n if (/rgb/i.test(color)) {\n return MODE_RGB\n }\n }\n}\n\nexport function hsv2rgb(h: number, s: number, v: number) {\n\n\tlet r = 0\n\tlet g = 0\n\tlet b = 0\n\n\tif (s === 0) {\n\t\tr = g = b = v\n\t}\n else {\n\t\tlet _h = h / 60\n\t\tlet i = Math.floor(_h)\n\t\tlet f = _h - i\n\t\tlet p = v * (1 - s)\n\t\tlet q = v * (1 - f * s)\n\t\tlet t = v * (1 - (1 - f) * s)\n\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\tr = v\n\t\t\t\tg = t\n\t\t\t\tb = p\n\t\t\t\tbreak\n\t\t\tcase 1:\n\t\t\t\tr = q\n\t\t\t\tg = v\n\t\t\t\tb = p\n\t\t\t\tbreak\n\t\t\tcase 2:\n\t\t\t\tr = p\n\t\t\t\tg = v\n\t\t\t\tb = t\n\t\t\t\tbreak\n\t\t\tcase 3:\n\t\t\t\tr = p\n\t\t\t\tg = q\n\t\t\t\tb = v\n\t\t\t\tbreak\n\t\t\tcase 4:\n\t\t\t\tr = t\n\t\t\t\tg = p\n\t\t\t\tb = v\n\t\t\t\tbreak\n\t\t\tcase 5:\n\t\t\t\tr = v\n\t\t\t\tg = p\n\t\t\t\tb = q\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\treturn [\n r * 255,\n g * 255,\n b * 255\n ]\n\n}\n\nexport function rgb2hsv(r: number, g: number, b: number) {\n r /= 255\n g /= 255\n b /= 255\n\n const max = Math.max(r, g, b)\n const min = Math.min(r, g, b)\n const diff = max - min\n\n let h = 0\n let v = max\n let s = max === 0 ? 0 : diff / max\n\n if (max === min) {\n h = 0\n }\n else if (max === r && g >= b) {\n h = 60 * ((g - b) / diff)\n }\n else if (max === r && g < b) {\n h = 60 * ((g - b) / diff) + 360\n }\n else if (max === g) {\n h = 60 * ((b - r) / diff) + 120\n }\n else if (max === b) {\n h = 60 * ((r - g) / diff) + 240\n }\n\n return [\n h,\n s,\n v,\n ]\n}\n\n/**\n * rgb2hex\n *\n * @param {number} r 红色颜色值 0~255\n * @param {number} g 绿色颜色值 0~255\n * @param {number} b 蓝色颜色值 0~255\n * @param {number|void} a 透明度 0~1,默认 1\n */\nexport function rgb2hex(r: number, g: number, b: number, a: number | void) {\n let alphaStr = ''\n if (typeof a === 'number') {\n a = Math.round(255 * a)\n alphaStr = (a | 1 << 8).toString(16).slice(1)\n }\n const colorStr = ((b | g << 8 | r << 16) | 1 << 24).toString(16).slice(1)\n return '#' + colorStr.toUpperCase() + alphaStr.toUpperCase()\n}\n\n/**\n * hex2rgb\n *\n * @param {string} hex hex颜色值 eg: #000、#325312、#b2c343\n */\nexport function hex2rgb(hex: string) {\n\n hex = hex.replace(/^#/, '')\n\n let alpha = -1\n\n if (hex.length === 8) {\n alpha = parseInt(hex.slice(6, 8), 16) / 255\n hex = hex.slice(0, 6)\n }\n\n if (hex.length === 4) {\n alpha = parseInt(new Array(3).join(hex.slice(3, 4)), 16) / 255\n hex = hex.slice(0, 3)\n }\n\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]\n }\n\n const num = parseInt(hex, 16)\n const r = num >> 16\n const g = (num >> 8) & 255\n const b = num & 255\n const rgb = [r, g, b]\n\n if (alpha >= 0) {\n rgb.push(alpha)\n }\n\n return rgb\n}\n\nexport function stringifyRgb(rgb: number[], alpha: number | void) {\n\n const separator = ', '\n\n let name = 'rgb'\n let value = [\n Math.floor(rgb[0]),\n Math.floor(rgb[1]),\n Math.floor(rgb[2]),\n ].join(separator)\n\n if (typeof alpha === 'number') {\n name = 'rgba'\n value += separator + (Math.floor(alpha * 100) / 100)\n }\n\n return `${name}(${value})`\n\n}\n\nfunction parseRgb(rgb: string) {\n return rgb.replace(/ *rgba?\\(([^)]+)\\) */i, '$1').split(',').map(\n function (value: string) {\n return toNumber(value)\n }\n )\n}\n\nconst converts = {\n rgb: {\n hex(color: string) {\n const value = parseRgb(color)\n return rgb2hex(value[0], value[1], value[2], value[3])\n }\n },\n hex: {\n rgb(color: string) {\n const rgba = hex2rgb(color)\n return stringifyRgb(rgba, rgba[4])\n }\n },\n}\n\nexport function parseColor(value: string, alphaEnabled: boolean) {\n\n let mode = getModeByColor(value)\n if (!mode) {\n mode = MODE_HEX\n if (/^[a-zA-Z]+$/.test(value)) {\n value = getColorByName(value)\n }\n else {\n value = COLOR_DEFAULT\n }\n }\n\n let color = value\n if (mode !== MODE_RGB) {\n color = converts[mode][MODE_RGB](value)\n }\n\n const rgba = parseRgb(color)\n const hsv = rgb2hsv(rgba[0], rgba[1], rgba[2])\n\n return {\n hsv,\n rgb: [rgba[0], rgba[1], rgba[2]],\n alpha: alphaEnabled && rgba[3] != NULL ? rgba[3] : 1,\n }\n}","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/HexInput.hbs'\n\nimport Input from '../input/Input'\n\nimport {\n TRUE,\n RAW_ARRAY,\n RAW_NUMBER,\n} from '../constant'\n\nimport {\n rgb2hex,\n getColorByName,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}HexInput',\n\n propTypes: {\n rgb: {\n type: RAW_ARRAY,\n },\n alpha: {\n type: RAW_NUMBER,\n },\n },\n\n data() {\n return {\n hexText: '',\n }\n },\n\n computed: {\n value() {\n const rgb = this.get('rgb')\n const alpha = this.get('alpha')\n return rgb2hex(rgb[0], rgb[1], rgb[2], alpha)\n },\n },\n\n methods: {\n onChange(event: CustomEventInterface, data: Record) {\n event.stop()\n this.set({\n hexText: data.value\n })\n },\n onSubmit(event: CustomEventInterface) {\n event.stop()\n const hexText = this.get('hexText')\n if (!hexText) {\n return\n }\n this.fire(\n {\n type: 'colorChange',\n ns: 'hexInput'\n },\n {\n color: getColorByName(hexText)\n }\n )\n },\n },\n\n afterMount() {\n\n this.watch(\n 'rgb',\n function () {\n this.set({\n hexText: this.get('value'),\n })\n },\n TRUE\n )\n\n this.watch(\n 'alpha',\n function () {\n this.set({\n hexText: this.get('value'),\n })\n },\n TRUE\n )\n\n },\n\n components: {\n Input,\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/RgbInput.hbs'\n\nimport Input from '../input/Input'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_ARRAY,\n RAW_NUMBER,\n} from '../constant'\n\nimport {\n stringifyRgb,\n getColorByName,\n} from './util'\n\nimport {\n toNumber,\n toString,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}RgbInput',\n\n propTypes: {\n rgb: {\n type: RAW_ARRAY,\n },\n alpha: {\n type: RAW_NUMBER,\n },\n },\n\n data() {\n return {\n redText: '',\n greenText: '',\n blueText: '',\n alphaText: '',\n }\n },\n\n computed: {\n red() {\n const rgb = this.get('rgb')\n return rgb\n ? toString(Math.floor(rgb[0]))\n : ''\n },\n green() {\n const rgb = this.get('rgb')\n return rgb\n ? toString(Math.floor(rgb[1]))\n : ''\n },\n blue() {\n const rgb = this.get('rgb')\n return rgb\n ? toString(Math.floor(rgb[2]))\n : ''\n },\n alphaPercent() {\n const alpha = this.get('alpha')\n if (typeof alpha === 'number') {\n return Math.floor(alpha * 100) + '%'\n }\n return ''\n }\n },\n\n methods: {\n onChange(event: CustomEventInterface, name: string, value: string) {\n event.stop()\n this.set(name, value)\n },\n onSubmit(event: CustomEventInterface) {\n event.stop()\n\n const redText = this.get('redText')\n const greenText = this.get('greenText')\n const blueText = this.get('blueText')\n const alphaText = this.get('alphaText')\n if (!redText\n || !greenText\n || !blueText\n || (this.get('alphaPercent') && !alphaText)\n ) {\n return\n }\n\n const alphaMatch = alphaText.match(/\\s*(\\d+)%\\s*/)\n\n const rgb = stringifyRgb(\n [\n toNumber(redText),\n toNumber(greenText),\n toNumber(blueText),\n ],\n alphaMatch ? (toNumber(alphaMatch[1]) / 100) : UNDEFINED\n )\n\n this.fire(\n {\n type: 'colorChange',\n ns: 'rgbInput'\n },\n {\n color: getColorByName(rgb)\n }\n )\n },\n },\n\n afterMount() {\n\n this.watch(\n 'rgb',\n function () {\n this.set({\n redText: this.get('red'),\n greenText: this.get('green'),\n blueText: this.get('blue'),\n })\n },\n TRUE\n )\n\n this.watch(\n 'alpha',\n function () {\n this.set({\n alphaText: this.get('alphaPercent')\n })\n },\n TRUE\n )\n\n },\n\n components: {\n Input,\n }\n\n})\n","import Yox, { CustomEventInterface, Data } from 'yox'\n\nimport template from './template/ColorPanel.hbs'\n\nimport Button from '../button/Button'\nimport ColorSwatch from '../color-swatch/ColorSwatch'\nimport ColorThumb from './ColorThumb'\nimport HexInput from './HexInput'\nimport RgbInput from './RgbInput'\n\nimport {\n DOCUMENT,\n UNDEFINED,\n RAW_ARRAY,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_EVENT_MOUSEMOVE,\n RAW_EVENT_MOUSEUP,\n} from '../constant'\n\nimport {\n MODE_HEX,\n MODE_RGB,\n stringifyRgb,\n normalizeAlpha,\n normalizeHue,\n normalizeSaturation,\n normalizeValue,\n} from './util'\n\nimport {\n oneOf,\n} from '../util'\n\nimport {\n endDrag,\n startDrag,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ColorPanel',\n\n propTypes: {\n mode: {\n type: oneOf([MODE_HEX, MODE_RGB]),\n },\n swatches: {\n type: RAW_ARRAY,\n },\n showAlpha: {\n type: RAW_BOOLEAN,\n },\n rgb: {\n type: RAW_ARRAY,\n },\n // 色调\n hue: {\n type: RAW_NUMERIC,\n },\n // 饱和度\n saturation: {\n type: RAW_NUMERIC,\n },\n // 明度\n value: {\n type: RAW_NUMERIC,\n },\n // 透明度\n alpha: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n },\n\n data() {\n return {\n MODE_HEX,\n MODE_RGB,\n }\n },\n\n computed: {\n palleteLayerStyle() {\n const hueThumbColor = this.get('hueThumbColor')\n return {\n backgroundImage: `linear-gradient(90deg, white, ${hueThumbColor})`\n }\n },\n palleteThumbStyle() {\n const saturation = this.get('saturation')\n const value = this.get('value')\n return {\n left: `${saturation * 100}%`,\n bottom: `${value * 100}%`,\n }\n },\n palleteThumbColor() {\n const rgb = this.get('rgb')\n if (rgb) {\n return stringifyRgb(rgb)\n }\n },\n hueThumbStyle() {\n const hue = this.get('hue')\n return {\n left: `${(hue / 359.9999) * 100}%`,\n }\n },\n hueThumbColor() {\n const hue = this.get('hue')\n return `hsl(${hue}, 100%, 50%)`\n },\n alphaMaskStyle() {\n const rgb = this.get('rgb')\n if (rgb) {\n return {\n backgroundImage: `linear-gradient(to right, ${stringifyRgb(rgb, 0)} 0%, ${stringifyRgb(rgb, 1)} 100%)`\n }\n }\n },\n alphaThumbStyle() {\n const alpha = this.get('alpha')\n return {\n left: `${alpha * 100}%`,\n }\n },\n alphaThumbColor() {\n const rgb = this.get('rgb')\n if (rgb) {\n const alpha = this.get('alpha')\n return stringifyRgb(rgb, alpha)\n }\n },\n },\n\n filters: {\n formatMode(mode: string, showAlpha: boolean) {\n return mode.toUpperCase() + (showAlpha ? 'A' : '')\n }\n },\n\n methods: {\n onSwatchChange(event: CustomEventInterface, data: Data) {\n event.stop()\n this.fire(\n {\n type: 'colorChange',\n ns: 'colorPanel',\n },\n {\n color: data.color,\n }\n )\n },\n },\n\n afterMount() {\n\n const me = this\n\n let palleteEl: HTMLElement | void\n let hueEl: HTMLElement | void\n let alphaEl: HTMLElement | void\n\n const onPalleteMouseDown = function (event: CustomEventInterface) {\n\n event.stop()\n\n palleteEl = me.$refs.pallete as HTMLElement | void\n if (!palleteEl) {\n return\n }\n\n startDrag()\n\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEMOVE, onPalleteMouseMove)\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEUP, onPalleteMouseUp)\n\n }\n\n const onPalleteMouseMove = function (event: CustomEventInterface) {\n\n const mouseEvent = event.originalEvent as MouseEvent\n const rect = (palleteEl as HTMLElement).getBoundingClientRect()\n\n const saturation = (mouseEvent.clientX - rect.left) / rect.width\n const value = (rect.bottom - mouseEvent.clientY) / rect.height\n\n me.fire(\n {\n type: 'hsvChange',\n ns: 'colorPanel',\n },\n {\n hsv: [\n me.get('hue'),\n normalizeSaturation(saturation),\n normalizeValue(value),\n ]\n }\n )\n\n }\n\n const onPalleteMouseUp = function () {\n\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEMOVE, onPalleteMouseMove)\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEUP, onPalleteMouseUp)\n\n palleteEl = UNDEFINED\n endDrag()\n\n }\n\n\n const onHueMouseDown = function (event: CustomEventInterface) {\n\n event.stop()\n\n hueEl = me.$refs.hue as HTMLElement | void\n if (!hueEl) {\n return\n }\n\n startDrag()\n\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEMOVE, onHueMouseMove)\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEUP, onHueMouseUp)\n\n }\n\n const onHueMouseMove = function (event: CustomEventInterface) {\n\n const mouseEvent = event.originalEvent as MouseEvent\n const rect = (hueEl as HTMLElement).getBoundingClientRect()\n\n const hue = (mouseEvent.clientX - rect.left) / rect.width\n\n me.fire(\n {\n type: 'hsvChange',\n ns: 'colorPanel',\n },\n {\n hsv: [\n normalizeHue(hue),\n me.get('saturation'),\n me.get('value'),\n ]\n }\n )\n\n }\n\n const onHueMouseUp = function () {\n\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEMOVE, onHueMouseMove)\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEUP, onHueMouseUp)\n\n hueEl = UNDEFINED\n endDrag()\n\n }\n\n\n\n const onAlphaMouseDown = function (event: CustomEventInterface) {\n\n event.stop()\n\n alphaEl = me.$refs.alpha as HTMLElement | void\n if (!alphaEl) {\n return\n }\n\n startDrag()\n\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEMOVE, onAlphaMouseMove)\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEUP, onAlphaMouseUp)\n\n }\n\n const onAlphaMouseMove = function (event: CustomEventInterface) {\n\n const mouseEvent = event.originalEvent as MouseEvent\n const rect = (alphaEl as HTMLElement).getBoundingClientRect()\n\n const alpha = (mouseEvent.clientX - rect.left) / rect.width\n\n me.fire(\n {\n type: 'alphaChange',\n ns: 'colorPanel',\n },\n {\n alpha: normalizeAlpha(alpha),\n }\n )\n\n }\n\n const onAlphaMouseUp = function () {\n\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEMOVE, onAlphaMouseMove)\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEUP, onAlphaMouseUp)\n\n alphaEl = UNDEFINED\n endDrag()\n\n }\n\n // @ts-ignore\n me.onPalleteMouseDown = onPalleteMouseDown\n // @ts-ignore\n me.onHueMouseDown = onHueMouseDown\n // @ts-ignore\n me.onAlphaMouseDown = onAlphaMouseDown\n\n },\n\n components: {\n Button,\n ColorSwatch,\n ColorThumb,\n HexInput,\n RgbInput,\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/ColorPicker.hbs'\n// import './style/ColorPicker.styl'\n\nimport Popover from '../popover/Popover'\nimport ColorPanel from './ColorPanel'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_ARRAY,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_DEFAULT,\n RAW_CUSTOM,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_SIZE_ARRAY,\n RAW_PLACEMENT_ARRAY,\n RAW_BOTTOM_START,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n rgb2hex,\n hsv2rgb,\n stringifyRgb,\n parseColor,\n MODE_HEX,\n MODE_RGB,\n COLOR_DEFAULT,\n} from './util'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nimport {\n fireClickEvent,\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ColorPicker',\n\n propTypes: {\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM_START,\n },\n defaultValue: {\n type: RAW_STRING,\n },\n value: {\n type: RAW_STRING,\n },\n modes: {\n type: RAW_ARRAY,\n },\n swatches: {\n type: RAW_ARRAY,\n },\n showAlpha: {\n type: RAW_BOOLEAN,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const modes = this.get('modes')\n const mode = modes && modes[0] || MODE_HEX\n\n let value = this.get('value')\n if (!value) {\n value = this.get('defaultValue') || COLOR_DEFAULT\n }\n\n const { rgb, hsv, alpha } = parseColor(value, this.get('showAlpha'))\n\n return {\n RAW_CUSTOM: RAW_CUSTOM,\n isFocus: FALSE,\n isVisible: FALSE,\n mode,\n rgb,\n hsv,\n alpha,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n colorStyle() {\n const rgb = this.get('rgb')\n if (rgb) {\n const alpha = this.get('alpha')\n return {\n backgroundColor: stringifyRgb(rgb, alpha),\n }\n }\n },\n colorValue() {\n\n const showAlpha = this.get('showAlpha')\n let alpha = UNDEFINED\n if (showAlpha) {\n alpha = this.get('alpha')\n }\n\n const mode = this.get('mode')\n const rgb = this.get('rgb')\n if (mode === MODE_HEX) {\n return rgb2hex(rgb[0], rgb[1], rgb[2], alpha)\n }\n else if (mode === MODE_RGB) {\n return stringifyRgb(rgb, alpha)\n }\n\n return ''\n\n }\n },\n\n watchers: {\n value(value: string) {\n // @ts-ignore\n this.setColor(value)\n },\n showAlpha() {\n this.set({\n alpha: 1,\n })\n // @ts-ignore\n this.fireChange()\n }\n },\n\n events: {\n outside: {\n listener(event) {\n event.stop()\n this.set({\n isVisible: FALSE,\n })\n },\n ns: 'popover',\n },\n hsvChange: {\n listener(event, data) {\n event.stop()\n const { hsv } = data\n this.set({\n hsv,\n rgb: hsv2rgb(hsv[0], hsv[1], hsv[2])\n })\n // @ts-ignore\n this.fireChange()\n },\n ns: 'colorPanel'\n },\n colorChange(event, data) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n event.stop()\n // @ts-ignore\n if (this.setColor(data.color)) {\n // @ts-ignore\n this.fireChange()\n }\n\n },\n alphaChange: {\n listener(event, data) {\n event.stop()\n this.set(data)\n // @ts-ignore\n this.fireChange()\n },\n ns: 'colorPanel'\n },\n modeChange: {\n listener(event) {\n event.stop()\n\n const modes = this.get('modes')\n if (!modes) {\n return\n }\n\n const mode = this.get('mode')\n const index = modes.indexOf(mode)\n let newIndex = index + 1\n if (newIndex >= modes.length) {\n newIndex = 0\n }\n\n this.set({\n mode: modes[newIndex]\n })\n // @ts-ignore\n this.fireChange()\n\n },\n ns: 'colorPanel'\n }\n },\n\n methods: {\n\n onClick(event?: CustomEventInterface) {\n this.toggle('isVisible')\n fireClickEvent(event)\n },\n\n setColor(value: string) {\n\n const { rgb, hsv, alpha } = parseColor(value, this.get('showAlpha'))\n const oldRgb = this.get('rgb')\n\n // hex 转 hsv,有时因为精度会导致值不一样\n // 这里用 rgb 判断一下,如果新旧值相同,则不再转 hsv\n if (rgb2hex(rgb[0], rgb[1], rgb[2]) === rgb2hex(oldRgb[0], oldRgb[1], oldRgb[2])) {\n return\n }\n\n this.set({\n rgb,\n hsv,\n alpha,\n })\n\n return TRUE\n\n },\n fireChange() {\n const value = this.get('colorValue')\n this.set('value', value)\n this.fire(\n {\n type: 'change',\n ns: 'colorPicker',\n },\n {\n value,\n }\n )\n }\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n },\n\n components: {\n Popover,\n ColorPanel,\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Tooltip.hbs'\n// import './style/Tooltip.styl'\n\nimport Popover from '../popover/Popover'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_HOVER,\n RAW_CLICK,\n RAW_CUSTOM,\n RAW_PLACEMENT_ARRAY,\n RAW_BOTTOM,\n RAW_THEME_ARRAY,\n RAW_DARK,\n HOVER_DELAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Tooltip',\n\n propTypes: {\n content: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n theme: {\n type: oneOf(RAW_THEME_ARRAY),\n value: RAW_DARK,\n },\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM,\n },\n defaultVisible: {\n type: RAW_BOOLEAN,\n },\n visible: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n delay: {\n type: RAW_NUMERIC,\n value: HOVER_DELAY,\n },\n trigger: {\n type: oneOf([RAW_HOVER, RAW_CLICK]),\n value: RAW_HOVER,\n },\n maxWidth: {\n type: RAW_NUMERIC,\n },\n maxHeight: {\n type: RAW_NUMERIC,\n },\n offsetX: {\n type: RAW_NUMERIC,\n },\n offsetY: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const visible = this.get('visible')\n const defaultVisible = this.get('defaultVisible')\n return {\n isVisible: typeof visible === 'boolean'\n ? visible\n : typeof defaultVisible === 'boolean'\n ? defaultVisible\n : FALSE,\n }\n },\n\n computed: {\n mode() {\n const visible = this.get('visible')\n return typeof visible === 'boolean'\n ? RAW_CUSTOM\n : this.get('trigger')\n },\n contentStyle(): Record | void {\n\n const maxWidth = this.get('maxWidth')\n const maxHeight = this.get('maxHeight')\n\n if (maxWidth || maxHeight) {\n const result: Record = {}\n if (maxWidth) {\n result.maxWidth = toPixel(maxWidth)\n }\n if (maxHeight) {\n result.maxHeight = toPixel(maxHeight)\n }\n return result\n }\n\n },\n },\n\n watchers: {\n visible(value) {\n this.set({\n isVisible: value,\n })\n }\n },\n\n methods: {\n onPopoverOpen(event: CustomEventInterface) {\n event.stop()\n this.set('isVisible', TRUE)\n // @ts-ignore\n this.fireChange(TRUE)\n },\n onPopoverClose(event: CustomEventInterface) {\n event.stop()\n this.set('isVisible', FALSE)\n // @ts-ignore\n this.fireChange(FALSE)\n },\n onPopoverOutside(event: CustomEventInterface) {\n event.stop()\n this.fire({\n type: 'outside',\n ns: 'tooltip',\n })\n },\n fireChange(visible: boolean) {\n if (this.get('visible') !== visible) {\n this.fire(\n {\n type: 'change',\n ns: 'tooltip',\n },\n {\n visible,\n }\n )\n }\n },\n },\n\n components: {\n Popover,\n },\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Slider.hbs'\n// import './style/Slider.styl'\n\nimport Tooltip from '../tooltip/Tooltip'\n\nimport {\n UNDEFINED,\n DOCUMENT,\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_EVENT_MOUSEMOVE,\n RAW_EVENT_MOUSEUP,\n RAW_TOP,\n RAW_RIGHT,\n RAW_CUSTOM,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n toNumber,\n} from '../util'\n\nimport {\n endDrag,\n startDrag,\n} from '../event'\n\nfunction getPercentByValue(min: number, max: number, rawValue: any) {\n\n const range = max - min\n\n let value = toNumber(rawValue)\n\n if (value > max) {\n value = max\n }\n else if (value < min) {\n value = min\n }\n\n return range > 0\n ? (value - min) / range * 100\n : 0\n\n}\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Slider',\n\n propTypes: {\n value: {\n type: [RAW_NUMERIC, RAW_ARRAY],\n value: 0,\n },\n max: {\n type: RAW_NUMERIC,\n value: 100,\n },\n min: {\n type: RAW_NUMERIC,\n value: 0,\n },\n step: {\n type: RAW_NUMERIC,\n value: 1,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n reverse: {\n type: RAW_BOOLEAN,\n },\n showStops: {\n type: RAW_BOOLEAN,\n },\n showTooltip: {\n type: RAW_BOOLEAN,\n },\n formatTooltip: {\n type: RAW_FUNCTION,\n },\n width: {\n type: RAW_NUMERIC,\n },\n height: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_TOP,\n RAW_RIGHT,\n RAW_CUSTOM,\n innerValue: this.get('value'),\n hoverThumbIndex: -1,\n dragThumbIndex: -1,\n showTooltipIndex: -1,\n }\n },\n\n computed: {\n isRange(): boolean {\n const value = this.get('value')\n return Yox.is.array(value)\n },\n minNumber(): number {\n return toNumber(this.get('min'))\n },\n maxNumber(): number {\n return toNumber(this.get('max'))\n },\n stepNumber(): number {\n return toNumber(this.get('step'))\n },\n valuePercentArray: {\n deps: ['innerValue', 'innerValue.*'],\n get() {\n const min = this.get('minNumber')\n const max = this.get('maxNumber')\n const innerValue = this.get('innerValue')\n if (Yox.is.array(innerValue)) {\n return [\n {\n value: innerValue[0],\n percent: getPercentByValue(min, max, innerValue[0])\n },\n {\n value: innerValue[1],\n percent: getPercentByValue(min, max, innerValue[1])\n },\n ]\n }\n return [\n {\n value: innerValue,\n percent: getPercentByValue(min, max, innerValue),\n }\n ]\n }\n },\n stops(): object[] {\n\n const vertical = this.get('vertical')\n const reverse = this.get('reverse')\n const min = this.get('minNumber')\n const max = this.get('maxNumber')\n const step = this.get('stepNumber')\n const range = max - min\n\n const result: object[] = []\n\n if (max - min > step) {\n let count = Math.floor(range / step)\n let interval = 100 / count\n for (let i = 1; i < count; i++) {\n\n let value = i * interval\n let percent = value + '%'\n\n result.push({\n value,\n style: vertical\n ? (reverse ? { top: percent } : { bottom: percent })\n : (reverse ? { right: percent } : { left: percent })\n })\n\n }\n }\n\n return result\n\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n const height = this.get('height')\n\n if (width || height) {\n const customStyle: Record = {}\n if (width) {\n customStyle.width = toPixel(width)\n }\n if (height) {\n customStyle.height = toPixel(height)\n }\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n filters: {\n formatBarStyle(valuePercentArray: any[], reverse: boolean, fromName: string, toName: string): any {\n\n let fromPercnet = valuePercentArray[0].percent\n let toPercent: number\n\n if (valuePercentArray[1]) {\n toPercent = valuePercentArray[1].percent\n if (fromPercnet > toPercent) {\n fromPercnet = valuePercentArray[1].percent\n toPercent = valuePercentArray[0].percent\n }\n }\n else {\n toPercent = fromPercnet\n fromPercnet = 0\n }\n\n if (reverse) {\n const temp = fromName\n fromName = toName\n toName = temp\n }\n\n return {\n [fromName]: fromPercnet + '%',\n [toName]: (100 - toPercent) + '%'\n }\n\n },\n formatThumbStyle(percent: number, name: string): any {\n\n return {\n [name]: percent + '%'\n }\n\n }\n },\n\n events: {\n outside: {\n listener(event) {\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n event.stop()\n this.set('showTooltipIndex', -1)\n },\n ns: 'tooltip'\n }\n },\n\n watchers: {\n value(value) {\n if (this.get('hoverThumbIndex') < 0\n && this.get('dragThumbIndex') < 0\n ) {\n this.set('innerValue', value)\n }\n },\n hoverThumbIndex(index) {\n if (index >= 0) {\n this.set('showTooltipIndex', this.get('showTooltip') ? index : -1)\n }\n else if (this.get('dragThumbIndex') < 0) {\n this.set('showTooltipIndex', -1)\n }\n },\n dragThumbIndex(index) {\n if (index < 0 && this.get('hoverThumbIndex') < 0) {\n this.set('showTooltipIndex', -1)\n }\n },\n },\n\n methods: {\n onThumbMouseEnter(event: CustomEventInterface, index: number) {\n event.stop()\n const dragThumbIndex = this.get('dragThumbIndex')\n if (dragThumbIndex >= 0) {\n if (dragThumbIndex === index) {\n this.set('hoverThumbIndex', index)\n }\n }\n else {\n this.set('hoverThumbIndex', index)\n }\n },\n onThumbMouseLeave(event: CustomEventInterface) {\n event.stop()\n this.set('hoverThumbIndex', -1)\n },\n },\n\n afterMount() {\n\n const me = this\n\n let element: HTMLElement | void\n let dragThumbIndex = -1\n let min = 0\n let max = 0\n let step = 0\n\n const onTrackMouseDown = function (event: CustomEventInterface) {\n\n event.stop()\n\n element = (event.originalEvent as MouseEvent).currentTarget as HTMLElement\n if (!element) {\n return\n }\n\n max = me.get('maxNumber')\n min = me.get('minNumber')\n step = me.get('stepNumber')\n\n const ratio = getRatio(event)\n\n dragThumbIndex = 0\n if (me.get('isRange')) {\n // 当前坐标距离哪个 thumb 近就移动哪个\n const percent = ratio * 100\n const valuePercentArray = me.get('valuePercentArray')\n\n if (Math.abs(valuePercentArray[0].percent - percent) > Math.abs(valuePercentArray[1].percent - percent)) {\n dragThumbIndex = 1\n }\n\n updatePosition(\n ratio,\n dragThumbIndex\n )\n }\n else {\n updatePosition(ratio)\n }\n\n me.set('dragThumbIndex', dragThumbIndex)\n\n startDrag()\n\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEMOVE, onTrackMouseMove)\n Yox.dom.on(DOCUMENT, RAW_EVENT_MOUSEUP, onTrackMouseUp)\n\n }\n\n const onTrackMouseMove = function (event: CustomEventInterface) {\n\n updatePosition(\n getRatio(event),\n dragThumbIndex\n )\n\n }\n\n const onTrackMouseUp = function () {\n\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEMOVE, onTrackMouseMove)\n Yox.dom.off(DOCUMENT, RAW_EVENT_MOUSEUP, onTrackMouseUp)\n\n me.set('dragThumbIndex', -1)\n\n element = UNDEFINED\n endDrag()\n\n }\n\n const getRatio = function (event: CustomEventInterface) {\n\n const mouseEvent = event.originalEvent as MouseEvent\n const rect = (element as HTMLElement).getBoundingClientRect()\n\n let ratio = me.get('vertical')\n ? (rect.bottom - mouseEvent.clientY) / rect.height\n : (mouseEvent.clientX - rect.left) / rect.width\n\n if (ratio < 0) {\n ratio = 0\n }\n else if (ratio > 1) {\n ratio = 1\n }\n\n return me.get('reverse') ? (1 - ratio) : ratio\n\n }\n\n const updatePosition = function (ratio: number, index?: number) {\n\n let newValue = (max - min) * ratio + min\n if (step > 0) {\n let count = Math.round(newValue / step)\n newValue = step * count\n }\n\n if (me.get('isRange')) {\n\n me.set('innerValue.' + index, newValue)\n\n const value = me.copy(\n me.get('innerValue')\n )\n\n // 交换值\n if (value[0] > value[1]) {\n const temp = value[0]\n value[0] = value[1]\n value[1] = temp\n }\n\n me.set('value', value)\n\n }\n else {\n me.set({\n innerValue: newValue,\n value: newValue,\n })\n }\n\n }\n\n // @ts-ignore\n this.onTrackMouseDown = onTrackMouseDown\n\n },\n\n components: {\n Tooltip,\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/Space.hbs'\n// import './style/Space.styl'\n\nimport {\n NULL,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toNumber,\n spaceListStyle,\n spaceItemStyle,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Space',\n\n propTypes: {\n size: {\n type: [RAW_NUMERIC, RAW_ARRAY],\n value: [8, 10],\n },\n align: {\n type: oneOf(['start', 'end', 'center', 'baseline']),\n value: 'center',\n },\n block: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n autoWrap: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n sizeArray() {\n\n const size = this.get('size')\n if (size == NULL) {\n return\n }\n\n // 配置两个方向的间距\n if (Yox.is.array(size) && (size[0] > 0 || size[1] > 0)) {\n return size\n }\n\n // 配置一个方向的间距\n const value = toNumber(size)\n if (value > 0) {\n return [value]\n }\n\n },\n inlineStyle(): object[] | void {\n return spaceListStyle(\n this.get('sizeArray'),\n this.get('vertical'),\n this.get('autoWrap'),\n this.get('style')\n )\n },\n itemStyle(): Record | void {\n return spaceItemStyle(\n this.get('sizeArray'),\n this.get('vertical'),\n this.get('autoWrap')\n )\n },\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Skeleton.hbs'\n// import './style/Skeleton.styl'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n RAW_OBJECT,\n RAW_SMALL,\n RAW_LARGE,\n RAW_SHAPE_CIRCLE,\n RAW_SHAPE_ROUND,\n} from '../constant'\n\nimport { toPixel } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Skeleton',\n\n propTypes: {\n text: {\n type: [RAW_BOOLEAN, RAW_OBJECT],\n value: TRUE,\n },\n image: {\n type: [RAW_BOOLEAN, RAW_OBJECT],\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n active: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n computedText() {\n const text = this.get('text')\n if (text) {\n let rows = 3\n if (Yox.is.object(text) && text.rows) {\n rows = text.rows\n }\n\n const allWidth = Yox.is.array(text.width) ? text.width : []\n const lastWidth = Yox.is.number(text.width) ? text.width : (rows > 1 ? '60%' : '100%')\n\n const result = []\n for (let i = 0; i < rows; i++) {\n let width = allWidth[i] || (i === rows - 1 ? lastWidth : '100%')\n result.push({\n width: Yox.is.number(width) ? toPixel(width) : width\n })\n }\n\n return result\n }\n },\n imageSize() {\n const image = this.get('image')\n if (image) {\n let size = 48\n if (Yox.is.object(image)) {\n if (Yox.is.number(image.size)) {\n size = image.size\n }\n if (image.size === RAW_SMALL) {\n size = 36\n }\n if (image.size === RAW_LARGE) {\n size = 60\n }\n }\n return toPixel(size)\n }\n },\n imageShape() {\n const image = this.get('image')\n if (image) {\n const defaultShape = RAW_SHAPE_CIRCLE\n if (Yox.is.boolean(image)) {\n return defaultShape\n }\n if (image.shape === RAW_SHAPE_ROUND) {\n return RAW_SHAPE_ROUND\n }\n return defaultShape\n }\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Statistic.hbs'\n// import './style/Statistic.styl'\n\nimport Skeleton from '../skeleton/Skeleton'\n\nimport {\n TRUE,\n RAW_NUMBER,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Statistic',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n required: TRUE,\n },\n value: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n prefix: {\n type: RAW_STRING,\n },\n suffix: {\n type: RAW_STRING,\n },\n color: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n Skeleton,\n }\n})","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Switch.hbs'\n// import './style/Switch.styl'\n\nimport {\n FALSE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_DEFAULT,\n RAW_SMALL,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nimport {\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n model: 'checked',\n\n name: '${prefix}Switch',\n\n propTypes: {\n size: {\n type: oneOf([RAW_DEFAULT, RAW_SMALL]),\n value: RAW_DEFAULT,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n checked: {\n type: RAW_BOOLEAN,\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isFocus: FALSE,\n }\n },\n\n methods: {\n onClick(event?: CustomEventInterface) {\n if (event) {\n event.stop()\n }\n this.fire(\n {\n type: 'change',\n ns: 'switch',\n },\n {\n checked: this.toggle('checked')\n }\n )\n }\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n }\n})","import Yox from 'yox'\n\nimport template from './template/Steps.hbs'\n// import './style/Steps.styl'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_SMALL,\n RAW_WAIT,\n RAW_PROCESS,\n RAW_FINISH,\n RAW_TYPE_ERROR,\n RAW_STYLE_TYPE,\n RAW_SLOT_CHILDREN,\n} from '../constant'\n\nimport { oneOf } from '../util'\nimport { setStepIndex } from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Steps',\n\n propTypes: {\n current: {\n type: RAW_NUMERIC,\n value: 0,\n },\n status: {\n type: oneOf([RAW_WAIT, RAW_PROCESS, RAW_FINISH, RAW_TYPE_ERROR]),\n value: RAW_PROCESS,\n },\n size: {\n type: oneOf([RAW_SMALL]),\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n beforeRender() {\n const children = this.get(RAW_SLOT_CHILDREN)\n if (children) {\n setStepIndex(\n children\n )\n }\n },\n\n watchers: {\n current(current) {\n this.fire(\n {\n type: 'currentChange',\n ns: 'steps'\n },\n {\n current,\n },\n TRUE\n )\n },\n status(status) {\n this.fire(\n {\n type: 'statusChange',\n ns: 'steps'\n },\n {\n status,\n },\n TRUE\n )\n }\n },\n\n})","import { VNode } from 'yox'\n\nexport const PHASE_OPERATING = 1\nexport const PHASE_WAITING = 2\nexport const PHASE_FINISHED = 3\n\nexport function setStepIndex(children: VNode[]) {\n\n children.forEach(\n function (vnode: VNode, index: number) {\n if (vnode.tag === 'Step') {\n vnode.props.index = index\n }\n }\n )\n\n}","import Yox from 'yox'\n\nimport template from './template/Step.hbs'\n// import './style/Step.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_WAIT,\n RAW_FINISH,\n RAW_TYPE_ERROR,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport { findComponentUpward } from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Step',\n\n propTypes: {\n index: {\n type: RAW_NUMBER,\n required: TRUE,\n },\n title: {\n type: RAW_STRING,\n required: TRUE,\n },\n description: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const steps = findComponentUpward(options.parent, '${prefix}Steps')\n return {\n RAW_FINISH,\n RAW_TYPE_ERROR,\n current: steps.get('current'),\n status: steps.get('status'),\n }\n },\n\n computed: {\n stepStatus() {\n const index = this.get('index')\n const current = this.get('current')\n if (index < current) {\n return RAW_FINISH\n }\n if (index > current) {\n return RAW_WAIT\n }\n return this.get('status')\n },\n stepNumber() {\n return this.get('index') + 1\n }\n },\n\n events: {\n currentChange: {\n listener(_, data) {\n this.set({\n current: data.current,\n })\n },\n ns: 'steps',\n },\n statusChange: {\n listener(_, data) {\n this.set({\n status: data.status,\n })\n },\n ns: 'steps',\n },\n },\n\n components: {\n Icon,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Tag.hbs'\n// import './style/Tag.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_TYPE_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Tag',\n\n propTypes: {\n type: {\n type: oneOf(RAW_TYPE_ARRAY),\n },\n checkable: {\n type: RAW_BOOLEAN,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n checked: {\n type: RAW_BOOLEAN,\n },\n color: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n presetName() {\n const color = this.get('color')\n if (color && /^[a-z]+$/.test(color)) {\n return color\n }\n },\n customColor() {\n const color = this.get('color')\n if (color && (/^#[\\w\\d]+$/.test(color) || /rgb/i.test(color))) {\n return color\n }\n },\n },\n\n methods: {\n toggleChecked() {\n this.fire(\n {\n type: 'change',\n ns: 'tag',\n },\n {\n checked: !this.get('checked'),\n }\n )\n }\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Empty.hbs'\n// import './style/Empty.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n toNumber,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Empty',\n\n propTypes: {\n simple: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n space: {\n type: RAW_NUMERIC,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle() {\n\n const result: object[] = []\n\n const space = toNumber(this.get('space'))\n if (space > 0) {\n result.push({\n marginTop: toPixel(space),\n marginBottom: toPixel(space),\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n\n }\n },\n\n})","import Yox from 'yox'\n\nimport { FALSE, RAW_SLOT_CHILDREN } from '../constant'\n\nexport function isOptionSelected(values: any, value: any) {\n return Yox.is.array(values)\n ? Yox.array.has(values, value, FALSE)\n : values == value\n}\n\nexport function getOptionsByChildren(instance: any, children: any[]) {\n\n const result: any[] = []\n\n const next = function (children) {\n children.forEach(\n function (vnode) {\n const { tag, props, slots } = vnode\n if (tag === 'Option' && props) {\n const { text, value } = props\n result.push({\n text,\n value,\n })\n }\n else if (tag === 'OptionGroup' && slots && slots[RAW_SLOT_CHILDREN]) {\n const children = slots[RAW_SLOT_CHILDREN](instance)\n if (children) {\n next(children)\n }\n }\n }\n )\n }\n\n next(children)\n\n return result\n\n}","import Yox from 'yox'\n\nimport template from './template/Option.hbs'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nimport {\n isOptionSelected,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Option',\n\n propTypes: {\n value: {\n type: [RAW_STRING, RAW_NUMBER],\n required: TRUE,\n },\n text: {\n type: RAW_STRING,\n required: TRUE,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const select = findComponentUpward(options.parent, '${prefix}Select')\n\n const props = options.props || {}\n\n return {\n isSelected: select\n ? isOptionSelected(select.get('value'), props.value)\n : FALSE\n }\n },\n\n events: {\n change: {\n listener(_, data) {\n this.set({\n isSelected: isOptionSelected(data.value, this.get('value'))\n })\n },\n ns: 'select'\n }\n },\n\n methods: {\n onClick() {\n this.fire(\n {\n type: 'click',\n ns: 'option',\n },\n {\n value: this.get('value'),\n }\n )\n }\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Select.hbs'\n// import './style/Select.styl'\n\nimport Tag from '../tag/Tag'\nimport Icon from '../icon/Icon'\nimport Empty from '../empty/Empty'\nimport Popover from '../popover/Popover'\nimport Option from './Option'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_ARRAY,\n RAW_NUMBER,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_TOP,\n RAW_BOTTOM,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_CUSTOM,\n RAW_SLOT_CHILDREN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nimport {\n isOptionSelected,\n getOptionsByChildren,\n} from './util'\n\nimport {\n fireClickEvent,\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Select',\n\n propTypes: {\n options: {\n type: RAW_ARRAY,\n },\n placeholder: {\n type: RAW_STRING,\n value: '请选择...'\n },\n value: {\n type: [RAW_ARRAY, RAW_STRING, RAW_NUMBER],\n },\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf([RAW_TOP, RAW_BOTTOM]),\n value: RAW_BOTTOM,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n showClear: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n prefix: {\n type: RAW_STRING,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_TOP,\n RAW_CUSTOM,\n isFocus: FALSE,\n isVisible: FALSE,\n }\n },\n\n computed: {\n allOptions(): any[] {\n const options = this.get('options')\n if (options) {\n return options\n }\n const children = this.get(RAW_SLOT_CHILDREN)\n if (children) {\n return getOptionsByChildren(this, children)\n }\n return []\n },\n selectedOptions(): any[] {\n const value = this.get('value')\n const allOptions = this.get('allOptions')\n const result: any[] = []\n\n Yox.array.each(\n allOptions,\n function (item: any) {\n if (isOptionSelected(value, item.value)) {\n result.push(item)\n }\n }\n )\n\n return result\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n events: {\n click: {\n listener(event, data) {\n\n event.stop()\n\n this.selectOption(data.value)\n\n if (!this.get('multiple')) {\n this.set('isVisible', FALSE)\n }\n\n },\n ns: 'option',\n },\n outside: {\n listener(event) {\n\n event.stop()\n\n this.set('isVisible', FALSE)\n\n },\n ns: 'popover',\n }\n },\n\n methods: {\n\n onClick(event?: CustomEventInterface) {\n this.toggle('isVisible')\n fireClickEvent(event)\n },\n\n onClearClick(event: CustomEventInterface) {\n\n // 停止冒泡,否则会展开下拉框\n event.stop()\n fireClickEvent(event)\n\n this.set('value', UNDEFINED)\n this.fireChange(UNDEFINED)\n\n },\n\n onOptionRemove(event: CustomEventInterface, index: number) {\n\n event.stop()\n\n this.removeAt('value', index)\n\n this.fireChange(\n this.get('value')\n )\n\n },\n\n selectOption(value: any) {\n\n const me = this\n const values = me.get('value')\n\n if (me.get('multiple')) {\n\n if (Yox.is.array(values)\n && Yox.array.has(values, value)\n ) {\n return\n }\n\n me.append('value', value)\n me.fireChange(\n me.get('value')\n )\n\n }\n else {\n\n if (values !== value) {\n me.set('value', value)\n me.fireChange(value)\n }\n\n }\n\n },\n\n deselectOption(value: any) {\n\n const me = this\n const values = me.get('value')\n\n if (me.get('multiple')) {\n\n const selectedIndex = Yox.is.array(values)\n ? Yox.array.indexOf(values, value)\n : -1\n\n if (selectedIndex < 0) {\n return\n }\n\n me.removeAt('value', selectedIndex)\n me.fireChange(\n me.get('value')\n )\n\n }\n else {\n\n if (values !== value) {\n return\n }\n\n me.set('value', UNDEFINED)\n me.fireChange(UNDEFINED)\n\n }\n\n },\n\n fireChange(value) {\n\n this.fire(\n {\n type: 'change',\n ns: 'select',\n },\n {\n value,\n }\n )\n\n this.fire(\n {\n type: 'change',\n ns: 'select',\n },\n {\n value,\n },\n TRUE\n )\n\n }\n\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n },\n\n components: {\n Tag,\n Icon,\n Empty,\n Popover,\n Option,\n },\n\n})\n","import Yox from 'yox'\n\nimport template from './template/OptionGroup.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}OptionGroup',\n\n propTypes: {\n label: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/PrevPage.hbs'\n\nimport {\n RAW_BOOLEAN,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n disabled: {\n type: RAW_BOOLEAN,\n },\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/NextPage.hbs'\n\nimport {\n RAW_BOOLEAN,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n disabled: {\n type: RAW_BOOLEAN,\n },\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Pagination.hbs'\n// import './style/Pagination.styl'\n\nimport Icon from '../icon/Icon'\nimport Input from '../input/Input'\nimport Button from '../button/Button'\nimport Select from '../select/Select'\nimport PrevPage from './PrevPage'\nimport NextPage from './NextPage'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_ARRAY,\n RAW_BOTTOM,\n RAW_TOP,\n RAW_DEFAULT,\n RAW_SMALL,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toNumber,\n} from '../util'\n\nimport {\n onClickEventByEnterPress,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n model: 'current',\n\n name: '${prefix}Pagination',\n\n propTypes: {\n size: {\n type: oneOf([RAW_DEFAULT, RAW_SMALL]),\n value: RAW_DEFAULT,\n },\n simple: {\n type: RAW_BOOLEAN,\n },\n total: {\n type: RAW_NUMERIC,\n required: TRUE,\n },\n current: {\n type: RAW_NUMERIC,\n value: 1,\n },\n pageSize: {\n type: RAW_NUMERIC,\n value: 10,\n },\n pageSizeOptions: {\n type: RAW_ARRAY,\n },\n showJumper: {\n type: RAW_BOOLEAN,\n },\n showTotal: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf([RAW_TOP, RAW_BOTTOM]),\n value: RAW_BOTTOM,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n page: '',\n focused: '',\n }\n },\n\n computed: {\n pageList(): object[] {\n\n const result = []\n\n const current = toNumber(this.get('current'))\n const count = toNumber(this.get('count'))\n\n if (count === 0) {\n return result\n }\n\n // 先用 current 拆出中间的 5 个页码\n let start = current - 2\n let end = current + 2\n\n if (start < 1) {\n start = 1\n end = Math.min(count, start + 4)\n }\n if (end > count) {\n end = count\n start = Math.max(1, end - 4)\n }\n\n for (let i = start; i <= end; i++) {\n result.push({\n value: i,\n active: i === current,\n })\n }\n\n if (start > 1) {\n // 和第一页至少隔了一个页码\n if (start - 1 > 1) {\n result.unshift({\n prev: TRUE,\n })\n }\n result.unshift({\n value: 1,\n active: 1 === current,\n })\n }\n\n if (end < count) {\n // 和最后一页至少隔了一个页码\n if (count - end > 1) {\n result.push({\n next: TRUE,\n })\n }\n result.push({\n value: count,\n active: count === current,\n })\n }\n\n return result\n\n },\n pageSizeList(): object[] {\n\n const result = []\n const pageSizeOptions = this.get('pageSizeOptions')\n\n if (pageSizeOptions) {\n Yox.array.each(\n pageSizeOptions,\n function (value) {\n result.push({\n text: value + ' 条/页',\n value,\n })\n }\n )\n }\n\n return result\n\n },\n count(): number {\n const total = this.get('total')\n const pageSize = this.get('pageSize')\n return Math.ceil(total / pageSize)\n }\n },\n\n events: [\n {\n type: 'change',\n ns: 'select',\n listener(event, data) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n event.stop()\n\n // @ts-ignore\n this.fire(\n {\n type: 'change',\n ns: 'pagination',\n },\n {\n pageSize: data.value\n }\n )\n\n }\n },\n {\n type: 'change',\n ns: 'input',\n listener(event) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n // @ts-ignore\n event.stop()\n\n }\n },\n {\n type: 'enter',\n ns: 'input',\n listener(event) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n event.stop()\n\n // @ts-ignore\n this.onJumpClick()\n\n }\n }\n ],\n\n watchers: {\n current(current: number) {\n this.set('page', current)\n }\n },\n\n methods: {\n\n onPageClick(page: number) {\n this.setCurrent(page)\n },\n onPageFocus(page: number) {\n this.set({\n focused: `${page}_page`,\n })\n },\n onPageBlur(page: number) {\n if (this.get('focused') === `${page}_page`) {\n this.set({\n focused: '',\n })\n }\n },\n\n onPrevPageClick() {\n this.decreaseCurrent(1)\n },\n onPrevPageFocus() {\n this.set({\n focused: 'prev_page',\n })\n },\n onPrevPageBlur() {\n if (this.get('focused') === 'prev_page') {\n this.set({\n focused: '',\n })\n }\n },\n\n onNextPageClick() {\n this.increaseCurrent(1)\n },\n onNextPageFocus() {\n this.set({\n focused: 'next_page',\n })\n },\n onNextPageBlur() {\n if (this.get('focused') === 'next_page') {\n this.set({\n focused: '',\n })\n }\n },\n\n onJumpClick() {\n let page = this.get('page')\n if (page) {\n if (Yox.is.numeric(page)) {\n page = +page\n if (page > this.get('count')) {\n this.showError('max')\n }\n else if (page <= 0) {\n this.showError('min')\n }\n else {\n this.setCurrent(page)\n }\n }\n else {\n this.showError('pattern')\n }\n }\n else {\n this.showError('empty')\n }\n },\n\n showError(error: string) {\n this.fire(\n {\n type: 'error',\n ns: 'pagination',\n },\n {\n error,\n }\n )\n },\n\n setCurrent(current: number) {\n if (this.get('current') === current) {\n return\n }\n this.set('current', current)\n this.fire(\n {\n type: 'change',\n ns: 'pagination',\n },\n {\n current,\n }\n )\n },\n\n decreaseCurrent(step: number) {\n const value = toNumber(this.get('current'), 1) - step\n this.setCurrent(\n value < 1 ? 1 : value\n )\n },\n\n increaseCurrent(step: number) {\n const value = toNumber(this.get('current'), 1) + step\n const count = this.get('count')\n this.setCurrent(\n value > count ? count : value\n )\n }\n\n },\n\n afterMount() {\n const me = this\n onClickEventByEnterPress(me, function () {\n const focused = me.get('focused')\n if (focused) {\n const parts = focused.split('_')\n if (parts[1] === 'page') {\n if (parts[0] === 'prev') {\n me.onPrevPageClick()\n }\n else if (parts[0] === 'next') {\n me.onNextPageClick()\n }\n else {\n me.onPageClick(\n toNumber(parts[0])\n )\n }\n }\n }\n })\n },\n\n components: {\n Icon,\n Input,\n Button,\n Select,\n PrevPage,\n NextPage,\n }\n\n})","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Upload.hbs'\n// import './style/Upload.styl'\n\nimport { toString } from '../util'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\n// 为每次选择的文件提供一个全局唯一的 id,便于外部知道触发的事件对应哪次上传\n\ntype LocalFile = {\n id: number | string,\n file: File,\n name: string,\n size: number,\n}\n\n// 本地文件用负数,避免和数据库自增 id 冲突\nlet guid = -1\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Upload',\n\n propTypes: {\n index: {\n type: RAW_NUMERIC,\n },\n draggable: {\n type: RAW_BOOLEAN,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n accept: {\n type: RAW_STRING,\n },\n beforeUpload: {\n type: RAW_FUNCTION,\n },\n upload: {\n type: RAW_FUNCTION,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isFileHover: FALSE,\n }\n },\n\n computed: {\n acceptPattern(): RegExp | void {\n const accept = this.get('accept')\n return accept\n ? new RegExp('(' + accept.replace(/\\*/g, '.').replace(/\\s*,\\s*/g, '|') + ')')\n : UNDEFINED\n }\n },\n\n methods: {\n beforeUpload(fileList: FileList) {\n\n const me = this\n const acceptPattern = me.get('acceptPattern')\n\n const formatedFileList = Yox.array.toArray(fileList)\n .filter(\n function (file) {\n return acceptPattern\n ? acceptPattern.test(file.type)\n : TRUE\n }\n )\n .map(\n function (file) {\n return {\n // 用字符串类型表示本地文件\n id: toString(guid--),\n file,\n name: file.name,\n size: file.size,\n }\n }\n )\n\n if (formatedFileList.length > 1\n && !me.get('multiple')\n ) {\n formatedFileList.length = 1\n }\n\n const beforeUpload = me.get('beforeUpload')\n if (beforeUpload) {\n const index = me.get('index')\n beforeUpload({\n index,\n fileList: formatedFileList,\n callback(result) {\n if (Yox.is.array(result)) {\n Yox.array.each(\n result,\n function (item: LocalFile) {\n me.upload(item)\n }\n )\n }\n else if (result) {\n me.upload(result)\n }\n }\n })\n return\n }\n\n Yox.array.each(\n formatedFileList,\n function (item) {\n me.upload(item)\n }\n )\n\n },\n\n upload(file: LocalFile) {\n\n const me = this\n const index = me.get('index')\n const upload = me.get('upload')\n\n upload({\n index,\n id: file.id,\n file: file.file,\n onStart() {\n me.fire(\n {\n type: 'start',\n ns: 'upload',\n },\n file\n )\n },\n onEnd() {\n\n me.fire(\n {\n type: 'end',\n ns: 'upload',\n },\n file\n )\n\n me.reset()\n\n },\n onAbort() {\n me.fire(\n {\n type: 'abort',\n ns: 'upload',\n },\n file\n )\n },\n onError() {\n me.fire(\n {\n type: 'error',\n ns: 'upload',\n },\n file\n )\n },\n onProgress(progress) {\n me.fire(\n {\n type: 'progress',\n ns: 'upload',\n },\n {\n id: file.id,\n file: file.file,\n progress,\n }\n )\n },\n onSuccess(response) {\n me.fire(\n {\n type: 'success',\n ns: 'upload',\n },\n {\n id: file.id,\n file: file.file,\n response,\n }\n )\n }\n })\n },\n\n reset() {\n // 重置一下,这样再次选择相同文件才能生效\n (this.$refs.form as HTMLFormElement).reset()\n },\n\n handleClick() {\n (this.$refs.input as HTMLInputElement).click()\n },\n\n handleDragenter() {\n this.set('isFileHover', TRUE)\n },\n\n handleDragleave() {\n this.set('isFileHover', FALSE)\n },\n\n handleDragover(event: CustomEventInterface) {\n // 默认情况下,元素是不允许放置的\n event.prevent()\n },\n\n handleDrop(event: CustomEventInterface) {\n event.prevent()\n this.set('isFileHover', FALSE)\n this.beforeUpload(\n (event.originalEvent as DragEvent).dataTransfer.files\n )\n },\n\n handleChange(event: CustomEventInterface) {\n this.beforeUpload(\n (event.originalEvent.target as HTMLInputElement).files\n )\n }\n\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Alert.hbs'\n// import './style/Alert.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STATUS_ARRAY,\n RAW_TYPE_WARNING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n getStatusIconName,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Alert',\n\n propTypes: {\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n value: RAW_TYPE_WARNING,\n },\n title: {\n type: RAW_STRING,\n },\n showIcon: {\n type: RAW_BOOLEAN,\n },\n banner: {\n type: RAW_BOOLEAN,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n iconName() {\n return getStatusIconName(\n this.get('status')\n )\n },\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Article.hbs'\n// import './style/Article.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Article',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n showLink: {\n type: RAW_BOOLEAN,\n },\n subTitle: {\n type: RAW_STRING,\n },\n signature: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Analysis.hbs'\n// import './style/Analysis.styl'\n\nimport Icon from '../icon/Icon'\nimport Tooltip from '../tooltip/Tooltip'\nimport Skeleton from '../skeleton/Skeleton'\n\nimport {\n TRUE,\n RAW_TOP,\n RAW_BOOLEAN,\n RAW_NUMBER,\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Analysis',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n required: TRUE,\n },\n value: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n tooltip: {\n type: RAW_STRING,\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_TOP,\n }\n },\n\n components: {\n Icon,\n Tooltip,\n Skeleton,\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/AnalysisField.hbs'\n// import './style/AnalysisField.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n RAW_NUMBER,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}AnalysisField',\n\n propTypes: {\n label: {\n type: RAW_STRING,\n required: TRUE,\n },\n value: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n up: {\n type: RAW_BOOLEAN,\n },\n down: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n Icon,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Spin.hbs'\n// import './style/Spin.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_DEFAULT,\n RAW_SIZE_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Spin',\n\n propTypes: {\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n fixed: {\n type: RAW_BOOLEAN,\n },\n text: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n },\n },\n\n})","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/SplitButton.hbs'\n// import './style/SplitButton.styl'\n\nimport Icon from '../icon/Icon'\nimport Button from '../button/Button'\nimport ButtonGroup from '../button/ButtonGroup'\nimport Popover from '../popover/Popover'\n\nimport {\n TRUE,\n FALSE,\n RAW_SMALL,\n RAW_LARGE,\n RAW_DEFAULT,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_CLICK,\n RAW_PLACEMENT_ARRAY,\n RAW_BOTTOM_END,\n RAW_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nimport {\n fireClickEvent\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}SplitButton',\n\n propTypes: {\n type: {\n type: oneOf([\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n ]),\n },\n size: {\n type: oneOf([RAW_DEFAULT, RAW_LARGE, RAW_SMALL]),\n value: RAW_DEFAULT,\n },\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM_END,\n },\n menu: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_CLICK,\n isMenuVisible: FALSE,\n }\n },\n\n events: {\n click(event) {\n if (event.phase === Yox.Event.PHASE_UPWARD) {\n event.stop()\n fireClickEvent(event)\n }\n },\n open(event) {\n event.stop()\n this.set('isMenuVisible', TRUE)\n },\n close(event) {\n event.stop()\n this.set('isMenuVisible', FALSE)\n }\n },\n\n methods: {\n onButtonClick(event: CustomEventInterface) {\n event.stop()\n fireClickEvent(event)\n this.fire(\n {\n type: 'click',\n ns: 'splitButton',\n }\n )\n },\n onItemClick(item, index) {\n this.set('isMenuVisible', FALSE)\n this.fire(\n {\n type: 'select',\n ns: 'splitButton',\n },\n {\n item,\n index,\n }\n )\n }\n },\n\n components: {\n Icon,\n Button,\n ButtonGroup,\n Popover,\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/BackTop.hbs'\n// import './style/BackTop.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n FALSE,\n WINDOW,\n DOCUMENT,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_EVENT_SCROLL,\n RAW_EVENT_RESIZE,\n RAW_EVENT_BEFORE_DESTROY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n toNumber,\n scrollTo,\n onTransitionEnd,\n} from '../util'\n\nconst CLASS_VISIBLE = '${prefix}backtop-visible'\nconst CLASS_FADE = '${prefix}backtop-fade'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}BackTop',\n\n propTypes: {\n target: {\n type: RAW_STRING,\n },\n bottom: {\n type: RAW_NUMERIC,\n },\n right: {\n type: RAW_NUMERIC,\n },\n height: {\n type: RAW_NUMERIC,\n value: 0,\n },\n duration: {\n type: RAW_NUMERIC,\n value: 500,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isVisible: FALSE,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const bottom = this.get('bottom')\n const right = this.get('right')\n\n if (bottom) {\n customStyle.bottom = toPixel(bottom)\n }\n if (right) {\n customStyle.right = toPixel(right)\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n transitions: {\n backTop: {\n enter(node) {\n\n const me = this\n\n // 设置为 display block\n Yox.dom.addClass(node, CLASS_VISIBLE)\n\n setTimeout(\n function () {\n if (!me.get('isVisible')) {\n return\n }\n Yox.dom.addClass(node, CLASS_FADE)\n },\n 50\n )\n\n },\n leave(node, done) {\n\n const me = this\n\n Yox.dom.removeClass(node, CLASS_FADE)\n\n onTransitionEnd(\n node,\n function () {\n if (me.get('isVisible')) {\n return\n }\n Yox.dom.removeClass(node, CLASS_VISIBLE)\n done()\n }\n )\n\n }\n },\n },\n\n components: {\n Icon,\n },\n\n afterMount() {\n\n const me = this\n\n let container: Document | HTMLElement = DOCUMENT\n let containerElement = DOCUMENT.documentElement\n\n const target = me.get('target')\n if (target) {\n containerElement = Yox.dom.find(target) as HTMLElement\n if (!containerElement) {\n Yox.logger.fatal(`target is not existed: ${target}`)\n return\n }\n container = containerElement\n }\n\n const height = toNumber(me.get('height'))\n const onRefresh = function () {\n me.set({\n isVisible: containerElement.scrollTop >= height\n })\n }\n\n const duration = toNumber(this.get('duration'))\n me.on('click', function () {\n scrollTo(\n containerElement,\n containerElement.scrollTop,\n 0,\n duration\n )\n })\n\n Yox.dom.on(container, RAW_EVENT_SCROLL, onRefresh)\n Yox.dom.on(WINDOW, RAW_EVENT_RESIZE, onRefresh)\n\n const destroy = function (component) {\n if (component === me) {\n Yox.dom.off(container, RAW_EVENT_SCROLL, onRefresh)\n Yox.dom.off(WINDOW, RAW_EVENT_RESIZE, onRefresh)\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Avatar.hbs'\n// import './style/Avatar.styl'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n RAW_DEFAULT,\n RAW_SHAPE_CIRCLE,\n RAW_SMALL,\n RAW_LARGE,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n} from '../util'\n\nconst SPACE_HORIZONTAL = 8\n\nconst SIZE_DEFAULT = 32\nconst SIZE_SMALL = 24\nconst SIZE_LARGE = 40\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Avatar',\n\n propTypes: {\n size: {\n type: [RAW_STRING, RAW_NUMERIC],\n value: RAW_DEFAULT,\n },\n shape: {\n type: oneOf([RAW_SHAPE_CIRCLE]),\n },\n text: {\n type: RAW_STRING,\n },\n url: {\n type: RAW_STRING,\n },\n formatUrl: {\n type: RAW_FUNCTION,\n },\n src: {\n type: RAW_STRING,\n },\n srcSet: {\n type: RAW_STRING,\n },\n alt: {\n type: RAW_STRING,\n },\n color: {\n type: RAW_STRING,\n },\n fontSize: {\n type: RAW_NUMERIC,\n },\n backgroundColor: {\n type: RAW_STRING,\n },\n clickable: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n sizeValue() {\n const size = this.get('size')\n const value = toNumber(size)\n if (value > 0) {\n return value\n }\n if (size === RAW_SMALL) {\n return SIZE_SMALL\n }\n if (size === RAW_LARGE) {\n return SIZE_LARGE\n }\n return SIZE_DEFAULT\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const sizeValue = this.get('sizeValue')\n customStyle.width = toPixel(sizeValue)\n customStyle.height = toPixel(sizeValue)\n\n const backgroundColor = this.get('backgroundColor')\n if (backgroundColor) {\n customStyle.backgroundColor = backgroundColor\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n textStyle() {\n\n const customStyle: Record = {}\n\n const color = this.get('color')\n const fontSize = this.get('fontSize')\n\n if (color) {\n customStyle.color = color\n }\n if (fontSize) {\n customStyle.fontSize = toPixel(fontSize)\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n return customStyle\n }\n\n }\n },\n\n afterMount() {\n\n const me = this\n\n me.watch(\n 'text',\n function () {\n me.nextTick(function () {\n\n const element = me.$refs && me.$refs.text as HTMLElement\n if (!element) {\n return\n }\n\n const scale = element.offsetWidth\n ? (me.$el.offsetWidth - SPACE_HORIZONTAL) / element.offsetWidth\n : 1\n\n element.style.transform = `scale(${Math.min(scale, 1)}) translateX(-50%)`\n\n })\n },\n TRUE\n )\n\n }\n})\n","import Yox from 'yox'\n\nimport template from './template/Badge.hbs'\n// import './style/Badge.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMBER,\n RAW_NUMERIC,\n RAW_DEFAULT,\n RAW_TYPE_ARRAY,\n RAW_TYPE_ERROR,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Badge',\n\n propTypes: {\n type: {\n type: oneOf(RAW_TYPE_ARRAY),\n value: RAW_TYPE_ERROR,\n },\n status: {\n type: oneOf([\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_DEFAULT,\n 'processing',\n ]),\n },\n text: {\n type: [RAW_STRING, RAW_NUMBER],\n },\n count: {\n type: RAW_NUMERIC,\n },\n max: {\n type: RAW_NUMERIC,\n value: 99,\n },\n dot: {\n type: RAW_BOOLEAN,\n },\n hidden: {\n type: RAW_BOOLEAN,\n },\n ripple: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n filters: {\n isNumeric: Yox.is.numeric,\n formatText(count: any, max: any) {\n count = Yox.is.numeric(count) ? +count : 0\n max = Yox.is.numeric(max) ? +max : 1\n return max < count\n ? max + '+'\n : count\n }\n }\n\n})\n","import {\n padStart,\n toString,\n} from '../util'\n\nexport const WEEKS = ['日', '一', '二', '三', '四', '五', '六']\n\nexport const SECOND = 1000\nexport const MINUTE = 60 * SECOND\nexport const HOUR = 60 * MINUTE\nexport const DAY = 24 * HOUR\n\nexport const STABLE_DURATION = 41 * DAY\nexport const MONTHS = [\n '一月', '二月', '三月', '四月', '五月',\n '六月', '七月', '八月', '九月', '十月',\n '十一月', '十二月'\n]\n\nexport const RAW_TYPE_DATE = 'date'\nexport const RAW_TYPE_DATE_RANGE = 'dateRange'\nexport const RAW_TYPE_WEEK = 'week'\nexport const RAW_TYPE_YEAR = 'year'\nexport const RAW_TYPE_MONTH = 'month'\n\nexport interface SimpleMonth {\n timestamp: number,\n year: number,\n month: number,\n text: string,\n}\n\nexport interface SimpleDate {\n timestamp: number,\n year: number,\n month: number,\n date: number,\n}\n\nexport interface SimpleRange {\n start: SimpleDate,\n end: SimpleDate,\n}\n\nexport interface DateRow {\n start: SimpleDate,\n end: SimpleDate,\n list: SimpleDate[],\n}\n\nexport interface Shortcut {\n text: string,\n onClick: () => Date | Date[],\n}\n\nexport function toSimpleDate(date: Date | number): SimpleDate {\n const result = toDate(date)\n return {\n year: result.getFullYear(),\n month: result.getMonth() + 1,\n date: result.getDate(),\n timestamp: result.getTime(),\n }\n}\n\nexport function toDate(date: Date | number) {\n\n let result: Date\n\n if (date instanceof Date) {\n result = date\n }\n else {\n result = new Date(date)\n }\n\n // 碰到过夏令时问题,问题描述如下:\n // time 每次递增 DAY,期望下次的时分秒是相同的,即 00:00:00\n // 但是碰到夏令时问题后,小时会有不同,非常坑爹\n // 因此这里要检查小时是否为 0\n result.setHours(0, 0, 0, 0)\n\n return result\n\n}\n\nexport function toTimestamp(date: Date | number | void) {\n return toDate(date || new Date()).getTime()\n}\n\nexport function offsetMonth(timestamp: number, offset: number) {\n\n const date = new Date(timestamp)\n\n date.setDate(1)\n date.setMonth(date.getMonth() + offset)\n\n return date.getTime()\n\n}\n\nfunction firstDateInWeek(date: Date) {\n const day = date.getDay()\n return new Date(date.getTime() - day * DAY)\n}\n\nfunction lastDateInWeek(date: Date) {\n const day = date.getDay()\n return new Date(date.getTime() - (6 - day) * DAY)\n}\n\nfunction firstDateInMonth(date: Date) {\n date.setDate(1)\n return date\n}\n\nfunction lastDateInMonth(date: Date) {\n date.setDate(1)\n date.setMonth(date.getMonth() + 1)\n return new Date(date.getTime() - DAY)\n}\n\nexport function createYearViewDatasource(startYear: number, count: number) {\n let result: number[][] = [], list: number[] = []\n for (let i = 0; i < count; i++) {\n list.push(i + startYear)\n if (i % 4 === 3) {\n result.push(list)\n list = []\n }\n }\n return result\n}\n\nexport function createMonthViewDatasource(year: number) {\n\n let result: SimpleMonth[][] = [], list: SimpleMonth[] = [], date = new Date()\n\n date.setFullYear(year)\n date.setDate(1)\n date.setHours(0, 0, 0, 0)\n\n for (let i = 0, len = MONTHS.length; i < len; i++) {\n\n date.setMonth(i)\n\n list.push({\n timestamp: date.getTime(),\n year,\n month: i + 1,\n text: MONTHS[i],\n })\n if (i % 4 === 3) {\n result.push(list)\n list = []\n }\n }\n return result\n}\n\nexport function createDateViewDatasource(timestamp: number) {\n\n let startDate = firstDateInWeek(firstDateInMonth(new Date(timestamp))).getTime()\n let endDate = lastDateInWeek(lastDateInMonth(new Date(timestamp))).getTime()\n\n let duration = endDate - startDate\n let offset = STABLE_DURATION - duration\n\n if (offset > 0) {\n endDate += offset\n }\n\n let result: DateRow[] = [], list: SimpleDate[] = []\n for (let i = 0, time = startDate; time <= endDate; i++, time += DAY) {\n\n list.push(toSimpleDate(time))\n\n if (i % 7 === 6) {\n result.push({\n start: list[0],\n end: list[list.length - 1],\n list: list,\n })\n list = []\n }\n\n }\n\n return result\n}\n\n/**\n * yyyy -> 2019\n * M -> 1\n * MM -> 01\n * d -> 1\n * dd -> 01\n */\nexport function formatDate(date: Date, format: string) {\n return format\n .replace(/yyyy/i, toString(date.getFullYear()))\n .replace(/MM/i, padStart(date.getMonth() + 1))\n .replace(/M/i, toString(date.getMonth() + 1))\n .replace(/dd/i, padStart(date.getDate()))\n .replace(/d/i, toString(date.getDate()))\n}\n","import Yox from 'yox'\n\nimport Icon from '../../icon/Icon'\nimport template from '../template/DateYear.hbs'\n\nimport {\n RAW_DATE,\n RAW_STRING,\n RAW_ARRAY,\n RAW_NUMBER,\n RAW_STYLE_TYPE,\n} from '../../constant'\n\nimport {\n toDate,\n createYearViewDatasource,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n defaultDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n checkedDate: {\n type: [RAW_DATE, RAW_NUMBER, RAW_ARRAY],\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n let date = props.defaultDate\n if (!date) {\n if (Yox.is.array(props.checkedDate)) {\n date = props.checkedDate[0]\n }\n else {\n date = props.checkedDate\n }\n }\n return {\n year: (date ? toDate(date) : new Date()).getFullYear(),\n count: 12,\n }\n },\n\n computed: {\n datasource(): number[][] {\n return createYearViewDatasource(this.get('year'), this.get('count'))\n },\n checkedYears(): number[] {\n let checkedDate = this.get('checkedDate')\n if (Yox.is.array(checkedDate)) {\n return checkedDate.map(function (date: number | Date) {\n return date ? toDate(date).getFullYear() : 0\n })\n }\n return [checkedDate ? toDate(checkedDate).getFullYear() : 0]\n }\n },\n\n filters: {\n isChecked(year: number, checkedYears: number[]) {\n return Yox.array.has(checkedYears, year)\n }\n },\n\n methods: {\n click(item: number) {\n this.fire(\n {\n type: 'change',\n ns: 'year',\n },\n {\n year: item,\n }\n )\n }\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport Icon from '../../icon/Icon'\nimport template from '../template/DateMonth.hbs'\n\nimport DateYear from './DateYear'\n\nimport {\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n toDate,\n SimpleMonth,\n createMonthViewDatasource,\n} from '../util'\n\nimport {\n RAW_DATE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_ARRAY,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../../constant'\n\nfunction toMonthTimestamp(date: Date | number | void) {\n if (date) {\n date = toDate(date)\n date.setDate(1)\n return date.getTime()\n }\n return 0\n}\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n defaultDate: {\n type: RAW_NUMBER,\n },\n checkedDate: {\n type: [RAW_DATE, RAW_NUMBER, RAW_ARRAY],\n },\n canPickYear: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n let date = props.defaultDate\n if (!date) {\n if (Yox.is.array(props.checkedDate)) {\n date = props.checkedDate[0]\n }\n else {\n date = props.checkedDate\n }\n }\n return {\n type: RAW_TYPE_MONTH,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n year: (date ? toDate(date) : new Date()).getFullYear(),\n }\n },\n\n components: {\n Icon,\n DateYear,\n },\n\n computed: {\n datasource(): SimpleMonth[][] {\n return createMonthViewDatasource(this.get('year'))\n },\n checkedTimestamps(): number[] {\n const checkedDate = this.get('checkedDate')\n if (Yox.is.array(checkedDate)) {\n return checkedDate.map(toMonthTimestamp)\n }\n return [toMonthTimestamp(checkedDate)]\n }\n },\n\n filters: {\n isChecked(item: SimpleMonth, checkedTimestamps: number[]) {\n return Yox.array.has(checkedTimestamps, item.timestamp)\n }\n },\n\n events: {\n change: {\n listener(event, data) {\n event.stop()\n this.set({\n type: RAW_TYPE_MONTH,\n year: data.year,\n })\n },\n ns: 'year',\n },\n },\n\n methods: {\n click(item: SimpleMonth) {\n this.fire(\n {\n type: 'change',\n ns: 'month',\n },\n item\n )\n }\n }\n\n})","import Yox from 'yox'\n\nimport Icon from '../../icon/Icon'\nimport template from '../template/Date.hbs'\n\nimport DateMonth from './DateMonth'\nimport DateYear from './DateYear'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_ARRAY,\n RAW_NUMBER,\n RAW_FUNCTION,\n RAW_DATE,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../../constant'\n\nimport {\n WEEKS,\n RAW_TYPE_DATE,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n DateRow,\n SimpleDate,\n toSimpleDate,\n toTimestamp,\n offsetMonth,\n createDateViewDatasource,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n defaultDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n checkedDate: {\n type: [RAW_DATE, RAW_NUMBER, RAW_ARRAY],\n },\n disabledDate: {\n type: RAW_FUNCTION,\n },\n canPickYear: {\n type: RAW_BOOLEAN,\n },\n canPickMonth: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n let date = props.defaultDate\n if (!date) {\n if (Yox.is.array(props.checkedDate)) {\n date = props.checkedDate[0]\n }\n else {\n date = props.checkedDate\n }\n }\n return {\n type: RAW_TYPE_DATE,\n RAW_TYPE_DATE,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n weeks: WEEKS,\n timestamp: toTimestamp(date),\n }\n },\n\n computed: {\n date(): SimpleDate {\n return toSimpleDate(this.get('timestamp'))\n },\n datasource(): DateRow[] {\n return createDateViewDatasource(this.get('timestamp'))\n },\n checkedTimestamps(): number[] {\n let checkedDate = this.get('checkedDate')\n if (Yox.is.array(checkedDate)) {\n return checkedDate.map(function (date: number | Date) {\n return date ? toTimestamp(date) : 0\n })\n }\n return [checkedDate ? toTimestamp(checkedDate) : 0]\n }\n },\n\n components: {\n Icon,\n DateYear,\n DateMonth,\n },\n\n filters: {\n isCurrentMonth(item: SimpleDate, date: SimpleDate) {\n return date.year === item.year && date.month === item.month\n },\n\n isEnabled(item: SimpleDate, disabledDate: ((item: SimpleDate) => boolean) | void) {\n return disabledDate\n ? disabledDate(item)\n : TRUE\n },\n\n isChecked(item: SimpleDate, checkedTimestamps: number[]) {\n return Yox.array.has(checkedTimestamps, item.timestamp)\n }\n },\n\n events: [\n {\n type: 'change',\n ns: 'year',\n listener(event, data) {\n event.stop()\n // @ts-ignore\n const date = new Date(this.get('timestamp'))\n date.setFullYear(data.year)\n // @ts-ignore\n this.set({\n type: RAW_TYPE_DATE,\n timestamp: date.getTime()\n })\n }\n },\n {\n type: 'change',\n ns: 'month',\n listener(event, data) {\n event.stop()\n // @ts-ignore\n const date = new Date(this.get('timestamp'))\n date.setMonth(data.month - 1)\n // @ts-ignore\n this.set({\n type: RAW_TYPE_DATE,\n timestamp: date.getTime()\n })\n }\n }\n ],\n\n methods: {\n offset(offset: number) {\n this.set(\n 'timestamp',\n offsetMonth(this.get('timestamp'), offset)\n )\n },\n click(item: SimpleDate) {\n this.fire(\n {\n type: 'change',\n ns: 'date',\n },\n item\n )\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport Icon from '../../icon/Icon'\nimport template from '../template/DateRange.hbs'\n\nimport {\n WEEKS,\n DateRow,\n SimpleDate,\n offsetMonth,\n toSimpleDate,\n toTimestamp,\n createDateViewDatasource,\n} from '../util'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_DATE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_FUNCTION,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../../constant'\n\nfunction getEndTimestamp(startTimestamp: number, endTimestamp: number) {\n\n const startDate = new Date(startTimestamp)\n const endDate = new Date(endTimestamp)\n\n startDate.setDate(1)\n endDate.setDate(1)\n\n if (endDate.getTime() > startDate.getTime()) {\n return endDate.getTime()\n }\n\n return offsetMonth(endTimestamp, 1)\n\n}\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n splitPanel: {\n type: RAW_BOOLEAN,\n },\n defaultStartDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n checkedStartDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n defaultEndDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n checkedEndDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n disabledDate: {\n type: RAW_FUNCTION,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const props = options.props || {}\n\n const startTimestamp = toTimestamp(props.defaultStartDate || props.checkedStartDate)\n const endTimestamp = toTimestamp(props.defaultEndDate || props.checkedEndDate || startTimestamp)\n\n return {\n weeks: WEEKS,\n\n startTimestamp,\n endTimestamp: getEndTimestamp(startTimestamp, endTimestamp),\n\n // 点击后钉住的日期\n pinDate: UNDEFINED,\n // 当 pinDate 存在时,tempDate 是 hover 时临时选中的开始或结束日期\n tempDate: UNDEFINED,\n }\n\n },\n\n computed: {\n startDate(): SimpleDate {\n return toSimpleDate(this.get('startTimestamp'))\n },\n endDate(): SimpleDate {\n return toSimpleDate(this.get('endTimestamp'))\n },\n startDatasource(): DateRow[] {\n return createDateViewDatasource(this.get('startTimestamp'))\n },\n endDatasource(): DateRow[] {\n return createDateViewDatasource(this.get('endTimestamp'))\n },\n checkedStartTimestamp(): number {\n const checkedStartDate = this.get('checkedStartDate')\n return checkedStartDate\n ? toTimestamp(checkedStartDate)\n : 0\n },\n checkedEndTimestamp(): number {\n const checkedEndDate = this.get('checkedEndDate')\n return checkedEndDate\n ? toTimestamp(checkedEndDate)\n : 0\n },\n computedCheckedStartTimestamp(): number {\n const pinDate = this.get('pinDate')\n if (!pinDate) {\n return this.get('checkedStartTimestamp')\n }\n const tempDate = this.get('tempDate')\n return tempDate\n ? Math.min(pinDate.timestamp, tempDate.timestamp)\n : pinDate.timestamp\n },\n computedCheckedEndTimestamp(): number {\n const pinDate = this.get('pinDate')\n if (!pinDate) {\n return this.get('checkedEndTimestamp')\n }\n const tempDate = this.get('tempDate')\n return tempDate\n ? Math.max(pinDate.timestamp, tempDate.timestamp)\n : 0\n },\n },\n\n watchers: {\n checkedStartDate(value) {\n if (value) {\n this.set('startTimestamp', toTimestamp(value))\n }\n },\n checkedEndDate(value) {\n const startTimestamp = this.get('startTimestamp')\n if (startTimestamp && value) {\n this.set(\n 'endTimestamp',\n getEndTimestamp(startTimestamp, toTimestamp(value))\n )\n }\n }\n },\n\n filters: {\n isCurrentMonth(item: SimpleDate, base: SimpleDate) {\n return base.year === item.year && base.month === item.month\n },\n\n isEnabled(item: SimpleDate, disabledDate: ((item: SimpleDate) => boolean) | void) {\n return disabledDate\n ? disabledDate(item)\n : TRUE\n },\n },\n\n methods: {\n offsetStart(offset: number) {\n this.set(\n 'startTimestamp',\n offsetMonth(\n this.get('startTimestamp'),\n offset\n )\n )\n if (!this.get('splitPanel')) {\n this.set(\n 'endTimestamp',\n offsetMonth(\n this.get('endTimestamp'),\n offset\n )\n )\n }\n },\n offsetEnd(offset: number) {\n this.set(\n 'endTimestamp',\n offsetMonth(\n this.get('endTimestamp'),\n offset\n )\n )\n if (!this.get('splitPanel')) {\n this.set(\n 'startTimestamp',\n offsetMonth(\n this.get('startTimestamp'),\n offset\n )\n )\n }\n },\n hover(item: SimpleDate) {\n const pinDate = this.get('pinDate')\n if (pinDate) {\n this.set('tempDate', pinDate.timestamp !== item.timestamp ? item : UNDEFINED)\n }\n },\n leave() {\n this.set('tempDate', UNDEFINED)\n },\n click(item: SimpleDate) {\n\n const me = this\n const pinDate = me.get('pinDate')\n if (!pinDate) {\n me.set('pinDate', item)\n return\n }\n\n if (pinDate.timestamp === item.timestamp) {\n return\n }\n\n if (item.timestamp > pinDate.timestamp) {\n me.fire(\n {\n type: 'change',\n ns: 'range',\n },\n {\n start: pinDate,\n end: item,\n }\n )\n }\n else {\n me.fire(\n {\n type: 'change',\n ns: 'range',\n },\n {\n start: item,\n end: pinDate,\n }\n )\n }\n\n // 等外部更新完 start 和 end 再重置,避免闪烁\n me.nextTick(\n function () {\n me.set({\n pinDate: UNDEFINED,\n tempDate: UNDEFINED,\n })\n }\n )\n\n },\n\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport Icon from '../../icon/Icon'\nimport template from '../template/DateWeek.hbs'\n\nimport DateMonth from './DateMonth'\nimport DateYear from './DateYear'\n\nimport {\n WEEKS,\n RAW_TYPE_WEEK,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n DateRow,\n SimpleDate,\n toSimpleDate,\n toTimestamp,\n offsetMonth,\n createDateViewDatasource,\n} from '../util'\n\nimport {\n TRUE,\n FALSE,\n RAW_DATE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n RAW_STYLE_TYPE,\n} from '../../constant'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n defaultDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n checkedDate: {\n type: [RAW_DATE, RAW_NUMBER],\n },\n disabledDate: {\n type: RAW_FUNCTION,\n },\n canPickYear: {\n type: RAW_BOOLEAN,\n },\n canPickMonth: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n return {\n type: RAW_TYPE_WEEK,\n RAW_TYPE_WEEK,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n weeks: WEEKS,\n timestamp: toTimestamp(props.defaultDate || props.checkedDate),\n }\n },\n\n computed: {\n date(): SimpleDate {\n const checkedDate = this.get('checkedDate')\n return toSimpleDate(\n checkedDate\n ? toTimestamp(checkedDate)\n : this.get('timestamp')\n )\n },\n datasource(): DateRow[] {\n const date = this.get('date')\n return createDateViewDatasource(date.timestamp)\n },\n checkedTimestamp(): number {\n const checkedDate = this.get('checkedDate')\n return checkedDate ? toTimestamp(checkedDate) : 0\n },\n },\n\n components: {\n Icon,\n DateYear,\n DateMonth,\n },\n\n filters: {\n isCurrentMonth(item: SimpleDate, date: SimpleDate) {\n return date.year === item.year && date.month === item.month\n },\n\n isEnabled(item: SimpleDate, disabledDate: ((item: SimpleDate) => boolean) | void) {\n return disabledDate\n ? disabledDate(item)\n : TRUE\n },\n },\n\n events: [\n {\n type: 'change',\n ns: 'year',\n listener(event, data) {\n event.stop()\n // @ts-ignore\n const date = new Date(this.get('timestamp'))\n date.setFullYear(data.year)\n // @ts-ignore\n this.set({\n type: RAW_TYPE_WEEK,\n timestamp: date.getTime()\n })\n }\n },\n {\n type: 'change',\n ns: 'month',\n listener(event, data) {\n event.stop()\n // @ts-ignore\n const date = new Date(this.get('timestamp'))\n date.setMonth(data.month - 1)\n // @ts-ignore\n this.set({\n type: RAW_TYPE_WEEK,\n timestamp: date.getTime()\n })\n }\n },\n ],\n\n methods: {\n offset(offset: number) {\n this.set(\n 'timestamp',\n offsetMonth(this.get('timestamp'), offset)\n )\n },\n click(colIndex: number) {\n\n const { start, end } = this.get(`datasource.${colIndex}`)\n\n this.fire(\n {\n type: 'change',\n ns: 'week',\n },\n {\n start,\n end,\n }\n )\n\n },\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport Tag from '../tag/Tag'\nimport Popover from '../popover/Popover'\nimport DateView from './component/Date'\nimport DateRange from './component/DateRange'\nimport DateWeek from './component/DateWeek'\nimport DateMonth from './component/DateMonth'\nimport DateYear from './component/DateYear'\n\nimport template from './template/DatePicker.hbs'\n// import './style/DatePicker.styl'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_DATE,\n RAW_ARRAY,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_BOTTOM_START,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_PLACEMENT_ARRAY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_CUSTOM,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n RAW_TYPE_DATE,\n RAW_TYPE_DATE_RANGE,\n RAW_TYPE_WEEK,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n\n Shortcut,\n formatDate,\n SimpleDate,\n toTimestamp,\n toSimpleDate,\n} from './util'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nimport {\n fireClickEvent,\n onClickEventByEnterPress,\n} from '../event'\n\nconst YEAR_FORMAT = 'yyyy'\nconst MONTH_FORMAT = 'yyyy-MM'\nconst DATE_FORMAT = 'yyyy-MM-dd'\n\nconst defaultFormat = {}\ndefaultFormat[RAW_TYPE_DATE] = DATE_FORMAT\ndefaultFormat[RAW_TYPE_DATE_RANGE] = DATE_FORMAT\ndefaultFormat[RAW_TYPE_WEEK] = DATE_FORMAT\ndefaultFormat[RAW_TYPE_MONTH] = MONTH_FORMAT\ndefaultFormat[RAW_TYPE_YEAR] = YEAR_FORMAT\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}DatePicker',\n\n propTypes: {\n type: {\n type: oneOf([RAW_TYPE_DATE, RAW_TYPE_DATE_RANGE, RAW_TYPE_WEEK, RAW_TYPE_YEAR, RAW_TYPE_MONTH]),\n value: RAW_TYPE_DATE,\n },\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n splitPanel: {\n type: RAW_BOOLEAN,\n },\n defaultDate: {\n type: RAW_DATE,\n },\n value: {\n type: function (key: string, value: any) {\n\n }\n },\n shortcuts: {\n type: RAW_ARRAY,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM_START,\n },\n placeholder: {\n type: RAW_STRING,\n value: '请选择日期...'\n },\n format: {\n type: RAW_STRING,\n },\n disabledDate: {\n type: RAW_FUNCTION,\n },\n showClear: {\n type: RAW_BOOLEAN,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const props = options.props || {}\n return {\n RAW_TYPE_DATE,\n RAW_TYPE_DATE_RANGE,\n RAW_TYPE_WEEK,\n RAW_TYPE_YEAR,\n RAW_TYPE_MONTH,\n RAW_CUSTOM,\n\n isFocus: FALSE,\n isVisible: FALSE,\n formatText: props.format || defaultFormat[props.type || RAW_TYPE_DATE]\n }\n },\n\n components: {\n Tag,\n Popover,\n DateView,\n DateRange,\n DateWeek,\n DateMonth,\n DateYear,\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n defaultSimpleDate(): SimpleDate {\n const defaultDate = this.get('defaultDate')\n return toSimpleDate(toTimestamp(defaultDate))\n },\n formatedValues(): string[] {\n\n const value = this.get('value')\n const formatText = this.get('formatText')\n\n if (Yox.is.array(value)) {\n return value.map(function (date: Date) {\n return formatDate(date, formatText)\n })\n }\n else if (value) {\n return [formatDate(value, formatText)]\n }\n return []\n\n },\n },\n\n events: [\n {\n type: 'change',\n ns: 'date',\n listener(event, data) {\n event.stop()\n // @ts-ignore\n this.dateChange(data.timestamp)\n }\n },\n {\n type: 'change',\n ns: 'year',\n listener(event, data) {\n event.stop()\n const date = new Date()\n date.setFullYear(data.year)\n // @ts-ignore\n this.dateChange(toTimestamp(date), YEAR_FORMAT)\n }\n },\n {\n type: 'change',\n ns: 'month',\n listener(event, data: SimpleDate) {\n event.stop()\n const date = new Date()\n date.setFullYear(data.year)\n date.setMonth(data.month - 1)\n // @ts-ignore\n this.dateChange(toTimestamp(date), MONTH_FORMAT)\n }\n },\n {\n type: 'change',\n ns: 'week',\n listener(event, data: SimpleDate) {\n event.stop()\n // @ts-ignore\n this.dateRangeChange(data.start.timestamp, data.end.timestamp)\n }\n },\n {\n type: 'change',\n ns: 'range',\n listener(event, data: SimpleDate) {\n event.stop()\n // @ts-ignore\n this.dateRangeChange(data.start.timestamp, data.end.timestamp)\n }\n },\n {\n listener(event) {\n\n event.stop()\n\n // @ts-ignore\n this.set('isVisible', FALSE)\n\n },\n type: 'outside',\n ns: 'popover',\n }\n ],\n\n methods: {\n\n onClick(event?: CustomEventInterface) {\n this.toggle('isVisible')\n fireClickEvent(event)\n },\n\n onClearClick(event: CustomEventInterface) {\n\n // 停止冒泡,否则会展开下拉框\n event.stop()\n fireClickEvent(event)\n\n const value = this.get('multiple') ? [] : UNDEFINED\n\n this.set('value', value)\n\n this.fire(\n {\n type: 'clear',\n ns: 'datePicker',\n },\n TRUE\n )\n\n this.fireChange(value)\n\n },\n\n onItemRemove(event: CustomEventInterface, index: number) {\n\n event.stop()\n\n this.removeAt('value', index)\n this.fireChange(this.get('value'))\n\n },\n\n onShortcutClick(data: Shortcut) {\n\n const value = data.onClick.call(this)\n if (Yox.is.array(value)) {\n if (!value[0] || !value[1]) {\n Yox.logger.warn(`shortcuts value 传值错误`)\n return\n }\n this.dateRangeChange(\n toTimestamp(value[0]),\n toTimestamp(value[1])\n )\n }\n else {\n if (!value) {\n Yox.logger.warn(`shortcuts value 传值错误`)\n return\n }\n const type = this.get('type')\n if (type === RAW_TYPE_DATE_RANGE || type === RAW_TYPE_WEEK) {\n Yox.logger.warn(`shortcuts value 需返回数组类型`)\n return\n }\n this.dateChange(\n toTimestamp(value as any)\n )\n }\n },\n\n dateChange(timestamp: number, dateFormat = DATE_FORMAT) {\n\n const me = this\n const value = me.get('value')\n\n const date = new Date(timestamp)\n\n if (me.get('multiple')) {\n if (Yox.is.array(value)) {\n // 判断年月日是否存在\n const format = formatDate(date, dateFormat)\n let existed = FALSE\n Yox.array.each(\n value,\n function (item: Date) {\n if (format === formatDate(item, dateFormat)) {\n existed = TRUE\n return FALSE\n }\n }\n )\n if (!existed) {\n me.append('value', date)\n me.fireChange(me.get('value'))\n }\n }\n else {\n me.append('value', date)\n me.fireChange(me.get('value'))\n }\n }\n else {\n me.set('value', date)\n me.fireChange(date)\n }\n\n if (!me.get('multiple')) {\n me.nextTick(\n function () {\n me.set('isVisible', FALSE)\n }\n )\n }\n\n },\n\n dateRangeChange(start: number, end: number) {\n\n const value = [new Date(start), new Date(end)]\n\n this.set('value', value)\n this.fireChange(value)\n\n if (!this.get('multiple')) {\n this.nextTick(\n function () {\n this.set('isVisible', FALSE)\n }\n )\n }\n\n },\n\n fireChange(value) {\n this.fire(\n {\n type: 'change',\n ns: 'datePicker',\n },\n {\n value,\n }\n )\n }\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n }\n\n})\n","import {\n padStart,\n scrollTo,\n} from '../util'\n\nexport function toTimeProps(value: Date | number | void, hourList: number[], minuteList: number[], secondList: number[]) {\n\n const result = {\n hour: -1,\n minute: -1,\n second: -1,\n hourIndex: -1,\n minuteIndex: -1,\n secondIndex: -1,\n text: '',\n }\n\n let date: Date\n\n if (value instanceof Date) {\n date = value\n }\n else if (typeof value === 'number' && value > 0) {\n date = new Date(value)\n }\n\n if (date) {\n const hour = date.getHours()\n const minute = date.getMinutes()\n const second = date.getSeconds()\n\n const hourIndex = hourList.indexOf(hour)\n const minuteIndex = minuteList.indexOf(minute)\n const secondIndex = secondList.indexOf(second)\n\n if (hourIndex >= 0) {\n result.hour = hour\n result.hourIndex = hourIndex\n }\n if (minuteIndex >= 0) {\n result.minute = minute\n result.minuteIndex = minuteIndex\n }\n if (secondIndex >= 0) {\n result.second = second\n result.secondIndex = secondIndex\n }\n\n result.text = formatTime(\n result.hour,\n result.minute,\n secondList.length > 0 ? result.second : -1\n )\n }\n\n return result\n\n}\n\nexport function formatTime(hour: number, minute: number, second: number) {\n\n const list: string[] = []\n\n if (hour >= 0) {\n list.push(\n padStart(hour)\n )\n }\n if (minute >= 0) {\n list.push(\n padStart(minute)\n )\n }\n if (second >= 0) {\n list.push(\n padStart(second)\n )\n }\n\n return list.join(':')\n\n}\n\nexport function createRangeList(start: number, end: number, step: number) {\n const list: number[] = []\n for (let i = start; i <= end; i += step) {\n list.push(i)\n }\n return list\n}\n\nexport function getValidTimeItemIndex(listLength: number, index: number) {\n return index >= 0 && index < listLength\n ? index\n : -1\n}\n\nexport function scrollTimeItemInToView(listElement: HTMLElement, index: number, animated?: boolean) {\n\n const itemElement = listElement.children[index]\n if (!itemElement) {\n return\n }\n\n scrollTo(\n listElement,\n listElement.scrollTop,\n (itemElement as HTMLElement).offsetHeight * index,\n animated ? 600 : 0\n )\n\n}","import Yox from 'yox'\n\nimport Button from '../button/Button'\nimport ResizeObserver from '../resize-observer/ResizeObserver'\nimport template from './template/TimePanel.hbs'\n\nimport {\n TRUE,\n RAW_ARRAY,\n RAW_NUMBER,\n} from '../constant'\n\nimport {\n getNowTime,\n padStart,\n} from '../util'\n\nimport {\n getValidTimeItemIndex,\n scrollTimeItemInToView,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n hourList: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n hourIndex: {\n type: RAW_NUMBER,\n },\n minuteList: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n minuteIndex: {\n type: RAW_NUMBER,\n },\n secondList: {\n type: RAW_ARRAY,\n },\n secondIndex: {\n type: RAW_NUMBER,\n },\n },\n\n computed: {\n showSecond(): boolean {\n return this.get('secondList.length') > 0\n },\n validHourIndex(): number {\n return getValidTimeItemIndex(\n this.get('hourList.length'),\n this.get('hourIndex')\n )\n },\n validMinuteIndex(): number {\n return getValidTimeItemIndex(\n this.get('minuteList.length'),\n this.get('minuteIndex')\n )\n },\n validSecondIndex(): number {\n return getValidTimeItemIndex(\n this.get('secondList.length'),\n this.get('secondIndex')\n )\n },\n hasValue(): boolean {\n return this.get('validHourIndex') >= 0\n && this.get('validMinuteIndex') >= 0\n && (!this.get('showSecond') || this.get('validSecondIndex') >= 0)\n },\n },\n\n watchers: {\n hourIndex() {\n this.scrollHourIntoView(TRUE)\n },\n minuteIndex() {\n this.scrollMinuteIntoView(TRUE)\n },\n secondIndex() {\n this.scrollSecondIntoView(TRUE)\n },\n },\n\n events: {\n resize: {\n listener(event, data) {\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n event.stop()\n if (data.height > 0) {\n this.scrollHourIntoView()\n this.scrollMinuteIntoView()\n this.scrollSecondIntoView()\n }\n },\n ns: 'resizeObserver'\n }\n },\n\n filters: {\n padStart,\n },\n\n methods: {\n scrollHourIntoView(animated?: boolean) {\n const hourIndex = this.get('hourIndex')\n if (hourIndex >= 0) {\n scrollTimeItemInToView(\n this.$refs.hourList as HTMLElement,\n hourIndex,\n animated\n )\n }\n },\n scrollMinuteIntoView(animated?: boolean) {\n const minuteIndex = this.get('minuteIndex')\n if (minuteIndex >= 0) {\n scrollTimeItemInToView(\n this.$refs.minuteList as HTMLElement,\n minuteIndex,\n animated\n )\n }\n },\n scrollSecondIntoView(animated?: boolean) {\n const secondIndex = this.get('secondIndex')\n if (secondIndex >= 0) {\n scrollTimeItemInToView(\n this.$refs.secondList as HTMLElement,\n secondIndex,\n animated\n )\n }\n },\n onHourClick(hourIndex: number) {\n\n let minuteIndex = this.get('validMinuteIndex')\n if (minuteIndex < 0) {\n minuteIndex = 0\n }\n\n let secondIndex = this.get('validSecondIndex')\n if (this.get('showSecond') && secondIndex < 0) {\n secondIndex = 0\n }\n\n this.fireChange(hourIndex, minuteIndex, secondIndex)\n\n },\n onMinuteClick(minuteIndex: number) {\n\n let hourIndex = this.get('validHourIndex')\n if (hourIndex < 0) {\n hourIndex = 0\n }\n\n let secondIndex = this.get('validSecondIndex')\n if (this.get('showSecond') && secondIndex < 0) {\n secondIndex = 0\n }\n\n this.fireChange(hourIndex, minuteIndex, secondIndex)\n\n },\n onSecondClick(secondIndex: number) {\n\n let hourIndex = this.get('validHourIndex')\n if (hourIndex < 0) {\n hourIndex = 0\n }\n\n let minuteIndex = this.get('validMinuteIndex')\n if (minuteIndex < 0) {\n minuteIndex = 0\n }\n\n this.fireChange(hourIndex, minuteIndex, secondIndex)\n\n },\n onNowClick() {\n\n const date = new Date(getNowTime())\n\n const hour = date.getHours()\n let hourIndex = -1\n\n const hourList = this.get('hourList')\n if (hourList) {\n hourIndex = hourList.indexOf(hour)\n }\n\n const minute = date.getMinutes()\n let minuteIndex = -1\n\n const minuteList = this.get('minuteList')\n if (minuteList) {\n minuteIndex = minuteList.indexOf(minute)\n }\n\n const second = date.getMinutes()\n let secondIndex = -1\n\n const secondList = this.get('secondList')\n if (this.get('showSecond') && secondList) {\n secondIndex = secondList.indexOf(second)\n }\n\n this.fireChange(hourIndex, minuteIndex, secondIndex)\n\n this.fire(\n {\n type: 'submit',\n ns: 'timePanel',\n },\n {\n hour,\n minute,\n second,\n }\n )\n\n },\n onSubmitClick() {\n\n let hour = -1\n let minute = -1\n let second = -1\n\n const hourIndex = this.get('validHourIndex')\n if (hourIndex >= 0) {\n hour = this.get('hourList')[hourIndex]\n }\n\n const minuteIndex = this.get('validMinuteIndex')\n if (minuteIndex >= 0) {\n minute = this.get('minuteList')[minuteIndex]\n }\n\n const secondIndex = this.get('validSecondIndex')\n if (this.get('showSecond') && secondIndex >= 0) {\n second = this.get('secondList')[secondIndex]\n }\n\n this.fire(\n {\n type: 'submit',\n ns: 'timePanel',\n },\n {\n hour,\n minute,\n second,\n }\n )\n\n\n },\n fireChange(hourIndex: number, minuteIndex: number, secondIndex: number) {\n this.fire(\n {\n type: 'change',\n ns: 'timePanel',\n },\n {\n hourIndex,\n minuteIndex,\n secondIndex,\n }\n )\n },\n },\n\n components: {\n Button,\n ResizeObserver,\n },\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport Popover from '../popover/Popover'\nimport TimePanel from './TimePanel'\n\nimport template from './template/TimePicker.hbs'\n// import './style/TimePicker.styl'\n\nimport {\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_BOTTOM_START,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_PLACEMENT_ARRAY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_CUSTOM,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toTimeProps,\n formatTime,\n createRangeList,\n} from './util'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n} from '../util'\n\nimport {\n fireClickEvent,\n onClickEventByEnterPress,\n} from '../event'\n\nconst DEFAULT_HOUR_STEP = 1\nconst DEFAULT_MINUTE_STEP = 1\nconst DEFAULT_SECOND_STEP = 1\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}TimePicker',\n\n propTypes: {\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM_START,\n },\n defaultValue: {\n type: function (key: string, value: any) {\n\n }\n },\n placeholder: {\n type: RAW_STRING,\n value: '请选择时间...'\n },\n showClear: {\n type: RAW_BOOLEAN,\n },\n format: {\n type: RAW_STRING,\n },\n hourStep: {\n type: RAW_NUMERIC,\n },\n minuteStep: {\n type: RAW_NUMERIC,\n },\n secondStep: {\n type: RAW_NUMERIC,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const props: Record = toTimeProps(\n options.props && options.props.defaultValue,\n this.get('hourList'),\n this.get('minuteList'),\n this.get('secondList')\n )\n\n props.isFocus = FALSE\n props.isVisible = FALSE\n props.RAW_CUSTOM = RAW_CUSTOM\n\n return props\n },\n\n components: {\n Popover,\n TimePanel,\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n needSecond(): boolean {\n return this.get('format') !== 'HH:mm'\n },\n hourList(): number[] {\n const hourStep = toNumber(this.get('hourStep'), DEFAULT_HOUR_STEP)\n return createRangeList(0, 23, hourStep)\n },\n minuteList(): number[] {\n const minuteStep = toNumber(this.get('minuteStep'), DEFAULT_MINUTE_STEP)\n return createRangeList(0, 59, minuteStep)\n },\n secondList(): number[] {\n if (this.get('needSecond')) {\n const secondStep = toNumber(this.get('secondStep'), DEFAULT_SECOND_STEP)\n return createRangeList(0, 59, secondStep)\n }\n return []\n },\n hasValue(): boolean {\n return this.get('hour') >= 0\n && this.get('minute') >= 0\n && (!this.get('needSecond') || this.get('second') >= 0)\n }\n },\n\n events: {\n change: {\n listener(event, data) {\n\n event.stop()\n\n const { hourIndex, minuteIndex, secondIndex } = data\n\n this.set({\n hourIndex,\n minuteIndex,\n secondIndex,\n text: formatTime(\n this.get('hourList')[hourIndex],\n this.get('minuteList')[minuteIndex],\n this.get('secondList')[secondIndex]\n )\n })\n\n },\n ns: 'timePanel',\n },\n submit: {\n listener(event, data) {\n\n event.stop()\n\n const { hour, minute, second } = data\n\n this.set({\n hour,\n minute,\n second,\n isVisible: FALSE,\n text: formatTime(hour, minute, second),\n })\n\n this.fireChange(hour, minute, second)\n\n },\n ns: 'timePanel',\n },\n outside: {\n listener(event) {\n\n event.stop()\n\n this.set({\n isVisible: FALSE,\n text: formatTime(\n this.get('hour'),\n this.get('minute'),\n this.get('second')\n )\n })\n\n },\n ns: 'popover',\n }\n },\n\n methods: {\n\n onClick(event?: CustomEventInterface) {\n this.toggle('isVisible')\n fireClickEvent(event)\n },\n\n onClearClick(event: CustomEventInterface) {\n\n // 停止冒泡,否则会展开下拉框\n event.stop()\n fireClickEvent(event)\n\n const props = toTimeProps(\n UNDEFINED,\n this.get('hourList'),\n this.get('minuteList'),\n this.get('secondList')\n )\n\n this.set(props)\n\n this.fireChange(props.hour, props.minute, props.second)\n\n },\n\n fireChange(hour: number, minute: number, second: number) {\n\n const data: Record = {\n hour,\n minute,\n }\n\n if (this.get('needSecond')) {\n data.second = second\n }\n\n this.fire(\n {\n type: 'change',\n ns: 'timePicker',\n },\n data\n )\n\n }\n\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/LoadingBar.hbs'\n// import './style/LoadingBar.styl'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_STRING,\n RAW_NUMBER,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_TYPE_ARRAY,\n RAW_TYPE_PRIMARY,\n RAW_STYLE_TYPE,\n RAW_EVENT_BEFORE_DESTROY,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n toPercent,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}LoadingBar',\n\n propTypes: {\n type: {\n type: oneOf(RAW_TYPE_ARRAY),\n value: RAW_TYPE_PRIMARY,\n },\n height: {\n type: RAW_NUMERIC,\n value: 2,\n },\n percent: {\n type: RAW_NUMBER,\n value: 0,\n },\n color: {\n type: RAW_STRING,\n },\n fixed: {\n type: RAW_BOOLEAN,\n },\n manual: {\n type: RAW_BOOLEAN,\n },\n outside: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle() {\n\n const result: object[] = []\n\n const outside = this.get('outside')\n if (outside) {\n const height = toNumber(this.get('height'))\n result.push({\n top: toPixel(-height)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n\n },\n indicatorStyle() {\n\n const percent = this.get('percent')\n const height = this.get('height')\n const color = this.get('color')\n\n const result: Record = {\n width: toPercent(percent),\n height: toPixel(height),\n }\n\n if (color) {\n result.color = color\n }\n\n return result\n\n }\n },\n\n afterMount() {\n\n const me = this as any\n\n let timer: number | undefined\n\n const next = function () {\n timer = window.setTimeout(\n function () {\n timer = UNDEFINED\n const value = me.increase('percent', Math.floor(Math.random() * 10), 98)\n if (value < 98) {\n next()\n }\n },\n 300\n )\n }\n\n me.watch(\n 'manual',\n function (manual: boolean) {\n if (manual) {\n if (timer) {\n clearTimeout(timer)\n timer = UNDEFINED\n }\n }\n else {\n next()\n }\n },\n TRUE\n )\n\n const destroy = function (component: any) {\n if (component === me) {\n if (timer) {\n clearTimeout(timer)\n timer = UNDEFINED\n }\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n }\n\n})","import { DOCUMENT, NULL, TRUE } from '../constant'\nimport { formatMillisecond } from '../util'\n\nexport const STATUS_UPLOADING = 'uploading'\nexport const STATUS_ERROR = 'error'\nexport const STATUS_FAILURE = 'failure'\n\nconst KB = 1024\nconst MB = 1024 * KB\nconst GB = 1024 * MB\n\nconst formatDurationOptinos = {\n format: 'd:HH:mm:ss',\n trimDay: TRUE,\n trimHour: TRUE,\n}\n\nexport function readLocalFile(item) {\n return new Promise(\n function (resolve) {\n const { file } = item\n if (file.type.indexOf('image') >= 0) {\n const reader = new FileReader()\n reader.onload = function (event: any) {\n\n const base64 = event.target.result as string\n item.base64 = base64\n\n const image = new Image()\n image.src = base64\n image.onload = function () {\n item.width = image.naturalWidth\n item.height = image.naturalHeight\n image.onload = image.onerror = NULL\n resolve(item)\n }\n image.onerror = function () {\n item.status = STATUS_ERROR\n item.message = 'error'\n image.onload = image.onerror = NULL\n resolve(item)\n }\n }\n reader.onerror = function () {\n item.status = STATUS_ERROR\n item.message = 'error'\n resolve(item)\n }\n reader.readAsDataURL(file)\n }\n else {\n const video = DOCUMENT.createElement('video')\n video.preload = 'metadata'\n video.src = URL.createObjectURL(file)\n video.onloadedmetadata = function () {\n URL.revokeObjectURL(video.src)\n item.width = video.videoWidth\n item.height = video.videoHeight\n item.duration = video.duration\n video.onloadedmetadata = video.onerror = NULL\n resolve(item)\n }\n video.onerror = function () {\n item.status = STATUS_ERROR\n item.message = 'error'\n video.onloadedmetadata = video.onerror = NULL\n resolve(item)\n }\n }\n }\n )\n}\n\nexport function validateFile(item: any, minSize: number, maxSize: number,\n minRatio: number, maxRatio: number,minWidth: number, maxWidth: number,\n minHeight: number, maxHeight: number, minDuration: number, maxDuration: number) {\n\n let errors = []\n if (minSize > 0) {\n if (item.size < minSize) {\n errors.push(\n `大小不能小于 ${formatFileSize(minSize)}`\n )\n }\n }\n if (maxSize > 0) {\n if (item.size > maxSize) {\n errors.push(\n `大小不能超过 ${formatFileSize(maxSize)}`\n )\n }\n }\n if (item.height > 0) {\n const ratio = item.width / item.height\n if (minRatio > 0) {\n if (ratio < minRatio) {\n errors.push(\n `宽高比不能小于 ${minRatio}`\n )\n }\n }\n if (maxRatio > 0) {\n if (ratio > maxRatio) {\n errors.push(\n `宽高比不能大于 ${maxRatio}`\n )\n }\n }\n }\n if (minWidth > 0) {\n if (item.width < minWidth) {\n errors.push(\n `宽度不能小于 ${minWidth}px`\n )\n }\n }\n if (minHeight > 0) {\n if (item.height < minHeight) {\n errors.push(\n `高度不能小于 ${minHeight}px`\n )\n }\n }\n if (maxWidth > 0) {\n if (item.width > maxWidth) {\n errors.push(\n `宽度不能大于 ${maxWidth}px`\n )\n }\n }\n if (maxHeight > 0) {\n if (item.height > maxHeight) {\n errors.push(\n `高度不能大于 ${maxHeight}px`\n )\n }\n }\n if (minDuration > 0) {\n if (item.duration < minDuration) {\n errors.push(\n `时长不能小于 ${formatMillisecond(minDuration * 1000, formatDurationOptinos)}`\n )\n }\n }\n if (maxDuration > 0) {\n if (item.duration > maxDuration) {\n errors.push(\n `时长不能超过 ${formatMillisecond(maxDuration * 1000, formatDurationOptinos)}`\n )\n }\n }\n\n return errors\n\n}\n\nexport function formatFileSize(size: number) {\n if (size >= GB) {\n return (size / GB).toFixed(1) + ' G'\n }\n if (size >= MB) {\n return (size / MB).toFixed(1) + ' MB'\n }\n return (size / KB).toFixed(1) + ' KB'\n}\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/ImagePicker.hbs'\n// import './style/ImagePicker.styl'\n\nimport Add from '../add/Add'\nimport Icon from '../icon/Icon'\nimport Space from '../space/Space'\nimport Button from '../button/Button'\nimport Upload from '../upload/Upload'\nimport Closable from '../closable/Closable'\nimport LoadingBar from '../loading-bar/LoadingBar'\n\nimport {\n TRUE,\n FALSE,\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_IMAGE_ACCEPT,\n RAW_STYLE_TYPE,\n RAW_STRETCH,\n RAW_CONTAIN,\n RAW_ALWAYS,\n RAW_HOVER,\n RAW_NEVER,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n spaceListStyle,\n spaceItemStyle,\n} from '../util'\n\nimport {\n STATUS_UPLOADING,\n STATUS_ERROR,\n STATUS_FAILURE,\n readLocalFile,\n formatFileSize,\n validateFile,\n} from './util'\n\nconst CLASS_CARD_MOUSE_ENTER = '${prefix}image-picker-card-mouse-enter'\nconst CLASS_CARD_DRAG_ENTER = '${prefix}image-picker-card-drag-enter'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ImagePicker',\n\n propTypes: {\n imageList: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n imageWidth: {\n type: RAW_NUMERIC,\n value: 80,\n },\n imageHeight: {\n type: RAW_NUMERIC,\n value: 80,\n },\n imageMode: {\n type: oneOf([RAW_STRETCH, RAW_CONTAIN]),\n value: RAW_CONTAIN,\n },\n gap: {\n type: RAW_ARRAY,\n value: [8, 10],\n },\n minSize: {\n type: RAW_NUMERIC,\n },\n maxSize: {\n type: RAW_NUMERIC,\n },\n maxCount: {\n type: RAW_NUMERIC,\n },\n minRatio: {\n type: RAW_NUMERIC,\n },\n maxRatio: {\n type: RAW_NUMERIC,\n },\n minWidth: {\n type: RAW_NUMERIC,\n },\n maxWidth: {\n type: RAW_NUMERIC,\n },\n minHeight: {\n type: RAW_NUMERIC,\n },\n maxHeight: {\n type: RAW_NUMERIC,\n },\n minDuration: {\n type: RAW_NUMERIC,\n },\n maxDuration: {\n type: RAW_NUMERIC,\n },\n accept: {\n type: RAW_STRING,\n value: RAW_IMAGE_ACCEPT,\n },\n formatImageUrl: {\n type: RAW_FUNCTION,\n },\n cropImage: {\n type: RAW_FUNCTION,\n },\n uploadTitle: {\n type: RAW_STRING,\n },\n uploadingTitle: {\n type: RAW_STRING,\n },\n uploadImage: {\n type: RAW_FUNCTION,\n },\n showSize: {\n type: oneOf([RAW_ALWAYS, RAW_HOVER, RAW_NEVER]),\n value: RAW_ALWAYS,\n },\n readOnly: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const me = this\n return {\n RAW_NEVER,\n STATUS_UPLOADING,\n STATUS_ERROR,\n STATUS_FAILURE,\n draggingIndex: -1,\n uploadingCount: 0,\n beforeReuploadImage(data) {\n\n const { index, fileList } = data\n\n readLocalFile(fileList[0]).then(function (item) {\n\n me.validateImageList([item])\n\n const reupload = me.$refs.reupload as any\n reupload.reset()\n\n me.replaceItem(item, index)\n\n })\n\n },\n beforeUploadImage(data) {\n const restCount = me.get('restCount')\n const fileList = data.fileList\n\n // 校验可选数量\n if (fileList.length > restCount) {\n if (me.get('isVideoUploader')) {\n me.fireError(`仅可以选择 ${restCount} 个视频`)\n }\n else {\n me.fireError(`仅可以选择 ${restCount} 张图片`)\n }\n return\n }\n\n Promise.all(\n fileList.map(readLocalFile)\n )\n .then(function (newList: any[]) {\n\n me.validateImageList(newList)\n\n const upload = me.$refs.upload as any\n upload.reset()\n\n me.appendItems(newList)\n\n })\n }\n }\n },\n\n computed: {\n needSize(): boolean {\n const showSize = this.get('showSize')\n return showSize && showSize !== RAW_NEVER\n },\n isVideoUploader(): boolean {\n const accept = this.get('accept')\n return accept ? accept.indexOf('video') >= 0 : FALSE\n },\n uploadText(): string {\n const uploadTitle = this.get('uploadTitle')\n const isVideoUploader = this.get('isVideoUploader')\n return uploadTitle || (isVideoUploader ? '上传视频' : '上传图片')\n },\n restCount(): number {\n const imageCount = this.get('imageList.length')\n const maxCount = this.get('maxCount')\n return maxCount - imageCount\n },\n canDraggable(): boolean {\n const uploadingCount = this.get('uploadingCount')\n const readOnly = this.get('readOnly')\n const imageList = this.get('imageList')\n return !uploadingCount && !readOnly && imageList.length > 1\n },\n inlineStyle(): object[] | void {\n return spaceListStyle(\n this.get('gap'),\n FALSE,\n TRUE,\n this.get('style')\n )\n },\n imageItemStyle(): Record | void {\n const imageWidth = this.get('imageWidth')\n const imageHeight = this.get('imageHeight')\n return spaceItemStyle(\n this.get('gap'),\n FALSE,\n TRUE,\n {\n width: toPixel(imageWidth),\n height: toPixel(imageHeight),\n }\n )\n },\n },\n\n filters: {\n formatFileSize,\n },\n\n methods: {\n handleImageClick(image: object, index: number) {\n this.fire(\n {\n type: 'preview',\n ns: 'imagePicker'\n },\n {\n image,\n index,\n }\n )\n },\n getImageIndexById(id: number) {\n const imageList = this.get('imageList')\n for (let i = 0, len = imageList.length; i < len; i++) {\n if (id === imageList[i].id) {\n return i\n }\n }\n return -1\n },\n validateImageList(imageList: any[]) {\n\n const me = this\n\n const minSize = toNumber(me.get('minSize'))\n const maxSize = toNumber(me.get('maxSize'))\n\n const minRatio = toNumber(me.get('minRatio'))\n const maxRatio = toNumber(me.get('maxRatio'))\n\n const minWidth = toNumber(me.get('minWidth'))\n const minHeight = toNumber(me.get('minHeight'))\n\n const maxWidth = toNumber(me.get('maxWidth'))\n const maxHeight = toNumber(me.get('maxHeight'))\n\n const minDuration = toNumber(me.get('minDuration'))\n const maxDuration = toNumber(me.get('maxDuration'))\n\n for (let i = 0, len = imageList.length; i < len; i++) {\n\n const item = imageList[i]\n\n const errors = validateFile(\n item, minSize, maxSize, minRatio, maxRatio,\n minWidth, maxWidth, minHeight, maxHeight, minDuration, maxDuration\n )\n if (errors.length) {\n item.status = STATUS_ERROR\n item.message = errors.join('
')\n }\n\n }\n\n },\n checkReady() {\n\n const result = {\n hasLocal: FALSE,\n hasUploading: FALSE,\n hasError: FALSE,\n }\n\n const imageList = this.get('imageList')\n for (let i = 0, len = imageList.length; i < len; i++) {\n if (imageList[i].status === STATUS_UPLOADING) {\n result.hasUploading = TRUE\n }\n else if (imageList[i].status === STATUS_ERROR || imageList[i].status === STATUS_FAILURE) {\n result.hasError = TRUE\n }\n if (!imageList[i].url) {\n result.hasLocal = TRUE\n }\n }\n\n return result\n\n },\n appendItems(items: any[]) {\n\n const me = this\n const imageList = me.copy(me.get('imageList'))\n const length = imageList.length\n\n items.forEach(\n function (item) {\n imageList.push(item)\n }\n )\n\n me.set('imageList', imageList)\n me.fireChange()\n\n items.forEach(\n function (item: any, index) {\n me.uploadItem(item.id, length + index)\n }\n )\n\n },\n replaceItem(item: any, index: number) {\n\n const me = this\n const imageList = me.copy(me.get('imageList'))\n\n imageList.splice(index, 1, item)\n\n me.set('imageList', imageList)\n me.fireChange()\n\n me.uploadItem(item.id, index)\n\n },\n removeItem(event: CustomEventInterface, index: number) {\n event.stop()\n this.removeAt('imageList', index)\n this.fireChange()\n },\n upload() {\n\n const me = this\n const imageList = me.get('imageList')\n\n Yox.array.each(\n imageList,\n function (item: any, index: number) {\n me.uploadItem(item.id, index)\n }\n )\n\n },\n uploadItem(id: number, index: number) {\n\n const me = this\n\n const item = me.get(`imageList.${index}`)\n // 如果校验未通过,或者已上传成功,则直接返回\n if (item.status === STATUS_ERROR || item.url) {\n return\n }\n\n const uploadHandler = function (item) {\n\n const uploadImage = me.get('uploadImage')\n\n me.increase('uploadingCount')\n\n uploadImage({\n id: item.id,\n file: item.file,\n onStart() {\n const index = me.getImageIndexById(id)\n if (index >= 0) {\n me.set(`imageList.${index}.status`, STATUS_UPLOADING)\n me.set(`imageList.${index}.progress`, 0)\n me.fireChange()\n }\n },\n onError(error: string) {\n const index = me.getImageIndexById(id)\n if (index >= 0) {\n me.set(`imageList.${index}.status`, STATUS_FAILURE)\n me.set(`imageList.${index}.message`, error || '上传失败')\n me.decrease('uploadingCount')\n me.fireChange()\n }\n },\n onProgress(progress: number) {\n const index = me.getImageIndexById(id)\n if (index >= 0) {\n me.set(`imageList.${index}.progress`, progress)\n me.fireChange()\n }\n },\n onSuccess(data) {\n const index = me.getImageIndexById(id)\n if (index >= 0) {\n me.set(`imageList.${index}`, data)\n me.decrease('uploadingCount')\n me.fireChange()\n }\n }\n })\n\n }\n\n const cropImage = me.get('cropImage')\n\n if (item.base64 && cropImage) {\n cropImage({\n index,\n base64: item.base64,\n callback(result) {\n Yox.object.extend(item, result)\n uploadHandler(item)\n }\n })\n }\n else {\n uploadHandler(item)\n }\n\n },\n fireError(error: string) {\n this.fire(\n {\n type: 'error',\n ns: 'imagePicker'\n },\n {\n error\n }\n )\n },\n fireChange() {\n this.fire(\n {\n type: 'change',\n ns: 'imagePicker'\n },\n {\n imageList: this.get('imageList')\n }\n )\n },\n addImgWrapperItemClass(index: number, className: string) {\n const element = this.$el as HTMLElement\n const targetChild = element.children[index]\n\n if (targetChild) {\n Yox.dom.addClass(targetChild as HTMLElement, className)\n }\n },\n removeImgWrapperItemClass(index: number, className: string) {\n const element = this.$el as HTMLElement\n const targetChild = element.children[index]\n\n if (targetChild) {\n Yox.dom.removeClass(targetChild as HTMLElement, className)\n }\n },\n handleMouseEnter(index: number) {\n // https://stackoverflow.com/questions/11989289/css-html5-hover-state-remains-after-drag-and-drop\n // drag 拖拽的时候,hover 状态仍然会保留,改用监听 mouseenter 和 mouseleave 来添加删除 class\n // 并在 dragstart 的时候删除添加的 class,使 active 状态失效\n this.addImgWrapperItemClass(index, CLASS_CARD_MOUSE_ENTER)\n },\n handleMouseLeave(index: number) {\n this.removeImgWrapperItemClass(index, CLASS_CARD_MOUSE_ENTER)\n },\n handleDragStart(index: number) {\n this.set('draggingIndex', index)\n this.removeImgWrapperItemClass(index, CLASS_CARD_MOUSE_ENTER)\n },\n handleDragEnd() {\n // https://stackoverflow.com/questions/38111946/is-there-a-defined-ordering-between-dragend-and-drop-events\n // dragend 事件会在 drop 事件之后触发,做一些清理工作\n this.set('draggingIndex', -1)\n },\n handleDragOver(index: number) {\n const draggingIndex = this.get('draggingIndex')\n if (draggingIndex < 0) {\n return FALSE\n }\n\n if (draggingIndex !== index) {\n this.addImgWrapperItemClass(index, CLASS_CARD_DRAG_ENTER)\n }\n\n // https://hijiangtao.github.io/2020/05/04/Drag-and-Drop-note/\n // 返回 false, 阻止浏览器这种默认行为\n return FALSE\n },\n handleDragEnter(index: number) {\n const draggingIndex = this.get('draggingIndex')\n if (draggingIndex < 0) {\n return FALSE\n }\n\n if (draggingIndex !== index) {\n this.addImgWrapperItemClass(index, CLASS_CARD_DRAG_ENTER)\n }\n\n return FALSE\n },\n handleDragLeave(index: number) {\n const draggingIndex = this.get('draggingIndex')\n if (draggingIndex < 0) {\n return\n }\n\n this.removeImgWrapperItemClass(index, CLASS_CARD_DRAG_ENTER)\n },\n handleDragDrop(index: number) {\n const draggingIndex = this.get('draggingIndex')\n if (draggingIndex < 0) {\n return FALSE\n }\n\n const imageList = this.get('imageList')\n\n if (draggingIndex >= 0\n && draggingIndex < imageList.length\n && draggingIndex !== index\n ) {\n this.removeImgWrapperItemClass(index, CLASS_CARD_DRAG_ENTER)\n\n const startImageItem = imageList[draggingIndex]\n const newImageList = this.copy(imageList)\n\n if (draggingIndex < index) {\n newImageList.splice(index + 1, 0, startImageItem)\n newImageList.splice(draggingIndex, 1)\n }\n else {\n newImageList.splice(index, 0, startImageItem)\n newImageList.splice(draggingIndex + 1, 1)\n }\n\n this.set('imageList', newImageList)\n this.fireChange()\n }\n\n this.set('draggingIndex', -1)\n\n return FALSE\n },\n },\n\n components: {\n Add,\n Icon,\n Space,\n Button,\n Upload,\n Closable,\n LoadingBar,\n },\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Image.hbs'\n// import './style/Image.styl'\n\nimport Icon from '../icon/Icon'\nimport Upload from '../upload/Upload'\nimport LoadingBar from '../loading-bar/LoadingBar'\n\nimport {\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n RAW_STRETCH,\n RAW_CONTAIN,\n RAW_IMAGE_ACCEPT,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n} from '../util'\n\nimport {\n STATUS_UPLOADING,\n STATUS_FAILURE,\n readLocalFile,\n validateFile,\n STATUS_ERROR,\n} from '../image-picker/util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Image',\n\n propTypes: {\n width: {\n type: RAW_NUMERIC,\n value: 60,\n },\n height: {\n type: RAW_NUMERIC,\n value: 60,\n },\n mode: {\n type: oneOf([RAW_STRETCH, RAW_CONTAIN]),\n value: RAW_STRETCH,\n },\n minSize: {\n type: RAW_NUMERIC,\n },\n maxSize: {\n type: RAW_NUMERIC,\n },\n minRatio: {\n type: RAW_NUMERIC,\n },\n maxRatio: {\n type: RAW_NUMERIC,\n },\n minWidth: {\n type: RAW_NUMERIC,\n },\n maxWidth: {\n type: RAW_NUMERIC,\n },\n minHeight: {\n type: RAW_NUMERIC,\n },\n maxHeight: {\n type: RAW_NUMERIC,\n },\n minDuration: {\n type: RAW_NUMERIC,\n },\n maxDuration: {\n type: RAW_NUMERIC,\n },\n simple: {\n type: RAW_BOOLEAN,\n },\n showPreview: {\n type: RAW_BOOLEAN,\n },\n showDelete: {\n type: RAW_BOOLEAN,\n },\n url: {\n type: RAW_STRING,\n },\n alt: {\n type: RAW_STRING,\n },\n fallback: {\n type: RAW_STRING,\n },\n formatImageUrl: {\n type: RAW_FUNCTION,\n },\n uploadTitle: {\n type: RAW_STRING,\n },\n uploadingTitle: {\n type: RAW_STRING,\n value: '正在上传...',\n },\n uploadImage: {\n type: RAW_FUNCTION,\n },\n cropImage: {\n type: RAW_FUNCTION,\n },\n accept: {\n type: RAW_STRING,\n value: RAW_IMAGE_ACCEPT,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const me = this\n return {\n useFallback: FALSE,\n image: {\n url: me.get('url'),\n base64: '',\n status: UNDEFINED,\n progress: 0,\n message: '',\n },\n beforeUploadImage(data) {\n\n const fileList = data.fileList as any[]\n\n readLocalFile(fileList[0]).then(function (image) {\n\n // @ts-ignore\n me.validateImage(image)\n\n me.set({\n image,\n })\n\n const upload = me.$refs.upload as any\n upload.reset()\n\n // @ts-ignore\n me.uploadImage(image)\n\n })\n\n },\n }\n },\n\n computed: {\n isUploading(): boolean {\n return this.get('image.status') === STATUS_UPLOADING\n },\n isVideoUploader(): boolean {\n const accept = this.get('accept')\n return accept ? accept.indexOf('video') >= 0 : FALSE\n },\n widthNumber(): number {\n return toNumber(this.get('width'))\n },\n heightNumber(): number {\n return toNumber(this.get('height'))\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const widthNumber = this.get('widthNumber')\n const heightNumber = this.get('heightNumber')\n\n result.push({\n width: toPixel(widthNumber),\n height: toPixel(heightNumber),\n })\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n watchers: {\n url(url) {\n this.set('image.url', url)\n },\n 'image.url': function () {\n this.set('useFallback', FALSE)\n },\n 'image.base64': function () {\n this.set('useFallback', FALSE)\n }\n },\n\n methods: {\n validateImage(image: any) {\n\n const me = this\n\n const minSize = toNumber(me.get('minSize'))\n const maxSize = toNumber(me.get('maxSize'))\n\n const minRatio = toNumber(me.get('minRatio'))\n const maxRatio = toNumber(me.get('maxRatio'))\n\n const minWidth = toNumber(me.get('minWidth'))\n const minHeight = toNumber(me.get('minHeight'))\n\n const maxWidth = toNumber(me.get('maxWidth'))\n const maxHeight = toNumber(me.get('maxHeight'))\n\n const minDuration = toNumber(me.get('minDuration'))\n const maxDuration = toNumber(me.get('maxDuration'))\n\n const errors = validateFile(\n image, minSize, maxSize, minRatio, maxRatio,\n minWidth, maxWidth, minHeight, maxHeight, minDuration, maxDuration\n )\n\n if (errors.length) {\n image.status = STATUS_ERROR\n image.message = errors.join('
')\n }\n\n },\n previewImage(event: CustomEventInterface) {\n event.stop()\n this.fire(\n {\n type: 'preview',\n ns: 'image',\n },\n {\n url: this.get('image.url'),\n }\n )\n },\n deleteImage(event: CustomEventInterface) {\n event.stop()\n this.fire(\n {\n type: 'delete',\n ns: 'image',\n }\n )\n },\n uploadImage(image: any) {\n\n const me = this\n\n // 如果校验未通过,或者已上传成功,则直接返回\n if (image.status === STATUS_ERROR || image.url) {\n return\n }\n\n const uploadHandler = function (image) {\n\n const uploadImage = me.get('uploadImage')\n\n uploadImage({\n id: image.id,\n file: image.file,\n onStart() {\n me.set('image.status', STATUS_UPLOADING)\n me.set('image.progress', 0)\n },\n onError(error: string) {\n me.set('image.status', STATUS_FAILURE)\n me.set('image.message', error || '上传失败')\n },\n onProgress(progress: number) {\n me.set('image.progress', progress)\n },\n onSuccess(data) {\n me.set('image.status', UNDEFINED)\n me.fire(\n {\n type: 'uploadSuccess',\n ns: 'image',\n },\n {\n image: data,\n }\n )\n }\n })\n\n }\n\n const cropImage = me.get('cropImage')\n\n if (image.base64 && cropImage) {\n cropImage({\n base64: image.base64,\n callback(result) {\n Yox.object.extend(image, result)\n uploadHandler(image)\n }\n })\n }\n else {\n uploadHandler(image)\n }\n\n }\n },\n\n components: {\n Icon,\n Upload,\n LoadingBar,\n }\n\n})\n","import Yox, { YoxInterface } from 'yox'\n\nimport template from './template/Carousel.hbs'\n// import './style/Carousel.styl'\n\nimport ResizeObserver from '../resize-observer/ResizeObserver'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_CLICK,\n RAW_HOVER,\n RAW_TOP,\n RAW_RIGHT,\n RAW_BOTTOM,\n RAW_LEFT,\n RAW_VERTICAL,\n RAW_HORIZONTAL,\n RAW_STYLE_TYPE,\n RAW_SLOT_CHILDREN,\n RAW_EVENT_BEFORE_DESTROY,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Carousel',\n\n propTypes: {\n autoPlay: {\n type: RAW_BOOLEAN,\n },\n interval: {\n type: RAW_NUMERIC,\n value: 3000,\n },\n trigger: {\n type: oneOf([RAW_CLICK, RAW_HOVER]),\n value: RAW_CLICK\n },\n indicatorType: {\n type: oneOf(['dot', 'line']),\n value: 'dot'\n },\n indicatorPosition: {\n type: oneOf([\n RAW_TOP,\n RAW_RIGHT,\n RAW_BOTTOM,\n RAW_LEFT,\n ]),\n value: RAW_BOTTOM,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_CLICK,\n RAW_HOVER,\n RAW_TOP,\n RAW_RIGHT,\n RAW_BOTTOM,\n RAW_LEFT,\n\n index: 0,\n size: UNDEFINED,\n }\n },\n\n computed: {\n count() {\n return this.get(`${RAW_SLOT_CHILDREN}.length`) || 0\n },\n direction() {\n const indicatorPosition = this.get('indicatorPosition')\n return indicatorPosition === 'left' || indicatorPosition === 'right'\n ? RAW_VERTICAL\n : RAW_HORIZONTAL\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const size = this.get('size')\n if (size) {\n result.push({\n width: toPixel(size.width),\n height: toPixel(size.height),\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n events: {\n resize: {\n listener(event, data) {\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n event.stop()\n this.set('size', data)\n },\n ns: 'resizeObserver'\n }\n },\n\n watchers: {\n index(value) {\n // @ts-ignore\n this.move(value, TRUE)\n },\n direction() {\n // @ts-ignore\n this.move(this.get('index'))\n }\n },\n\n methods: {\n go(index: number) {\n this.set('index', index)\n },\n prev() {\n const index = this.get('index') - 1\n const count = this.get('count')\n // @ts-ignore\n this.go(index < 0 ? (count - 1) : index)\n },\n next() {\n const index = this.get('index') + 1\n const count = this.get('count')\n // @ts-ignore\n this.go(index === count ? 0 : index)\n },\n move(index: number, animated?: boolean) {\n\n const size = this.get('size')\n if (!size) {\n return\n }\n\n const element = this.$refs.list as HTMLElement\n\n element.style.transitionDuration = animated ? '0.2s' : ''\n element.style.transform = this.get('direction') === RAW_HORIZONTAL\n ? ('translateX(-' + toPixel(index * size.width) + ')')\n : ('translateY(-' + toPixel(index * size.height) + ')')\n\n }\n },\n\n components: {\n ResizeObserver\n },\n\n afterMount() {\n\n const me = this\n\n // 自动播放\n let autoPlayTimer: number\n\n const autoPlayHandler = function () {\n\n // @ts-ignore\n me.next()\n\n autoPlayTimer = window.setTimeout(\n autoPlayHandler,\n me.get('interval')\n )\n\n }\n\n me.watch(\n 'autoPlay',\n function (newValue) {\n if (newValue) {\n autoPlayTimer = window.setTimeout(\n autoPlayHandler,\n me.get('interval')\n )\n }\n else if (autoPlayTimer) {\n clearTimeout(autoPlayTimer)\n autoPlayTimer = 0\n }\n },\n TRUE\n )\n\n const destroy = function (component: YoxInterface) {\n if (component === me) {\n if (autoPlayTimer) {\n clearTimeout(autoPlayTimer)\n }\n Yox.lifeCycle.off(RAW_EVENT_BEFORE_DESTROY, destroy)\n }\n }\n Yox.lifeCycle.on(RAW_EVENT_BEFORE_DESTROY, destroy)\n\n },\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Collapse.hbs'\n// import './style/Collapse.styl'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_ARRAY,\n RAW_NUMBER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Collapse',\n\n propTypes: {\n value: {\n type: [RAW_STRING, RAW_NUMBER, RAW_ARRAY],\n },\n accordion: {\n type: RAW_BOOLEAN,\n },\n simple: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n watchers: {\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'collapse',\n },\n {\n value,\n },\n TRUE\n )\n }\n },\n\n events: {\n toggle: {\n listener(event, data) {\n if (event.phase === Yox.Event.PHASE_UPWARD) {\n event.stop()\n\n let { name, opened } = data\n\n let value = this.get('value')\n\n if (this.get('accordion')) {\n value = opened ? name : UNDEFINED\n }\n else {\n value = Yox.is.array(value) ? this.copy(value) : []\n if (opened) {\n if (!Yox.array.has(value, name, FALSE)) {\n value.push(name)\n }\n }\n else {\n Yox.array.remove(value, name, FALSE)\n }\n }\n\n this.set('value', value)\n\n }\n },\n ns: 'collapseItem'\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport Icon from '../icon/Icon'\nimport template from './template/CollapseItem.hbs'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMBER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CollapseItem',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n required: TRUE,\n },\n name: {\n type: [RAW_STRING, RAW_NUMBER],\n required: TRUE,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const collapse = findComponentUpward(options.parent, '${prefix}Collapse')\n\n let opened = FALSE\n\n if (collapse) {\n let name = this.get('name')\n let value = collapse.get('value')\n\n opened = Yox.is.array(value)\n ? Yox.array.has(value, name, FALSE)\n : value == name\n }\n\n return {\n opened,\n }\n },\n\n events: {\n change: {\n listener(event, data) {\n\n // 只接收父级事件,再上一级的就不管了\n // 避免嵌套面板的问题\n if (event.target !== this.$parent) {\n return\n }\n\n const name = this.get('name')\n\n this.set(\n 'opened',\n Yox.is.array(data.value)\n ? Yox.array.has(data.value, name, FALSE)\n : data.value == name\n )\n\n },\n ns: 'collapse',\n }\n },\n\n methods: {\n onClick() {\n this.fire(\n {\n type: 'toggle',\n ns: 'collapseItem',\n },\n {\n name: this.get('name'),\n opened: !this.get('opened'),\n }\n )\n },\n },\n\n components: {\n Icon,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Card.hbs'\n// import './style/Card.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_ALWAYS,\n RAW_HOVER,\n RAW_NEVER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Card',\n\n propTypes: {\n simple: {\n type: RAW_BOOLEAN,\n },\n shadow: {\n type: oneOf([RAW_ALWAYS, RAW_HOVER, RAW_NEVER]),\n value: RAW_ALWAYS,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n }\n})","import Yox from 'yox'\n\nimport template from './template/CardHeader.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CardHeader',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n },\n },\n})","import Yox from 'yox'\n\nimport template from './template/CardMedia.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CardMedia',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})\n","import Yox from 'yox'\n\nimport template from './template/CardBody.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CardBody',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/CardFooter.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CardFooter',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox, { CustomEventInterface, Data } from 'yox'\n\nimport template from './template/CascaderOption.hbs'\n\nimport Icon from '../icon/Icon'\nimport Checkbox from '../checkbox/Checkbox'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMBER,\n RAW_BOOLEAN,\n RAW_OBJECT,\n RAW_ARRAY,\n RAW_FUNCTION,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}CascaderOption',\n\n propTypes: {\n level: {\n type: RAW_NUMBER,\n required: TRUE,\n },\n index: {\n type: RAW_NUMBER,\n required: TRUE,\n },\n option: {\n type: RAW_OBJECT,\n required: TRUE,\n },\n checkable: {\n type: RAW_BOOLEAN,\n },\n loadData: {\n type: RAW_FUNCTION,\n },\n loadingValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n selectedValue: {\n type: [RAW_STRING, RAW_NUMBER],\n required: TRUE,\n },\n checkedValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n indeterminateValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n },\n\n computed: {\n interactive() {\n return !this.get('option.disabled') && !this.get('loading')\n },\n loading() {\n return Yox.array.has(\n this.get('loadingValues'),\n this.get('option.value')\n )\n },\n selected() {\n return this.get('option.value') == this.get('selectedValue')\n },\n checked() {\n if (this.get('indeterminate')) {\n return FALSE\n }\n return Yox.array.has(\n this.get('checkedValues'),\n this.get('option.value')\n )\n },\n indeterminate() {\n return Yox.array.has(\n this.get('indeterminateValues'),\n this.get('option.value')\n )\n },\n },\n\n methods: {\n onClick() {\n\n const me = this\n\n const option = me.get('option')\n const level = me.get('level')\n\n const options: any[] = []\n const values: any[] = []\n options[level] = option\n values[level] = option.value\n\n const isLeaf = !option.children && option.isLeaf !== FALSE\n\n me.fire(\n {\n type: 'select',\n ns: 'cascaderOption'\n },\n {\n options,\n values,\n level,\n checked: me.get('checked'),\n index: me.get('index'),\n isLeaf,\n }\n )\n\n const loadData = me.get('loadData')\n if (loadData && option.isLeaf === FALSE) {\n\n me.fire(\n {\n type: 'loading',\n ns: 'cascaderOption'\n },\n {\n options,\n values,\n level,\n loading: TRUE,\n }\n )\n\n loadData(option)\n .then(function (children: any[]) {\n delete option.isLeaf\n if (children && children.length > 0) {\n option.children = children\n }\n })\n .finally(function () {\n me.fire(\n {\n type: 'loading',\n ns: 'cascaderOption'\n },\n {\n options,\n values,\n level,\n loading: FALSE,\n }\n )\n })\n\n }\n\n },\n onCheckboxChange(event: CustomEventInterface, data: Data) {\n\n event.stop()\n\n const option = this.get('option')\n const level = this.get('level')\n\n const options: any[] = []\n const values: any[] = []\n options[level] = option\n values[level] = option.value\n\n this.fire(\n {\n type: 'check',\n ns: 'cascaderOption'\n },\n {\n options,\n values,\n level,\n checked: data.checked,\n }\n )\n\n }\n },\n\n components: {\n Icon,\n Checkbox,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/CascaderOptions.hbs'\n\nimport Icon from '../icon/Icon'\nimport CascaderOption from './CascaderOption'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_ARRAY,\n RAW_NUMBER,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n} from '../constant'\n\nconst CascaderOptions = Yox.define({\n\n template,\n\n name: '${prefix}CascaderOptions',\n\n propTypes: {\n level: {\n type: RAW_NUMBER,\n required: TRUE,\n },\n options: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n loadData: {\n type: RAW_FUNCTION,\n },\n loadingValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n checkedValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n selectedValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n indeterminateValues: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n },\n\n computed: {\n currentLoadingValues() {\n\n const result: any[] = []\n\n const loadingValues = this.get('loadingValues')\n const level = this.get('level')\n\n Yox.array.each(\n loadingValues,\n function (values: any[]) {\n if (values.length === level + 1) {\n result.push(values[level])\n }\n }\n )\n\n return result\n\n },\n currentCheckedValues() {\n\n const result: any[] = []\n\n const checkedValues = this.get('checkedValues')\n const level = this.get('level')\n\n Yox.array.each(\n checkedValues,\n function (values: any[]) {\n if (values.length === level + 1) {\n result.push(values[level])\n }\n }\n )\n\n return result\n\n },\n currentIndeterminateValues() {\n\n const result: any[] = []\n\n const indeterminateValues = this.get('indeterminateValues')\n const level = this.get('level')\n\n Yox.array.each(\n indeterminateValues,\n function (values: any[]) {\n const value = values[level]\n if (!Yox.array.has(indeterminateValues, value)) {\n result.push(value)\n }\n }\n )\n\n return result\n\n },\n currentSelectedValue() {\n const level = this.get('level')\n return this.get(`selectedValues.${level}`)\n },\n currentSelectedOption: {\n deps: ['options.length', 'options.*.value', 'currentLoadingValues', 'currentSelectedValue'],\n get() {\n const currentSelectedValue = this.get('currentSelectedValue')\n if (currentSelectedValue !== UNDEFINED) {\n const options = this.get('options')\n for (let i = 0, len = options.length; i < len; i++) {\n if (options[i].value == currentSelectedValue) {\n return options[i]\n }\n }\n }\n }\n }\n },\n\n events: {\n loadingStart: {\n listener(_, data) {\n // @ts-ignore\n this.addLevelInfoIfNeeded(data)\n },\n ns: 'cascaderOption'\n },\n loadingEnd: {\n listener(_, data) {\n // @ts-ignore\n this.addLevelInfoIfNeeded(data)\n },\n ns: 'cascaderOption'\n },\n select: {\n listener(_, data) {\n // @ts-ignore\n this.addLevelInfoIfNeeded(data)\n },\n ns: 'cascaderOption'\n },\n check: {\n listener(_, data) {\n // @ts-ignore\n this.addLevelInfoIfNeeded(data)\n },\n ns: 'cascaderOption'\n }\n },\n\n methods: {\n addLevelInfoIfNeeded(data: Record) {\n const level = this.get('level')\n if (data.level !== level) {\n const currentSelectedOption = this.get('currentSelectedOption')\n if (currentSelectedOption) {\n data.options[level] = currentSelectedOption\n data.values[level] = currentSelectedOption.value\n }\n return TRUE\n }\n }\n },\n\n components: {\n Icon,\n CascaderOption,\n }\n\n})\n\nCascaderOptions.components.CascaderOptions = CascaderOptions\n\nexport default CascaderOptions","import { TRUE } from '../constant'\nimport { getNodesProps, renderNodesProps, setTreeCheckedKey } from '../util'\n\nexport function formatOptions(\n options: any[] | void,\n values: any[] | void,\n multiple: boolean,\n) {\n\n if (!options) {\n options = []\n }\n if (!values) {\n values = []\n }\n if (values.length > 0 && !multiple) {\n values = [\n values\n ]\n }\n\n const checkedOptions = []\n const indeterminateOptions = []\n\n setCheckedOptions(\n options,\n checkedOptions,\n indeterminateOptions,\n values,\n values.map(function () {\n return TRUE\n })\n )\n\n return {\n checkedOptions,\n selectedOptions: checkedOptions[0] || [],\n indeterminateOptions,\n }\n\n}\n\nexport function setCheckedOptions(\n options: any[],\n checkedOptions: any[],\n indeterminateOptions: any[],\n values: any[],\n checked: any[]\n) {\n\n const checkedKeys = getNodesProps(checkedOptions, 'value').map(renderNodesProps)\n const indeterminateKeys = getNodesProps(indeterminateOptions, 'value').map(renderNodesProps)\n\n const isChecked = function (key: string) {\n return checkedKeys.indexOf(key) >= 0\n }\n const addChecked = function (key: string, options: any[]) {\n checkedOptions.push(options)\n checkedKeys.push(key)\n }\n const removeChecked = function (key: string) {\n const index = checkedKeys.indexOf(key)\n if (index >= 0) {\n checkedOptions.splice(index, 1)\n checkedKeys.splice(index, 1)\n }\n }\n const isIndeterminate = function (key: string) {\n return indeterminateKeys.indexOf(key) >= 0\n }\n const addIndeterminate = function (key: string, options: any[]) {\n indeterminateOptions.push(options)\n indeterminateKeys.push(key)\n }\n const removeIndeterminate = function (key: string) {\n const index = indeterminateKeys.indexOf(key)\n if (index >= 0) {\n indeterminateOptions.splice(index, 1)\n indeterminateKeys.splice(index, 1)\n }\n }\n\n for (let i = 0, len = values.length; i < len; i++) {\n const key = renderNodesProps(values[i])\n setTreeCheckedKey(\n options,\n 'value',\n checked[i],\n TRUE,\n function (k) {\n return k === key\n },\n isChecked,\n addChecked,\n removeChecked,\n isIndeterminate,\n addIndeterminate,\n removeIndeterminate\n )\n }\n\n}","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Cascader.hbs'\n// import './style/Cascader.styl'\n\nimport Tag from '../tag/Tag'\nimport Icon from '../icon/Icon'\nimport Empty from '../empty/Empty'\nimport Popover from '../popover/Popover'\nimport CascaderOptions from './CascaderOptions'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_DEFAULT,\n RAW_SIZE_ARRAY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_ERROR,\n RAW_TYPE_WARNING,\n RAW_TOP,\n RAW_TOP_START,\n RAW_TOP_END,\n RAW_BOTTOM,\n RAW_BOTTOM_START,\n RAW_BOTTOM_END,\n RAW_CUSTOM,\n RAW_ALL,\n RAW_PARENT,\n RAW_CHILD,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n getNodesProps,\n renderNodesProps,\n} from '../util'\n\nimport {\n fireClickEvent,\n onClickEventByEnterPress,\n} from '../event'\n\nimport {\n setCheckedOptions,\n formatOptions,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Cascader',\n\n propTypes: {\n options: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n placeholder: {\n type: RAW_STRING,\n value: '请选择...'\n },\n value: {\n type: RAW_ARRAY,\n },\n status: {\n type: oneOf([RAW_TYPE_INFO, RAW_TYPE_SUCCESS, RAW_TYPE_ERROR, RAW_TYPE_WARNING]),\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n placement: {\n type: oneOf([RAW_TOP, RAW_TOP_START, RAW_TOP_END, RAW_BOTTOM, RAW_BOTTOM_START, RAW_BOTTOM_END]),\n value: RAW_BOTTOM_START,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n showClear: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n changeOnSelect: {\n type: RAW_BOOLEAN,\n },\n showCheckedStrategy: {\n type: oneOf([RAW_ALL, RAW_PARENT, RAW_CHILD]),\n value: RAW_PARENT,\n },\n loadData: {\n type: RAW_FUNCTION,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const data = formatOptions(\n this.get('options'),\n this.get('value'),\n this.get('multiple')\n )\n return {\n RAW_CUSTOM,\n isFocus: FALSE,\n isVisible: FALSE,\n loadingOptions: [],\n checkedOptions: data.checkedOptions,\n selectedOptions: data.selectedOptions,\n indeterminateOptions: data.indeterminateOptions,\n }\n },\n\n computed: {\n actualOptions(): any[] {\n\n const showCheckedStrategy = this.get('showCheckedStrategy')\n const checkedOptions = this.get('checkedOptions')\n\n if (showCheckedStrategy === RAW_ALL) {\n return checkedOptions\n }\n\n const showChildStrategy = showCheckedStrategy === RAW_CHILD\n const actualOptions: any[] = []\n const checkedValues = this.get('checkedValues')\n const checkedKeys = checkedValues.map(renderNodesProps)\n\n Yox.array.each(\n checkedOptions,\n function (options: any[], index) {\n\n let isParentChecked = FALSE\n\n const values = checkedValues[index]\n if (values.length > 1) {\n const copyed = values.slice()\n copyed.pop()\n const parentKey = renderNodesProps(copyed)\n isParentChecked = checkedKeys.indexOf(parentKey) >= 0\n }\n\n if (Yox.array.last(options).children) {\n // branch 节点,父级没选中时有效\n // 如果父级选中了,则有效的是父级\n if (!showChildStrategy && !isParentChecked) {\n actualOptions.push(options)\n }\n }\n else {\n // leaf 节点\n if (showChildStrategy || !isParentChecked) {\n actualOptions.push(options)\n }\n }\n }\n )\n\n return actualOptions\n\n },\n actualValues(): any[] {\n return getNodesProps(this.get('actualOptions'), 'value')\n },\n actualTexts(): string[] {\n const texts = getNodesProps(this.get('actualOptions'), 'text')\n if (this.get('multiple')) {\n return texts.map(function (item: string[]) {\n return Yox.array.last(item) as string\n })\n }\n return texts.map(renderNodesProps)\n },\n loadingValues(): any[] {\n return getNodesProps(this.get('loadingOptions'), 'value')\n },\n checkedValues(): any[] {\n return getNodesProps(this.get('checkedOptions'), 'value')\n },\n selectedValues(): any[] {\n return getNodesProps(this.get('selectedOptions'), 'value')\n },\n indeterminateValues(): any[] {\n return getNodesProps(this.get('indeterminateOptions'), 'value')\n },\n isReversed(): boolean {\n const placement = this.get('placement')\n return placement.indexOf(RAW_TOP) >= 0\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const width = this.get('width')\n if (width) {\n result.push({\n width: toPixel(width)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n events: {\n loading: {\n listener(event, data) {\n\n event.stop()\n\n if (data.loading) {\n this.append('loadingOptions', data.options)\n }\n else {\n const loadingKeys = this.get('loadingValues').map(renderNodesProps)\n const loadingKey = renderNodesProps(data.values)\n\n const index = loadingKeys.indexOf(loadingKey)\n if (index >= 0) {\n this.removeAt('loadingOptions', index)\n }\n }\n\n },\n ns: 'cascaderOption',\n },\n select: {\n listener(event, data) {\n\n event.stop()\n\n const me = this\n const isLeafOption = data.isLeaf\n\n me.set({\n selectedOptions: data.options,\n })\n\n if (me.get('multiple')) {\n if (isLeafOption) {\n me.setOptionChecked(\n data.values,\n !data.checked\n )\n }\n }\n else {\n if (isLeafOption || me.get('changeOnSelect')) {\n me.setCheckedOptions([data.options])\n }\n if (isLeafOption) {\n this.set({\n isVisible: FALSE,\n })\n }\n }\n\n },\n ns: 'cascaderOption',\n },\n check: {\n listener(event, data) {\n\n event.stop()\n\n this.setOptionChecked(data.values, data.checked)\n\n },\n ns: 'cascaderOption',\n },\n outside: {\n listener(event) {\n\n event.stop()\n\n this.set('isVisible', FALSE)\n\n },\n ns: 'popover',\n },\n },\n\n methods: {\n onClick(event?: CustomEventInterface) {\n this.toggle('isVisible')\n fireClickEvent(event)\n },\n onClearClick(event: CustomEventInterface) {\n\n // 停止冒泡,否则会展开下拉框\n event.stop()\n fireClickEvent(event)\n\n this.set({\n indeterminateOptions: [],\n })\n\n this.setCheckedOptions([])\n\n },\n onOptionRemove(event: CustomEventInterface, index: number) {\n\n event.stop()\n\n const value = this.get(`actualValues.${index}`)\n\n this.setOptionChecked(value, FALSE)\n\n },\n setOptionChecked(value: any[], checked: boolean) {\n\n const me = this\n\n const checkedOptions = me.copy(me.get('checkedOptions'))\n const indeterminateOptions = me.copy(me.get('indeterminateOptions'))\n\n setCheckedOptions(\n me.get('options'),\n checkedOptions,\n indeterminateOptions,\n [value],\n [checked]\n )\n\n me.set({\n indeterminateOptions,\n })\n\n me.setCheckedOptions(checkedOptions)\n\n },\n setCheckedOptions(checkedOptions: any[][]) {\n\n const me = this\n\n if (checkedOptions === me.get('checkedOptions')) {\n return\n }\n\n me.set({\n checkedOptions\n })\n\n let value = me.get('actualValues')\n if (!me.get('multiple') && value.length === 1) {\n value = value[0]\n }\n\n me.set({\n value,\n })\n\n me.fire(\n {\n type: 'change',\n ns: 'cascader',\n },\n {\n value,\n }\n )\n\n },\n },\n\n afterMount() {\n onClickEventByEnterPress(this)\n },\n\n beforePropsUpdate(props) {\n\n const { options, value, multiple } = props\n\n if (options !== this.get('options')\n || (value !== UNDEFINED && value !== this.get('value'))\n ) {\n this.set(\n formatOptions(options, value, multiple)\n )\n }\n\n },\n\n components: {\n Tag,\n Icon,\n Empty,\n Popover,\n CascaderOptions,\n },\n\n})\n","import Yox from 'yox'\n\nimport template from './template/PageHeader.hbs'\n// import './style/PageHeader.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}PageHeader',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n required: TRUE,\n },\n showBack: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n Icon,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Layout.hbs'\n// import './style/Layout.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Layout',\n\n propTypes: {\n vertical: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/LayoutHeader.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}LayoutHeader',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/LayoutContent.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}LayoutContent',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/LayoutFooter.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}LayoutFooter',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport Icon from '../icon/Icon'\nimport template from './template/LayoutSider.hbs'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toNumber, toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n model: 'collapsed',\n\n name: '${prefix}LayoutSider',\n\n propTypes: {\n showTrigger: {\n type: RAW_BOOLEAN,\n },\n collapsed: {\n type: RAW_BOOLEAN,\n },\n width: {\n type: RAW_NUMERIC,\n value: 200\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n customWidth(): number {\n if (this.get('collapsed')) {\n return 80\n }\n return toNumber(this.get('width'))\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const customWidth = this.get('customWidth')\n if (customWidth) {\n result.push({\n flex: '0 0 ' + toPixel(customWidth),\n width: toPixel(customWidth),\n minWidth: toPixel(customWidth),\n maxWidth: toPixel(customWidth),\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n triggerStyle(): Record | void {\n const customWidth = this.get('customWidth')\n if (customWidth) {\n return {\n width: toPixel(customWidth)\n }\n }\n },\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Link.hbs'\n// import './style/Link.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_SMALL,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_CONTENT,\n RAW_TYPE_TITLE,\n RAW_TYPE_MUTED,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Link',\n\n propTypes: {\n type: {\n type: oneOf([\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n RAW_TYPE_SUCCESS,\n RAW_TYPE_WARNING,\n RAW_TYPE_ERROR,\n RAW_TYPE_TITLE,\n RAW_TYPE_CONTENT,\n RAW_TYPE_MUTED,\n ]),\n value: RAW_TYPE_PRIMARY,\n },\n size: {\n type: oneOf([RAW_SMALL]),\n },\n underline: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n href: {\n type: RAW_STRING,\n },\n target: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n }\n})\n","import Yox from 'yox'\n\nimport template from './template/ListEmpty.hbs'\n\nimport Empty from '../empty/Empty'\n\nexport default Yox.define({\n\n template,\n\n components: {\n Empty,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/List.hbs'\n// import './style/List.styl'\n\nimport Spin from '../spin/Spin'\nimport ListEmpty from './ListEmpty'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_SIZE_ARRAY,\n RAW_DEFAULT,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}List',\n\n propTypes: {\n simple: {\n type: RAW_BOOLEAN,\n },\n loading: {\n type: RAW_BOOLEAN,\n },\n clickable: {\n type: RAW_BOOLEAN,\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n Spin,\n ListEmpty,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/ListItem.hbs'\n\nimport {\n FALSE,\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}ListItem',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n const list = findComponentUpward(options.parent, '${prefix}List')\n return {\n clickable: list\n ? list.get('clickable')\n : FALSE\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Result.hbs'\n// import './style/Result.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_STATUS_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n getStatusIconName,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Result',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n subTitle: {\n type: RAW_STRING,\n },\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n iconName() {\n return getStatusIconName(\n this.get('status')\n )\n }\n },\n\n components: {\n Icon,\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Exception.hbs'\n// import './style/Exception.styl'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Exception',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n subTitle: {\n type: RAW_STRING,\n },\n status: {\n type: oneOf([403, 404, 500]),\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/Divider.hbs'\n// import './style/Divider.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_LEFT,\n RAW_RIGHT,\n RAW_CENTER,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Divider',\n\n propTypes: {\n vertical: {\n type: RAW_BOOLEAN,\n },\n dashed: {\n type: RAW_BOOLEAN,\n },\n align: {\n type: oneOf([RAW_CENTER, RAW_LEFT, RAW_RIGHT]),\n value: RAW_CENTER,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})\n","import Yox from 'yox'\n\nimport template from './template/Circle.hbs'\n// import './style/Circle.styl'\n\nimport {\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Circle',\n\n propTypes: {\n dashboard: {\n type: RAW_BOOLEAN,\n },\n percent: {\n type: RAW_NUMERIC,\n value: 0,\n },\n size: {\n type: RAW_NUMERIC,\n value: 120,\n },\n strokeWidth: {\n type: RAW_NUMERIC,\n value: 6,\n },\n strokeColor: {\n type: RAW_STRING,\n value: '#2db7f5',\n },\n strokeLinecap: {\n type: oneOf(['square', 'round']),\n value: 'round',\n },\n trailWidth: {\n type: RAW_NUMERIC,\n value: 5,\n },\n trailColor: {\n type: RAW_STRING,\n value: '#eaeef2',\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n computedStrokeWidth() {\n return this.get('percent') === 0 && this.get('dashboard')\n ? 0\n : this.get('strokeWidth')\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const size = this.get('size')\n if (size) {\n result.push({\n width: toPixel(size),\n height: toPixel(size),\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n trailStyle() {\n if (this.get('dashboard')) {\n const len = this.get('len')\n return {\n strokeDasharray: `${len - 75}px ${len}px`,\n strokeDashoffset: `-${75 / 2}px`,\n transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'\n }\n }\n },\n pathStyle() {\n const percent = this.get('percent')\n const len = this.get('len')\n if (this.get('dashboard')) {\n return {\n strokeDasharray: `${(percent / 100) * (len - 75)}px ${len}px`,\n strokeDashoffset: `-${75 / 2}px`,\n transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .6s ease 0s, stroke .6s, stroke-width .06s ease .6s'\n }\n }\n return {\n strokeDasharray: `${len}px ${len}px`,\n strokeDashoffset: `${((100 - percent) / 100 * len)}px`,\n transition: 'stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease'\n }\n },\n radius() {\n return 50 - this.get('strokeWidth') / 2\n },\n len() {\n return Math.PI * 2 * this.get('radius')\n },\n path() {\n let radius = this.get('radius')\n if (this.get('dashboard')) {\n return `M 50,50 m 0,${radius}\n a ${radius},${radius} 0 1 1 0,-${2 * radius}\n a ${radius},${radius} 0 1 1 0,${2 * radius}`\n }\n else {\n return `M 50,50 m 0,-${radius}\n a ${radius},${radius} 0 1 1 0,${2 * radius}\n a ${radius},${radius} 0 1 1 0,-${2 * radius}`\n }\n }\n }\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Popconfirm.hbs'\n// import './style/Popconfirm.styl'\n\nimport Button from '../button/Button'\nimport Popover from '../popover/Popover'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_CLICK,\n RAW_TYPE_WARNING,\n RAW_STATUS_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n getStatusIconName,\n} from '../util'\n\nimport {\n fireClickEvent,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Popconfirm',\n\n propTypes: {\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n value: RAW_TYPE_WARNING,\n },\n showIcon: {\n type: RAW_BOOLEAN,\n },\n title: {\n type: RAW_STRING,\n },\n okText: {\n type: RAW_STRING,\n value: '确定',\n },\n okType: {\n type: RAW_STRING,\n },\n cancelText: {\n type: RAW_STRING,\n value: '取消',\n },\n maxWidth: {\n type: RAW_NUMERIC,\n },\n maxHeight: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n RAW_CLICK,\n isVisible: FALSE,\n }\n },\n\n computed: {\n iconName() {\n return getStatusIconName(\n this.get('status')\n )\n },\n contentStyle() {\n\n const customStyle: Record = {}\n\n const maxWidth = this.get('maxWidth')\n const maxHeight = this.get('maxHeight')\n if (maxWidth) {\n customStyle.maxWidth = toPixel(maxWidth)\n }\n if (maxHeight) {\n customStyle.maxHeight = toPixel(maxHeight)\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n return customStyle\n }\n\n }\n },\n\n events: {\n open: {\n listener(event) {\n event.stop()\n this.set('isVisible', TRUE)\n },\n ns: 'popover',\n },\n close: {\n listener(event) {\n event.stop()\n this.set('isVisible', FALSE)\n },\n ns: 'popover',\n }\n },\n\n methods: {\n onCancelClick(event: CustomEventInterface) {\n event.stop()\n fireClickEvent(event, TRUE)\n this.set('isVisible', FALSE)\n this.fire({\n type: 'cancel',\n ns: 'popconfirm',\n })\n },\n onOkClick(event: CustomEventInterface) {\n event.stop()\n fireClickEvent(event, TRUE)\n this.set('isVisible', FALSE)\n this.fire({\n type: 'ok',\n ns: 'popconfirm',\n })\n }\n },\n\n components: {\n Button,\n Popover,\n },\n})\n","import Yox from 'yox'\n\nimport template from './template/ProgressTrack.hbs'\n\nimport {\n RAW_BOOLEAN,\n RAW_NUMERIC,\n} from '../constant'\n\nimport {\n toPixel,\n toPercent,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n propTypes: {\n vertical: {\n type: RAW_BOOLEAN,\n },\n inside: {\n type: RAW_BOOLEAN,\n },\n thickness: {\n type: RAW_NUMERIC,\n },\n percent: {\n type: RAW_NUMERIC,\n },\n },\n\n computed: {\n inlineStyle(): Record {\n\n const vertical = this.get('vertical')\n const thickness = this.get('thickness')\n\n if (vertical) {\n return {\n width: toPixel(thickness)\n }\n }\n\n return {\n height: toPixel(thickness)\n }\n },\n barStyle(): Record {\n\n const vertical = this.get('vertical')\n const thickness = this.get('thickness')\n const percent = this.get('percent')\n\n if (vertical) {\n return {\n width: toPixel(thickness),\n height: toPercent(percent),\n }\n }\n\n return {\n width: toPercent(percent),\n height: toPixel(thickness),\n lineHeight: toPixel(thickness),\n }\n },\n }\n\n})","import Yox from 'yox'\n\nimport template from './template/Progress.hbs'\n// import './style/Progress.styl'\n\nimport ProgressTrack from './ProgressTrack'\n\nimport {\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_STATUS_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Progress',\n\n propTypes: {\n percent: {\n type: RAW_NUMERIC,\n value: 0,\n },\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n },\n thickness: {\n type: RAW_STRING,\n value: 8,\n },\n inside: {\n type: RAW_BOOLEAN,\n },\n vertical: {\n type: RAW_BOOLEAN,\n },\n active: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n components: {\n ProgressTrack,\n }\n})\n","import Yox, { CustomEventInterface, Data } from 'yox'\n\nimport template from './template/TreeNode.hbs'\n// import './style/TreeNode.styl'\n\nimport Icon from '../icon/Icon'\nimport Checkbox from '../checkbox/Checkbox'\n\nimport {\n TRUE,\n FALSE,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_ARRAY,\n RAW_OBJECT,\n RAW_FUNCTION,\n} from '../constant'\n\nimport { isMac } from '../util'\n\nconst TreeNode = Yox.define({\n\n template,\n\n name: '${prefix}TreeNode',\n\n propTypes: {\n loadingKeys: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n expandedKeys: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n selectedKeys: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n checkedKeys: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n indeterminateKeys: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n selectable: {\n type: RAW_BOOLEAN,\n },\n checkable: {\n type: RAW_BOOLEAN,\n },\n block: {\n type: RAW_BOOLEAN,\n },\n showLine: {\n type: RAW_BOOLEAN,\n },\n showIndeterminate: {\n type: RAW_BOOLEAN,\n },\n loadData: {\n type: RAW_FUNCTION,\n },\n last: {\n type: RAW_BOOLEAN,\n },\n level: {\n type: RAW_NUMERIC,\n },\n node: {\n type: RAW_OBJECT,\n },\n },\n\n computed: {\n loading() {\n const loadingKeys = this.get('loadingKeys')\n const key = this.get('node.key')\n return Yox.array.has(loadingKeys, key)\n },\n expanded() {\n const expandedKeys = this.get('expandedKeys')\n const key = this.get('node.key')\n return Yox.array.has(expandedKeys, key)\n },\n checked() {\n if (this.get('checkable')) {\n const checkedKeys = this.get('checkedKeys')\n const key = this.get('node.key')\n return Yox.array.has(checkedKeys, key)\n }\n return FALSE\n },\n indeterminate() {\n if (this.get('showIndeterminate') && !this.get('checked')) {\n const indeterminateKeys = this.get('indeterminateKeys')\n const key = this.get('node.key')\n return Yox.array.has(indeterminateKeys, key)\n }\n return FALSE\n },\n selected() {\n if (this.get('selectable') && !this.get('node.disabled')) {\n const selectedKeys = this.get('selectedKeys')\n const key = this.get('node.key')\n return Yox.array.has(selectedKeys, key)\n }\n return FALSE\n },\n hasChildren() {\n const children = this.get('node.children')\n return children && children.length > 0\n },\n isLeaf() {\n if (this.get('node.isLeaf') === FALSE) {\n return FALSE\n }\n return !this.get('hasChildren')\n }\n },\n\n methods: {\n onExpandClick() {\n\n const me = this\n\n const node = me.get('node')\n const expanded = !me.get('expanded')\n\n const fireExpandEvent = function () {\n me.fire(\n {\n type: 'expand',\n ns: 'treeNode'\n },\n {\n node,\n expanded,\n }\n )\n }\n\n if (expanded) {\n // 如果是展开,需判断是否要加载数据\n const loadData = me.get('loadData')\n if (loadData && node.isLeaf === FALSE) {\n\n me.fire(\n {\n type: 'loading',\n ns: 'treeNode'\n },\n {\n node,\n loading: TRUE,\n }\n )\n\n loadData(node)\n .then(function (children: any[]) {\n delete node.isLeaf\n if (children && children.length > 0) {\n node.children = children\n fireExpandEvent()\n }\n })\n .finally(function () {\n me.fire(\n {\n type: 'loading',\n ns: 'treeNode'\n },\n {\n node,\n loading: FALSE,\n }\n )\n })\n\n return\n }\n }\n\n fireExpandEvent()\n\n },\n onSelectClick(event: CustomEventInterface) {\n\n const node = this.get('node')\n const selected = this.get('selected')\n\n const originalEvent = event.originalEvent as MouseEvent\n\n this.fire(\n {\n type: 'select',\n ns: 'treeNode'\n },\n {\n node,\n selected: !selected,\n multiple: isMac\n ? originalEvent.metaKey\n : originalEvent.ctrlKey\n }\n )\n\n },\n onCheckClick() {\n\n // @ts-ignore\n this.fireCheck(\n !this.get('checked')\n )\n\n },\n onCheckboxChange(event: CustomEventInterface, data: Data) {\n\n event.stop()\n\n // @ts-ignore\n this.fireCheck(data.checked)\n\n },\n\n fireCheck(checked: boolean) {\n\n const node = this.get('node')\n\n this.fire(\n {\n type: 'check',\n ns: 'treeNode'\n },\n {\n node,\n checked,\n }\n )\n\n }\n },\n\n components: {\n Icon,\n Checkbox,\n }\n\n})\n\nTreeNode.components.TreeNode = TreeNode\n\nexport default TreeNode\n","import Yox from 'yox'\nimport { TRUE } from '../constant'\nimport { getNodesProps, renderNodesProps, setTreeCheckedKey } from '../util'\n\nexport function getLastNodeKey(nodes: any[]) {\n const node = Yox.array.last(nodes)\n return node.key\n}\n\nfunction expandAll(data: any[], expandedKeys: string[]) {\n const handleNode = function (child: any) {\n if (child.children && child.children.length) {\n if (!Yox.array.has(expandedKeys, child.key)) {\n expandedKeys.push(child.key)\n }\n Yox.array.each(\n child.children,\n handleNode\n )\n }\n }\n Yox.array.each(\n data,\n handleNode\n )\n}\n\nexport function formatExpandedKeys(data: any[], expandedKeys: string[] | void, defaultExpandAll: boolean) {\n\n const result = expandedKeys\n ? expandedKeys.slice()\n : []\n\n const parents: any[] = []\n\n const handleNode = function (child: any) {\n\n if (Yox.array.has(result, child.key)) {\n Yox.array.each(\n parents,\n function (parent: any) {\n if (!Yox.array.has(result, parent.key)) {\n result.push(parent.key)\n }\n }\n )\n }\n\n parents.push(child)\n if (child.children) {\n Yox.array.each(\n child.children,\n handleNode\n )\n }\n parents.pop()\n\n }\n Yox.array.each(\n data,\n handleNode\n )\n\n if (defaultExpandAll) {\n expandAll(data, result)\n }\n\n return result\n\n}\n\nexport function formatSelectedKeys(selectedKeys: string[] | void) {\n return selectedKeys\n ? selectedKeys.slice()\n : []\n}\n\nexport function formatCheckedKeys(data: any[], checkedKeys: string[] | void, checkStrictly: boolean) {\n\n const result = checkedKeys\n ? checkedKeys.slice()\n : []\n\n const checkedNodes = []\n const indeterminateNodes = []\n\n setCheckedKey(\n data,\n checkedNodes,\n indeterminateNodes,\n result,\n result.map(function () {\n return TRUE\n }),\n checkStrictly\n )\n\n return {\n checkedNodes,\n indeterminateNodes,\n }\n\n}\n\nexport function setCheckedKey(\n data: any[],\n checkedNodes: any[],\n indeterminateNodes: any[],\n keys: string[],\n checked: boolean[],\n checkStrictly: boolean\n) {\n\n const checkedKeys = getNodesProps(checkedNodes, 'key').map(renderNodesProps)\n const indeterminateKeys = getNodesProps(indeterminateNodes, 'key').map(renderNodesProps)\n\n const interact = !checkStrictly\n\n const isChecked = function (key: string) {\n return checkedKeys.indexOf(key) >= 0\n }\n const addChecked = function (key: string, nodes: any[]) {\n checkedNodes.push(nodes)\n checkedKeys.push(key)\n }\n const removeChecked = function (key: string) {\n const index = checkedKeys.indexOf(key)\n if (index >= 0) {\n checkedNodes.splice(index, 1)\n checkedKeys.splice(index, 1)\n }\n }\n const isIndeterminate = function (key: string) {\n return indeterminateKeys.indexOf(key) >= 0\n }\n const addIndeterminate = function (key: string, nodes: any[]) {\n indeterminateNodes.push(nodes)\n indeterminateKeys.push(key)\n }\n const removeIndeterminate = function (key: string) {\n const index = indeterminateKeys.indexOf(key)\n if (index >= 0) {\n indeterminateNodes.splice(index, 1)\n indeterminateKeys.splice(index, 1)\n }\n }\n\n for (let i = 0, len = keys.length; i < len; i++) {\n const key = keys[i]\n setTreeCheckedKey(\n data,\n 'key',\n checked[i],\n interact,\n function (k, nodes) {\n return Yox.array.last(nodes).key === key\n },\n isChecked,\n addChecked,\n removeChecked,\n isIndeterminate,\n addIndeterminate,\n removeIndeterminate,\n )\n }\n\n}","import Yox from 'yox'\n\nimport template from './template/Tree.hbs'\n// import './style/Tree.styl'\n\nimport Icon from '../icon/Icon'\nimport TreeNode from './TreeNode'\n\nimport {\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_ARRAY,\n RAW_BOOLEAN,\n RAW_FUNCTION,\n RAW_ALL,\n RAW_PARENT,\n RAW_CHILD,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n formatExpandedKeys,\n formatSelectedKeys,\n formatCheckedKeys,\n setCheckedKey,\n getLastNodeKey,\n} from './util'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Tree',\n\n propTypes: {\n data: {\n type: RAW_ARRAY,\n },\n defaultExpandedKeys: {\n type: RAW_ARRAY,\n },\n defaultSelectedKeys: {\n type: RAW_ARRAY,\n },\n defaultCheckedKeys: {\n type: RAW_ARRAY,\n },\n defaultExpandAll: {\n type: RAW_BOOLEAN,\n },\n expandedKeys: {\n type: RAW_ARRAY,\n },\n selectedKeys: {\n type: RAW_ARRAY,\n },\n checkedKeys: {\n type: RAW_ARRAY,\n },\n showCheckedStrategy: {\n type: oneOf([RAW_ALL, RAW_PARENT, RAW_CHILD]),\n value: RAW_ALL,\n },\n checkStrictly: {\n type: RAW_BOOLEAN,\n },\n selectable: {\n type: RAW_BOOLEAN,\n },\n checkable: {\n type: RAW_BOOLEAN,\n },\n multiple: {\n type: RAW_BOOLEAN,\n },\n showLine: {\n type: RAW_BOOLEAN,\n },\n blockNode: {\n type: RAW_BOOLEAN,\n },\n loadData: {\n type: RAW_FUNCTION,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n const data = this.get('data')\n const expandedKeys = this.get('expandedKeys')\n const defaultExpandedKeys = this.get('defaultExpandedKeys')\n const innerExpandedKeys = formatExpandedKeys(data, expandedKeys || defaultExpandedKeys, this.get('defaultExpandAll'))\n\n const selectedKeys = this.get('selectedKeys')\n const defaultSelectedKeys = this.get('defaultSelectedKeys')\n const innerSelectedKeys = formatSelectedKeys(selectedKeys || defaultSelectedKeys)\n\n const checkedKeys = this.get('checkedKeys')\n const defaultCheckedKeys = this.get('defaultCheckedKeys')\n const checkedResult = formatCheckedKeys(data, checkedKeys || defaultCheckedKeys, this.get('checkStrictly'))\n\n return {\n innerLoadingKeys: [],\n innerExpandedKeys,\n innerSelectedKeys,\n innerCheckedNodes: checkedResult.checkedNodes,\n innerIndeterminateNodes: checkedResult.indeterminateNodes,\n }\n },\n\n computed: {\n actualNodes(): any[] {\n\n const showCheckedStrategy = this.get('showCheckedStrategy')\n const innerCheckedNodes = this.get('innerCheckedNodes')\n\n if (showCheckedStrategy === RAW_ALL) {\n return innerCheckedNodes\n }\n\n const showChildStrategy = showCheckedStrategy === RAW_CHILD\n const actualNodes: any[] = []\n const innerCheckedKeys = this.get('innerCheckedKeys')\n\n Yox.array.each(\n innerCheckedNodes,\n function (nodes: any[]) {\n\n let isParentChecked = FALSE\n\n if (nodes.length > 1) {\n const parentKey = nodes[nodes.length - 2].key\n isParentChecked = innerCheckedKeys.indexOf(parentKey) >= 0\n }\n\n if (Yox.array.last(nodes).children) {\n // branch 节点,父级没选中时有效\n // 如果父级选中了,则有效的是父级\n if (!showChildStrategy && !isParentChecked) {\n actualNodes.push(nodes)\n }\n }\n else {\n // leaf 节点\n if (showChildStrategy || !isParentChecked) {\n actualNodes.push(nodes)\n }\n }\n }\n )\n\n return actualNodes\n\n },\n actualKeys() {\n const actualNodes = this.get('actualNodes')\n return actualNodes.map(getLastNodeKey)\n },\n innerCheckedKeys() {\n const innerCheckedNodes = this.get('innerCheckedNodes')\n return innerCheckedNodes.map(getLastNodeKey)\n },\n innerIndeterminateKeys() {\n const innerIndeterminateNodes = this.get('innerIndeterminateNodes')\n return innerIndeterminateNodes.map(getLastNodeKey)\n }\n },\n\n events: {\n loading: {\n listener(event, data) {\n event.stop()\n\n const loadingKeys = this.copy(\n this.get('innerLoadingKeys')\n )\n\n const { node, loading } = data\n const { key } = node\n\n if (loading) {\n loadingKeys.push(key)\n }\n else {\n Yox.array.remove(loadingKeys, key)\n }\n\n this.set({\n innerLoadingKeys: loadingKeys,\n })\n\n },\n ns: 'treeNode'\n },\n expand: {\n listener(event, data) {\n event.stop()\n\n const expandedKeys = this.copy(\n this.get('innerExpandedKeys')\n )\n\n const { node, expanded } = data\n const { key } = node\n\n if (expanded) {\n expandedKeys.push(key)\n }\n else {\n Yox.array.remove(expandedKeys, key)\n }\n\n this.set({\n expandedKeys,\n innerExpandedKeys: expandedKeys,\n })\n\n this.fire(\n {\n type: 'expand',\n ns: 'tree'\n },\n {\n expandedKeys,\n node,\n }\n )\n },\n ns: 'treeNode'\n },\n select: {\n listener(event, data) {\n event.stop()\n\n const selectedKeys = this.copy(\n this.get('innerSelectedKeys')\n )\n\n const { node, selected } = data\n const { key } = node\n\n if (selected) {\n if (this.get('multiple') && data.multiple) {\n selectedKeys.push(key)\n }\n else {\n selectedKeys.length = 1\n selectedKeys[0] = key\n }\n }\n else {\n if (this.get('multiple') && !data.multiple && selectedKeys.length > 1) {\n selectedKeys.length = 1\n selectedKeys[0] = key\n }\n else {\n Yox.array.remove(selectedKeys, key)\n }\n }\n\n this.set({\n selectedKeys,\n innerSelectedKeys: selectedKeys,\n })\n\n this.fire(\n {\n type: 'select',\n ns: 'tree'\n },\n {\n selectedKeys,\n node,\n }\n )\n },\n ns: 'treeNode'\n },\n check: {\n listener(event, data) {\n event.stop()\n\n const innerCheckedNodes = this.copy(\n this.get('innerCheckedNodes')\n )\n\n const innerIndeterminateNodes = this.copy(\n this.get('innerIndeterminateNodes')\n )\n\n const { node, checked } = data\n\n setCheckedKey(\n this.get('data'),\n innerCheckedNodes,\n innerIndeterminateNodes,\n [node.key],\n [checked],\n this.get('checkStrictly')\n )\n\n this.set({\n innerCheckedNodes,\n innerIndeterminateNodes,\n })\n\n const checkedKeys = this.get('actualKeys')\n this.set({\n checkedKeys,\n })\n\n this.fire(\n {\n type: 'check',\n ns: 'tree'\n },\n {\n checkedKeys,\n node,\n }\n )\n },\n ns: 'treeNode'\n }\n },\n\n beforePropsUpdate(props) {\n\n const {\n data,\n expandedKeys, defaultExpandAll,\n selectedKeys,\n checkedKeys, checkStrictly,\n } = props\n\n if (data !== this.get('data')\n || (expandedKeys !== UNDEFINED && expandedKeys !== this.get('expandedKeys'))\n ) {\n this.set({\n innerExpandedKeys: formatExpandedKeys(data, expandedKeys, defaultExpandAll)\n })\n }\n\n if (selectedKeys !== UNDEFINED && selectedKeys !== this.get('selectedKeys')) {\n this.set({\n selectedKeys: formatSelectedKeys(selectedKeys)\n })\n }\n\n if (data !== this.get('data')\n || (checkedKeys !== UNDEFINED && checkedKeys !== this.get('checkedKeys'))\n || (checkStrictly !== UNDEFINED && checkStrictly !== this.get('checkStrictly'))\n ) {\n const checkedResult = formatCheckedKeys(data, checkedKeys, checkStrictly)\n this.set({\n innerCheckedNodes: checkedResult.checkedNodes,\n innerIndeterminateNodes: checkedResult.indeterminateNodes,\n })\n }\n\n },\n\n components: {\n Icon,\n TreeNode,\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Rate.hbs'\n// import './style/Rate.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_ARRAY,\n RAW_TYPE_WARNING,\n RAW_TYPE_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Rate',\n\n propTypes: {\n count: {\n type: RAW_NUMERIC,\n value: 5,\n },\n value: {\n type: RAW_NUMERIC,\n value: 0,\n },\n half: {\n type: RAW_BOOLEAN,\n },\n readOnly: {\n type: RAW_BOOLEAN,\n },\n texts: {\n type: RAW_ARRAY,\n },\n type: {\n type: oneOf(RAW_TYPE_ARRAY),\n value: RAW_TYPE_WARNING,\n },\n iconName: {\n type: RAW_STRING,\n value: 'star-fill',\n },\n iconSize: {\n type: RAW_NUMERIC,\n value: 18,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n hoverValue: -1,\n }\n },\n\n computed: {\n activeValue(): number {\n const hoverValue = this.get('hoverValue')\n return hoverValue < 0\n ? this.get('value')\n : hoverValue\n }\n },\n\n methods: {\n handleMove(event: CustomEventInterface, value: number) {\n\n const mouseEvent = event.originalEvent as MouseEvent\n if (this.hoverOnHalfIcon(mouseEvent.target as HTMLElement)) {\n value -= 0.5\n }\n\n this.set({\n hoverValue: value\n })\n },\n\n handleLeave() {\n const value = this.get('value')\n this.set({\n hoverValue: value >= 0 ? value : -1\n })\n },\n\n handleClick(event: CustomEventInterface, value: number) {\n\n const clickEvent = event.originalEvent as MouseEvent\n if (this.hoverOnHalfIcon(clickEvent.target as HTMLElement)) {\n value -= 0.5\n }\n\n this.set('value', value)\n\n this.fire(\n {\n type: 'change',\n ns: 'rate',\n },\n {\n value\n }\n )\n },\n\n hoverOnHalfIcon(element: HTMLElement) {\n return Yox.string.has(element.className, 'half')\n }\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Tabs.hbs'\n// import './style/Tabs.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n\n RAW_SMALL,\n RAW_LARGE,\n\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_DEFAULT,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\ninterface Tab {\n name: string,\n icon: string,\n label: string,\n disabled: boolean,\n}\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Tabs',\n\n propTypes: {\n type: {\n type: oneOf(['card']),\n },\n size: {\n type: oneOf([RAW_DEFAULT, RAW_SMALL, RAW_LARGE]),\n value: RAW_DEFAULT,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n value: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n tabs: [],\n }\n },\n\n events: {\n add: {\n listener(event, data) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n const { target } = event\n const tabName = target.get('name')\n\n this.append(\n 'tabs',\n {\n name: tabName,\n icon: target.get('icon'),\n label: target.get('label'),\n disabled: target.get('disabled'),\n }\n )\n\n if (data.isActive) {\n this.set({\n value: tabName,\n })\n }\n\n },\n ns: 'tabPanel',\n },\n remove: {\n listener(event) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n const { target } = event\n const tabName = target.get('name')\n\n const tabs: Tab[] = this.get('tabs')\n const newTabs = tabs.filter(function (item) {\n return item.name !== tabName\n })\n this.set({\n tabs: newTabs\n })\n\n if (this.get('value') === tabName) {\n this.set('value', newTabs[0] ? newTabs[0].name : UNDEFINED)\n }\n\n },\n ns: 'tabPanel',\n },\n update: {\n listener(event) {\n\n if (event.phase !== Yox.Event.PHASE_UPWARD) {\n return\n }\n\n const me = this\n const { target } = event\n const tabName = target.get('name')\n const tabs: Tab[] = me.get('tabs')\n\n Yox.array.each(\n tabs,\n function (item, index) {\n if (item.name === tabName) {\n me.set(\n `tabs.${index}`,\n {\n name: tabName,\n icon: target.get('icon'),\n label: target.get('label'),\n disabled: target.get('disabled'),\n }\n )\n return FALSE\n }\n }\n )\n\n },\n ns: 'tabPanel',\n }\n },\n\n watchers: {\n value(value) {\n this.fire(\n {\n type: 'change',\n ns: 'tabs',\n },\n { value },\n TRUE\n )\n },\n },\n\n methods: {\n handleCloseTab(tab: Tab) {\n this.fire(\n {\n type: 'tabRemove',\n ns: 'tabs',\n },\n {\n name: tab.name\n }\n )\n },\n handleClickTab(tab: Tab) {\n this.set({\n value: tab.name,\n })\n }\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/TabPanel.hbs'\n\nimport {\n NULL,\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n findComponentUpward,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}TabPanel',\n\n propTypes: {\n name: {\n type: RAW_STRING,\n },\n icon: {\n type: RAW_STRING,\n },\n label: {\n type: RAW_STRING,\n required: TRUE,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n return {\n isActive: FALSE,\n }\n },\n\n watchers: {\n name() {\n this.updatePanel()\n },\n icon() {\n this.updatePanel()\n },\n label() {\n this.updatePanel()\n },\n disabled() {\n this.updatePanel()\n },\n },\n\n events: {\n change: {\n listener(_, data) {\n this.set({\n isActive: this.get('name') == data.value\n })\n },\n ns: 'tabs',\n }\n },\n\n methods: {\n updatePanel() {\n this.fire({\n type: 'update',\n ns: 'tabPanel',\n })\n }\n },\n\n afterMount() {\n\n const tabs = findComponentUpward(this.$parent, '${prefix}Tabs')\n\n const index = Yox.array.indexOf(tabs.$children, this)\n\n let name = this.get('name')\n if (name == NULL) {\n name = '' + index\n this.set('name', name)\n }\n\n let value = tabs.get('value')\n if (value == NULL && index === 0) {\n value = name\n }\n\n const isActive = value === name\n\n this.set('isActive', isActive)\n\n this.fire(\n {\n type: 'add',\n ns: 'tabPanel',\n },\n {\n isActive,\n }\n )\n\n },\n\n beforeDestroy() {\n this.fire({\n type: 'remove',\n ns: 'tabPanel',\n })\n }\n\n})\n","import Yox, { CustomEventInterface } from 'yox'\n\nimport template from './template/Dropdown.hbs'\n// import './style/Dropdown.styl'\n\nimport Popover from '../popover/Popover'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_HOVER,\n RAW_CLICK,\n RAW_CUSTOM,\n RAW_BOTTOM,\n RAW_PLACEMENT_ARRAY,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n} from '../util'\n\nimport {\n fireClickEvent,\n} from '../event'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Dropdown',\n\n propTypes: {\n placement: {\n type: oneOf(RAW_PLACEMENT_ARRAY),\n value: RAW_BOTTOM,\n },\n trigger: {\n type: oneOf([RAW_HOVER, RAW_CLICK, RAW_CUSTOM]),\n value: RAW_HOVER,\n },\n visible: {\n type: RAW_BOOLEAN,\n },\n maxHeight: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const maxHeight = this.get('maxHeight')\n if (maxHeight) {\n result.push({\n maxHeight: toPixel(maxHeight)\n })\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n events: {\n click: {\n listener(event) {\n event.stop()\n fireClickEvent(event, TRUE)\n this.fire({\n type: 'close',\n ns: 'dropdown',\n })\n },\n ns: 'dropdownItem',\n },\n open: {\n listener(event) {\n event.stop()\n this.fire({\n type: 'open',\n ns: 'dropdown',\n })\n },\n ns: 'popover',\n },\n close: {\n listener(event) {\n event.stop()\n this.fire({\n type: 'close',\n ns: 'dropdown',\n })\n },\n ns: 'popover',\n },\n outside: {\n listener(event) {\n event.stop()\n this.fire({\n type: 'outside',\n ns: 'dropdown',\n })\n },\n ns: 'popover',\n }\n },\n\n components: {\n Popover,\n }\n})","import Yox from 'yox'\n\nimport template from './template/DropdownItem.hbs'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}DropdownItem',\n\n propTypes: {\n name: {\n type: RAW_STRING,\n },\n divided: {\n type: RAW_BOOLEAN,\n },\n disabled: {\n type: RAW_BOOLEAN,\n },\n active: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})","import Yox from 'yox'\n\nimport template from './template/DropdownMenu.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}DropdownMenu',\n\n propTypes: {\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n})","import Yox from 'yox'\n\nimport template from './template/Description.hbs'\n// import './style/Description.styl'\n\nimport {\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_DEFAULT,\n RAW_SIZE_ARRAY,\n RAW_SLOT_CHILDREN,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n} from '../util'\n\nimport {\n addSlots2Props,\n} from './util'\n\nconst COLUMN_DEFAULT = 3\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Description',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n simple: {\n type: RAW_BOOLEAN,\n },\n size: {\n type: oneOf(RAW_SIZE_ARRAY),\n value: RAW_DEFAULT,\n },\n column: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n beforeRender(props) {\n\n const children = this.get(RAW_SLOT_CHILDREN)\n if (children) {\n addSlots2Props(\n this,\n children,\n props,\n this.get('column') || COLUMN_DEFAULT\n )\n }\n\n }\n\n})\n","import { VNode, YoxInterface } from 'yox'\nimport { UNDEFINED, RAW_SLOT_PREFIX, RAW_SLOT_CHILDREN } from '../constant'\nimport { toNumber } from '../util'\n\ntype DescriptionItem = {\n label: string\n name: string\n span: number\n}\n\nexport function addSlots2Props(instance: YoxInterface, children: VNode[], props: Record, column: number) {\n\n let cells: DescriptionItem[][] = []\n let columnArray: DescriptionItem[] | void\n let columnItem: DescriptionItem | void\n let columnSpanSum = 0\n let index = 0\n\n children.forEach(\n function (vnode: any) {\n if (vnode.tag === 'DescriptionItem') {\n\n const { label, span } = vnode.props\n const name = 'cell' + index++\n\n if (!columnArray) {\n columnArray = []\n cells.push(columnArray)\n }\n\n let spanCount = toNumber(span, 1)\n if (spanCount > column - columnSpanSum) {\n spanCount = column - columnSpanSum\n }\n\n columnItem = {\n label,\n name,\n span: spanCount,\n }\n\n columnArray.push(columnItem)\n props[RAW_SLOT_PREFIX + name] = vnode.slots[RAW_SLOT_CHILDREN](instance)\n\n columnSpanSum += columnItem.span\n\n if (columnSpanSum >= column) {\n columnArray = columnItem = UNDEFINED\n columnSpanSum = 0\n }\n\n }\n }\n )\n\n if (columnItem && columnArray) {\n columnItem.span = column - columnArray.length + 1\n }\n\n props.cells = cells\n\n}\n","import Yox from 'yox'\n\nimport {\n RAW_STRING,\n RAW_NUMERIC,\n} from '../constant'\n\nexport default Yox.define({\n\n name: '${prefix}DescriptionItem',\n\n propTypes: {\n label: {\n type: RAW_STRING,\n },\n span: {\n type: RAW_NUMERIC,\n }\n },\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Timeline.hbs'\n// import './style/Timeline.styl'\n\nimport {\n FALSE,\n RAW_BOOLEAN,\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Timeline',\n\n propTypes: {\n pending: {\n type: RAW_BOOLEAN,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})\n","import Yox from 'yox'\n\nimport template from './template/TimelineItem.hbs'\n\nimport {\n RAW_STRING,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}TimelineItem',\n\n propTypes: {\n color: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n})\n","export const formInlineItemGaps = [16, 26]","import Yox, { Data } from 'yox'\n\nimport template from './template/Form.hbs'\n// import './style/Form.styl'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_LEFT,\n RAW_RIGHT,\n RAW_NUMERIC,\n RAW_INLINE,\n RAW_VERTICAL,\n RAW_HORIZONTAL,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n oneOf,\n spaceListStyle,\n} from '../util'\n\nimport {\n formInlineItemGaps,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Form',\n\n propTypes: {\n layout: {\n type: oneOf([RAW_INLINE, RAW_HORIZONTAL, RAW_VERTICAL]),\n value: RAW_HORIZONTAL,\n },\n showColon: {\n type: RAW_BOOLEAN,\n },\n scrollToFirstError: {\n type: RAW_BOOLEAN,\n },\n labelAlign: {\n type: oneOf([RAW_LEFT, RAW_RIGHT]),\n value: RAW_RIGHT,\n },\n labelWidth: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n inlineStyle() {\n const layout = this.get('layout')\n const style = this.get('style')\n if (layout === RAW_INLINE) {\n return spaceListStyle(\n formInlineItemGaps,\n FALSE,\n TRUE,\n style\n )\n }\n return style\n }\n },\n\n watchers: {\n layout(value) {\n this.fire(\n {\n type: 'layoutChange',\n ns: 'form',\n },\n {\n layout: value,\n },\n TRUE\n )\n }\n },\n\n methods: {\n validate(errors: Data | void) {\n this.fire(\n {\n type: 'validate',\n ns: 'form',\n },\n {\n errors,\n hasScrolled: FALSE,\n scrollToFirstError: this.get('scrollToFirstError'),\n },\n TRUE\n )\n },\n }\n})","import Yox from 'yox'\n\nimport template from './template/FormItem.hbs'\n\nimport {\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_INLINE,\n RAW_HORIZONTAL,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n spaceItemStyle,\n findComponentUpward,\n} from '../util'\n\nimport {\n formInlineItemGaps,\n} from './util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}FormItem',\n\n propTypes: {\n prop: {\n type: RAW_STRING,\n },\n label: {\n type: RAW_STRING,\n },\n showRequiredMark: {\n type: RAW_BOOLEAN,\n },\n showMessage: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n adaptive: {\n type: RAW_BOOLEAN,\n },\n message: {\n type: RAW_STRING,\n },\n extra: {\n type: RAW_STRING,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data(options) {\n\n const form = findComponentUpward(options.parent, '${prefix}Form')\n\n return {\n RAW_HORIZONTAL,\n error: UNDEFINED,\n formLayout: form.get('layout'),\n formLabelWidth: form.get('labelWidth'),\n }\n\n },\n\n computed: {\n inlineStyle() {\n const formLayout = this.get('formLayout')\n const style = this.get('style')\n if (formLayout === RAW_INLINE) {\n return spaceItemStyle(\n formInlineItemGaps,\n FALSE,\n TRUE,\n style\n )\n }\n return style\n },\n itemLabelWidth(): string {\n const formLayout = this.get('formLayout')\n const formLabelWidth = this.get('formLabelWidth')\n return formLayout === RAW_HORIZONTAL && formLabelWidth\n ? toPixel(formLabelWidth)\n : ''\n },\n itemMessage(): string {\n return this.get('error') || this.get('message')\n },\n showItemMessage(): string {\n return this.get('showMessage') && this.get('itemMessage')\n },\n },\n\n events: {\n layoutChange: {\n listener(_, data) {\n this.set({\n formLayout: data.layout,\n })\n },\n ns: 'form',\n },\n validate: {\n listener(_, data) {\n\n const { errors } = data\n const error = errors\n ? errors[this.get('prop')]\n : UNDEFINED\n\n this.set({\n error\n })\n\n if (!data.hasScrolled && data.scrollToFirstError) {\n const el = this.$el\n if (el.scrollIntoView) {\n el.scrollIntoView()\n }\n data.hasScrolled = TRUE\n }\n\n },\n ns: 'form',\n }\n }\n\n})\n","import Yox from 'yox'\n\nimport template from './template/Dialog.hbs'\n// import './style/Dialog.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n BODY,\n TRUE,\n FALSE,\n UNDEFINED,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n screenWidth,\n onTransitionEnd,\n} from '../util'\n\nconst CLASS_VISIBLE = '${prefix}dialog-visible'\nconst CLASS_FADE = '${prefix}dialog-fade'\n\nexport default Yox.define({\n\n template,\n\n model: 'visible',\n\n name: '${prefix}Dialog',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n visible: {\n type: RAW_BOOLEAN,\n },\n showMask: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n closable: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n maskClosable: {\n type: RAW_BOOLEAN,\n value: TRUE,\n },\n width: {\n type: RAW_NUMERIC,\n value: screenWidth > 1024 ? 500 : 300,\n },\n height: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n computed: {\n wrapperStyle(): Record | void {\n\n const width = this.get('width')\n const height = this.get('height')\n\n if (width || height) {\n const result: Record = {}\n if (width) {\n result.width = toPixel(width)\n }\n if (height) {\n result.height = toPixel(height)\n }\n return result\n }\n\n },\n },\n\n watchers: {\n visible(visible) {\n const bodyStyle = BODY.style\n if (visible) {\n this.set('bodyOverflow', bodyStyle.overflow)\n bodyStyle.overflow = 'hidden'\n }\n else {\n bodyStyle.overflow = this.get('bodyOverflow')\n }\n }\n },\n\n methods: {\n open() {\n this.set('visible', TRUE)\n },\n close() {\n this.set('visible', FALSE)\n }\n },\n\n transitions: {\n dialog: {\n enter(node) {\n\n const me = this as any\n const dialog = node as HTMLElement\n const wrapper = me.$refs.wrapper as HTMLElement\n me.wrapperElement = wrapper\n\n // 设置为 display block\n Yox.dom.addClass(dialog, CLASS_VISIBLE)\n me.fire({\n type: 'open',\n ns: 'dialog',\n })\n\n setTimeout(\n function () {\n if (!me.get('visible')) {\n return\n }\n\n Yox.dom.addClass(dialog, CLASS_FADE)\n\n onTransitionEnd(\n wrapper,\n function () {\n if (!me.get('visible')) {\n return\n }\n me.fire({\n type: 'opened',\n ns: 'dialog',\n })\n }\n )\n },\n 50\n )\n\n },\n leave(node, done) {\n\n const me = this as any\n const dialog = node as HTMLElement\n const wrapper = me.wrapperElement as HTMLElement\n me.wrapperElement = UNDEFINED\n\n Yox.dom.removeClass(dialog, CLASS_FADE)\n me.fire({\n type: 'close',\n ns: 'dialog',\n })\n\n onTransitionEnd(\n wrapper,\n function () {\n if (me.get('visible')) {\n return\n }\n Yox.dom.removeClass(dialog, CLASS_VISIBLE)\n me.fire({\n type: 'closed',\n ns: 'dialog',\n })\n done()\n }\n )\n\n }\n },\n },\n\n components: {\n Icon,\n }\n\n})\n","import Yox, { Data, CustomEventInterface } from 'yox'\n\nimport template from './template/Table.hbs'\n// import './style/Table.styl'\n\nimport Icon from '../icon/Icon'\nimport Empty from '../empty/Empty'\nimport Button from '../button/Button'\nimport Checkbox from '../checkbox/Checkbox'\nimport ResizeObserver from '../resize-observer/ResizeObserver'\n\nimport {\n TRUE,\n UNDEFINED,\n RAW_ARRAY,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_STYLE_TYPE,\n} from '../constant'\n\nimport {\n toPixel,\n} from '../util'\n\ninterface ButtonConfig {\n type: string | void,\n text: string | void,\n size: string | void,\n shape: string | void,\n onClick: (item: Data, index: number) => void\n}\n\nconst SORT_ORDER_ASC = 'asc'\nconst SORT_ORDER_DESC = 'desc'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Table',\n\n propTypes: {\n list: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n columns: {\n type: RAW_ARRAY,\n required: TRUE,\n },\n selection: {\n type: RAW_ARRAY,\n },\n stripe: {\n type: RAW_BOOLEAN,\n },\n simple: {\n type: RAW_BOOLEAN,\n },\n height: {\n type: RAW_NUMERIC,\n },\n width: {\n type: RAW_NUMERIC,\n },\n className: {\n type: RAW_STRING,\n },\n style: {\n type: RAW_STYLE_TYPE,\n }\n },\n\n data() {\n\n let sortKey = UNDEFINED\n let sortOrder = UNDEFINED\n\n Yox.array.each(\n this.get('columns'),\n function (item: any) {\n if (item.defaultSortOrder) {\n sortKey = item.key\n sortOrder = item.defaultSortOrder\n }\n }\n )\n\n return {\n SORT_ORDER_ASC,\n SORT_ORDER_DESC,\n\n colWidths: UNDEFINED,\n sortKey,\n sortOrder,\n }\n },\n\n computed: {\n allChecked: {\n deps: ['selection', 'selection.length'],\n get(): boolean {\n const selection = this.get('selection')\n const list = this.get('list')\n return selection && list\n && selection.length > 0\n && selection.length === list.length\n },\n set(checked): void {\n let selection = this.get('selection')\n if (checked) {\n selection = this.get('list').map(\n function (item: any) {\n return item.key\n }\n )\n }\n else {\n selection = []\n }\n this.set('selection', selection)\n }\n },\n inlineStyle(): object[] | void {\n const result: object[] = []\n\n const customStyle: Record = {}\n\n const width = this.get('width')\n const height = this.get('height')\n\n if (width) {\n customStyle.width = toPixel(width)\n customStyle.overflowX = 'auto'\n }\n if (height) {\n customStyle.height = toPixel(height)\n customStyle.overflowY = 'auto'\n }\n\n if (Yox.object.keys(customStyle).length > 0) {\n result.push(customStyle)\n }\n\n const style = this.get('style')\n if (style) {\n result.push(style)\n }\n\n if (result.length > 0) {\n return result\n }\n },\n },\n\n watchers: {\n selection(selection) {\n this.fire(\n 'change.table',\n {\n selection,\n }\n )\n }\n },\n\n filters: {\n inArray: Yox.array.has,\n },\n\n methods: {\n onResize(_, data) {\n this.updateColumnWidths(data.width)\n },\n allCheckedChange(event: CustomEventInterface, data: Data) {\n event.stop()\n this.set('allChecked', data.checked)\n },\n rowCheckedChange(event: CustomEventInterface, data: Data, index: number) {\n\n event.stop()\n\n let selection = this.get('selection')\n let key = this.get(`list.${index}.key`)\n\n if (data.checked) {\n if (!Yox.is.array(selection) || !Yox.array.has(selection, key)) {\n this.append('selection', key)\n }\n }\n else {\n this.remove('selection', key)\n }\n\n },\n clickButton(button: ButtonConfig, item: Data, index: number) {\n button.onClick(item, index)\n },\n sortColumn(key: string, order: string) {\n this.set({\n sortKey: key,\n sortOrder: order,\n })\n this.fire(\n 'sort',\n {\n key,\n order,\n }\n )\n },\n\n updateColumnWidths(totalWidth: number) {\n\n let columns = this.get('columns')\n if (!columns || !columns.length) {\n return\n }\n\n let colWidths: number[] = [], noWidths: number[] = [], widthSum = 0\n\n Yox.array.each(\n columns,\n function (col: any, index) {\n if (col.width > 0) {\n colWidths[index] = col.width\n widthSum += col.width\n }\n else if (col.key === 'selection') {\n colWidths[index] = 50\n widthSum += 50\n }\n else {\n noWidths.push(index)\n }\n }\n )\n\n totalWidth -= widthSum\n\n let noCount = noWidths.length\n if (totalWidth > 0 && noCount) {\n Yox.array.each(\n noWidths,\n function (index) {\n let colWidth = Math.floor(totalWidth / noCount)\n colWidths[index] = colWidth\n totalWidth -= colWidth\n noCount--\n }\n )\n }\n\n this.set('colWidths', colWidths)\n\n }\n\n },\n\n components: {\n Icon,\n Empty,\n Button,\n Checkbox,\n ResizeObserver,\n }\n\n})\n","import Yox from 'yox'\n\nimport { BODY, TRUE, UNDEFINED } from '../constant'\n\nimport LoadingBar from './LoadingBar'\n\ninterface Config {\n type?: string,\n color?: string,\n height?: number,\n percent?: number\n}\n\nlet instance = UNDEFINED\n\nfunction add(props: Config | void) {\n\n const newProps = props ? Yox.object.copy(props) : {}\n newProps.fixed = TRUE\n\n instance = new Yox(\n Yox.object.extend(\n {\n el: BODY,\n props: newProps,\n },\n LoadingBar\n )\n )\n\n return instance\n\n}\n\nfunction remove() {\n if (instance) {\n instance.destroy()\n instance = UNDEFINED\n }\n}\n\n(Yox.prototype as any).$loadingBar = {\n // 开始从 0 显示进度条,并自动加载进度\n start(options?: Config) {\n if (instance) {\n remove()\n }\n return add(options)\n },\n // 结束进度条,自动补全剩余进度\n finish() {\n if (instance) {\n instance.set('percent', 100)\n setTimeout(remove, 300)\n }\n },\n // 精确加载到指定的进度\n update(data: Config) {\n if (instance) {\n instance.set(data)\n }\n }\n}\n\n\n","import Yox from 'yox'\n\nimport template from './template/Message.hbs'\n// import './style/Message.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_BOOLEAN,\n RAW_STATUS_ARRAY,\n RAW_TYPE_INFO,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n onTransitionEnd,\n getStatusIconName,\n} from '../util'\n\nconst CLASS_VISIBLE = '${prefix}message-visible'\nconst CLASS_FADE = '${prefix}message-fade'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Message',\n\n propTypes: {\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n value: RAW_TYPE_INFO,\n },\n content: {\n type: RAW_STRING,\n required: TRUE,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n duration: {\n type: RAW_NUMERIC,\n value: 2000,\n },\n gap: {\n type: RAW_NUMERIC,\n value: 12,\n },\n top: {\n type: RAW_NUMERIC,\n value: 15,\n },\n },\n\n data() {\n return {\n isVisible: FALSE,\n actualTop: 0,\n }\n },\n\n computed: {\n iconName(): string {\n return getStatusIconName(\n this.get('status')\n )\n },\n },\n\n methods: {\n move(distance: number) {\n\n const me = this\n if (!me.get('isVisible')) {\n return\n }\n\n const element = me.$el\n if (element) {\n const gap = toNumber(this.get('gap'))\n const actualTop = this.get('actualTop') - distance - gap\n me.set({\n actualTop,\n })\n element.style.top = toPixel(actualTop)\n }\n\n },\n show(height: number, count: number) {\n\n const me = this\n if (me.get('isVisible')) {\n return\n }\n\n const gap = toNumber(this.get('gap'))\n const top = toNumber(this.get('top')) + height + count * gap\n\n me.set({\n isVisible: TRUE,\n actualTop: top,\n })\n\n const element = me.$el\n Yox.dom.addClass(element, CLASS_VISIBLE)\n element.style.top = toPixel(top)\n\n setTimeout(\n function () {\n if (!me.$el) {\n return\n }\n\n Yox.dom.addClass(element, CLASS_FADE)\n\n const duration = toNumber(me.get('duration'))\n if (duration > 0) {\n setTimeout(\n function () {\n if (me.$el) {\n me.hide()\n }\n },\n duration\n )\n }\n },\n 50\n )\n\n },\n hide() {\n\n const me = this\n if (!me.get('isVisible')) {\n return\n }\n\n me.set({\n isVisible: FALSE,\n })\n\n const element = me.$el\n Yox.dom.removeClass(element, CLASS_FADE)\n\n onTransitionEnd(\n element,\n function () {\n if (!me.$el) {\n return\n }\n Yox.dom.removeClass(element, CLASS_VISIBLE)\n me.fire({\n type: 'hide',\n ns: 'message',\n })\n }\n )\n\n }\n },\n\n components: {\n Icon,\n },\n\n})","import Yox, { Data } from 'yox'\nimport { BODY, UNDEFINED } from '../constant'\n\ntype Item = {\n instance: Yox\n height: number\n}\n\nconst map: Record = {}\n\nexport function addComponent(component: Data, props: Data, hideEvent: string, onClose: Function | void) {\n\n const instance: Yox = new Yox(\n Yox.object.extend(\n {\n el: BODY,\n props,\n },\n component\n )\n )\n\n instance.on(hideEvent, function () {\n\n if (onClose) {\n onClose()\n }\n instance.destroy()\n\n // 通知后面的移位\n const originalList = map[hideEvent]\n const copyList = originalList.slice()\n let removed: Item | void = UNDEFINED\n for (let i = 0, len = copyList.length; i < len; i++) {\n const item = copyList[i]\n if (item.instance === instance) {\n removed = item\n originalList.splice(i, 1)\n }\n else if (removed) {\n // @ts-ignore\n item.instance.move(removed.height)\n }\n }\n\n })\n\n setTimeout(\n function () {\n if (instance.$el) {\n\n const list = map[hideEvent] || (map[hideEvent] = [])\n\n let height = 0\n let count = list.length\n\n for (let i = 0; i < count; i++) {\n height += list[i].height\n }\n\n // @ts-ignore\n instance.show(height, count)\n\n list.push({\n instance,\n height: instance.$el.clientHeight,\n })\n\n }\n },\n 300\n )\n\n}","import Yox, { Data } from 'yox'\n\nimport Message from './Message'\nimport { addComponent } from './util'\n\ntype Arg = {\n content: string\n closable?: boolean\n top?: number\n duration?: number\n onClose?: Function\n}\n\nconst config: Data = {}\n\nfunction addMessage(status: string, arg: string | Arg) {\n\n const props: Data = { status }\n let onClose: Function | void\n\n Yox.object.extend(props, config)\n\n if (Yox.is.string(arg)) {\n props.content = arg as string\n }\n else {\n onClose = (arg as Arg).onClose\n Yox.object.extend(props, arg as Arg)\n }\n\n addComponent(\n Message,\n props,\n 'hide.message',\n onClose\n )\n\n}\n\n(Yox.prototype as any).$message = {\n success(arg: string | Arg) {\n addMessage('success', arg)\n },\n info(arg: string | Arg) {\n addMessage('info', arg)\n },\n warning(arg: string | Arg) {\n addMessage('warning', arg)\n },\n error(arg: string | Arg) {\n addMessage('error', arg)\n },\n config(arg: {\n top: number,\n duration: number,\n }) {\n Yox.object.extend(config, arg)\n }\n}","import Yox from 'yox'\n\nimport template from './template/Alert.hbs'\n\nimport Button from '../button/Button'\nimport Dialog from '../dialog/Dialog'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_TYPE_ARRAY,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_INFO,\n} from '../constant'\n\nimport {\n getStatusIconName,\n oneOf,\n screenWidth,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Alert',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n content: {\n type: RAW_STRING,\n required: TRUE,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n width: {\n type: RAW_NUMERIC,\n value: screenWidth > 1024 ? 400 : 300,\n },\n okText: {\n type: RAW_STRING,\n value: '我知道了'\n },\n okType: {\n type: oneOf(RAW_TYPE_ARRAY),\n value: RAW_TYPE_PRIMARY,\n },\n onOk: {\n type: RAW_FUNCTION,\n }\n },\n\n data() {\n return {\n iconName: getStatusIconName(RAW_TYPE_INFO),\n }\n },\n\n events: {\n closed: {\n listener(event) {\n event.stop()\n this.destroy()\n },\n ns: 'dialog',\n }\n },\n\n methods: {\n ok() {\n (this.$refs.dialog as any).close()\n const onOk = this.get('onOk')\n if (onOk) {\n onOk()\n }\n }\n },\n\n components: {\n Button,\n Dialog,\n },\n\n afterMount() {\n const me = this\n setTimeout(\n function () {\n if (me.$refs) {\n (me.$refs.dialog as any).open()\n }\n },\n 30\n )\n }\n\n})","import Yox from 'yox'\n\nimport Button from '../button/Button'\nimport Dialog from '../dialog/Dialog'\nimport template from './template/Confirm.hbs'\n\nimport {\n TRUE,\n RAW_STRING,\n RAW_BOOLEAN,\n RAW_NUMERIC,\n RAW_FUNCTION,\n RAW_TYPE_ARRAY,\n RAW_TYPE_PRIMARY,\n RAW_TYPE_WARNING,\n} from '../constant'\n\nimport {\n getStatusIconName,\n oneOf,\n screenWidth,\n} from '../util'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Confirm',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n content: {\n type: RAW_STRING,\n required: TRUE,\n },\n closable: {\n type: RAW_BOOLEAN,\n },\n width: {\n type: RAW_NUMERIC,\n value: screenWidth > 1024 ? 400 : 300,\n },\n okText: {\n type: RAW_STRING,\n value: '确定',\n },\n okType: {\n type: oneOf(RAW_TYPE_ARRAY),\n value: RAW_TYPE_PRIMARY,\n },\n onOk: {\n type: RAW_FUNCTION,\n },\n cancelText: {\n type: RAW_STRING,\n value: '取消',\n },\n cancelType: {\n type: oneOf(RAW_TYPE_ARRAY),\n },\n onCancel: {\n type: RAW_FUNCTION,\n }\n },\n\n data() {\n return {\n iconName: getStatusIconName(RAW_TYPE_WARNING),\n }\n },\n\n events: {\n closed: {\n listener(event) {\n event.stop()\n this.destroy()\n },\n ns: 'dialog',\n }\n },\n\n methods: {\n ok() {\n (this.$refs.dialog as any).close()\n const onOk = this.get('onOk')\n if (onOk) {\n onOk()\n }\n },\n cancel() {\n (this.$refs.dialog as any).close()\n const onCancel = this.get('onCancel')\n if (onCancel) {\n onCancel()\n }\n },\n },\n\n components: {\n Button,\n Dialog,\n },\n\n afterMount() {\n const me = this\n setTimeout(\n function () {\n if (me.$refs) {\n (me.$refs.dialog as any).open()\n }\n },\n 30\n )\n }\n\n})","import Yox, { Data } from 'yox'\n\nimport { BODY } from '../constant'\n\nimport Alert from './Alert'\nimport Confirm from './Confirm'\n\ntype Arg = string | Data\n\nconst prototype = Yox.prototype as any\n\nprototype.$alert = function (data: Arg) {\n\n const props: Data = {}\n\n if (Yox.is.object(data)) {\n const obj = data as Data\n props.closable = obj.closable\n props.title = obj.title\n props.content = obj.content\n props.width = obj.width\n props.okText = obj.okText\n props.okType = obj.okType\n props.onOk = obj.onOk\n }\n else {\n props.content = data as string\n }\n\n new Yox(\n Yox.object.extend(\n {\n el: BODY,\n props,\n },\n Alert\n )\n )\n\n}\n\nprototype.$confirm = function (data: Arg) {\n\n const props: Data = {}\n\n if (Yox.is.object(data)) {\n const obj = data as Data\n props.closable = obj.closable\n props.title = obj.title\n props.content = obj.content\n props.width = obj.width\n props.okText = obj.okText\n props.okType = obj.okType\n props.onOk = obj.onOk\n props.cancelText = obj.cancelText\n props.cancelType = obj.cancelType\n props.onCancel = obj.onCancel\n }\n else {\n props.content = data as string\n }\n\n new Yox(\n Yox.object.extend(\n {\n el: BODY,\n props,\n },\n Confirm\n )\n )\n\n}\n","import Yox from 'yox'\n\nimport template from './template/Notification.hbs'\n// import './style/Notification.styl'\n\nimport Icon from '../icon/Icon'\n\nimport {\n TRUE,\n FALSE,\n RAW_STRING,\n RAW_NUMERIC,\n RAW_STATUS_ARRAY,\n} from '../constant'\n\nimport {\n oneOf,\n toPixel,\n toNumber,\n onTransitionEnd,\n getStatusIconName,\n} from '../util'\n\nconst CLASS_VISIBLE = '${prefix}notification-visible'\nconst CLASS_FADE = '${prefix}notification-fade'\n\nexport default Yox.define({\n\n template,\n\n name: '${prefix}Notification',\n\n propTypes: {\n title: {\n type: RAW_STRING,\n },\n content: {\n type: RAW_STRING,\n },\n status: {\n type: oneOf(RAW_STATUS_ARRAY),\n },\n duration: {\n type: RAW_NUMERIC,\n value: 4500,\n },\n gap: {\n type: RAW_NUMERIC,\n value: 16,\n },\n right: {\n type: RAW_NUMERIC,\n value: 15,\n },\n width: {\n type: RAW_NUMERIC,\n value: 320,\n },\n },\n\n data() {\n return {\n isVisible: FALSE,\n actualTop: 0,\n }\n },\n\n computed: {\n iconName(): string {\n return getStatusIconName(\n this.get('status')\n )\n },\n },\n\n methods: {\n move(distance: number) {\n\n const me = this\n if (!me.get('isVisible')) {\n return\n }\n\n const element = me.$el\n if (element) {\n const gap = toNumber(this.get('gap'))\n const actualTop = this.get('actualTop') - distance - gap\n me.set({\n actualTop,\n })\n element.style.top = toPixel(actualTop)\n }\n\n },\n show(height: number, count: number) {\n\n const me = this\n if (me.get('isVisible')) {\n return\n }\n\n const gap = toNumber(this.get('gap'))\n const width = toNumber(this.get('width'))\n const right = toNumber(this.get('right'))\n const top = 24 + height + count * gap\n\n me.set({\n isVisible: TRUE,\n actualTop: top,\n })\n\n const element = me.$el\n Yox.dom.addClass(element, CLASS_VISIBLE)\n element.style.top = toPixel(top)\n element.style.right = toPixel(right)\n element.style.width = toPixel(width)\n\n setTimeout(\n function () {\n if (!me.$el) {\n return\n }\n\n Yox.dom.addClass(element, CLASS_FADE)\n\n const duration = toNumber(me.get('duration'))\n if (duration > 0) {\n setTimeout(\n function () {\n if (me.$el) {\n me.hide()\n }\n },\n duration\n )\n }\n },\n 50\n )\n\n },\n\n hide() {\n\n const me = this\n if (!me.get('isVisible')) {\n return\n }\n\n me.set({\n isVisible: FALSE,\n })\n\n const element = me.$el\n Yox.dom.removeClass(element, CLASS_FADE)\n\n onTransitionEnd(\n element,\n function () {\n if (!me.$el) {\n return\n }\n Yox.dom.removeClass(element, CLASS_VISIBLE)\n me.fire({\n type: 'hide',\n ns: 'notification',\n })\n }\n )\n\n }\n },\n\n components: {\n Icon,\n }\n\n})","import Yox, { Data } from 'yox'\nimport { addComponent } from '../message/util'\n\nimport Notification from './Notification'\n\ntype Arg = {\n content: string\n title?: string\n right?: number\n width?: number\n duration?: number\n onClose?: Function\n}\n\ntype Config = {\n right?: number\n width?: number\n duration?: number\n}\n\nlet config: Config = {}\n\nfunction addNotification(status: string, arg: string | Arg) {\n\n let props: Data = { status }\n let onClose: Function | void\n\n // 先写 config,可支持 arg 覆盖全局配置\n Yox.object.extend(props, config)\n\n if (Yox.is.string(arg)) {\n props.content = arg\n }\n else {\n onClose = (arg as Arg).onClose\n Yox.object.extend(props, arg as Arg)\n }\n\n addComponent(\n Notification,\n props,\n 'hide.notification',\n onClose\n )\n\n}\n\n(Yox.prototype as any).$notification = {\n open(props: string | Arg) {\n addNotification('', props)\n },\n success(props: string | Arg) {\n addNotification('success', props)\n },\n info(props: string | Arg) {\n addNotification('info', props)\n },\n warning(props: string | Arg) {\n addNotification('warning', props)\n },\n error(props: string | Arg) {\n addNotification('error', props)\n },\n config(options: Config) {\n Yox.object.extend(config, options)\n }\n}","import Row from './component/grid/Row'\nimport Col from './component/grid/Col'\nimport Add from './component/add/Add'\nimport ColorSwatch from './component/color-swatch/ColorSwatch'\nimport Countdown from './component/countdown/Countdown'\nimport Closable from './component/closable/Closable'\nimport FooterBar from './component/footer-bar/FooterBar'\nimport ResizeObserver from './component/resize-observer/ResizeObserver'\n\nimport Menu from './component/menu/Menu'\nimport MenuItem from './component/menu/MenuItem'\nimport MenuGroup from './component/menu/MenuGroup'\nimport SubMenu from './component/menu/SubMenu'\n\nimport Icon from './component/icon/Icon'\nimport Text from './component/text/Text'\nimport Drawer from './component/drawer/Drawer'\nimport Guide from './component/guide/Guide'\n\nimport Breadcrumb from './component/breadcrumb/Breadcrumb'\nimport BreadcrumbItem from './component/breadcrumb/BreadcrumbItem'\n\nimport Button from './component/button/Button'\nimport ButtonGroup from './component/button/ButtonGroup'\nimport Input from './component/input/Input'\nimport InputNumber from './component/input-number/InputNumber'\nimport Textarea from './component/textarea/Textarea'\nimport Radio from './component/radio/Radio'\nimport RadioGroup from './component/radio/RadioGroup'\nimport Checkbox from './component/checkbox/Checkbox'\nimport CheckboxGroup from './component/checkbox/CheckboxGroup'\nimport ColorPicker from './component/color-picker/ColorPicker'\nimport Slider from './component/slider/Slider'\nimport Space from './component/space/Space'\nimport Statistic from './component/statistic/Statistic'\nimport Switch from './component/switch/Switch'\nimport Skeleton from './component/skeleton/Skeleton'\nimport Steps from './component/steps/Steps'\nimport Step from './component/steps/Step'\nimport Select from './component/select/Select'\nimport Option from './component/select/Option'\nimport OptionGroup from './component/select/OptionGroup'\n\nimport Pagination from './component/pagination/Pagination'\nimport Upload from './component/upload/Upload'\n\nimport Alert from './component/alert/Alert'\nimport Article from './component/article/Article'\nimport Analysis from './component/analysis/Analysis'\nimport AnalysisField from './component/analysis/AnalysisField'\nimport Spin from './component/spin/Spin'\nimport SplitButton from './component/split-button/SplitButton'\nimport BackTop from './component/backtop/BackTop'\nimport Avatar from './component/avatar/Avatar'\nimport Badge from './component/badge/Badge'\nimport DatePicker from './component/date-picker/DatePicker'\nimport TimePicker from './component/time-picker/TimePicker'\nimport ImagePicker from './component/image-picker/ImagePicker'\nimport Image from './component/image/Image'\n\nimport Tooltip from './component/tooltip/Tooltip'\n\nimport Carousel from './component/carousel/Carousel'\n\nimport Collapse from './component/collapse/Collapse'\nimport CollapseItem from './component/collapse/CollapseItem'\n\nimport Card from './component/card/Card'\nimport CardHeader from './component/card/CardHeader'\nimport CardMedia from './component/card/CardMedia'\nimport CardBody from './component/card/CardBody'\nimport CardFooter from './component/card/CardFooter'\n\nimport Cascader from './component/cascader/Cascader'\n\nimport PageHeader from './component/page-header/PageHeader'\n\nimport Layout from './component/layout/Layout'\nimport LayoutHeader from './component/layout/LayoutHeader'\nimport LayoutContent from './component/layout/LayoutContent'\nimport LayoutFooter from './component/layout/LayoutFooter'\nimport LayoutSider from './component/layout/LayoutSider'\n\nimport Link from './component/link/Link'\nimport List from './component/list/List'\nimport ListItem from './component/list/ListItem'\n\nimport Empty from './component/empty/Empty'\nimport Result from './component/result/Result'\nimport Exception from './component/exception/Exception'\nimport Divider from './component/divider/Divider'\n\nimport Circle from './component/circle/Circle'\nimport Popover from './component/popover/Popover'\nimport Popconfirm from './component/popconfirm/Popconfirm'\nimport Progress from './component/progress/Progress'\nimport Tree from './component/tree/Tree'\nimport Tag from './component/tag/Tag'\nimport Rate from './component/rate/Rate'\nimport Tabs from './component/tabs/Tabs'\nimport TabPanel from './component/tabs/TabPanel'\nimport Dropdown from './component/dropdown/Dropdown'\nimport DropdownItem from './component/dropdown/DropdownItem'\nimport DropdownMenu from './component/dropdown/DropdownMenu'\nimport Description from './component/description/Description'\nimport DescriptionItem from './component/description/DescriptionItem'\n\nimport Timeline from './component/timeline/Timeline'\nimport TimelineItem from './component/timeline/TimelineItem'\n\nimport Form from './component/form/Form'\nimport FormItem from './component/form/FormItem'\nimport Dialog from './component/dialog/Dialog'\nimport Table from './component/table/Table'\n\nimport './component/loading-bar'\nimport './component/message'\nimport './component/modal'\nimport './component/notification'\n\n/**\n * 版本\n */\nexport const version = process.env.NODE_VERSION\n\n/**\n * 安装插件\n */\nexport function install(Yox: any) {\n Yox.component({\n Row,\n Col,\n Add,\n ColorSwatch,\n Countdown,\n Closable,\n FooterBar,\n ResizeObserver,\n\n Menu,\n MenuItem,\n MenuGroup,\n SubMenu,\n Icon,\n Text,\n Drawer,\n Guide,\n\n Breadcrumb,\n BreadcrumbItem,\n\n Button,\n ButtonGroup,\n Input,\n InputNumber,\n Textarea,\n Radio,\n RadioGroup,\n Checkbox,\n CheckboxGroup,\n ColorPicker,\n Slider,\n Space,\n Statistic,\n Switch,\n Skeleton,\n Steps,\n Step,\n Select,\n Option,\n OptionGroup,\n Pagination,\n DatePicker,\n TimePicker,\n ImagePicker,\n Image,\n Upload,\n\n Tooltip,\n\n Alert,\n Article,\n Analysis,\n AnalysisField,\n Spin,\n SplitButton,\n BackTop,\n Avatar,\n Badge,\n\n Card,\n CardHeader,\n CardMedia,\n CardBody,\n CardFooter,\n\n Cascader,\n\n PageHeader,\n Layout,\n LayoutHeader,\n LayoutContent,\n LayoutFooter,\n LayoutSider,\n\n Carousel,\n Collapse,\n CollapseItem,\n Link,\n List,\n ListItem,\n Empty,\n Result,\n Exception,\n Divider,\n Circle,\n Progress,\n Popover,\n Popconfirm,\n Tree,\n Tag,\n Rate,\n Tabs,\n TabPanel,\n\n Dropdown,\n DropdownItem,\n DropdownMenu,\n\n Description,\n DescriptionItem,\n\n Timeline,\n TimelineItem,\n Form,\n FormItem,\n Dialog,\n Table,\n })\n}\n"],"names":["RAW_THEME_ARRAY","RAW_STATUS_ARRAY","RAW_TYPE_ARRAY","RAW_SIZE_ARRAY","RAW_PLACEMENT_ARRAY","RAW_STYLE_TYPE","WINDOW","window","DOCUMENT","document","BODY","body","element","createElement","prefixs","testCSS","property","upperCase","charAt","toUpperCase","slice","list","join","split","i","len","length","style","screenWidth","screen","availWidth","transitionEnd","isMac","test","navigator","userAgent","supportFlexGap","onTransitionEnd","el","callback","offsetWidth","offsetHeight","listener_1","Yox","dom","off","on","nextTick","supportPageOffset","pageXOffset","isCSS1Compat","compatMode","requestAnimationFrame","setTimeout","contains","target","compareDocumentPosition","toNumber","value","defaultValue","is","numeric","toString","toPixel","toPercent","findComponentUpward","parent","componentName","name","array","has","$parent","oneOf","values","key","logger","warn","getNowTime","Date","now","formatMillisecond","options","format","trimDay","trimHour","showDay","indexOf","showHour","showMinute","showSecond","day","Math","floor","hour","minute","second","replace","padStart","text","arrayLength","Array","scrollTo","from","to","duration","difference","abs","scroll","start","end","step","scrollTop","ceil","getStatusIconName","status","spaceListStyle","gaps","vertical","autoWrap","result","gapStyle","horizontalGap","verticalGap","columnGap","rowGap","marginBottom","object","keys","push","spaceItemStyle","marginRight","getNodesProps","nodes","propName","each","node","renderNodesProps","setTreeCheckedKey","treeData","keyName","checked","interact","isTarget","isChecked","addChecked","removeChecked","isIndeterminate","addIndeterminate","removeIndeterminate","parents","callFunc","func","unshift","handleNode","child","children","result_1","shift","addNode","addChildren","disabled","setNodeIndeterminate","FLAG_ALL_SELECTED","removeNode","removeChildren","FLAG_NONE_SELECTED","getNodeIndeterminate","checkedCount","indeterminateCount","indeterminate","responsiveMap","xs","sm","md","lg","xl","xxl","responsiveArray","eachBreakpoints","matchMedia","getCurrentBreakpoint","breakpoint","mql","matches","store","data","parseGutter","gutter","startIndex","addListener","event","set","get","define","template","propTypes","type","justify","align","className","computed","responsiveGutter","this","inlineStyle","customStyle","horizontalGutter","marginLeft","verticalGutter","marginTop","watchers","fire","ns","afterMount","me","watcher","watch","watchBreakpoint","destroy","component","unwatch","unwatchBreakpoint","lifeCycle","flex","span","order","offset","pull","row","events","change","listener","_","responsiveClass","breakpointName","breakpointConfig","breakpointList","map","string","minWidth","paddingLeft","paddingRight","paddingTop","paddingBottom","required","size","color","spin","fontSize","title","width","height","block","components","Icon","swatchGaps","swatches","swatchListStyle","swatchItemStyle","methods","onColorClick","formatedValue","timer","clearTimer","clearInterval","next","isFinish","newValue","max","setInterval","needClose","showClose","draggable","RAW_ALWAYS","RAW_HOVER","delay","timerRef","timerTimestamp","actualWidth","actualHeight","$el","handleResize","rest","fireResize","clearTimeout","clientWidth","clientHeight","ResizeObserver","resizeObserver_1","entries","_a","observe","destroy_1","disconnect","mode","theme","collapsed","activeName","openNames","inner","click","phase","Event","PHASE_UPWARD","isOpen","copy","remove","isActive","RAW_INLINE","RAW_VERTICAL","emitter","fireClickEvent","isFromPopover","originalEvent","endDragTime","startDrag","endDrag","onClickEventByEnterPress","instance","handler","onKeydown","keyCode","onClick","onDestroy","placement","trigger","triggerMutable","visible","widthAlign","showArrow","showDelay","hideDelay","offsetX","offsetY","gap","isHover","RAW_CLICK","RAW_CUSTOM","fireClose","onOverlayClick","stop","enter","leaveTimer","enterTimer","fireOpen","leave","toggleVisible","getOverlayRect","triggerRect","$refs","getBoundingClientRect","triggerLeft","documentElement","scrollLeft","left","triggerTop","pageYOffset","top","x","y","isVertical","refreshOverlayRect","overlayElement","overlay","overlayRect","setOverlayRect","transitions","triggerElement","readElementRectInfo","rectInfo","addClass","animateTimer","done","removeClass","onWindowResize","onNativeClick","onGlobalClick","RAW_SLOT_PREFIX","offClickEvent","menu","RAW_HORIZONTAL","RAW_BOTTOM","RAW_RIGHT_START","outside","Popover","bold","model","closable","showMask","maskClosable","wrapperStyle","bodyStyle","overflow","open","close","drawer","wrapper","wrapperElement","separator","last","shape","ghost","autoFocus","loading","beforeCreate","props","buttonGroup","focus","placeholder","showClear","secure","prefix","suffix","spellCheck","readOnly","showCount","maxLength","isSecure","isFocus","currentType","TEXT_TYPE_TEXT","TEXT_TYPE_PASSWORD","hasCount","filters","formatValueLength","handleFocus","handleBlur","handleClearClick","prevent","onKeyup","onKeypress","isNumber","min","precision","showStep","isComposition","inputStringValue","customClassName","classNames","customPrecision","customMin","Number","NEGATIVE_INFINITY","customMax","POSITIVE_INFINITY","upDisabled","downDisabled","updateInputValue","correctValue","handleInput","changeValue","handleKeydown","metaKey","ctrlKey","shiftKey","isHelper","textInputElement","getTextInput","isFirstChar","selectionStart","selectionEnd","isMinus","dotIndex","precisionLength","substr","isDot","handleKeyup","handleEnter","handleUp","numberInputElement","getNumberInput","stepUp","handleDown","stepDown","handleCompositionStart","handleCompositionEnd","oldStringValue","newStringValue","oldValue","fireChange","number","input","numberInput","Input","sizes","fontSizes","autoSize","rows","resize","wrap","textareaStyle","ROW_HEIGHT","PADDING_VERTICAL","minRows","minHeight","maxHeight","maxRows","setChecked","radioGroup","button","checkboxGroup","colorStyle","backgroundColor","normalizeHue","hue","normalizeSaturation","saturation","normalizeValue","normalizeAlpha","alpha","getColorByName","ctx","getContext","fillStyle","hsv2rgb","h","s","v","r","g","b","_h","f","p","q","t","rgb2hex","a","alphaStr","round","stringifyRgb","rgb","parseRgb","converts","hex","rgba","parseInt","num","hex2rgb","parseColor","alphaEnabled","getModeByColor","hsv","diff","rgb2hsv","hexText","onChange","onSubmit","redText","greenText","blueText","alphaText","red","green","blue","alphaPercent","alphaMatch","match","showAlpha","MODE_HEX","MODE_RGB","palleteLayerStyle","backgroundImage","palleteThumbStyle","bottom","palleteThumbColor","hueThumbStyle","hueThumbColor","alphaMaskStyle","alphaThumbStyle","alphaThumbColor","formatMode","onSwatchChange","palleteEl","hueEl","alphaEl","onPalleteMouseMove","mouseEvent","rect","clientX","clientY","onPalleteMouseUp","onHueMouseMove","onHueMouseUp","onAlphaMouseMove","onAlphaMouseUp","onPalleteMouseDown","pallete","onHueMouseDown","onAlphaMouseDown","Button","ColorSwatch","ColorThumb","HexInput","RgbInput","modes","isVisible","colorValue","setColor","hsvChange","colorChange","alphaChange","modeChange","newIndex","toggle","oldRgb","ColorPanel","content","defaultVisible","maxWidth","contentStyle","onPopoverOpen","onPopoverClose","onPopoverOutside","getPercentByValue","rawValue","range","reverse","showStops","showTooltip","formatTooltip","RAW_TOP","RAW_RIGHT","innerValue","hoverThumbIndex","dragThumbIndex","showTooltipIndex","isRange","minNumber","maxNumber","stepNumber","valuePercentArray","deps","percent","stops","count","interval","right","formatBarStyle","fromName","toName","fromPercnet","temp","formatThumbStyle","index","onThumbMouseEnter","onThumbMouseLeave","onTrackMouseMove","updatePosition","getRatio","onTrackMouseUp","ratio","onTrackMouseDown","currentTarget","Tooltip","sizeArray","itemStyle","image","active","computedText","allWidth","lastWidth","imageSize","imageShape","boolean","Skeleton","current","beforeRender","forEach","vnode","tag","setStepIndex","description","steps","RAW_FINISH","RAW_TYPE_ERROR","stepStatus","currentChange","statusChange","checkable","presetName","customColor","toggleChecked","simple","space","isOptionSelected","select","isSelected","multiple","allOptions","slots","children_1","getOptionsByChildren","selectedOptions","item","selectOption","onClearClick","onOptionRemove","removeAt","append","deselectOption","selectedIndex","Tag","Empty","Option","label","total","pageSize","pageSizeOptions","showJumper","showTotal","page","focused","pageList","prev","pageSizeList","onJumpClick","onPageClick","setCurrent","onPageFocus","onPageBlur","onPrevPageClick","decreaseCurrent","onPrevPageFocus","onPrevPageBlur","onNextPageClick","increaseCurrent","onNextPageFocus","onNextPageBlur","showError","error","parts","Select","PrevPage","NextPage","guid","accept","beforeUpload","upload","isFileHover","acceptPattern","RegExp","fileList","formatedFileList","toArray","filter","file","id","onStart","onEnd","reset","onAbort","onError","onProgress","progress","onSuccess","response","form","handleClick","handleDragenter","handleDragleave","handleDragover","handleDrop","dataTransfer","files","handleChange","showIcon","banner","iconName","showLink","subTitle","signature","tooltip","up","down","fixed","isMenuVisible","onButtonClick","onItemClick","ButtonGroup","backTop","container","containerElement","find","fatal","onRefresh","url","formatUrl","src","srcSet","alt","clickable","sizeValue","textStyle","scale","transform","dot","hidden","ripple","isNumeric","formatText","WEEKS","MONTHS","toSimpleDate","date","toDate","year","getFullYear","month","getMonth","getDate","timestamp","getTime","setHours","toTimestamp","offsetMonth","setDate","setMonth","createDateViewDatasource","startDate","getDay","firstDateInWeek","endDate","lastDateInWeek","lastDateInMonth","time","formatDate","defaultDate","checkedDate","datasource","startYear","createYearViewDatasource","checkedYears","toMonthTimestamp","canPickYear","RAW_TYPE_YEAR","RAW_TYPE_MONTH","DateYear","setFullYear","createMonthViewDatasource","checkedTimestamps","disabledDate","canPickMonth","RAW_TYPE_DATE","weeks","DateMonth","isCurrentMonth","isEnabled","getEndTimestamp","startTimestamp","endTimestamp","splitPanel","defaultStartDate","checkedStartDate","defaultEndDate","checkedEndDate","pinDate","tempDate","startDatasource","endDatasource","checkedStartTimestamp","checkedEndTimestamp","computedCheckedStartTimestamp","computedCheckedEndTimestamp","base","offsetStart","offsetEnd","hover","RAW_TYPE_WEEK","checkedTimestamp","colIndex","defaultFormat","dateRange","week","shortcuts","RAW_TYPE_DATE_RANGE","DateView","DateRange","DateWeek","defaultSimpleDate","formatedValues","dateChange","dateRangeChange","onItemRemove","onShortcutClick","call","dateFormat","format_1","existed_1","toTimeProps","hourList","minuteList","secondList","hourIndex","minuteIndex","secondIndex","getHours","getMinutes","getSeconds","formatTime","createRangeList","getValidTimeItemIndex","listLength","scrollTimeItemInToView","listElement","animated","itemElement","validHourIndex","validMinuteIndex","validSecondIndex","hasValue","scrollHourIntoView","scrollMinuteIntoView","scrollSecondIntoView","onHourClick","onMinuteClick","onSecondClick","onNowClick","onSubmitClick","hourStep","minuteStep","secondStep","TimePanel","needSecond","submit","manual","indicatorStyle","increase","random","MB","GB","formatDurationOptinos","readLocalFile","Promise","resolve","reader","FileReader","onload","base64","Image","naturalWidth","naturalHeight","onerror","message","readAsDataURL","video_1","preload","URL","createObjectURL","onloadedmetadata","revokeObjectURL","videoWidth","videoHeight","validateFile","minSize","maxSize","minRatio","maxRatio","minDuration","maxDuration","errors","formatFileSize","toFixed","imageList","imageWidth","imageHeight","imageMode","maxCount","formatImageUrl","cropImage","uploadTitle","uploadingTitle","uploadImage","showSize","RAW_NEVER","STATUS_UPLOADING","STATUS_ERROR","STATUS_FAILURE","draggingIndex","uploadingCount","beforeReuploadImage","then","validateImageList","reupload","replaceItem","beforeUploadImage","restCount","fireError","all","newList","appendItems","needSize","isVideoUploader","uploadText","imageCount","canDraggable","imageItemStyle","handleImageClick","getImageIndexById","checkReady","hasLocal","hasUploading","hasError","items","uploadItem","splice","removeItem","uploadHandler","decrease","extend","addImgWrapperItemClass","targetChild","removeImgWrapperItemClass","handleMouseEnter","handleMouseLeave","handleDragStart","handleDragEnd","handleDragOver","handleDragEnter","handleDragLeave","handleDragDrop","startImageItem","newImageList","Add","Space","Upload","Closable","LoadingBar","showPreview","showDelete","fallback","useFallback","validateImage","isUploading","widthNumber","heightNumber","image.url","image.base64","previewImage","deleteImage","autoPlay","indicatorType","indicatorPosition","RAW_LEFT","RAW_SLOT_CHILDREN","direction","move","go","transitionDuration","autoPlayTimer","autoPlayHandler","accordion","opened","collapse","shadow","level","option","loadData","loadingValues","selectedValue","checkedValues","indeterminateValues","interactive","selected","isLeaf","finally","onCheckboxChange","Checkbox","CascaderOptions","selectedValues","currentLoadingValues","currentCheckedValues","currentIndeterminateValues","currentSelectedValue","currentSelectedOption","loadingStart","addLevelInfoIfNeeded","loadingEnd","check","CascaderOption","formatOptions","checkedOptions","indeterminateOptions","setCheckedOptions","checkedKeys","indeterminateKeys","k","changeOnSelect","showCheckedStrategy","loadingOptions","actualOptions","showChildStrategy","isParentChecked","copyed","pop","parentKey","actualValues","actualTexts","texts","isReversed","loadingKeys","loadingKey","isLeafOption","setOptionChecked","beforePropsUpdate","showBack","showTrigger","customWidth","triggerStyle","underline","href","Spin","ListEmpty","dashed","dashboard","strokeWidth","strokeColor","strokeLinecap","trailWidth","trailColor","computedStrokeWidth","trailStyle","strokeDasharray","strokeDashoffset","transition","pathStyle","radius","PI","path","okText","okType","cancelText","onCancelClick","onOkClick","inside","thickness","barStyle","lineHeight","ProgressTrack","TreeNode","expandedKeys","selectedKeys","selectable","showLine","showIndeterminate","expanded","hasChildren","onExpandClick","fireExpandEvent","onSelectClick","onCheckClick","fireCheck","getLastNodeKey","formatExpandedKeys","defaultExpandAll","expandAll","formatSelectedKeys","formatCheckedKeys","checkStrictly","checkedNodes","indeterminateNodes","setCheckedKey","defaultExpandedKeys","defaultSelectedKeys","defaultCheckedKeys","blockNode","innerExpandedKeys","innerSelectedKeys","checkedResult","innerLoadingKeys","innerCheckedNodes","innerIndeterminateNodes","actualNodes","innerCheckedKeys","actualKeys","innerIndeterminateKeys","expand","half","iconSize","hoverValue","activeValue","handleMove","hoverOnHalfIcon","handleLeave","clickEvent","tabs","add","tabName","icon","newTabs","update","handleCloseTab","tab","handleClickTab","updatePanel","$children","beforeDestroy","divided","column","columnArray","columnItem","cells","columnSpanSum","spanCount","addSlots2Props","pending","formInlineItemGaps","layout","showColon","scrollToFirstError","labelAlign","labelWidth","validate","hasScrolled","prop","showRequiredMark","showMessage","adaptive","extra","formLayout","formLabelWidth","itemLabelWidth","itemMessage","showItemMessage","layoutChange","scrollIntoView","dialog","columns","selection","stripe","sortKey","sortOrder","defaultSortOrder","SORT_ORDER_ASC","SORT_ORDER_DESC","colWidths","allChecked","overflowX","overflowY","inArray","onResize","updateColumnWidths","allCheckedChange","rowCheckedChange","clickButton","sortColumn","totalWidth","noWidths","widthSum","col","noCount","colWidth","prototype","$loadingBar","newProps","finish","actualTop","distance","show","hide","addComponent","hideEvent","onClose","originalList","copyList","removed","config","addMessage","arg","Message","$message","success","info","warning","onOk","closed","ok","Dialog","cancelType","onCancel","cancel","$alert","obj","Alert","$confirm","Confirm","addNotification","Notification","$notification","Row","Col","Countdown","FooterBar","Menu","MenuItem","MenuGroup","SubMenu","Text","Drawer","Guide","Breadcrumb","BreadcrumbItem","InputNumber","Textarea","Radio","RadioGroup","CheckboxGroup","ColorPicker","Slider","Statistic","Switch","Steps","Step","OptionGroup","Pagination","DatePicker","TimePicker","ImagePicker","Article","Analysis","AnalysisField","SplitButton","BackTop","Avatar","Badge","Card","CardHeader","CardMedia","CardBody","CardFooter","Cascader","PageHeader","Layout","LayoutHeader","LayoutContent","LayoutFooter","LayoutSider","Carousel","Collapse","CollapseItem","Link","List","ListItem","Result","Exception","Divider","Circle","Progress","Popconfirm","Tree","Rate","Tabs","TabPanel","Dropdown","DropdownItem","DropdownMenu","Description","DescriptionItem","Timeline","TimelineItem","Form","FormItem","Table"],"mappings":"+mCA4FaA,EAAkB,CALP,OACC,SASZC,EAAmB,CAvCH,OAHG,UACA,UACF,SA+CjBC,EAAiB,CAlDE,UAIH,OAHG,UACA,UACF,SAuDjBC,EAAiB,CA9FL,QACE,UACF,SAkGZC,EAAsB,CA7EZ,MACM,YACF,UACD,SACM,eACF,aACN,OACM,aACF,WACH,QACM,cACF,aAiFhBC,EAAiB,CA9HJ,SAIA,SALD,SAqIZC,EAASC,OACTC,EAAWC,SACXC,EAAOF,EAASG,KC1IvBC,EAAUJ,EAASK,cAAc,OAEjCC,EAAU,CAAC,SAAU,MAAO,IAAK,MAEvC,SAASC,EAAQC,GAUf,IARA,IAAMC,EAAYD,EAASE,OAAO,GAAGC,cACrBH,EAASI,MAAM,GAEzBC,GAAQL,EACF,IACAF,EAAQQ,KAAKL,EAAY,KACzBA,GAAWM,MAAM,KAEpBC,EAAI,EAAGC,EAAMJ,EAAKK,OAAQF,EAAIC,EAAKD,IAC1C,GAAIH,EAAKG,KAAMZ,EAAQe,MACrB,OAAON,EAAKG,GAMX,IAAMI,EAActB,EAAOuB,OAAOC,WAEnCC,EAAg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