@zjpcy/simple-design 1.6.0 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -26
- package/dist/cjs/components/Anchor/index.js +1 -0
- package/dist/cjs/components/Breadcrumb/index.js +1 -0
- package/dist/cjs/components/Button/Button.js +1 -0
- package/dist/cjs/components/Calendar/index.js +1 -0
- package/dist/cjs/components/Carousel/index.js +1 -0
- package/dist/cjs/components/Cascader/index.js +1 -0
- package/dist/cjs/components/Checkbox/index.js +1 -0
- package/dist/cjs/components/ColorPicker/ColorPickerPanel.js +1 -0
- package/dist/cjs/components/ColorPicker/index.js +1 -0
- package/dist/cjs/components/CopyToClipboard/index.js +1 -0
- package/dist/cjs/components/DatePicker/RangePicker.js +1 -0
- package/dist/cjs/components/DatePicker/index.js +1 -0
- package/dist/cjs/components/DatePicker/styles.js +1 -0
- package/dist/cjs/components/Divider/index.js +1 -0
- package/dist/cjs/components/Drawer/index.js +1 -0
- package/dist/cjs/components/Dropdown/index.js +1 -0
- package/dist/cjs/components/Empty/index.js +1 -0
- package/dist/cjs/components/Flex/index.js +1 -0
- package/dist/cjs/components/Form/index.js +1 -0
- package/dist/cjs/components/Form/styles.js +1 -0
- package/dist/cjs/components/Grid/index.js +1 -0
- package/dist/cjs/components/Grid/styles.js +1 -0
- package/dist/cjs/components/Hooks/useClickOutside.js +1 -0
- package/dist/cjs/components/Hooks/useCopy.js +1 -0
- package/dist/cjs/components/Icon/Icon.js +1 -0
- package/dist/cjs/components/Icon/index.js +1 -0
- package/dist/cjs/components/Icon/path.js +1 -0
- package/dist/cjs/components/Input/InputBase.js +1 -0
- package/dist/cjs/components/Input/Number.js +1 -0
- package/dist/cjs/components/Input/Password.js +1 -0
- package/dist/cjs/components/Input/Search.js +1 -0
- package/dist/cjs/components/Input/Textarea.js +1 -0
- package/dist/cjs/components/Input/index.js +1 -0
- package/dist/cjs/components/Label/index.js +1 -0
- package/dist/cjs/components/Label/styles.js +1 -0
- package/dist/cjs/components/Layout/LayoutContext.js +1 -0
- package/dist/cjs/components/Layout/index.js +1 -0
- package/dist/cjs/components/Layout/styles.js +1 -0
- package/dist/cjs/components/Marquee/index.js +1 -0
- package/dist/cjs/components/Masonry/index.js +1 -0
- package/dist/cjs/components/Menu/index.js +1 -0
- package/dist/cjs/components/Message/Message.js +1 -0
- package/dist/cjs/components/Message/index.js +1 -0
- package/dist/cjs/components/Modal/index.js +1 -0
- package/dist/cjs/components/Notification/Notification.js +1 -0
- package/dist/cjs/components/Pagination/index.js +1 -0
- package/dist/cjs/components/Popconfirm/index.js +1 -0
- package/dist/cjs/components/Progress/index.js +1 -0
- package/dist/cjs/components/Radio/index.js +1 -0
- package/dist/cjs/components/Rate/index.js +1 -0
- package/dist/cjs/components/Select/index.js +1 -0
- package/dist/cjs/components/Select/styles.js +1 -0
- package/dist/cjs/components/Slider/index.js +1 -0
- package/dist/cjs/components/Space/index.js +1 -0
- package/dist/cjs/components/Spin/index.js +1 -0
- package/dist/cjs/components/Splitter/index.js +1 -0
- package/dist/cjs/components/Splitter/styles.js +1 -0
- package/dist/cjs/components/Steps/index.js +1 -0
- package/dist/cjs/components/Switch/index.js +1 -0
- package/dist/cjs/components/Switch/styles.js +1 -0
- package/dist/cjs/components/Table/SortableRow.js +1 -0
- package/dist/cjs/components/Table/index.js +1 -0
- package/dist/cjs/components/Tabs/index.js +1 -0
- package/dist/cjs/components/Tag/index.js +1 -0
- package/dist/cjs/components/TimePicker/RangePicker.js +1 -0
- package/dist/cjs/components/TimePicker/TimePickerPanel.js +1 -0
- package/dist/cjs/components/TimePicker/index.js +1 -0
- package/dist/cjs/components/Tooltip/Tooltip.js +1 -0
- package/dist/cjs/components/Top/index.js +1 -0
- package/dist/cjs/components/Transfer/index.js +1 -0
- package/dist/cjs/components/Transfer/styles.js +1 -0
- package/dist/cjs/components/Tree/index.js +1 -0
- package/dist/cjs/components/TreeSelect/index.js +1 -0
- package/dist/cjs/components/TreeSelect/styles.js +1 -0
- package/dist/cjs/components/Typography/index.js +1 -0
- package/dist/cjs/components/Upload/index.js +1 -0
- package/dist/cjs/components/Upload/useChunkUpload.js +1 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/i18n/I18nProvider.js +1 -0
- package/dist/cjs/i18n/index.js +1 -0
- package/dist/cjs/i18n/locales/en-US.json.js +1 -0
- package/dist/cjs/i18n/locales/zh-CN.json.js +1 -0
- package/dist/cjs/index.css +11725 -6076
- package/dist/es/components/Anchor/index.js +1 -0
- package/dist/es/components/Button/Button.js +1 -0
- package/dist/es/components/Calendar/index.js +1 -0
- package/dist/es/components/Carousel/index.js +1 -0
- package/dist/es/components/Cascader/index.js +1 -0
- package/dist/es/components/Checkbox/index.js +1 -0
- package/dist/es/components/ColorPicker/ColorPickerPanel.js +1 -0
- package/dist/es/components/ColorPicker/index.js +1 -0
- package/dist/es/components/CopyToClipboard/index.js +1 -0
- package/dist/es/components/DatePicker/RangePicker.js +1 -0
- package/dist/es/components/DatePicker/index.js +1 -0
- package/dist/es/components/DatePicker/styles.js +1 -0
- package/dist/es/components/Divider/index.js +1 -0
- package/dist/es/components/Drawer/index.js +1 -0
- package/dist/es/components/Flex/index.js +1 -0
- package/dist/es/components/Form/index.js +1 -0
- package/dist/es/components/Form/styles.js +1 -0
- package/dist/es/components/Grid/index.js +1 -0
- package/dist/es/components/Grid/styles.js +1 -0
- package/dist/es/components/Hooks/useCopy.js +1 -0
- package/dist/es/components/Icon/Icon.js +1 -0
- package/dist/es/components/Input/InputBase.js +1 -0
- package/dist/es/components/Input/Number.js +1 -0
- package/dist/es/components/Input/Password.js +1 -0
- package/dist/es/components/Input/Search.js +1 -0
- package/dist/es/components/Input/Textarea.js +1 -0
- package/dist/es/components/Label/index.js +1 -0
- package/dist/es/components/Label/styles.js +1 -0
- package/dist/es/components/Layout/index.js +1 -0
- package/dist/es/components/Layout/styles.js +1 -0
- package/dist/es/components/Marquee/index.js +1 -0
- package/dist/es/components/Masonry/index.js +1 -0
- package/dist/es/components/Menu/index.js +1 -0
- package/dist/es/components/Message/index.js +1 -0
- package/dist/es/components/Modal/index.js +1 -0
- package/dist/es/components/Notification/Notification.js +1 -0
- package/dist/es/components/Popconfirm/index.js +1 -0
- package/dist/es/components/Progress/index.js +1 -0
- package/dist/es/components/Radio/index.js +1 -0
- package/dist/es/components/Select/index.js +1 -0
- package/dist/es/components/Select/styles.js +1 -0
- package/dist/es/components/Slider/index.js +1 -0
- package/dist/es/components/Space/index.js +1 -0
- package/dist/es/components/Splitter/index.js +1 -0
- package/dist/es/components/Splitter/styles.js +1 -0
- package/dist/es/components/Switch/index.js +1 -0
- package/dist/es/components/Switch/styles.js +1 -0
- package/dist/es/components/Table/SortableRow.js +1 -0
- package/dist/es/components/Table/index.js +1 -0
- package/dist/es/components/Tabs/index.js +1 -0
- package/dist/es/components/Tag/index.js +1 -0
- package/dist/es/components/TimePicker/RangePicker.js +1 -0
- package/dist/es/components/TimePicker/TimePickerPanel.js +1 -0
- package/dist/es/components/TimePicker/index.js +1 -0
- package/dist/es/components/Tooltip/Tooltip.js +1 -0
- package/dist/es/components/Top/index.js +1 -0
- package/dist/es/components/Transfer/index.js +1 -0
- package/dist/es/components/Transfer/styles.js +1 -0
- package/dist/es/components/Tree/index.js +1 -0
- package/dist/es/components/TreeSelect/index.js +1 -0
- package/dist/es/components/TreeSelect/styles.js +1 -0
- package/dist/es/components/Typography/index.js +1 -0
- package/dist/es/components/Upload/index.js +1 -0
- package/dist/es/components/Upload/useChunkUpload.js +1 -0
- package/dist/es/components/index.js +1 -0
- package/dist/es/i18n/I18nProvider.js +1 -0
- package/dist/es/i18n/index.js +1 -0
- package/dist/es/i18n/locales/en-US.json.js +1 -0
- package/dist/es/i18n/locales/zh-CN.json.js +1 -0
- package/dist/es/index.css +11725 -6076
- package/dist/i18n/locales/en-US.json +2 -3
- package/dist/i18n/locales/zh-CN.json +1 -1
- package/dist/types/components/ColorPicker/ColorPickerPanel.d.ts +21 -0
- package/dist/types/components/DatePicker/styles.d.ts +118 -152
- package/dist/types/components/Form/styles.d.ts +84 -22
- package/dist/types/components/Grid/styles.d.ts +36 -6
- package/dist/types/components/Label/styles.d.ts +16 -1
- package/dist/types/components/Label/types.d.ts +1 -0
- package/dist/types/components/Layout/styles.d.ts +131 -41
- package/dist/types/components/Marquee/index.d.ts +1 -1
- package/dist/types/components/Message/index.d.ts +1 -1
- package/dist/types/components/Select/styles.d.ts +254 -44
- package/dist/types/components/Splitter/styles.d.ts +39 -2
- package/dist/types/components/Splitter/types.d.ts +12 -12
- package/dist/types/components/Switch/index.d.ts +1 -0
- package/dist/types/components/Switch/styles.d.ts +116 -35
- package/dist/types/components/Switch/types.d.ts +4 -0
- package/dist/types/components/TimePicker/styles.d.ts +153 -25
- package/dist/types/components/Top/index.d.ts +1 -1
- package/dist/types/components/Transfer/styles.d.ts +205 -66
- package/dist/types/components/TreeSelect/index.d.ts +1 -0
- package/dist/types/components/TreeSelect/styles.d.ts +295 -55
- package/dist/types/components/TreeSelect/types.d.ts +3 -1
- package/dist/types/components/Upload/index.d.ts +2 -2
- package/dist/types/components/Upload/styles.d.ts +150 -24
- package/dist/types/components/Upload/types.d.ts +279 -15
- package/dist/types/components/Upload/useChunkUpload.d.ts +27 -0
- package/dist/types/components/index.d.ts +4 -3
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/utils/dnd-kit-adapter.d.ts +2 -0
- package/dist/types/utils/i18n-adapter.d.ts +5 -0
- package/dist/types/utils/lunar-adapter.d.ts +2 -0
- package/package.json +29 -13
- package/dist/cjs/index.js +0 -1
- package/dist/es/Anchor/index.js +0 -1
- package/dist/es/Button/Button.js +0 -1
- package/dist/es/Calendar/index.js +0 -1
- package/dist/es/Carousel/index.js +0 -1
- package/dist/es/Cascader/index.js +0 -1
- package/dist/es/Checkbox/index.js +0 -1
- package/dist/es/ColorPicker/index.js +0 -1
- package/dist/es/CopyToClipboard/index.js +0 -1
- package/dist/es/DatePicker/RangePicker.js +0 -1
- package/dist/es/DatePicker/index.js +0 -1
- package/dist/es/DatePicker/styles.js +0 -1
- package/dist/es/Divider/index.js +0 -1
- package/dist/es/Drawer/index.js +0 -1
- package/dist/es/Flex/index.js +0 -1
- package/dist/es/Form/index.js +0 -1
- package/dist/es/Form/styles.js +0 -1
- package/dist/es/Grid/index.js +0 -1
- package/dist/es/Grid/styles.js +0 -1
- package/dist/es/Hooks/useCopy.js +0 -1
- package/dist/es/Icon/Icon.js +0 -1
- package/dist/es/Input/InputBase.js +0 -1
- package/dist/es/Input/Number.js +0 -1
- package/dist/es/Input/Password.js +0 -1
- package/dist/es/Input/Search.js +0 -1
- package/dist/es/Input/Textarea.js +0 -1
- package/dist/es/Label/index.js +0 -1
- package/dist/es/Label/styles.js +0 -1
- package/dist/es/Layout/index.js +0 -1
- package/dist/es/Layout/styles.js +0 -1
- package/dist/es/Marquee/index.js +0 -1
- package/dist/es/Masonry/index.js +0 -1
- package/dist/es/Menu/index.js +0 -1
- package/dist/es/Message/index.js +0 -1
- package/dist/es/Modal/index.js +0 -1
- package/dist/es/Notice/Notice.js +0 -1
- package/dist/es/Notification/Notification.js +0 -1
- package/dist/es/Popconfirm/index.js +0 -1
- package/dist/es/Progress/index.js +0 -1
- package/dist/es/Radio/index.js +0 -1
- package/dist/es/Select/index.js +0 -1
- package/dist/es/Select/styles.js +0 -1
- package/dist/es/Slider/index.js +0 -1
- package/dist/es/Space/index.js +0 -1
- package/dist/es/Splitter/index.js +0 -1
- package/dist/es/Splitter/styles.js +0 -1
- package/dist/es/Switch/index.js +0 -1
- package/dist/es/Switch/styles.js +0 -1
- package/dist/es/Table/SortableRow.js +0 -1
- package/dist/es/Table/index.js +0 -1
- package/dist/es/Tabs/index.js +0 -1
- package/dist/es/Tag/index.js +0 -1
- package/dist/es/TimePicker/RangePicker.js +0 -1
- package/dist/es/TimePicker/TimePickerPanel.js +0 -1
- package/dist/es/TimePicker/index.js +0 -1
- package/dist/es/Tooltip/Tooltip.js +0 -1
- package/dist/es/Top/index.js +0 -1
- package/dist/es/Transfer/index.js +0 -1
- package/dist/es/Transfer/styles.js +0 -1
- package/dist/es/Tree/index.js +0 -1
- package/dist/es/TreeSelect/index.js +0 -1
- package/dist/es/TreeSelect/styles.js +0 -1
- package/dist/es/Typography/index.js +0 -1
- package/dist/es/Upload/index.js +0 -1
- package/dist/es/_virtual/index.js +0 -1
- package/dist/es/_virtual/index2.js +0 -1
- package/dist/es/_virtual/use-sync-external-store-shim.development.js +0 -1
- package/dist/es/_virtual/use-sync-external-store-shim.production.js +0 -1
- package/dist/es/index.js +0 -1
- package/dist/es/node_modules/i18next/dist/esm/i18next.js +0 -1
- package/dist/es/node_modules/react-fast-marquee/dist/index.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/context.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/defaults.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/i18nInstance.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/initReactI18next.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/unescape.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/useTranslation.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/utils.js +0 -1
- package/dist/es/node_modules/react-icons/fa/index.js +0 -1
- package/dist/es/node_modules/react-icons/io5/index.js +0 -1
- package/dist/es/node_modules/react-icons/lib/iconBase.js +0 -1
- package/dist/es/node_modules/react-icons/lib/iconContext.js +0 -1
- package/dist/es/node_modules/tslib/tslib.es6.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/shim/index.js +0 -1
- package/dist/es/src/i18n/I18nProvider.js +0 -1
- package/dist/es/src/i18n/index.js +0 -1
- package/dist/es/src/i18n/locales/en-US.json.js +0 -1
- package/dist/es/src/i18n/locales/zh-CN.json.js +0 -1
- package/dist/types/components/Drawer/styles.d.ts +0 -0
- package/dist/types/components/Menu/styles.d.ts +0 -7
- package/dist/types/components/Notice/Notice.d.ts +0 -18
- package/dist/types/components/Progress/styles.d.ts +0 -0
- /package/dist/es/{Breadcrumb → components/Breadcrumb}/index.js +0 -0
- /package/dist/es/{Dropdown → components/Dropdown}/index.js +0 -0
- /package/dist/es/{Empty → components/Empty}/index.js +0 -0
- /package/dist/es/{Hooks → components/Hooks}/useClickOutside.js +0 -0
- /package/dist/es/{Icon → components/Icon}/index.js +0 -0
- /package/dist/es/{Icon → components/Icon}/path.js +0 -0
- /package/dist/es/{Input → components/Input}/index.js +0 -0
- /package/dist/es/{Layout → components/Layout}/LayoutContext.js +0 -0
- /package/dist/es/{Message → components/Message}/Message.js +0 -0
- /package/dist/es/{Pagination → components/Pagination}/index.js +0 -0
- /package/dist/es/{Rate → components/Rate}/index.js +0 -0
- /package/dist/es/{Spin → components/Spin}/index.js +0 -0
- /package/dist/es/{Steps → components/Steps}/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e}from"tslib";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as t,useContext as n,useRef as r,useState as o,useEffect as d,useCallback as l}from"react";import c from"classnames";var u=t(void 0),s=function(t){var l,s=t.value,p=t.checked,v=t.defaultChecked,m=void 0!==v&&v,f=t.onChange,h=t.disabled,y=void 0!==h&&h,g=t.size,b=t.children,z=t.className,j=t.style,N=t.label,w=t.labelGap,R=void 0===w?8:w,C=t.labelClassName,_=void 0===C?"":C,k=t.labelStyle,x=n(u),I=!!x,G=r(null),A=o(m),F=A[0],q=A[1],B=I?x.value===s:void 0!==p?p:F,E=g||(I?x.size:void 0),L="button"===(I?x.type:void 0);d(function(){if(I&&x.registerRadio)return x.registerRadio(s,G.current),function(){var e;null===(e=x.unregisterRadio)||void 0===e||e.call(x,s)}},[I,s,x]),d(function(){B&&I&&x.updateIndicator&&requestAnimationFrame(function(){var e;null===(e=x.updateIndicator)||void 0===e||e.call(x)})},[B,I]),d(function(){I||void 0===p||q(p)},[p,I]);var X=c("zjpcy-radio",((l={"zjpcy-radio--checked":B,"zjpcy-radio--unchecked":!B,"zjpcy-radio--disabled":y||I&&x.disabled,"zjpcy-radio--disabled-checked":B&&(y||I&&x.disabled)})["zjpcy-radio--".concat(E)]=E,l["zjpcy-radio--button"]=L,l),z);return i("label",{ref:G,className:X,style:j,children:a("div",{className:"zjpcy-radio-wrapper",style:{display:"flex",alignItems:"center"},children:[N&&i("div",{className:"zjpcy-radio-label ".concat(_),style:e({marginRight:"number"==typeof R?"".concat(R,"px"):R},k),children:N}),a("div",{style:{display:"flex",alignItems:"center",gap:4},children:[i("input",{type:"radio",className:"zjpcy-radio__input",checked:B,onChange:function(e){var i,a=e.target.checked;y||I&&x.disabled||(I?null===(i=x.onChange)||void 0===i||i.call(x,s):(q(a),null==f||f(a,s)))},disabled:y||I&&x.disabled,value:s}),!L&&i("span",{className:"zjpcy-radio__inner"}),b&&i("span",{className:"zjpcy-radio__label",children:b})]})]})})};s.Group=function(e){var t,n=e.value,s=e.defaultValue,p=e.onChange,v=e.disabled,m=void 0!==v&&v,f=e.type,h=void 0===f?"radio":f,y=e.size,g=void 0===y?"middle":y,b=e.children,z=e.className,j=e.style,N=o(s),w=N[0],R=N[1],C=r(null),_=r(new Map),k=o({width:0,height:0,transform:"translateX(0px)"}),x=k[0],I=k[1],G=void 0!==n?n:w,A=l(function(e,i){i&&_.current.set(e,i)},[]),F=l(function(e){_.current.delete(e)},[]),q=l(function(){if("button"===h&&C.current){var e=_.current.get(G);if(e){var i=C.current.getBoundingClientRect(),a=e.getBoundingClientRect(),t=a.left-i.left;I({width:a.width,height:a.height,transform:"translateX(".concat(t,"px)")})}}},[G,h]);d(function(){if("button"===h){var e=requestAnimationFrame(function(){q()});return function(){return cancelAnimationFrame(e)}}},[h,q]),d(function(){if("button"===h){var e=function(){q()};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}},[h,q]),d(function(){void 0!==n&&R(n)},[n]);var B=c("zjpcy-radio-group",((t={"zjpcy-radio-group--button":"button"===h})["zjpcy-radio-group--".concat(g)]=g,t["zjpcy-radio-group--button-large"]="button"===h&&"large"===g,t["zjpcy-radio-group--button-middle"]="button"===h&&"middle"===g,t["zjpcy-radio-group--button-small"]="button"===h&&"small"===g,t),z);return i(u.Provider,{value:{value:G,onChange:function(e){R(e),null==p||p(e)},disabled:m,type:h,size:g,registerRadio:A,unregisterRadio:F,updateIndicator:q},children:a("div",{ref:C,className:B,style:j,children:["button"===h&&i("div",{className:"zjpcy-radio-group__indicator",style:{width:x.width,height:x.height,transform:x.transform}}),b]})})},s.displayName="Radio",s.Group.displayName="Radio.Group";var p=s;export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__spreadArray as e}from"tslib";import{jsx as l,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as r,useRef as i,useMemo as a,useCallback as o,useEffect as s}from"react";import{getWrapperClassName as u,getWrapperStyle as c,getLabelWrapperClassName as d,getLabelWrapperStyle as v,getLabelClassName as f,getLabelStyle as p,getSelectorClassName as m,getSelectorStyle as h,getSelectorContentClassName as y,getSelectorContentStyle as b,getSuffixAreaClassName as g,getSuffixAreaStyle as N,getClearButtonClassName as w,getClearButtonStyle as C,getLoadingIconClassName as x,getLoadingIconStyle as A,getArrowClassName as k,getArrowStyle as S,getSearchInputClassName as L,getSearchInputStyle as M,getTagsContainerClassName as D,getTagsContainerStyle as E,getPlaceholderClassName as z,getPlaceholderStyle as B,getSingleValueClassName as P,getSingleValueStyle as H,getDropdownClassName as j,getDropdownStyle as G,getOptionListClassName as R,getOptionListStyle as T,getEmptyClassName as V,getEmptyStyle as I,getTagClassName as K,getTagStyle as O,getTagCloseClassName as U,getTagCloseStyle as Z,getCheckIconClassName as q,getCheckIconStyle as F,getOptionClassName as J,getOptionStyle as Q}from"./styles.js";var W=function(W){var X=W.value,Y=W.defaultValue,$=W.options,_=void 0===$?[]:$,ee=W.disabled,le=void 0!==ee&&ee,ne=W.loading,te=void 0!==ne&&ne,re=W.mode,ie=void 0===re?"single":re,ae=W.placeholder,oe=void 0===ae?"请选择":ae,se=W.searchable,ue=void 0!==se&&se,ce=W.clearable,de=void 0!==ce&&ce,ve=W.size,fe=void 0===ve?"default":ve,pe=W.width,me=W.styles,he=W.onChange,ye=W.onOpenChange,be=W.onSearch,ge=W.optionRender,Ne=W.tagRender,we=W.label,Ce=W.labelGap,xe=void 0===Ce?8:Ce,Ae=W.labelClassName,ke=void 0===Ae?"":Ae,Se=W.labelStyle,Le=W.className,Me=void 0===Le?"":Le,De=W.style,Ee=W.showArrow,ze=void 0===Ee||Ee,Be=W.maxHeight,Pe=void 0===Be?256:Be,He=W.emptyContent,je=void 0===He?"暂无数据":He,Ge=W.getPopupContainer,Re=void 0!==X,Te=r(void 0!==Y?Y:"multiple"===ie?[]:""),Ve=Te[0],Ie=Te[1],Ke=r(!1),Oe=Ke[0],Ue=Ke[1],Ze=r(""),qe=Ze[0],Fe=Ze[1],Je=r(-1),Qe=Je[0],We=Je[1],Xe=r(!1),Ye=Xe[0],$e=Xe[1],_e=i(null),el=i(null),ll=i(null),nl=Re?X:Ve,tl="multiple"===ie,rl=a(function(){return qe?_.filter(function(e){return String(e.label).toLowerCase().includes(qe.toLowerCase())}):_},[_,qe]),il=a(function(){if(tl){var e=Array.isArray(nl)?nl:[];return _.filter(function(l){return e.includes(l.value)})}return _.find(function(e){return e.value===nl})||null},[nl,_,tl]),al=o(function(e,l){Re||Ie(e),null==he||he(e,l)},[Re,he]),ol=o(function(e){e.disabled||(al(e.value,e),Fe(""),Ue(!1))},[al]),sl=o(function(l){if(!l.disabled){var n,t,r=Array.isArray(nl)?nl:[];r.includes(l.value)?(n=r.filter(function(e){return e!==l.value}),t=il.filter(function(e){return e.value!==l.value})):(n=e(e([],r,!0),[l.value],!1),t=e(e([],il,!0),[l],!1)),al(n,t),Fe(""),setTimeout(function(){var e;return null===(e=ll.current)||void 0===e?void 0:e.focus()},0)}},[nl,al,il]),ul=o(function(e){tl?sl(e):ol(e)},[tl,sl,ol]),cl=o(function(e,l){if(e.stopPropagation(),!le){var n=(Array.isArray(nl)?nl:[]).filter(function(e){return e!==l}),t=il.filter(function(e){return e.value!==l});al(n,t)}},[nl,le,al,il]),dl=o(function(e){(e.stopPropagation(),le)||(al(tl?[]:"",tl?[]:void 0),Fe(""))},[le,tl,al]),vl=o(function(e){var l=e.target.value;Fe(l),null==be||be(l)},[be]);s(function(){var e=function(e){_e.current&&!_e.current.contains(e.target)&&(Ue(!1),Fe(""))};return Oe&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[Oe]),s(function(){null==ye||ye(Oe),Oe&&ue&&setTimeout(function(){var e;return null===(e=ll.current)||void 0===e?void 0:e.focus()},0)},[Oe,ue,ye]);var fl,pl=o(function(e){if(Oe)switch(e.key){case"Escape":e.preventDefault(),Ue(!1);break;case"ArrowDown":e.preventDefault(),We(function(e){return e<rl.length-1?e+1:0});break;case"ArrowUp":e.preventDefault(),We(function(e){return e>0?e-1:rl.length-1});break;case"Enter":e.preventDefault(),Qe>=0&&Qe<rl.length&&ul(rl[Qe])}else"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ue(!0))},[Oe,Qe,rl,ul]),ml=function(e){return Ne?Ne({value:e.value,label:e.label,onClose:function(l){return cl(l,e.value)},disabled:le}):n("span",{className:K({disabled:le}),style:O({customStyles:null==me?void 0:me.tag}),children:[l("span",{children:e.label}),!le&&l("span",{className:U({}),style:Z({}),onClick:function(l){return cl(l,e.value)},children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})})]},e.value)},hl=function(e,r){var i=tl?nl.includes(e.value):nl===e.value,a=r===Qe,o=ge?ge(e):n(t,{children:[i&&tl&&l("div",{className:q({}),style:F({}),children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})})}),l("span",{children:e.label})]});return l("div",{className:J({selected:i,active:a,disabled:!!e.disabled}),style:Q({customStyles:null==me?void 0:me.option}),onClick:function(){return ul(e)},onMouseEnter:function(){return We(r)},children:o},e.value)},yl=tl?Array.isArray(nl)&&nl.length>0:""!==nl&&null!=nl,bl=de&&!le&&yl&&!te&&Ye,gl=ze&&!te&&!bl;return l("div",{ref:_e,className:u({className:Me}),style:c({width:pe,style:De,customStyles:null==me?void 0:me.wrapper}),children:n("div",{className:d({}),style:v({}),children:[we&&l("div",{className:f({labelClassName:ke}),style:p({labelGap:xe,labelStyle:Se}),children:we}),n("div",{style:{flex:1,position:"relative"},children:[n("div",{className:m({size:fe,open:Oe,disabled:le}),style:h({customStyles:null==me?void 0:me.selector}),onClick:function(){return!le&&!te&&Ue(!Oe)},onKeyDown:pl,onMouseEnter:function(){return $e(!0)},onMouseLeave:function(){return $e(!1)},tabIndex:le?-1:0,role:"combobox","aria-expanded":Oe,"aria-haspopup":"listbox",children:[l("div",{className:y({}),style:b({}),children:function(){if(ue&&Oe){var e=tl?"搜索...":String((null==il?void 0:il.label)||oe);return l("input",{ref:ll,type:"text",className:L({}),style:M({}),value:qe,onChange:vl,placeholder:e,onClick:function(e){return e.stopPropagation()}})}if(tl){var n=il;return n.length>0?l("div",{className:D({}),style:E({}),children:n.map(ml)}):l("span",{className:z({}),style:B({}),children:oe})}var t=il;return l("span",t?{className:P({}),style:H({}),children:t.label}:{className:z({}),style:B({}),children:oe})}()}),n("div",{className:g({}),style:N({}),children:[bl&&l("div",{className:w({}),style:C({}),onClick:dl,children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})}),te&&l("div",{className:x({}),style:A({}),children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),gl&&l("div",{className:k({open:Oe}),style:S({}),children:l("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:l("path",{d:"M7 10l5 5 5-5z"})})})]})]}),(fl=l("div",{ref:el,className:j({open:Oe}),style:G({customStyles:null==me?void 0:me.dropdown}),children:l("div",{className:R({}),style:T({maxHeight:Pe}),children:rl.length>0?rl.map(hl):l("div",{className:V({}),style:I({}),children:je})})}),Ge?Ge()?fl:null:fl)]})]})})};export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import t from"classnames";var n=function(e){var n=e.className;return t("select-wrapper",n)},r=function(t){var n=t.width,r=t.style,a=t.customStyles,c=void 0!==n?{width:"number"==typeof n?"".concat(n,"px"):n}:{};return e(e(e({},c),r),a)},a=function(e){var n=e.className;return t("select-label-wrapper",n)},c=function(t){var n=t.style;return e({},n)},s=function(e){var n=e.labelClassName;return t("select-label",n)},l=function(t){var n=t.labelGap,r=t.labelStyle,a=void 0!==n?{marginRight:"number"==typeof n?"".concat(n,"px"):n}:{};return e(e({},a),r)},o=function(e){var n=e.size,r=void 0===n?"default":n,a=e.open,c=e.disabled,s=e.className;return t("select-selector","select-selector-".concat(r),{"select-selector-open":a,"select-selector-disabled":c},s)},u=function(t){var n=t.customStyles;return e({},n)},i=function(e){var n=e.className;return t("select-selector-content",n)},v=function(t){var n=t.style;return e({},n)},f=function(e){var n=e.className;return t("select-placeholder",n)},m=function(t){var n=t.style;return e({},n)},p=function(e){var n=e.className;return t("select-single-value",n)},d=function(t){var n=t.style;return e({},n)},y=function(e){var n=e.className;return t("select-tags-container",n)},N=function(t){var n=t.style;return e({},n)},b=function(e){var n=e.disabled,r=e.className;return t("select-tag",{"select-tag-disabled":n},r)},g=function(t){var n=t.customStyles;return e({},n)},h=function(e){var n=e.className;return t("select-tag-close",n)},w=function(t){var n=t.style;return e({},n)},x=function(e){var n=e.className;return t("select-search-input",n)},S=function(t){var n=t.style;return e({},n)},H=function(e){var n=e.className;return t("select-suffix-area",n)},k=function(t){var n=t.style;return e({},n)},z=function(e){var n=e.className;return t("select-clear",n)},C=function(t){var n=t.style;return e({},n)},G=function(e){var n=e.open,r=e.className;return t("select-arrow",{"select-arrow-open":n},r)},R=function(t){var n=t.style;return e({},n)},j=function(e){var n=e.className;return t("select-loading",n)},q=function(t){var n=t.style;return e({},n)},A=function(e){var n=e.open,r=e.className;return t("select-dropdown",{"select-dropdown-open":n},r)},B=function(t){var n=t.customStyles;return e({},n)},D=function(e){var n=e.className;return t("select-option-list",n)},E=function(t){var n=t.maxHeight,r=t.style,a=void 0!==n?{maxHeight:"".concat(n,"px")}:{};return e(e({},a),r)},F=function(e){var n=e.selected,r=e.active,a=e.disabled,c=e.className;return t("select-option",{"select-option-selected":n,"select-option-active":r,"select-option-disabled":a},c)},I=function(t){var n=t.customStyles;return e({},n)},J=function(e){var n=e.className;return t("select-check-icon",n)},K=function(t){var n=t.style;return e({},n)},L=function(e){var n=e.className;return t("select-empty",n)},M=function(t){var n=t.style;return e({},n)};export{G as getArrowClassName,R as getArrowStyle,J as getCheckIconClassName,K as getCheckIconStyle,z as getClearButtonClassName,C as getClearButtonStyle,A as getDropdownClassName,B as getDropdownStyle,L as getEmptyClassName,M as getEmptyStyle,s as getLabelClassName,l as getLabelStyle,a as getLabelWrapperClassName,c as getLabelWrapperStyle,j as getLoadingIconClassName,q as getLoadingIconStyle,F as getOptionClassName,D as getOptionListClassName,E as getOptionListStyle,I as getOptionStyle,f as getPlaceholderClassName,m as getPlaceholderStyle,x as getSearchInputClassName,S as getSearchInputStyle,o as getSelectorClassName,i as getSelectorContentClassName,v as getSelectorContentStyle,u as getSelectorStyle,p as getSingleValueClassName,d as getSingleValueStyle,H as getSuffixAreaClassName,k as getSuffixAreaStyle,b as getTagClassName,h as getTagCloseClassName,w as getTagCloseStyle,g as getTagStyle,y as getTagsContainerClassName,N as getTagsContainerStyle,n as getWrapperClassName,r as getWrapperStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e}from"tslib";import{jsxs as r,jsx as n}from"react/jsx-runtime";import{useState as a,useRef as t,useEffect as o,useCallback as l,useMemo as i}from"react";var c=function(c){var d,u=c.min,s=void 0===u?0:u,m=c.max,v=void 0===m?100:m,h=c.step,f=void 0===h?1:h,k=c.value,C=c.defaultValue,p=void 0===C?0:C,b=c.disabled,g=void 0!==b&&b,M=c.marks,w=void 0===M?{}:M,y=c.showValue,x=void 0!==y&&y,L=c.trackColor,N=void 0===L?"#1890ff":L,A=c.handleColor,E=void 0===A?"#1890ff":A,D=c.gradient,j=c.onChange,z=c.onAfterChange,F=c.className,X=void 0===F?"":F,P=c.style,R=a(p),U=R[0],V=R[1],q=a(!1),B=q[0],H=q[1],I=t(null),K=t(null),O=t(void 0!==k?k:p),S=void 0!==k,T=S?k:U;o(function(){O.current=T},[T]);var G=l(function(e){var r=(e-s)/(v-s);return Math.max(0,Math.min(1,r))},[s,v]),J=l(function(e){var r=Math.max(0,Math.min(1,e)),n=s+r*(v-s);if(f>0){var a=Math.round(n/f)*f;return Math.min(v,Math.max(s,a))}return Math.min(v,Math.max(s,n))},[s,v,f]),Q=function(e){return"touches"in e?e.touches[0].clientX:e.clientX},W=l(function(e){I.current&&!g&&(K.current&&cancelAnimationFrame(K.current),K.current=requestAnimationFrame(function(){var r=I.current.getBoundingClientRect(),n=(e-r.left)/r.width,a=J(n);a!==O.current&&(O.current=a,S||V(a),null==j||j(a))}))},[g,S,J,j]),Y=function(e){if(!g){e.preventDefault(),H(!0);var r=Q(e);W(r)}};o(function(){if(B){var e=function(e){e.preventDefault();var r=Q(e);W(r)},r=function(){H(!1),K.current&&(cancelAnimationFrame(K.current),K.current=null),null==z||z(O.current)};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",r),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",r),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",r),K.current&&(cancelAnimationFrame(K.current),K.current=null)}}},[B,W,z]);var Z=G(T),$=i(function(){return Object.entries(w).map(function(e){var r=e[0],n=e[1],a=Number(r),t="string"==typeof n?{trackColor:void 0,handleColor:void 0,mark:n}:n;return{value:a,label:t.mark,trackColor:t.trackColor,handleColor:t.handleColor,position:G(a)}}).sort(function(e,r){return e.value-r.value})},[w,G]),_=i(function(){for(var e=0;e<$.length;e++){var r=$[e];if(T<=r.value)return{trackColor:r.trackColor,handleColor:r.handleColor,mark:r.label}}var n=$[$.length-1];return n?{trackColor:n.trackColor,handleColor:n.handleColor,mark:n.label}:{trackColor:void 0,handleColor:void 0,mark:""}},[$,T]),ee=P&&P["--zjpcy-slider-track-filled-bg"],re=P&&P["--zjpcy-slider-handle-border"],ne=D&&!_.trackColor&&!ee&&"#1890ff"===N,ae=_.trackColor||ee||N,te=_.handleColor||re||E;return r("div",{className:"slider-container ".concat(g?"slider-container-disabled":""," ").concat(B?"slider-container-dragging":""," ").concat(X),style:e((d={},d["--zjpcy-slider-track-filled-bg"]=ae,d["--zjpcy-slider-handle-border"]="2px solid ".concat(te),d),P),children:[r("div",{ref:I,className:"slider-track",onClick:function(e){g||(e.target.classList.contains("slider-handle")||(W(e.clientX),null==z||z(T)))},role:"presentation",children:[n("div",{className:"slider-track-filled",style:e({width:"".concat(100*Z,"%")},ne&&D?{background:"linear-gradient(to right, ".concat(D.startColor,", ").concat(D.endColor,")")}:{})}),n("div",{className:"slider-handle",style:{left:"".concat(100*Z,"%")},onMouseDown:Y,onTouchStart:Y,onKeyDown:function(e){if(!g){var r=T;switch(e.key){case"ArrowLeft":case"ArrowDown":r=Math.max(s,T-f);break;case"ArrowRight":case"ArrowUp":r=Math.min(v,T+f);break;case"Home":r=s;break;case"End":r=v;break;case"PageDown":r=Math.max(s,T-10*f);break;case"PageUp":r=Math.min(v,T+10*f);break;default:return}e.preventDefault(),void 0===k&&V(r),null==j||j(r),null==z||z(r)}},role:"slider","aria-valuemin":s,"aria-valuemax":v,"aria-valuenow":T,"aria-disabled":g,tabIndex:g?-1:0,children:n("div",{className:"slider-tooltip",children:T})})]}),$.length>0&&n("div",{className:"slider-marks",children:$.map(function(e){return n("div",{className:"slider-mark",style:{left:"".concat(100*e.position,"%"),color:e.trackColor||void 0},children:e.label},e.value)})}),x&&r("div",{className:"slider-value-display",children:["当前值:",T]})]})},d=c;export{c as Slider,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import n from"react";var t=function(t){var a=t.children,i=t.gap,c=void 0===i?12:i,l=t.align,s=void 0===l?"center":l,o=t.wrap,u=void 0===o?"nowrap":o,p=t.className,d=t.style,f=void 0===d?{}:d,m=t.inline,v=void 0!==m&&m,h=t.as,x=void 0===h?"div":h,g=n.Children.toArray(a).filter(function(e){return null!=e});return 0===g.length?null:r(x,{className:"space ".concat(v?"space-inline":""," ").concat(p||""),style:e({display:v?"inline-flex":"flex",gap:"number"==typeof c?"".concat(c,"px"):c,alignItems:function(){switch(s){case"start":return"flex-start";case"end":return"flex-end";case"center":default:return"center";case"baseline":return"baseline";case"stretch":return"stretch"}}(),flexWrap:u},f),children:g.map(function(e,n){return r("span",{className:"space-item",children:e},n)})})};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__spreadArray as e}from"tslib";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{useRef as i,useState as o,useMemo as u,useCallback as a,useEffect as c}from"react";import{parseSizeConfig as l,parseSizeConfigWithPercentage as s,calculateAllMinMaxPixels as d,parseSizeToPixels as m,getContainerStyle as v,getPanelStyle as f,getSplitterBarStyle as p,getSplitterLineStyle as h}from"./styles.js";var z=function(z){var g=z.layout,x=void 0===g?"horizontal":g,y=z.panels,S=z.defaultSize,j=void 0===S?"50%":S,b=z.minSize,E=void 0===b?50:b,L=z.maxSize,_=void 0===L?1/0:L,P=z.splitterSize,w=z.lineColor,D=z.lineHoverColor,M=z.disabled,N=void 0!==M&&M,C=z.onResize,I=z.onResizeEnd,X=z.className,Y=void 0===X?"":X,B=z.style,O=z.left,R=z.right,A=z.top,q=z.bottom,F=z.children,H=i(null),T=o([]),V=T[0],k=T[1],G=o(!1),J=G[0],K=G[1],Q=o(-1),U=Q[0],W=Q[1],Z=i({isDragging:!1,startPosition:0,startSizes:[],containerSize:0,splitterIndex:-1}),$=u(function(){if(y&&y.length>0)return y.map(function(e){return e.content});if("vertical"===x){if(A&&q)return[A,q]}else if(O&&R)return[O,R];return F&&Array.isArray(F)?F:[]},[y,x,O,R,A,q,F]),ee=$.length,te=a(function(e){return y&&y[e]?y[e]:{}},[y]),ne=a(function(){if(!H.current)return 0;var e=H.current.getBoundingClientRect();return"horizontal"===x?e.width:e.height},[x]),re=a(function(){if(void 0!==P)return P;var e=getComputedStyle(document.documentElement).getPropertyValue("--zjpcy-splitter-bar-size").trim();return parseInt(e,10)||10},[P]);c(function(){var e=ne();if(e>0&&ee>0){var t=re()*(ee-1),n=Math.max(0,e-t),r=l(j,ee,"".concat(100/ee,"%")),i=s(E,ee,50),o=s(_,ee,1/0),u=y?y.map(function(e){var t;return null!==(t=e.defaultSize)&&void 0!==t?t:r[y.indexOf(e)]}):r,a=y?y.map(function(e){var t;return null!==(t=e.minSize)&&void 0!==t?t:i[y.indexOf(e)]}):i,c=y?y.map(function(e){var t;return null!==(t=e.maxSize)&&void 0!==t?t:o[y.indexOf(e)]}):o,v=d(a,c,n),f=v.minPixels,p=v.maxPixels,h=u.map(function(e){return m(e,n)}),z=h.reduce(function(e,t){return e+t},0);if(z!==n&&n>0){var g=n/z;h=h.map(function(e){return e*g})}h=h.map(function(e,t){return Math.max(f[t],Math.min(p[t],e))}),k(h)}},[ee]),c(function(){var e=function(){var e=ne();if(e>0&&V.length>0){var t=re()*(ee-1),n=Math.max(0,e-t),r=V.reduce(function(e,t){return e+t},0);if(r>0){var i=n/r;k(function(e){return e.map(function(e){return e*i})})}}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[V,ee,ne,re]);var ie=a(function(t){return function(n){if(!N){var r=te(t),i=te(t+1);if(!r.disabled&&!i.disabled){n.preventDefault();var o="touches"in n?n.touches[0].clientX:n.clientX,u="touches"in n?n.touches[0].clientY:n.clientY,a="horizontal"===x?o:u,c=ne();Z.current={isDragging:!0,startPosition:a,startSizes:e([],V,!0),containerSize:c,splitterIndex:t},K(!0),W(t)}}}},[N,x,V,ne,te]),oe=a(function(t){if(Z.current.isDragging&&!N){var n="touches"in t?t.touches[0].clientX:t.clientX,r="touches"in t?t.touches[0].clientY:t.clientY,i=("horizontal"===x?n:r)-Z.current.startPosition,o=Z.current.splitterIndex,u=Z.current.startSizes,a=ne(),c=re()*(ee-1),l=Math.max(0,a-c),m=s(E,ee,50),v=s(_,ee,1/0),f=y?y.map(function(e,t){var n;return null!==(n=e.minSize)&&void 0!==n?n:m[t]}):m,p=y?y.map(function(e,t){var n;return null!==(n=e.maxSize)&&void 0!==n?n:v[t]}):v,h=d(f.slice(o,o+2),p.slice(o,o+2),l),z=h.minPixels,g=h.maxPixels,S=z[0],j=g[0],b=z[1],L=g[1],P=u[o],w=u[o+1],D=P+i,M=w-i;D<S?(D=S,M=P+w-S):D>j&&(D=j,M=P+w-j),M<b?(M=b,D=P+w-b):M>L&&(M=L,D=P+w-L);var I=e([],V,!0);I[o]=D,I[o+1]=M,k(I),null==C||C(I,o)}},[N,x,V,ee,E,_,y,C,ne,re]),ue=a(function(){Z.current.isDragging&&(Z.current.isDragging=!1,K(!1),W(-1),null==I||I(V))},[V,I]);if(c(function(){if(J)return document.addEventListener("mousemove",oe),document.addEventListener("mouseup",ue),document.addEventListener("touchmove",oe,{passive:!1}),document.addEventListener("touchend",ue),function(){document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",ue),document.removeEventListener("touchmove",oe),document.removeEventListener("touchend",ue)}},[J,oe,ue]),ee<2)return console.warn("Splitter requires at least 2 panels"),null;var ae=["zjpcy-splitter","zjpcy-splitter-".concat(x),J?"zjpcy-splitter-dragging":"",Y].filter(Boolean).join(" ");return t("div",{ref:H,className:ae,style:v(x,B),children:$.map(function(e,i){var o=V[i]||0,u=i===ee-1;return n(r.Fragment,{children:[t("div",{className:"zjpcy-splitter__panel",style:f(o,x,i,ee),children:e}),!u&&t("div",{className:["zjpcy-splitter__bar",U===i?"zjpcy-splitter__bar-dragging":"",N||te(i).disabled||te(i+1).disabled?"zjpcy-splitter__bar-disabled":""].filter(Boolean).join(" "),style:p(x,P,N,i),onMouseDown:ie(i),onTouchStart:ie(i),children:t("div",{className:"zjpcy-splitter__line",style:h(x,w,D,J,U===i)})})]},i)})})},g=z;export{z as Splitter,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r,__spreadArray as t}from"tslib";var i=function(t,i){return r({display:"flex",flexDirection:"horizontal"===t?"row":"column",alignItems:"stretch",width:"100%",height:"100%",overflow:"hidden",background:"var(--zjpcy-splitter-panel-bg)",borderRadius:"var(--zjpcy-splitter-panel-radius)"},i)},e=function(r,t,i,e){void 0===i&&(i=0),void 0===e&&(e=2);var n={position:"relative",overflow:"auto",flexShrink:0,alignSelf:"stretch",background:"var(--zjpcy-splitter-panel-bg)"};return"horizontal"===t?(n.width="".concat(r,"px"),n.height="auto",n.minHeight="100%"):(n.width="auto",n.minWidth="100%",n.height="".concat(r,"px")),i<e-1&&(n.boxShadow="horizontal"===t?"var(--zjpcy-splitter-panel-shadow)":"var(--zjpcy-splitter-panel-shadow-vertical)",n.zIndex=e-i),n},n=function(r,t,i,e){void 0===e&&(e=0);var n={position:"relative",flexShrink:0,background:i?"var(--zjpcy-bg-color-light)":"var(--zjpcy-splitter-bar-bg)",cursor:i?"not-allowed":"horizontal"===r?"col-resize":"row-resize",userSelect:"none",touchAction:"none",zIndex:10+5*e,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"var(--zjpcy-splitter-shadow-sm)",transition:"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)"};return void 0!==t&&("horizontal"===r?(n.width="".concat(t,"px"),n.height="100%"):(n.width="100%",n.height="".concat(t,"px"))),i&&(n.opacity="var(--zjpcy-opacity-disabled)"),n},a=function(r,t,i,e,n){void 0===n&&(n=!1);var a={borderRadius:"var(--zjpcy-border-radius-sm)",transition:"all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function)"};return"horizontal"===r?(a.width=t?"2px":"var(--zjpcy-splitter-line-width)",a.height=t?"32px":"var(--zjpcy-splitter-line-length)",a.minHeight="var(--zjpcy-splitter-line-min-length)"):(a.width=t?"32px":"var(--zjpcy-splitter-line-length)",a.minWidth="var(--zjpcy-splitter-line-min-length)",a.height=t?"2px":"var(--zjpcy-splitter-line-width)"),n&&e&&i?(a.backgroundColor=i,a.boxShadow="var(--zjpcy-splitter-shadow-active)"):e&&i?(a.backgroundColor=i,a.boxShadow="var(--zjpcy-splitter-shadow-md)"):t?a.backgroundColor=t:a.background="var(--zjpcy-splitter-line-bg)",a},o=function(r,i,e){var n;if(void 0===e&&(e="50%"),void 0===r){var a="".concat(100/i,"%");return new Array(i).fill(a)}if(Array.isArray(r)){for(var o=t([],r,!0);o.length<i;)o.push(null!==(n=o[o.length-1])&&void 0!==n?n:e);return o.slice(0,i)}return new Array(i).fill(r)},l=function(r,i,e){var n;if(void 0===e&&(e=50),void 0===r)return new Array(i).fill(e);if(Array.isArray(r)){for(var a=t([],r,!0);a.length<i;)a.push(null!==(n=a[a.length-1])&&void 0!==n?n:e);return a.slice(0,i)}return new Array(i).fill(r)},p=function(r,t){return"number"==typeof r?r:"string"==typeof r&&r.endsWith("%")?t*(parseFloat(r)/100):parseFloat(r)||t/2},s=function(r,t,i){var e,n,a="string"==typeof r&&r.endsWith("%"),o="string"==typeof t&&t.endsWith("%");if(a&&o)e=i*(parseFloat(r)/100),n=i*(parseFloat(t)/100);else if(o&&!a){n=i*(parseFloat(t)/100);var l="number"==typeof r?r:parseFloat(r);e=Math.min(l,i-n)}else if(a&&!o){e=i*(parseFloat(r)/100);var p="number"==typeof t?t:parseFloat(t);n=Math.min(p,i-e)}else e="number"==typeof r?r:parseFloat(r),n="number"==typeof t?t:parseFloat(t);return e=Math.max(0,e),n=Math.max(e,n),{minPixels:e,maxPixels:n=Math.min(n,i)}},h=function(r,t,i){for(var e=r.length,n=[],a=[],o=0;o<e;o++){var l=s(r[o],t[o],i),p=l.minPixels,h=l.maxPixels;n.push(p),a.push(h)}return{minPixels:n,maxPixels:a}};export{h as calculateAllMinMaxPixels,s as calculateMinMaxPixels,i as getContainerStyle,e as getPanelStyle,n as getSplitterBarStyle,a as getSplitterLineStyle,o as parseSizeConfig,l as parseSizeConfigWithPercentage,p as parseSizeToPixels};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as s}from"react";import{getWrapperClassName as i,getWrapperStyle as d,getLabelWrapperClassName as a,getLabelWrapperStyle as t,getLabelClassName as c,getLabelStyle as n,getTrackClassName as o,getTrackStyle as r,getLoadingIconClassName as h,getLoadingIconStyle as m,getCheckedInnerClassName as v,getCheckedInnerStyle as u,getUncheckedInnerClassName as y,getUncheckedInnerStyle as f,getThumbClassName as N,getThumbStyle as b}from"./styles.js";var p=function(p){var k=p.checked,C=p.defaultChecked,S=void 0!==C&&C,g=p.disabled,w=void 0!==g&&g,z=p.loading,x=void 0!==z&&z,j=p.size,A=void 0===j?"default":j,G=p.width,B=p.checkedChildren,H=p.unCheckedChildren,M=p.styles,V=p.onChange,Z=p.label,q=p.labelGap,D=void 0===q?8:q,E=p.labelClassName,F=void 0===E?"":E,I=p.labelStyle,J=p.className,K=p.style,L=void 0!==k,O=s(S),P=O[0],Q=O[1],R=L?k:P,T=void 0!==B||void 0!==H;return e("div",{className:i({className:J}),style:d({style:K,customStyles:null==M?void 0:M.wrapper}),children:l("div",{className:a({}),style:t({}),children:[Z&&e("div",{className:c({labelClassName:F}),style:n({labelGap:D,labelStyle:I}),children:Z}),l("div",{className:o({checked:R,disabled:w,loading:x}),style:r({size:A,width:G,hasChildren:T,disabled:w,customStyles:null==M?void 0:M.track}),onClick:function(){if(!w&&!x){var e=!R;L||Q(e),null==V||V(e)}},"data-size":A,children:[x&&e("div",{className:h({}),style:m({size:A,checked:R,width:G,customStyles:null==M?void 0:M.loading}),children:e("svg",{viewBox:"0 0 24 24",width:"12",height:"12",fill:"#1890ff",children:e("path",{d:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"})})}),!x&&R&&B&&e("span",{className:v({}),style:u({size:A,customStyles:null==M?void 0:M.inner}),children:B}),!x&&!R&&H&&e("span",{className:y({}),style:f({size:A,customStyles:null==M?void 0:M.inner}),children:H}),e("div",{className:N({checked:R,loading:x}),style:b({size:A,checked:R,width:G,customStyles:null==M?void 0:M.thumb})})]})]})})};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import e from"classnames";var i=function(t){var i=t.className;return e("switch-wrapper",i)},a=function(e){var i=e.style,a=e.customStyles;return t(t({display:"inline-block"},i),a)},n=function(t){var i=t.className;return e("switch-label-wrapper",i)},o=function(e){var i=e.style;return t({display:"flex",alignItems:"center"},i)},c=function(t){var i=t.labelClassName;return e("switch-label",i)},r=function(e){var i=e.labelGap,a=e.labelStyle,n=void 0!==i?{marginRight:"number"==typeof i?"".concat(i,"px"):i}:{};return t(t({},n),a)},l=function(t){var i=t.checked,a=t.disabled,n=t.loading,o=t.className;return e("switch-track",{"switch-track-checked":i&&!a,"switch-track-disabled":a&&!i,"switch-track-disabled-checked":a&&i,"switch-track-loading":n},o)},s=function(e){var i=e.size,a=void 0===i?"default":i,n=e.width,o=e.hasChildren,c=e.disabled,r=e.customStyles,l={default:{width:44,height:22},small:{width:28,height:16}}[a],s=void 0!==n?{width:"".concat(n,"px"),minWidth:"".concat(n,"px")}:{width:o?"auto":"".concat(l.width,"px"),minWidth:"".concat(l.width,"px")},d=c?{cursor:"not-allowed"}:{cursor:"pointer"},u=c?{opacity:"var(--zjpcy-switch-disabled-opacity, 0.65)"}:{},p=t({},r);return(null==r?void 0:r.backgroundColor)&&(p.background=r.backgroundColor,delete p.backgroundColor),t(t(t(t({position:"relative",borderRadius:"var(--zjpcy-switch-track-radius, 12px)",boxSizing:"border-box",overflow:"hidden",height:"".concat(l.height,"px")},s),d),u),p)},d=function(t){var i=t.checked,a=t.loading,n=t.className;return e("switch-thumb",{"switch-thumb-checked":i,"switch-thumb-loading":a},n)},u=function(e){var i,a=e.size,n=void 0===a?"default":a,o=e.checked,c=e.width,r=e.customStyles,l="small"===n?12:18;i=void 0!==c?"".concat(o?c-l-2:2,"px"):"small"===n?o?"14px":"2px":o?"24px":"2px";var s=t({},r);return(null==r?void 0:r.backgroundColor)&&(s.background=r.backgroundColor,delete s.backgroundColor),t({position:"absolute",top:"50%",transform:"translateY(-50%)",borderRadius:"var(--zjpcy-switch-thumb-radius, 50%)",width:"".concat(l,"px"),height:"".concat(l,"px"),left:i,zIndex:2},s)},p=function(t){var i=t.className;return e("switch-loading-icon",i)},h=function(e){var i,a=e.size,n=void 0===a?"default":a,o=e.checked,c=e.width,r=e.customStyles,l="small"===n?12:18;if(void 0!==c)i="".concat((o?c-l-2:2)+(l-12)/2,"px");else if("small"===n){i="".concat((o?14:2)+(l-12)/2,"px")}else{i="".concat((o?24:2)+(l-12)/2,"px")}return t({position:"absolute",top:"50%",marginTop:"-6px",width:"var(--zjpcy-switch-loading-size, 12px)",height:"var(--zjpcy-switch-loading-size, 12px)",zIndex:3,display:"flex",alignItems:"center",justifyContent:"center",left:i},r)},f=function(t){var i=t.className;return e("switch-checked-inner",i)},x=function(e){var i=e.size,a=void 0===i?"default":i,n=e.customStyles;return t({position:"absolute",top:0,bottom:0,left:"small"===a?"3px":"4px",display:"flex",alignItems:"center",justifyContent:"flex-start",fontSize:"small"===a?"9px":"10px",color:"#fff",whiteSpace:"nowrap",userSelect:"none",zIndex:1,paddingRight:"small"===a?"14px":"20px",fontWeight:500,letterSpacing:"0.2px"},n)},m=function(t){var i=t.className;return e("switch-unchecked-inner",i)},g=function(e){var i=e.size,a=void 0===i?"default":i,n=e.customStyles;return t({position:"absolute",top:0,bottom:0,right:"small"===a?"3px":"4px",display:"flex",alignItems:"center",justifyContent:"flex-end",fontSize:"small"===a?"9px":"10px",color:"var(--zjpcy-text-color-secondary, rgba(0, 0, 0, 0.65))",whiteSpace:"nowrap",userSelect:"none",zIndex:1,paddingLeft:"small"===a?"14px":"20px",fontWeight:500,letterSpacing:"0.2px"},n)};export{f as getCheckedInnerClassName,x as getCheckedInnerStyle,c as getLabelClassName,r as getLabelStyle,n as getLabelWrapperClassName,o as getLabelWrapperStyle,p as getLoadingIconClassName,h as getLoadingIconStyle,d as getThumbClassName,u as getThumbStyle,l as getTrackClassName,s as getTrackStyle,m as getUncheckedInnerClassName,g as getUncheckedInnerStyle,i as getWrapperClassName,a as getWrapperStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import t from"classnames";import*as n from"@dnd-kit/utilities";import i from"../Checkbox/index.js";import l from"../Radio/index.js";import{useSortable as a}from"@dnd-kit/sortable";var d=a,s=n.CSS,c=function(n){var a=n.id,c=n.record,u=n.rowIndex,m=n.allColumns,b=n.renderTableCell,f=n.isRowSelectionEnabled,g=n.rowSelection,p=n.selectedRowKeys,h=void 0===p?[]:p,v=n.handleRowSelect,x=d({id:a}),w=x.attributes,k=x.listeners,y=x.setNodeRef,C=x.transform,S=x.transition,j=x.isDragging,R={transform:s.Transform.toString(C),transition:S,opacity:j?.5:1,cursor:"grab"};return r("tr",e({ref:y,style:R},w,k,{className:t("zjpcy-table-sortable-row",{"zjpcy-table-sortable-row-dragging":j}),"data-dragging":j,children:[f&&function(){var e,r=h.includes(a),t=null===(e=null==g?void 0:g.getCheckboxProps)||void 0===e?void 0:e.call(g,c,u),n=(null==t?void 0:t.disabled)||!1,d={width:(null==g?void 0:g.columnWidth)||"50px",textAlign:"center",backgroundColor:"white"};return o("td",{style:d,children:"checkbox"===(null==g?void 0:g.type)?o(i,{checked:r,disabled:n,onChange:function(e){return null==v?void 0:v(c,u,e)}}):o(l,{checked:r,disabled:n,onChange:function(){return null==v?void 0:v(c,u,!r)}})},"zjpcy-table-sortable-selection-".concat(a))}(),m.map(function(e,r){return b(e,c,u,r,m)})]}))};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e,__spreadArray as t,__rest as n}from"tslib";import{jsxs as r,jsx as i}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as c,useMemo as u}from"react";import d from"classnames";import*as s from"@dnd-kit/core";import{PointerSensor as f,KeyboardSensor as m,DndContext as p,closestCenter as v}from"@dnd-kit/core";import h from"../Empty/index.js";import g from"../Pagination/index.js";import y from"../Icon/Icon.js";import b from"../Checkbox/index.js";import x from"../Radio/index.js";import S from"./SortableRow.js";import k from"../Tooltip/Tooltip.js";import{sortableKeyboardCoordinates as w,SortableContext as z,verticalListSortingStrategy as C,arrayMove as j}from"@dnd-kit/sortable";var N=s.useSensor,I=s.useSensors,T=function(s){var T=s.dataSource,E=void 0===T?[]:T,A=s.columns,W=void 0===A?[]:A,L=s.bordered,R=void 0!==L&&L,K=s.scroll,P=void 0===K?{}:K,F=s.rowKey,O=void 0===F?"key":F,V=s.className,_=void 0===V?"":V,D=s.pagination,M=s.empty,q=s.loading,J=void 0!==q&&q,X=s.loadingText,B=void 0===X?"加载中...":X,G=s.loadingDelay,H=s.draggable,Q=void 0!==H&&H,Y=s.onDragEnd,U=s.rowSelection,Z=l([]),$=Z[0],ee=Z[1],te=l([]),ne=te[0],re=te[1],ie=l([]),oe=ie[0],le=ie[1],ae=l([]),ce=ae[0],ue=ae[1],de=l(1),se=de[0],fe=de[1],me=l(10),pe=me[0],ve=me[1],he=l(J),ge=he[0],ye=he[1],be=l(E),xe=be[0],Se=be[1],ke=a(null),we=a(null),ze=a(null),Ce=a(null),je=a(null),Ne=a(0),Ie=a(!1),Te=a(null),Ee=a(0),Ae=l(null),We=Ae[0],Le=Ae[1],Re=l(""),Ke=Re[0],Pe=Re[1],Fe=null==U?void 0:U.type,Oe="checkbox"===Fe||"radio"===Fe,Ve=l((null==U?void 0:U.defaultSelectedRowKeys)||[]),_e=Ve[0],De=Ve[1],Me=void 0!==(null==U?void 0:U.selectedRowKeys)?U.selectedRowKeys:_e;c(function(){Se(E)},[E]),c(function(){return ke.current&&(clearTimeout(ke.current),ke.current=null),J&&G&&G>0?(ye(!0),ke.current=setTimeout(function(){ye(!1)},G)):ye(J),function(){ke.current&&clearTimeout(ke.current)}},[J,G]),c(function(){D&&"object"==typeof D&&(void 0!==D.current&&fe(D.current),void 0!==D.pageSize&&ve(D.pageSize))},[D&&"object"==typeof D?D.current:void 0,D&&"object"==typeof D?D.pageSize:void 0]),c(function(){return function(){je.current&&cancelAnimationFrame(je.current),Te.current&&clearTimeout(Te.current)}},[]);var qe=function(e){return e?"number"==typeof e?e:parseInt(e,10)||0:0};c(function(){var t=[],n=[],r=[],i=[];W.forEach(function(o,l){var a=qe(o.width);i[l]=a;var c=e(e({},o),{_index:l});"start"===o.fixed||!0===o.fixed?t.push(c):"end"===o.fixed?n.push(c):r.push(c)}),ee(t),re(n),le(r),ue(i),requestAnimationFrame(function(){Je.current(0)})},[W]);var Je=a(function(e){we.current&&we.current.querySelectorAll('.custom-table th[style*="sticky"], .custom-table td[style*="sticky"]').forEach(function(t){var n=t,r=window.getComputedStyle(n),i=r.left,o=r.right;"auto"!==i&&"0px"!==i?n.style.transform="translateX(".concat(e,"px)"):"auto"!==o&&"0px"!==o&&(n.style.transform="translateX(".concat(-e,"px)"))})}),Xe=function(e,t,n){je.current&&cancelAnimationFrame(je.current),je.current=requestAnimationFrame(function(){t&&t.scrollLeft!==n&&(t.scrollLeft=n),Je.current(n),je.current=null})},Be=function(e,t){var n=t||pe,r=n!==pe?1:e;fe(r),ve(n),D&&"function"==typeof D.onChange&&D.onChange(r,t)},Ge=function(e,t){if(void 0===e&&(e=se),void 0===t&&(t=pe),!1===D)return null;var n,r=void 0!==(null==D?void 0:D.total)?D.total:xe.length,i=Math.ceil(r/t)||1,o=Math.min(e,i);if(void 0!==(null==D?void 0:D.total))n=xe;else{var l=(o-1)*t,a=l+t;n=xe.slice(l,a)}return{data:n,total:r,pageSize:t,current:o,totalPages:i}},He=function(e,t){return"function"==typeof O?O(e,t):e[O]||t},Qe=function(){var e=Ge();return(e?e.data:xe).map(function(e,t){var n,r=He(e,t),i=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t);return{key:r,disabled:null==i?void 0:i.disabled}}).filter(function(e){return!e.disabled}).map(function(e){return e.key})},Ye=function(){var e=Qe();if(0===e.length)return!1;var t=e.filter(function(e){return Me.includes(e)}).length;return t>0&&t<e.length},Ue=function(e,n,r){var i,o,l,a=He(e,n);o="radio"===Fe?r?[a]:[]:r?t(t([],Me,!0),[a],!1):Me.filter(function(e){return e!==a}),l=xe.filter(function(e){var t="function"==typeof O?O(e,xe.indexOf(e)):e[O];return o.includes(t)}),De(o),null===(i=null==U?void 0:U.onChange)||void 0===i||i.call(U,o,l)},Ze=function(){var e,n={width:(null==U?void 0:U.columnWidth)||"50px",textAlign:"center",backgroundColor:"#fafafa !important",top:0};return i("th",{style:n,children:"checkbox"===Fe?i(b,{checked:(e=Qe(),0!==e.length&&e.every(function(e){return Me.includes(e)})),indeterminate:Ye(),onChange:function(e){return function(e){var n,r,i=Ge(),o=i?i.data:xe;if(e){var l=o.map(function(e,t){var n,r=He(e,t),i=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t);return{key:r,disabled:null==i?void 0:i.disabled}}).filter(function(e){return!e.disabled}).map(function(e){return e.key}),a=Me.filter(function(e){return!o.some(function(t,n){return He(t,n)===e})}),c=t(t([],a,!0),l,!0),u=xe.filter(function(e){var t="function"==typeof O?O(e,xe.indexOf(e)):e[O];return c.includes(t)});De(c),null===(n=null==U?void 0:U.onChange)||void 0===n||n.call(U,c,u)}else{var d=o.map(function(e,t){return He(e,t)}),s=Me.filter(function(e){return!d.includes(e)});u=xe.filter(function(e){var t="function"==typeof O?O(e,xe.indexOf(e)):e[O];return s.includes(t)}),De(s),null===(r=null==U?void 0:U.onChange)||void 0===r||r.call(U,s,u)}}(e)}}):(null==U?void 0:U.columnTitle)||""},"zjpcy-table-selection-header")},$e=function(e){if(null==e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if("boolean"==typeof e)return"";if(Array.isArray(e))return e.map($e).join("");if("object"==typeof e&&!o.isValidElement(e)){if(void 0!==e.name)return String(e.name);if(void 0!==e.label)return String(e.label);if(void 0!==e.title)return String(e.title);if(void 0!==e.value)return String(e.value);if(void 0!==e.text)return String(e.text);try{return JSON.stringify(e)}catch(e){return""}}if(o.isValidElement(e)){var t=e.props;if(t.children)return $e(t.children);if(void 0!==t.title)return String(t.title);if(void 0!==t.label)return String(t.label);if(void 0!==t.value)return String(t.value);if(void 0!==t.alt)return String(t.alt)}return""},et=function(e,t,n){Le({rowIndex:e,colKey:t}),Pe(String(n||""))},tt=function(e,t){t.onSave&&t.onSave(e,Ke),Le(null),Pe("")},nt=function(){Le(null),Pe("")},rt=function(e,t){var n,r=He(e,t),o=Me.includes(r),l=null===(n=null==U?void 0:U.getCheckboxProps)||void 0===n?void 0:n.call(U,e,t),a=(null==l?void 0:l.disabled)||!1,c={width:(null==U?void 0:U.columnWidth)||"50px",textAlign:"center",backgroundColor:"white"};return i("td",{style:c,children:"checkbox"===Fe?i(b,{checked:o,disabled:a,onChange:function(n){return Ue(e,t,n)}}):i(x,{checked:o,disabled:a,onChange:function(){return Ue(e,t,!o)}})},"zjpcy-table-selection-".concat(r))},it=function(e,t,n,l,a,c){if(void 0===c&&(c=!1),c)return rt(t,n);var u={width:e.width||"auto",textAlign:e.align||"left",backgroundColor:"white"};if("start"===e.fixed||!0===e.fixed){u.position="sticky";var d=0;Oe&&(d+=qe((null==U?void 0:U.columnWidth)||"50px"));for(var s=0;s<l;s++)d+=ce[s]||0;u.left="".concat(d,"px"),u.zIndex=5}else if("end"===e.fixed){u.position="sticky";var f=0;for(s=a.length-1;s>l;s--)f+=ce[s]||0;u.right="".concat(f,"px"),u.zIndex=5}var m=$.length?$.length-1:-1,p=ne.length?$.length+oe.length:-1,v=("start"===e.fixed||!0===e.fixed)&&l===m,h="end"===e.fixed&&l===p,g=e.key||e.dataIndex||e._index,b=(null==We?void 0:We.rowIndex)===n&&(null==We?void 0:We.colKey)===String(g),x=e.dataIndex?t[e.dataIndex]:null;e.render&&(x=e.render(x,t,n));var S=x;if(null!==x&&"object"==typeof x&&!o.isValidElement(x))if(void 0!==x.name)S=String(x.name);else if(void 0!==x.label)S=String(x.label);else if(void 0!==x.title)S=String(x.title);else try{S=JSON.stringify(x)}catch(e){S=""}var w=e.maxLines&&e.maxLines>0,z="";if(e.tooltip&&!b&&!(z=$e(S))&&e.dataIndex){var C=t[e.dataIndex];z="object"==typeof C?$e(C):String(C||"")}if(e.editable&&b)return i("td",{style:u,className:"".concat(v?"zjpcy-table-fixed-left-shadow":"").concat(h?" zjpcy-table-fixed-right-shadow":""),children:r("div",{className:"zjpcy-table-edit-cell",onClick:function(e){return e.stopPropagation()},children:[i("input",{type:"text",className:"zjpcy-table-edit-input",value:Ke,onChange:function(e){return Pe(e.target.value)},autoFocus:!0,onClick:function(e){return e.stopPropagation()}}),r("div",{className:"zjpcy-table-edit-actions",children:[i("span",{className:"zjpcy-table-edit-icon zjpcy-edit-submit",onClick:function(){return tt(t,e)},title:"保存",children:i(y,{type:"check",size:24,color:"#339af0"})}),i("span",{className:"zjpcy-table-edit-icon zjpcy-edit-cancel",onClick:nt,title:"取消",children:i(y,{type:"close",size:24,color:"#339af0"})})]})]})},e.key||e.dataIndex||e._index);var j=w?i("div",{className:"zjpcy-table-cell-ellipsis",style:{WebkitLineClamp:e.maxLines},children:S}):S,N=z?i(k,{title:z,placement:"top",delay:0,children:i("span",{className:"zjpcy-table-cell-tooltip-wrapper",children:j})}):j;return r("td",{style:u,onClick:e.editable?function(){return et(n,String(g),x)}:void 0,className:"".concat(v?"zjpcy-table-fixed-left-shadow":"").concat(h?" zjpcy-table-fixed-right-shadow":"").concat(w?" zjpcy-table-cell-has-ellipsis":"").concat(e.editable?" zjpcy-table-editable-cell":""),children:[N,e.editable&&i("span",{className:"zjpcy-table-edit-icon-wrapper",children:i(y,{type:"edit",size:16,color:"#339af0"})})]},e.key||e.dataIndex||e._index)},ot=I(N(f,{activationConstraint:{distance:8}}),N(m,{coordinateGetter:w})),lt=function(e){var n=e.active,r=e.over;if(r&&n.id!==r.id){var i=Ge(),o=i?i.data:xe,l=o.findIndex(function(e,t){return String(He(e,t))===String(n.id)}),a=o.findIndex(function(e,t){return String(He(e,t))===String(r.id)});if(-1!==l&&-1!==a){var c=j(o,l,a);if(i&&D&&"object"==typeof D&&void 0===D.total){var u=(i.current-1)*i.pageSize,d=t([],xe,!0);c.forEach(function(e,t){d[u+t]=e}),Se(d),Y&&Y(d)}else Se(c),Y&&Y(c)}}},at={width:P.x?"number"==typeof P.x?"".concat(P.x,"px"):P.x:"100%"},ct={maxHeight:P.y?"number"==typeof P.y?"".concat(P.y,"px"):P.y:"auto",overflowY:P.y?"auto":"visible",overflowX:P.x?"auto":"visible"},ut=t(t(t([],$,!0),oe,!0),ne,!0),dt=u(function(){return Ge()},[xe,D,pe,se]),st=dt?dt.data:xe;return r("div",{ref:we,className:d("custom-table-container",{"custom-table-bordered":R,"custom-table-draggable":Q},_),style:at,children:[ge&&i("div",{className:"custom-table-loading-mask",children:r("div",{className:"custom-table-loading-content",children:[i("div",{className:"custom-table-loading-spinner",children:r("svg",{viewBox:"0 0 24 24",className:"custom-table-loading-icon",children:[i("circle",{className:"custom-table-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),i("circle",{className:"custom-table-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})}),B&&i("div",{className:"custom-table-loading-text",children:B})]})}),i("div",{className:"custom-table-header",ref:ze,onScroll:function(e){if(ze.current&&Ce.current){var t=e.target;if(t===ze.current){var n=t.scrollLeft;Ie.current=!0,Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Ie.current=!1},150),Math.abs(n-Ne.current)>.5&&(Ne.current=n,Ee.current=n,Xe(ze.current,Ce.current,n))}}},children:r("table",{className:d("custom-table",{"custom-table-bordered-body":R,"custom-table-header-separator":!R}),children:[r("colgroup",{children:[Oe&&i("col",{style:{width:(null==U?void 0:U.columnWidth)||"50px"}},"header-selection-col"),ut.map(function(e,t){return i("col",{style:{width:e.width||"auto"}},"header-col-".concat(e.dataIndex||e.key||t))})]}),i("thead",{children:r("tr",{children:[Oe&&Ze(),ut.map(function(e,t){return function(e,t,n,r){if(void 0===r&&(r=!1),r)return Ze();var o={width:e.width||"auto",textAlign:e.align||"left",backgroundColor:"#fafafa !important",top:0};if("start"===e.fixed||!0===e.fixed){o.position="sticky";var l=0;Oe&&(l+=qe((null==U?void 0:U.columnWidth)||"50px"));for(var a=0;a<t;a++)l+=ce[a]||0;o.left="".concat(l,"px"),o.zIndex=10}else if("end"===e.fixed){o.position="sticky";var c=0;for(a=n.length-1;a>t;a--)c+=ce[a]||0;o.right="".concat(c,"px"),o.zIndex=10}return i("th",{style:o,children:e.title||""},e.key||e.dataIndex||e._index)}(e,t,ut)})]})})]})}),i("div",{className:"custom-table-body",ref:Ce,style:ct,onScroll:function(e){if(ze.current&&Ce.current){var t=e.target;if(t===Ce.current){var n=t.scrollLeft;Ie.current=!0,Te.current&&clearTimeout(Te.current),Te.current=setTimeout(function(){Ie.current=!1},150),Math.abs(n-Ne.current)>.5&&(Ne.current=n,Ee.current=n,Xe(Ce.current,ze.current,n))}}},children:function(){var e=r("table",{className:d("custom-table",{"custom-table-bordered-body":R,"custom-table-header-separator":!R}),children:[r("colgroup",{children:[Oe&&i("col",{style:{width:(null==U?void 0:U.columnWidth)||"50px"}},"body-selection-col"),ut.map(function(e,t){return i("col",{style:{width:e.width||"auto"}},"body-col-".concat(e.dataIndex||e.key||t))})]}),i("tbody",{children:Q?st.map(function(e,t){return i(S,{id:String(He(e,t)),record:e,rowIndex:t,columns:W,columnWidths:ce,fixedLeftColumns:$,fixedRightColumns:ne,normalColumns:oe,allColumns:ut,editingCell:We,editingValue:Ke,handleEdit:et,handleSave:tt,handleCancel:nt,setEditingValue:Pe,renderTableCell:it,isRowSelectionEnabled:Oe,rowSelection:U,selectedRowKeys:Me,handleRowSelect:Ue},He(e,t))}):st.map(function(e,t){return r("tr",{children:[Oe&&rt(e,t),ut.map(function(n,r){return it(n,e,t,r,ut)})]},He(e,t))})})]});if(Q){var t=st.map(function(e,t){return String(He(e,t))});return i(p,{sensors:ot,collisionDetection:v,onDragEnd:lt,children:i(z,{items:t,strategy:C,children:e})})}return e}()}),0===st.length&&i("div",{className:"custom-table-empty",children:M||i(h,{size:"small",description:"暂无数据"})}),function(){if(!1===D||!dt)return null;var t=dt.total,r=dt.current,o=dt.pageSize,l=n(D||{},["onChange","pageSize","current"]);return i("div",{className:"custom-table-pagination-wrapper",children:i(g,e({total:t,current:r,pageSize:o,onChange:Be,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条,共 ").concat(e," 条")},showSizeChanger:!0,showQuickJumper:!0,align:"flex-end"},l))})}()]})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as t}from"tslib";import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import i,{useState as o,useRef as a,useEffect as c,useMemo as s}from"react";import l from"classnames";import*as u from"@dnd-kit/core";import{PointerSensor as d,DndContext as f,closestCenter as b}from"@dnd-kit/core";import*as v from"@dnd-kit/utilities";import m from"../Icon/Icon.js";import{SortableContext as p,horizontalListSortingStrategy as y,arrayMove as h,useSortable as z}from"@dnd-kit/sortable";var k=u.useSensor,g=u.useSensors,j=v.CSS,_=function(r){var i=r.item,o=r.isActive,a=r.isClosable,c=r.onClick,s=r.onClose,u=r.tabRefs,d=z({id:i.key,disabled:i.disabled}),f=d.attributes,b=d.listeners,v=d.setNodeRef,p=d.transform,y=d.transition,h=d.isDragging,k={transform:j.Transform.toString(p),transition:y,opacity:h?.5:1,zIndex:h?1e3:"auto",position:"relative"};return n("div",{ref:function(t){v(t),t?u.current.set(i.key,t):u.current.delete(i.key)},className:l("zjpcy-tabs-tab",{"zjpcy-tabs-tab--active":o,"zjpcy-tabs-tab--disabled":i.disabled,"zjpcy-tabs-tab--dragging":h}),role:"tab","aria-selected":o,style:k,children:[n("div",t({className:"zjpcy-tabs-tab__drag-handle"},f,b,{onClick:c,style:{cursor:i.disabled?"not-allowed":"grab",display:"flex",alignItems:"center",gap:"6px"},children:[i.icon&&e("span",{className:"zjpcy-tabs-tab__icon",children:i.icon}),e("span",{className:"zjpcy-tabs-tab__label",children:i.label})]})),a&&!i.disabled&&e("span",{className:"zjpcy-tabs-tab__close",onClick:function(t){return s(t)},children:e(m,{type:"close",size:12})})]})},C=function(u){var v=u.items,z=void 0===v?[]:v,j=u.activeKey,C=u.defaultActiveKey,N=u.onChange,L=u.onClose,w=u.tabsClosable,E=void 0!==w&&w,W=u.tabPlacement,T=void 0===W?"top":W,A=u.type,x=void 0===A?"line":A,I=u.onAdd,S=u.className,M=u.style,R=u.contentClassName,D=u.contentStyle,q=u.draggable,F=void 0!==q&&q,B=u.onDragEnd,K=o(function(){return C}),P=K[0],V=K[1],H=a(null),G=a(new Map),J=a(null),O=o({}),Q=O[0],U=O[1],X=o(!1),Y=X[0],Z=X[1],$=o(!1),tt=$[0],et=$[1],nt=o(!1),rt=nt[0],it=nt[1],ot=o(!1),at=ot[0],ct=ot[1],st=a(!1),lt=a(!0),ut=o(!1),dt=ut[0],ft=ut[1],bt=o(z),vt=bt[0],mt=bt[1];c(function(){void 0!==j&&V(j)},[j]),c(function(){mt(z)},[z]),c(function(){var t;if(void 0===j){var e=null===(t=z[0])||void 0===t?void 0:t.key;if(!(!!C&&z.some(function(t){return t.key===C}))||P)if(e)z.some(function(t){return t.key===P})||V(e);else V(void 0);else V(C)}},[z,P,j,C]);var pt=void 0!==j?j:P,yt=s(function(){return z.find(function(t){return t.key===pt})||z[0]},[z,pt]),ht=function(t,e){if(void 0===e&&(e=!0),t&&H.current){var n=G.current.get(t),r=H.current;if(n&&r){var i=r.querySelector(".zjpcy-tabs-indicator"),o=lt.current;if(i&&o&&(i.style.transition="none"),"top"===T||"bottom"===T){if(U({left:n.offsetLeft,width:n.offsetWidth,top:void 0,height:void 0}),!e){var a=n.offsetLeft,c=a+n.offsetWidth,s=r.scrollLeft,l=r.clientWidth;(a<s||c>s+l)&&n.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}}else U({top:n.offsetTop,height:n.offsetHeight,left:void 0,width:void 0});i&&o&&e?requestAnimationFrame(function(){i.style.transition="",lt.current=!1}):o&&(lt.current=!1)}}},zt=i.useCallback(function(){if(H.current){var t=H.current,e="top"===T||"bottom"===T;if("card"===x)return Z(!1),et(!1),void it(!1);if(e){var n=Math.ceil(t.scrollWidth)>Math.floor(t.clientWidth);if(Z(n),n){var r=t.scrollLeft>1;et(r);var i=t.scrollWidth-t.clientWidth,o=t.scrollLeft<i-1;it(o)}else et(!1),it(!1)}else Z(!1),et(!1),it(!1)}},[T,x]),kt=function(t){if(H.current&&!st.current){var e=H.current,n=e.clientWidth,r=Math.max(200,.6*n);st.current=!0,"left"===t?e.scrollTo({left:e.scrollLeft-r,behavior:"smooth"}):e.scrollTo({left:e.scrollLeft+r,behavior:"smooth"}),setTimeout(function(){st.current=!1,zt()},400)}};c(function(){pt&&(ht(pt,!1),zt())},[pt,z,T,zt]),c(function(){zt();var t=requestAnimationFrame(function(){pt&&ht(pt,!1),zt()});return function(){return cancelAnimationFrame(t)}},[zt,pt]),c(function(){var t,e=function(){pt&&ht(pt,!1),zt()},n=function(){clearTimeout(t),t=setTimeout(function(){zt()},100)},r=H.current;return r&&r.addEventListener("scroll",n),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),r&&r.removeEventListener("scroll",n),clearTimeout(t)}},[zt,pt]),c(function(){var t=function(){if(J.current&&H.current&&"card"===x&&I){var t=H.current,e=J.current,n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.right-r.right;ft(i<=20)}else ft(!1)};t();var e=function(){t()},n=H.current;return n&&(n.addEventListener("scroll",e),window.addEventListener("resize",e)),function(){n&&n.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[x,I,z]);var gt=function(t){t.disabled||(void 0===j&&V(t.key),ht(t.key,!0),zt(),null==N||N(t.key))},jt=function(t,e){t.stopPropagation(),e.disabled||null==L||L(e.key)},_t=function(){null==I||I(),setTimeout(function(){H.current&&requestAnimationFrame(function(){if(H.current&&G.current.size>0){var t=Array.from(G.current.keys());if(t.length>0){var e=t[t.length-1],n=G.current.get(e),r=H.current;if(n&&r&&J.current)if("card"===x){var i=J.current.offsetWidth+4,o=n.offsetLeft+n.offsetWidth,a=r.clientWidth;if(o-r.scrollLeft>a-i){var c=o-a+i;r.scrollTo({left:c,behavior:"smooth"})}}else n.scrollIntoView({behavior:"smooth",inline:"nearest",block:"nearest"})}}})},100)},Ct=g(k(d,{activationConstraint:{distance:8}})),Nt=function(t){},Lt=function(t){var e=t.active,n=t.over;if(n&&e.id!==n.id){var r=vt.findIndex(function(t){return t.key===e.id}),i=vt.findIndex(function(t){return t.key===n.id});if(-1!==r&&-1!==i){var o=h(vt,r,i);mt(o),null==B||B(o)}}},wt=function(){var t="top"===T||"bottom"===T,r="card"===x,i=F?vt:z,o=n("div",{className:"zjpcy-tabs-nav-wrapper",onMouseEnter:function(){return ct(!0)},onMouseLeave:function(){return ct(!1)},children:[t&&Y&&!r&&e("button",{className:l("zjpcy-tabs-nav__button","zjpcy-tabs-nav__button--left",{"zjpcy-tabs-nav__button--disabled":!tt,"zjpcy-tabs-nav__button--visible":at}),onClick:function(){return kt("left")},disabled:!tt,type:"button",children:e(m,{type:"arrowLeft",size:12})}),n("div",{className:"zjpcy-tabs-nav",ref:H,children:[i.map(function(t){return function(t,r,i){return!F||t.disabled||"top"!==T&&"bottom"!==T?n("div",{ref:function(e){e?G.current.set(t.key,e):G.current.delete(t.key)},className:l("zjpcy-tabs-tab",{"zjpcy-tabs-tab--active":r,"zjpcy-tabs-tab--disabled":t.disabled}),role:"tab","aria-selected":r,onClick:function(){return gt(t)},children:[t.icon&&e("span",{className:"zjpcy-tabs-tab__icon",children:t.icon}),e("span",{className:"zjpcy-tabs-tab__label",children:t.label}),i&&!t.disabled&&e("span",{className:"zjpcy-tabs-tab__close",onClick:function(e){return jt(e,t)},children:e(m,{type:"close",size:12})})]},t.key):e(_,{item:t,isActive:r,isClosable:i,onClick:function(){return gt(t)},onClose:function(e){return jt(e,t)},tabRefs:G},t.key)}(t,t.key===pt,E||t.closable||!1)}),"card"===x&&I&&e("div",{ref:J,className:l("zjpcy-tabs-tab zjpcy-tabs-tab--add",{sticky:!0===dt}),role:"tab",onClick:_t,children:e(m,{type:"plus",size:16})}),e("div",{className:"zjpcy-tabs-indicator",style:Q})]}),t&&Y&&!r&&e("button",{className:l("zjpcy-tabs-nav__button","zjpcy-tabs-nav__button--right",{"zjpcy-tabs-nav__button--disabled":!rt,"zjpcy-tabs-nav__button--visible":at}),onClick:function(){return kt("right")},disabled:!rt,type:"button",children:e(m,{type:"arrowRight",size:12})})]});return!F||r||"top"!==T&&"bottom"!==T?o:e(f,{sensors:Ct,collisionDetection:b,onDragStart:Nt,onDragEnd:Lt,children:e(p,{items:i.map(function(t){return t.key}),strategy:y,children:o})})},Et=function(){var n=(null==yt?void 0:yt.renderContent)?yt.renderContent():null==yt?void 0:yt.content,r=l("zjpcy-tabs-content","zjpcy-tabs-content--".concat(T),R),i=t({},D);return e("div",{className:r,style:i,children:n})};return e("div",{className:l("zjpcy-tabs","zjpcy-tabs--".concat(T),"zjpcy-tabs--".concat(x),S),style:M,children:n(r,"bottom"===T?{children:[Et(),wt()]}:{children:[wt(),Et()]})})};export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__rest as o,__assign as c}from"tslib";import{jsxs as a,jsx as l}from"react/jsx-runtime";import e,{useState as n}from"react";import r from"classnames";import s from"../Icon/Icon.js";var t=e.forwardRef(function(e,t){var i=e.children,p=e.className,m=e.style,d=e.size,u=void 0===d?"medium":d,y=e.backgroundColor,g=e.color,f=e.icon,b=e.closable,j=void 0!==b&&b,z=e.onClose,C=e.onClick,k=o(e,["children","className","style","size","backgroundColor","color","icon","closable","onClose","onClick"]),N=n(!0),_=N[0],h=N[1];if(!_)return null;var v=r("zjpcy-tag","zjpcy-tag--".concat(u),{"zjpcy-tag--clickable":C,"zjpcy-tag--closable":j},p),x=c({backgroundColor:y,color:g},m);return a("span",c({ref:t,className:v,style:x,onClick:C},k,{children:[f?l("span","string"==typeof f?{className:"zjpcy-tag__icon",children:l(s,{type:f})}:{className:"zjpcy-tag__icon",children:f}):null,l("span",{className:"zjpcy-tag__content",children:i}),j&&l("span",{className:"zjpcy-tag__close",onClick:function(o){o.stopPropagation(),null==z||z(o),h(!1)},role:"button",tabIndex:0,"aria-label":"close",children:l(s,{type:"close"})})]}))});t.displayName="Tag";var i=t;export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{useState as n,useRef as r,useCallback as o,useEffect as a}from"react";import l from"react-dom";import d from"classnames";import s from"../Icon/Icon.js";import c from"./TimePickerPanel.js";var u=function(u){var m=u.size,p=void 0===m?"middle":m,f=u.value,v=u.defaultValue,h=u.onChange,w=u.placeholder,g=void 0===w?["开始时间","结束时间"]:w,b=u.disabled,k=void 0!==b&&b,N=u.readOnly,y=void 0!==N&&N,C=u.className,x=void 0===C?"":C,S=u.style,z=u.width,H=void 0===z?"auto":z,E=u.format,L=void 0===E?"HH:mm:ss":E,O=u.allowClear,I=void 0===O||O,P=u.hourStep,j=void 0===P?1:P,M=u.minuteStep,R=void 0===M?1:M,Y=u.secondStep,B=void 0===Y?1:Y,D=u.disabledHours,W=u.disabledMinutes,q=u.disabledSeconds,A=u.hideDisabledOptions,F=void 0!==A&&A,G=u.label,T=u.labelGap,V=void 0===T?8:T,X=u.labelClassName,J=void 0===X?"":X,K=u.labelStyle,Q=u.onOpenChange,U=u.open,Z=u.separator,$=n(v),_=$[0],ee=$[1],te=n(!1),ie=te[0],ne=te[1],re=n("start"),oe=re[0],ae=re[1],le=n(!1),de=le[0],se=le[1],ce=n({top:0,left:0,width:0}),ue=ce[0],me=ce[1],pe=n(!1),fe=pe[0],ve=pe[1],he=r(null),we=r(null),ge=void 0!==f,be=ge?f:_,ke=void 0!==U?U:ie,Ne=(null==be?void 0:be[0])||"",ye=(null==be?void 0:be[1])||"",Ce=o(function(){if(he.current){var e=he.current.getBoundingClientRect(),t=Math.max(e.width,200),i=window.innerHeight-e.bottom,n=e.bottom+window.scrollY+4,r=e.left+window.scrollX;i<280&&e.top>280&&(n=e.top+window.scrollY-280-4);var o=window.innerWidth;r+t>o&&(r=o-t-16),me({top:n,left:r,width:t})}},[]);a(function(){if(ke&&we.current&&he.current){return ve(!1),requestAnimationFrame(function(){var t=he.current.getBoundingClientRect(),i=we.current.offsetHeight;if(window.innerHeight-t.bottom<280&&t.top>280){var n=t.top+window.scrollY-i-4;me(function(t){return e(e({},t),{top:n})})}ve(!0)}),function(){ve(!1)}}},[ke]),a(function(){var e=function(e){he.current&&!he.current.contains(e.target)&&we.current&&!we.current.contains(e.target)&&(void 0===U&&ne(!1),null==Q||Q(!1),se(!1))};return ke&&(document.addEventListener("mousedown",e),Ce(),window.addEventListener("scroll",Ce,!0),window.addEventListener("resize",Ce)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",Ce,!0),window.removeEventListener("resize",Ce)}},[ke,U,Q,Ce]);var xe=o(function(e,t){var i=[0===e?t:(null==be?void 0:be[0])||"",1===e?t:(null==be?void 0:be[1])||""];ge||ee(i),null==h||h(i)},[ge,h,be]),Se=function(e){k||y||(ae(e),void 0===U&&ne(!0),null==Q||Q(!0),se(!0))},ze=function(){void 0===U&&ne(!1),null==Q||Q(!1),se(!1)},He=e({width:"number"==typeof H?"".concat(H,"px"):H},S),Ee=e({marginRight:"number"==typeof V?"".concat(V,"px"):V},K),Le=Ne||ye;return t("div",{className:d("time-picker time-range-picker",x),"data-has-label":!!G,style:He,children:[G&&i("span",{className:d("time-picker-label",J),style:Ee,children:G}),t("div",{ref:he,className:"time-range-picker-trigger","data-focused":de,"data-disabled":k,"data-size":p,children:[i("div",{className:"time-range-picker-input","data-active":"start"===oe&&ke,onClick:function(){return Se("start")},children:i("span",{className:"time-range-picker-value","data-placeholder":!Ne,children:Ne||g[0]})}),i("span",{className:"time-range-picker-separator",children:Z||i(s,{type:"arrow-right",size:"small"})}),i("div",{className:"time-range-picker-input","data-active":"end"===oe&&ke,onClick:function(){return Se("end")},children:i("span",{className:"time-range-picker-value","data-placeholder":!ye,children:ye||g[1]})}),t("span",{className:"time-picker-suffix time-range-picker-suffix",children:[I&&Le&&!k&&!y&&i("span",{className:"time-picker-clear",onClick:function(e){e.stopPropagation(),ge||ee(void 0),null==h||h(["",""])},children:i(s,{type:"close",size:"small"})}),i(s,{type:"clock",size:"small",className:"time-picker-icon","data-has-clear":I&&Le&&!k&&!y})]})]}),function(){if(!ke)return null;var e="start"===oe?Ne:ye,t=i("div",{ref:we,className:"time-picker-dropdown time-range-picker-dropdown",style:{position:"fixed",top:ue.top,left:ue.left,minWidth:function(){if(ue.width)return ue.width;if("number"==typeof H)return H;if("string"==typeof H&&"auto"!==H){var e=parseInt(H,10);return isNaN(e)?200:e}return 200}(),zIndex:999,opacity:fe?1:0,transition:"opacity 0.15s ease"},children:i(c,{value:e,onChange:function(e){return xe("start"===oe?0:1,e)},format:L,hourStep:j,minuteStep:R,secondStep:B,disabledHours:D,disabledMinutes:W,disabledSeconds:q,hideDisabledOptions:F,showNow:!1,showOk:!0,onOk:ze})});return l.createPortal(t,document.body)}()]})};export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as n,jsx as e}from"react/jsx-runtime";import t,{useState as i,useEffect as o,useMemo as r}from"react";var u=function(n,e,t,i){var o=function(n){return n.toString().padStart(2,"0")};return"HH:mm"===i?"".concat(o(n),":").concat(o(e)):"".concat(o(n),":").concat(o(e),":").concat(o(t))},l=function(i){var o=i.options,r=i.value,u=i.onChange,l=i.unit,c=t.useRef(null),a=t.useRef(null);return t.useEffect(function(){if(a.current&&c.current){var n=c.current,e=a.current,t=n.clientHeight,i=e.offsetTop-t/2+18;requestAnimationFrame(function(){n.scrollTo({top:Math.max(0,i),behavior:"smooth"})})}},[r]),n("div",{className:"time-picker-column",children:[e("div",{className:"time-picker-column-header",children:l}),e("div",{className:"time-picker-column-list",ref:c,children:o.map(function(n){return e("div",{ref:r===n?a:null,className:"time-picker-option","data-selected":r===n,onClick:function(){return null==u?void 0:u(n)},children:n.toString().padStart(2,"0")},n)})})]})},c=function(t){var c,a,s,d=t.value,f=t.onChange,m=t.format,v=t.hourStep,p=t.minuteStep,h=t.secondStep,k=t.disabledHours,g=t.disabledMinutes,N=t.disabledSeconds,b=t.hideDisabledOptions,S=void 0!==b&&b,C=t.showNow,w=void 0===C||C,H=t.showOk,x=void 0===H||H,I=t.onNow,M=t.onOk,O=function(n){if(!n)return null;var e=n.split(":");return e.length<2?null:{hour:parseInt(e[0],10)||0,minute:parseInt(e[1],10)||0,second:parseInt(e[2],10)||0}}(d),D=i(null!==(c=null==O?void 0:O.hour)&&void 0!==c?c:0),R=D[0],T=D[1],j=i(null!==(a=null==O?void 0:O.minute)&&void 0!==a?a:0),q=j[0],A=j[1],E=i(null!==(s=null==O?void 0:O.second)&&void 0!==s?s:0),F=E[0],y=E[1];o(function(){if(O)T(O.hour),A(O.minute),y(O.second);else{var n=new Date;T(n.getHours()),A(n.getMinutes()),y(n.getSeconds())}},[d,O]);var z=function(n,e,t){void 0===t&&(t=[]);for(var i=[],o=0;o<n;o+=e)S&&t.includes(o)||i.push(o);return i},B=r(function(){return(null==k?void 0:k())||[]},[k]),G=r(function(){return(null==g?void 0:g(R))||[]},[g,R]),J=r(function(){return(null==N?void 0:N(R,q))||[]},[N,R,q]),K=r(function(){return z(24,v,B)},[v,B,S]),L=r(function(){return z(60,p,G)},[p,G,S]),P=r(function(){return z(60,h,J)},[h,J,S]),Q=m.includes("ss");return n("div",{className:"time-picker-panel-container",children:[n("div",{className:"time-picker-panel",children:[e(l,{unit:"时",options:K,value:R,onChange:function(n){T(n),null==f||f(u(n,q,F,m))}}),e(l,{unit:"分",options:L,value:q,onChange:function(n){A(n),null==f||f(u(R,n,F,m))}}),Q&&e(l,{unit:"秒",options:P,value:F,onChange:function(n){y(n),null==f||f(u(R,q,n,m))}})]}),(w||x)&&n("div",{className:"time-picker-footer",children:[w&&e("button",{className:"time-picker-now-btn",onClick:I,children:"此刻"}),x&&e("button",{className:"time-picker-ok-btn",onClick:function(){return null==M?void 0:M(u(R,q,F,m))},children:"确定"})]})]})};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{useState as i,useRef as o,useCallback as r,useEffect as a}from"react";import d from"react-dom";import c from"classnames";import l from"../Icon/Icon.js";import s from"./TimePickerPanel.js";import u from"./RangePicker.js";var m=function(u){var m=u.size,p=void 0===m?"middle":m,f=u.value,v=u.defaultValue,w=u.onChange,h=u.placeholder,b=void 0===h?"请选择时间":h,g=u.disabled,k=void 0!==g&&g,y=u.readOnly,N=void 0!==y&&y,S=u.className,H=void 0===S?"":S,C=u.style,x=u.width,z=void 0===x?120:x,O=u.format,E=void 0===O?"HH:mm:ss":O,L=u.allowClear,P=void 0===L||L,R=u.hourStep,j=void 0===R?1:R,I=u.minuteStep,M=void 0===I?1:I,D=u.secondStep,Y=void 0===D?1:D,B=u.disabledHours,W=u.disabledMinutes,q=u.disabledSeconds,A=u.hideDisabledOptions,F=void 0!==A&&A,G=u.label,T=u.labelGap,V=void 0===T?8:T,X=u.labelClassName,J=void 0===X?"":X,K=u.labelStyle,Q=u.onOpenChange,U=u.open,Z=u.showNow,$=void 0===Z||Z,_=u.showOk,ee=void 0===_||_,te=i(v),ne=te[0],ie=te[1],oe=i(!1),re=oe[0],ae=oe[1],de=i(!1),ce=de[0],le=de[1],se=i({top:0,left:0,width:0}),ue=se[0],me=se[1],pe=i(!1),fe=pe[0],ve=pe[1],we=o(null),he=o(null),be=void 0!==f,ge=be?f:ne,ke=void 0!==U?U:re,ye=r(function(){if(we.current){var e=we.current.getBoundingClientRect(),t=Math.max(e.width,200),n=window.innerHeight-e.bottom,i=e.bottom+window.scrollY+4,o=e.left+window.scrollX;n<280&&e.top>280&&(i=e.top+window.scrollY-280-4);var r=window.innerWidth;o+t>r&&(o=r-t-16),me({top:i,left:o,width:t})}},[]);a(function(){if(ke&&he.current&&we.current){return ve(!1),requestAnimationFrame(function(){var t=we.current.getBoundingClientRect(),n=he.current.offsetHeight;if(window.innerHeight-t.bottom<280&&t.top>280){var i=t.top+window.scrollY-n-4;me(function(t){return e(e({},t),{top:i})})}ve(!0)}),function(){ve(!1)}}},[ke]),a(function(){var e=function(e){we.current&&!we.current.contains(e.target)&&he.current&&!he.current.contains(e.target)&&(void 0===U&&ae(!1),null==Q||Q(!1),le(!1))};return ke&&(document.addEventListener("mousedown",e),ye(),window.addEventListener("scroll",ye,!0),window.addEventListener("resize",ye)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",ye,!0),window.removeEventListener("resize",ye)}},[ke,U,Q,ye]);var Ne=r(function(e){be||ie(e),null==w||w(e)},[be,w]),Se=function(){var e=new Date,t=function(e,t,n,i){var o=function(e){return e.toString().padStart(2,"0")};return"HH:mm"===i?"".concat(o(e),":").concat(o(t)):"".concat(o(e),":").concat(o(t),":").concat(o(n))}(e.getHours(),e.getMinutes(),e.getSeconds(),E);Ne(t)},He=e({width:"number"==typeof z?"".concat(z,"px"):z},C),Ce=e({marginRight:"number"==typeof V?"".concat(V,"px"):V},K),xe=t("div",{ref:we,className:"time-picker-trigger","data-focused":ce,"data-disabled":k,"data-size":p,onClick:function(){if(!k&&!N){var e=!ke;void 0===U&&ae(e),null==Q||Q(e),le(e)}},children:[n("span",{className:"time-picker-value","data-placeholder":!ge,children:ge||b}),t("span",{className:"time-picker-suffix",children:[P&&ge&&!k&&!N&&n("span",{className:"time-picker-clear",onClick:function(e){e.stopPropagation(),be||ie(void 0),null==w||w("")},children:n(l,{type:"close",size:"small"})}),n(l,{type:"clock",size:"small",className:"time-picker-icon","data-open":ke,"data-has-clear":P&&ge&&!k&&!N})]})]});return t("div",{className:c("time-picker",H),"data-has-label":!!G,style:He,children:[G&&n("span",{className:c("time-picker-label",J),style:Ce,children:G}),xe,function(){if(!ke)return null;var e=n("div",{ref:he,className:"time-picker-dropdown",style:{position:"fixed",top:ue.top,left:ue.left,minWidth:function(){if(ue.width)return ue.width;if("number"==typeof z)return z;if("string"==typeof z&&"auto"!==z){var e=parseInt(z,10);return isNaN(e)?120:e}return 120}(),zIndex:999,opacity:fe?1:0,transition:"opacity 0.15s ease"},children:n(s,{value:ge,onChange:Ne,format:E,hourStep:j,minuteStep:M,secondStep:Y,disabledHours:B,disabledMinutes:W,disabledSeconds:q,hideDisabledOptions:F,showNow:$,showOk:ee,onNow:Se,onOk:function(e){return function(e){e&&!ge&&Ne(e),void 0===U&&ae(!1),null==Q||Q(!1),le(!1)}(e)}})});return d.createPortal(e,document.body)}()]})};m.RangePicker=u;var p=m;export{u as RangePicker,p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e}from"tslib";import{jsxs as t,jsx as n,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useCallback as c,useEffect as u}from"react";import{createPortal as l}from"react-dom";var a=function(a){var d=a.children,s=a.title,f=a.placement,m=void 0===f?"top":f,v=a.trigger,h=void 0===v?"hover":v,p=a.delay,g=void 0===p?100:p,k=a.open,w=a.backgroundColor,b=a.style,y=void 0===b?{}:b,T=a.className,E=void 0===T?"":T,L=o(!1),z=L[0],C=L[1],j=o(!1),x=j[0],M=j[1],N=o({top:0,left:0}),q=N[0],A=N[1],F=i(null),B=i(null),R=i(null),I=i(null),D=void 0!==k,G=(D?k:z)||x,H=c(function(){if(F.current&&B.current){var e=F.current.getBoundingClientRect(),t=B.current.getBoundingClientRect(),n=0,r=0;switch(m){case"top":n=e.top-t.height-8,r=e.left+(e.width-t.width)/2;break;case"bottom":n=e.bottom+8,r=e.left+(e.width-t.width)/2;break;case"left":n=e.top+(e.height-t.height)/2,r=e.left-t.width-8;break;case"right":n=e.top+(e.height-t.height)/2,r=e.right+8}A({top:n,left:r})}},[m]),J=c(function(){s&&(I.current&&(clearTimeout(I.current),I.current=null),D||(C(!0),requestAnimationFrame(function(){M(!0)})))},[s,D]),K=c(function(){D||(M(!1),I.current=setTimeout(function(){C(!1),I.current=null},200))},[D]),O=c(function(e){if("click"===h&&!D&&z){var t=e.target;F.current&&!F.current.contains(t)&&B.current&&!B.current.contains(t)&&K()}},[h,D,z,K]);u(function(){D&&(k?(I.current&&(clearTimeout(I.current),I.current=null),requestAnimationFrame(function(){M(!0)})):(M(!1),I.current=setTimeout(function(){I.current=null},200)))},[k,D]),u(function(){if(G){requestAnimationFrame(H);var e=function(){return H()},t=function(){return H()};return window.addEventListener("resize",e),window.addEventListener("scroll",t,!0),"click"!==h||D||document.addEventListener("click",O),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",t,!0),"click"!==h||D||document.removeEventListener("click",O)}}},[G,m,h,D,H,O]),u(function(){return function(){R.current&&clearTimeout(R.current),I.current&&clearTimeout(I.current)}},[]);var P=G&&s&&t("div",{ref:B,className:"zjpcy-tooltip zjpcy-tooltip-".concat(m," ").concat(x?"is-visible":""," ").concat(E),style:e({position:"fixed",top:q.top,left:q.left,zIndex:1e3,backgroundColor:w},y),onMouseEnter:"hover"!==h||D?void 0:function(){I.current&&(clearTimeout(I.current),I.current=null),C(!0),M(!0)},onMouseLeave:"hover"!==h||D?void 0:K,children:[n("div",{className:"zjpcy-tooltip-content",children:s}),n("div",{className:"zjpcy-tooltip-arrow",style:{backgroundColor:w}})]});return t(r,{children:[n("span",{ref:F,onMouseEnter:"hover"===h?function(){"hover"!==h||D||(R.current&&clearTimeout(R.current),R.current=setTimeout(function(){J(),R.current=null},g))}:void 0,onMouseLeave:"hover"===h?function(){"hover"!==h||D||(R.current&&(clearTimeout(R.current),R.current=null),K())}:void 0,onClick:"click"===h?function(){"click"!==h||D||(z?K():J())}:void 0,style:{display:"inline-block"},children:d}),P&&l(P,document.body)]})};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useCallback as r,useEffect as e}from"react";import i from"../Icon/Icon.js";var c=function(c){var l=c.showAfter,a=void 0===l?100:l,d=c.bottom,s=void 0===d?30:d,u=c.right,p=void 0===u?30:u,h=c.size,f=void 0===h?40:h,v=c.color,x=void 0===v?"#fff":v,m=c.bgColor,b=void 0===m?"#1a2980":m,w=c.boxShadow,g=void 0===w?"0 2px 10px rgba(0, 0, 0, 0.15)":w,y=c.onClick,C=c.containerRef,k=c.icon,I=t(!1),L=I[0],j=I[1],z=n(null),E=r(function(){(null==C?void 0:C.current)?C.current.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"}),null==y||y()},[y,C]);if(e(function(){var o=function(){var o=0;o=(null==C?void 0:C.current)?C.current.scrollTop:window.pageYOffset,j(o>a)};if(null==C?void 0:C.current){var t=C.current;return t.addEventListener("scroll",o),o(),function(){return t.removeEventListener("scroll",o)}}return window.addEventListener("scroll",o),o(),function(){return window.removeEventListener("scroll",o)}},[a,C]),!L)return null;var N=o(i,{type:"arrowUp",size:Math.floor(.5*f)}),S=.5*f;return(null==C?void 0:C.current)?o("div",{ref:z,className:"top-button-wrapper-container",style:{position:"sticky",bottom:"".concat(s,"px"),marginLeft:"auto",width:"".concat(f,"px"),height:"".concat(f,"px"),right:"".concat(p,"px"),zIndex:10},children:o("button",{className:"top-button",onClick:E,style:{width:"".concat(f,"px"),height:"".concat(f,"px"),backgroundColor:b,color:x,boxShadow:g,padding:0,border:"none"},children:k?o("span",{style:{width:S,height:S,display:"flex",alignItems:"center",justifyContent:"center"},children:k}):N})}):o("div",{ref:z,className:"top-button-wrapper",style:{position:"fixed",bottom:"".concat(s,"px"),right:"".concat(p,"px"),zIndex:1e3},children:o("button",{className:"top-button",onClick:E,style:{width:"".concat(f,"px"),height:"".concat(f,"px"),backgroundColor:b,color:x,boxShadow:g,padding:0,border:"none"},children:k?o("span",{style:{width:S,height:S,display:"flex",alignItems:"center",justifyContent:"center"},children:k}):N})})};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__spreadArray as e}from"tslib";import{jsx as t,jsxs as n,Fragment as l}from"react/jsx-runtime";import{useState as r,useMemo as i,useCallback as a,useRef as s,useEffect as o}from"react";import{getWrapperClassName as c,getWrapperStyle as d,getListContainerClassName as u,getListContainerStyle as f,getSearchWrapperClassName as h,getSearchWrapperStyle as y,getSearchClassName as m,getSearchStyle as g,getSearchButtonClassName as v,getSearchButtonStyle as b,getListFooterClassName as N,getListFooterStyle as p,getOperationClassName as S,getOperationStyle as C,getOperationButtonClassName as K,getOperationButtonStyle as w,getListHeaderClassName as T,getListHeaderStyle as k,getHeaderLeftClassName as D,getHeaderLeftStyle as R,getItemCheckboxClassName as L,getItemCheckboxStyle as O,getHeaderCountClassName as x,getHeaderCountStyle as H,getLoadingClassName as W,getLoadingStyle as j,getLoadingSpinnerClassName as M,getLoadingSpinnerStyle as I,getListBodyClassName as z,getListBodyStyle as E,getListItemClassName as P,getListItemStyle as q,getListItemCheckboxClassName as A,getListItemCheckboxStyle as B,getItemContentClassName as F,getItemContentStyle as G,getEmptyClassName as J,getEmptyStyle as Q}from"./styles.js";import U from"../Icon/Icon.js";var V=function(e,t,n){return t?e[t]:e[n]},X=function(e,t){return V(e,null==t?void 0:t.key,"key")},Y=function(e,t){return V(e,null==t?void 0:t.title,"title")},Z=function(c){var d=c.dataSource,S=c.fieldNames,C=c.selectedKeys,K=c.showSearch,w=c.disabled,V=c.title,Z=c.description,$=c.searchPlaceholder,_=void 0===$?"请输入搜索内容":$,ee=c.filterOption,te=c.styles,ne=c.listHeight,le=c.listWidth,re=c.header,ie=c.search,ae=c.body,se=c.onSelectChange,oe=c.onSearch,ce=c.render,de=c.footer,ue=c.direction,fe=c.rowClassName,he=c.loading,ye=c.loadingRender,me=c.loadingDelay,ge=c.sourceSelectedKeys,ve=c.targetSelectedKeys,be=r(""),Ne=be[0],pe=be[1],Se=r(he),Ce=Se[0],Ke=Se[1],we=s(null);o(function(){return we.current&&(clearTimeout(we.current),we.current=null),he&&me&&me>0?(Ke(!0),we.current=setTimeout(function(){Ke(!1)},me)):Ke(he),function(){we.current&&clearTimeout(we.current)}},[he,me]);var Te=i(function(){return Ne?ee?d.filter(function(e){return ee(Ne,e)}):d.filter(function(e){var t=Y(e,S),n=null!=t?String(t):"";if(n)return n.toLowerCase().includes(Ne.toLowerCase());var l=Ne.toLowerCase();return Object.keys(e).some(function(t){var n=e[t];return"key"!==t&&"disabled"!==t&&(null!=n&&String(n).toLowerCase().includes(l))})}):d},[d,Ne,ee,S]),ke=i(function(){var e=Te.filter(function(e){return!e.disabled});return 0!==e.length&&e.every(function(e){return C.includes(X(e,S))})},[Te,C,S]),De=i(function(){var e=Te.filter(function(e){return!e.disabled});if(0===e.length)return!1;var t=e.filter(function(e){return C.includes(X(e,S))}).length;return t>0&&t<e.length},[Te,C,S]),Re=a(function(){if(!w){var t=Te.filter(function(e){return!e.disabled}).map(function(e){return X(e,S)});if(ke){var n=C.filter(function(e){return!t.includes(e)});"left"===ue?se(n,ve):se(ge,n)}else{var l=e(e([],C,!0),t,!0);n=l.filter(function(e,t){return l.indexOf(e)===t});"left"===ue?se(n,ve):se(ge,n)}}},[w,Te,C,ke,se,S,ue,ge,ve]),Le=a(function(t){if(!w&&!t.disabled){var n,l=X(t,S),r=C.indexOf(l);n=r>-1?e(e([],C.slice(0,r),!0),C.slice(r+1),!0):e(e([],C,!0),[l],!1),"left"===ue?se(n,ve):se(ge,n)}},[w,C,se,S,ue,ge,ve]),Oe=a(function(e){var t=e.target.value;pe(t)},[]),xe=a(function(){null==oe||oe(Ne)},[oe,Ne]),He=a(function(e){"Enter"===e.key&&xe()},[xe]),We=a(function(){xe()},[xe]),je=i(function(){var e=C.length,t=d.length;return"".concat(e,"/").concat(t)},[C,d]);return n("div",{className:u({disabled:w,className:"transfer-list"}),style:f({height:ne,width:le,style:null==te?void 0:te.list}),children:[function(){if(re){var e=re({direction:ue,dataSource:d,selectedKeys:C,sourceSelectedKeys:ge,targetSelectedKeys:ve});return null===e?null:e}var l=w||0===Te.length;return n("div",{className:T({className:"transfer-list-header"}),style:k({}),children:[n("div",{className:D({}),style:R({}),children:[t("span",{className:L({checked:ke,indeterminate:De,disabled:l,className:"transfer-checkbox"}),style:O({style:{opacity:l?.6:1}}),onClick:Re}),t("span",{children:V})]}),t("span",{className:x({}),style:H({}),children:je})]})}(),K&&null!==re&&t("div",{className:h({className:"transfer-search-wrapper"}),style:y({}),children:ie?ie({direction:ue,value:Ne,onChange:function(e){pe(e),null==oe||oe(e)},disabled:w}):n(l,{children:[t("input",{type:"text",className:m({disabled:w,className:"transfer-search"}),style:g({style:null==te?void 0:te.search}),placeholder:_,value:Ne,onChange:Oe,onKeyDown:He,disabled:w}),t("button",{className:v({disabled:w,className:"transfer-search-button"}),style:b({}),onClick:We,disabled:w,"aria-label":"搜索",children:t(U,{type:"search",size:"small",color:w?"#bfbfbf":"#1890ff"})})]})}),ae?ae({direction:ue,dataSource:Te,selectedKeys:C,sourceSelectedKeys:ge,targetSelectedKeys:ve,onSelectChange:se}):t("div",Ce?{className:W({className:"transfer-loading"}),style:j({}),children:ye?ye():t("div",{className:M({className:"transfer-loading-spinner"}),style:I({})})}:{className:z({className:"transfer-list-body"}),style:E({}),children:Te.length>0?Te.map(function(e){var l=X(e,S),r=C.includes(l),i=(null==fe?void 0:fe(e))||"";return n("div",{className:P({selected:r,disabled:w||e.disabled,className:"transfer-list-item ".concat(i)}),style:q({style:null==te?void 0:te.item}),onClick:function(){return Le(e)},children:[t("span",{className:A({checked:r,disabled:w||e.disabled}),style:B({})}),t("span",{className:F({}),style:G({}),children:ce?ce(e):Y(e,S)})]},l)}):t("div",{className:J({className:"transfer-empty"}),style:Q({}),children:"暂无数据"})}),(Z||de)&&t("div",{className:N({className:"transfer-list-footer"}),style:p({}),children:de?de({direction:ue}):Z})]})},$=function(e){var l=e.moveToRightDisabled,r=e.moveToLeftDisabled,i=e.onMoveToRight,a=e.onMoveToLeft,s=e.style;return n("div",{className:S({className:"transfer-operation"}),style:C({style:s}),children:[t("button",{type:"button",className:K({direction:"right",disabled:l,className:"transfer-operation-button transfer-operation-button-right"}),style:w({}),onClick:i,disabled:l,"aria-label":"移动到右侧"}),t("button",{type:"button",className:K({direction:"left",disabled:r,className:"transfer-operation-button transfer-operation-button-left"}),style:w({}),onClick:a,disabled:r,"aria-label":"移动到左侧"})]})},_=function(s){var o=s.dataSource,u=s.fieldNames,f=s.targetKeys,h=s.defaultTargetKeys,y=void 0===h?[]:h,m=s.selectedKeys,g=s.defaultSelectedKeys,v=void 0===g?[]:g,b=s.showSearch,N=void 0!==b&&b,p=s.disabled,S=void 0!==p&&p,C=s.leftTitle,K=void 0===C?"源列表":C,w=s.rightTitle,T=void 0===w?"目标列表":w,k=s.leftDescription,D=s.rightDescription,R=s.filterOption,L=s.styles,O=s.listHeight,x=s.listWidth,H=s.header,W=s.search,j=s.body,M=s.onSelectChange,I=s.onChange,z=s.onSearch,E=s.render,P=s.footer,q=s.rowClassName,A=s.mode,B=void 0===A?"transfer":A,F=s.loading,G=void 0!==F&&F,J=s.loadingRender,Q=s.loadingDelay,U=void 0!==f,V=void 0!==m,Y=r(y),_=Y[0],ee=Y[1],te=r(v),ne=te[0],le=te[1],re=r([]),ie=re[0],ae=re[1],se=U?f:_,oe=V?m.filter(function(e){return!se.includes(e)}):ne,ce=V?m.filter(function(e){return se.includes(e)}):ie,de=i(function(){return o.filter(function(e){return!se.includes(X(e,u))})},[o,se,u]),ue=i(function(){return o.filter(function(e){return se.includes(X(e,u))})},[o,se,u]),fe=a(function(e,t){V||le(e),null==M||M(e,t)},[V,M]),he=a(function(e,t){V||ae(t),null==M||M(e,t)},[V,M]),ye=a(function(){if(0!==oe.length){var t=e(e([],se,!0),oe,!0),n=e([],oe,!0);U||(ee(t),le([])),null==I||I(t,"right",n)}},[oe,se,U,I]),me=a(function(){if(0!==ce.length){var t=se.filter(function(e){return!ce.includes(e)}),n=e([],ce,!0);U||(ee(t),ae([])),null==I||I(t,"left",n)}},[ce,se,U,I]),ge=a(function(e){null==z||z("left",e)},[z]),ve=a(function(e){null==z||z("right",e)},[z]),be=S||0===oe.length,Ne=S||0===ce.length,pe=a(function(e,t){var n=e;U||ee(n),null==I||I(n,"right",n),null==M||M([],n)},[U,I,M]),Se=i(function(){return o},[o]),Ce=i(function(){return V?m.filter(function(e){return se.includes(e)}):se},[V,m,se]);return t("div",{className:c({className:"transfer-wrapper"}),style:d({style:null==L?void 0:L.wrapper}),children:"single"===B?t(Z,{direction:"left",dataSource:Se,fieldNames:u,selectedKeys:Ce,showSearch:N,disabled:S,title:K,description:k,filterOption:R,styles:L,listHeight:O,listWidth:x,header:H,search:W,body:j,onSelectChange:pe,onSearch:ge,render:E,footer:P,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:[],targetSelectedKeys:Ce}):n(l,{children:[t(Z,{direction:"left",dataSource:de,fieldNames:u,selectedKeys:oe,showSearch:N,disabled:S,title:K,description:k,filterOption:R,styles:L,listHeight:O,listWidth:x,header:H,search:W,body:j,onSelectChange:fe,onSearch:ge,render:E,footer:P,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:oe,targetSelectedKeys:ce}),t($,{moveToRightDisabled:be,moveToLeftDisabled:Ne,onMoveToRight:ye,onMoveToLeft:me,style:null==L?void 0:L.operation}),t(Z,{direction:"right",dataSource:ue,fieldNames:u,selectedKeys:ce,showSearch:N,disabled:S,title:T,description:D,filterOption:R,styles:L,listHeight:O,listWidth:x,header:H,search:W,body:j,onSelectChange:he,onSearch:ve,render:E,footer:P,rowClassName:q,loading:G,loadingRender:J,loadingDelay:Q,sourceSelectedKeys:oe,targetSelectedKeys:ce})]})})};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import e from"classnames";var t=function(r){var t=r.className;return e("transfer-wrapper",t)},n=function(e){var t=e.style;return r({},t)},a=function(r){var t=r.disabled,n=r.className;return e("transfer-list",{"transfer-list-disabled":t},n)},s=function(e){var t=e.height,n=e.width,a=e.style,s="number"==typeof t?"".concat(t,"px"):t,c="number"==typeof n?"".concat(n,"px"):n;return r({height:s,width:c},a)},c=function(r){var t=r.className;return e("transfer-list-header",t)},i=function(e){var t=e.style;return r({},t)},u=function(r){var t=r.className;return e("transfer-header-left",t)},o=function(e){var t=e.style;return r({},t)},f=function(r){var t=r.className;return e("transfer-header-count",t)},l=function(e){var t=e.style;return r({},t)},d=function(r){var t=r.className;return e("transfer-search-wrapper",t)},m=function(e){var t=e.style;return r({},t)},v=function(r){var t=r.disabled,n=r.className;return e("transfer-search",{"transfer-search-disabled":t},n)},b=function(e){var t=e.style;return r({},t)},h=function(r){var t=r.disabled,n=r.className;return e("transfer-search-button",{"transfer-search-button-disabled":t},n)},y=function(e){var t=e.style;return r({},t)},N=function(r){var t=r.className;return e("transfer-list-body",t)},p=function(e){var t=e.style;return r({},t)},k=function(r){var t=r.selected,n=r.disabled,a=r.className;return e("transfer-list-item",{"transfer-list-item-selected":t,"transfer-list-item-disabled":n},a)},x=function(e){var t=e.style;return r({},t)},g=function(r){var t=r.checked,n=r.indeterminate,a=r.disabled,s=r.className;return e("transfer-item-checkbox",{"transfer-item-checkbox-checked":t,"transfer-item-checkbox-indeterminate":n,"transfer-item-checkbox-disabled":a},s)},w=function(e){var t=e.style;return r({},t)},j=function(r){var t=r.checked,n=r.disabled,a=r.className;return e("transfer-list-item-checkbox",{"transfer-list-item-checkbox-checked":t,"transfer-list-item-checkbox-disabled":n},a)},q=function(e){var t=e.style;return r({},t)},z=function(r){var t=r.className;return e("transfer-item-content",t)},A=function(e){var t=e.style;return r({},t)},B=function(r){var t=r.className;return e("transfer-list-footer",t)},C=function(e){var t=e.style;return r({},t)},D=function(r){var t=r.className;return e("transfer-operation",t)},E=function(e){var t=e.style;return r({},t)},F=function(r){var t=r.direction,n=r.disabled,a=r.className;return e("transfer-operation-button","transfer-operation-button-".concat(t),{"transfer-operation-button-disabled":n},a)},G=function(e){var t=e.style;return r({},t)},H=function(r){var t=r.className;return e("transfer-empty",t)},I=function(e){var t=e.style;return r({},t)},J=function(r){var t=r.className;return e("transfer-loading",t)},K=function(e){var t=e.style;return r({},t)},L=function(r){var t=r.className;return e("transfer-loading-spinner",t)},M=function(e){var t=e.style;return r({},t)};export{H as getEmptyClassName,I as getEmptyStyle,f as getHeaderCountClassName,l as getHeaderCountStyle,u as getHeaderLeftClassName,o as getHeaderLeftStyle,g as getItemCheckboxClassName,w as getItemCheckboxStyle,z as getItemContentClassName,A as getItemContentStyle,N as getListBodyClassName,p as getListBodyStyle,a as getListContainerClassName,s as getListContainerStyle,B as getListFooterClassName,C as getListFooterStyle,c as getListHeaderClassName,i as getListHeaderStyle,j as getListItemCheckboxClassName,q as getListItemCheckboxStyle,k as getListItemClassName,x as getListItemStyle,J as getLoadingClassName,L as getLoadingSpinnerClassName,M as getLoadingSpinnerStyle,K as getLoadingStyle,F as getOperationButtonClassName,G as getOperationButtonStyle,D as getOperationClassName,E as getOperationStyle,h as getSearchButtonClassName,y as getSearchButtonStyle,v as getSearchClassName,b as getSearchStyle,d as getSearchWrapperClassName,m as getSearchWrapperStyle,t as getWrapperClassName,n as getWrapperStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__spreadArray as e,__assign as n}from"tslib";import{jsxs as t,jsx as i}from"react/jsx-runtime";import{memo as r,useState as o,useRef as c,useEffect as a,useCallback as l,forwardRef as d,useImperativeHandle as u,useMemo as s}from"react";import f from"classnames";import h from"../Tooltip/Tooltip.js";var p=function(e){var n=e.className;return i("span",{className:n,children:i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:i("path",{d:"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8z"})})})},v=function(){return i("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor",children:i("path",{d:"M8 5l8 7-8 7V5z"})})},y=function(e){var n=e.expanded;return i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:i("path",n?{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}:{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})})},m=function(){return t("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:[i("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),i("polyline",{points:"14 2 14 8 20 8",stroke:"currentColor",strokeWidth:"2",fill:"none"})]})},k=function(){return i("svg",{viewBox:"0 0 24 24",width:"48",height:"48",fill:"currentColor",opacity:"0.3",children:i("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"})})},g=function(e,n){return e.children&&0!==e.children.length?e.children.every(function(e){return g(e,n)}):n.includes(e.key)},b=function(e,n){if(!e.children||0===e.children.length)return n.includes(e.key);var t=e.children.map(function(e){return{key:e.key,allChecked:g(e,n),someChecked:b(e,n)}}),i=t.some(function(e){return e.allChecked||e.someChecked}),r=t.every(function(e){return e.allChecked});return i&&!r},N=function(e,n){for(var t=0,i=e;t<i.length;t++){var r=i[t];if(r.key===n)return r;if(r.children){var o=N(r.children,n);if(o)return o}}return null},x=function(e){return e.reduce(function(e,n){return e.push(n.key),n.children&&e.push.apply(e,x(n.children)),e},[])},C=function(e,n){for(var t=0,i=e;t<i.length;t++){var r=i[t];if(r.children){if(r.children.some(function(e){return e.key===n}))return r;var o=C(r.children,n);if(o)return o}}return null},w=function(e,n,t){var i;if(null===n)return e.push.apply(e,t),!0;for(var r=0,o=e;r<o.length;r++){var c=o[r];if(c.key===n)return c.children||(c.children=[]),(i=c.children).push.apply(i,t),!0;if(c.children)if(w(c.children,n,t))return!0}return!1},E=function(e,n){var t=e.findIndex(function(e){return e.key===n});if(-1!==t)return e.splice(t,1),!0;for(var i=0,r=e;i<r.length;i++){var o=r[i];if(o.children)if(E(o.children,n))return!0}return!1},D=function(e,n,t){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(o.key===n)return Object.assign(o,t),!0;if(o.children)if(D(o.children,n,t))return!0}return!1},L=function(e,t,i){return e.reduce(function(e,r){var o=i(t,r),c=r.children?L(r.children,t,i):[];return(o||c.length>0)&&e.push(n(n({},r),{children:c.length>0?c:void 0})),e},[])},S=r(function(e){var r=e.node,d=e.level,u=e.expanded,s=e.selected,k=e.checked,g=e.halfChecked,N=e.loading,x=e.isLeaf,C=e.showIcon,w=e.showLine,E=e.checkable,D=e.draggable,L=e.checkStrictly,K=e.expandedKeys,M=e.selectedKeys,z=e.checkedKeys,B=e.motionDuration,T=e.prefixCls,V=e.renderNode,A=e.addable,I=e.removable,j=e.editable,P=e.actionDisplayMode,H=e.onAddNode,R=e.onRemoveNode,O=e.onEditNode,F=e.editingNodeKey,W=e.editValue,q=e.onEditChange,Y=e.onEditConfirm,G=e.onEditCancel,J=e.onExpand,Q=e.onSelect,U=e.onCheck,X=e.onNodeMount,Z=e.onDrop,$=e.dragEndCounter,_=e.tooltip,ee=o(!1),ne=ee[0],te=ee[1],ie=o(null),re=ie[0],oe=ie[1],ce=o(!1),ae=ce[0],le=ce[1],de=c(null),ue=c(null);a(function(){void 0!==$&&$>0&&(te(!1),oe(null))},[$]);var se=l(function(e){de.current=e,X&&X(r.key,e)},[X,r.key]),fe=Boolean(r.children&&r.children.length>0),he=void 0!==r.children,pe=K.includes(r.key),ve=r.disabled,ye=D&&!ve,me=void 0!==r.isLeaf?r.isLeaf:!he,ke=l(function(e){e.stopPropagation(),me||N||J(r.key,e)},[me,N,r.key,J]),ge=l(function(e){e.stopPropagation(),ve||r.disableCheckbox||U(r.key,e)},[ve,r.disableCheckbox,r.key,U]),be=l(function(e){ve||(E?ge(e):Q(r.key,e))},[ve,E,r.key,Q,ge]),Ne=l(function(e){if(ye){e.stopPropagation(),e.dataTransfer.setData("text/plain",String(r.key)),e.dataTransfer.effectAllowed="move";var n=document.createElement("div");n.style.cssText="\n position: absolute;\n top: -1000px;\n left: -1000px;\n padding: 4px 8px;\n background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n font-family: inherit;\n white-space: nowrap;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n z-index: 9999;\n pointer-events: none;\n ";var t="string"==typeof r.title?r.title:String(r.title);n.textContent=t,document.body.appendChild(n),e.dataTransfer.setDragImage(n,10,10),setTimeout(function(){document.body.removeChild(n)},0)}},[ye,r.key,r.title]),xe=l(function(){te(!1),oe(null)},[]),Ce=l(function(e){var n;if(ye){e.preventDefault(),e.dataTransfer.dropEffect="move";var t=e.target,i=de.current;if(i&&t&&i.contains(t)){var r=i.querySelector(".".concat(T,"-child-tree"));if(r&&r.contains(t))return}var o=null===(n=de.current)||void 0===n?void 0:n.getBoundingClientRect();if(o){var c=e.clientY-o.top,a=o.height;oe(me?c<a/2?"before":"after":c<a/3?"before":c>2*a/3?"after":"inside"),te(!0)}}},[ye,me,T]),we=l(function(){te(!1),oe(null)},[]),Ee=l(function(e){e.preventDefault(),e.stopPropagation(),te(!1),oe(null);var n=e.dataTransfer.getData("text/plain");n&&n!==String(r.key)&&Z&&re&&Z(n,r.key,re)},[r.key,re,Z]),De=F===r.key,Le=["".concat(T,"-treenode"),"".concat(T,"-treenode-ellipsis"),s&&"".concat(T,"-node-selected"),ve&&"".concat(T,"-treenode-disabled"),ye&&"".concat(T,"-treenode-draggable"),ne&&"".concat(T,"-treenode-drag-over"),ne&&re&&"".concat(T,"-treenode-drop-target"),me&&"".concat(T,"-treenode-leaf"),w&&"".concat(T,"-line")].filter(Boolean).join(" "),Se=["".concat(T,"-node-content-wrapper"),s&&"".concat(T,"-node-selected")].filter(Boolean).join(" ");return t("div",{ref:se,className:Le,draggable:ye,onDragStart:Ne,onDragEnd:xe,onDragOver:Ce,onDragLeave:we,onDrop:Ee,"data-drop-position":re,children:[function(){if(0===d)return null;for(var e=[],n=0;n<d;n++)e.push(i("span",{className:"".concat(T,"-indent")},n));return e}(),w&&d>0&&i("span",{className:"".concat(T,"-line-point")}),function(){if(N)return i("span",{className:"".concat(T,"-switcher"),children:i(p,{className:"".concat(T,"-loading-icon")})});if(me)return i("span",{className:"".concat(T,"-switcher ").concat(T,"-switcher-spaced"),style:{visibility:"hidden"}});var e=["".concat(T,"-switcher"),"".concat(T,pe?"-switcher-open":"-switcher-close")].join(" ");return i("span",{className:e,onClick:ke,children:i(v,{})})}(),function(){var e;if(!E)return null;var n=f("".concat(T,"-checkbox"),((e={})["".concat(T,"-checkbox-checked")]=k&&!g,e["".concat(T,"-checkbox-indeterminate")]=g,e["".concat(T,"-checkbox-disabled")]=ve||r.disableCheckbox,e["".concat(T,"-checkbox-disabled-checked")]=(ve||r.disableCheckbox)&&k&&!g,e["".concat(T,"-checkbox-disabled-indeterminate")]=(ve||r.disableCheckbox)&&g,e));return i("span",{className:n,onClick:ge})}(),!C||V?null:r.icon?i("span",{className:"".concat(T,"-icon"),children:r.icon}):i("span",{className:"".concat(T,"-icon"),children:x?i(m,{}):i(y,{expanded:pe})}),i("span",{className:Se,onClick:be,children:function(){var e,t="".concat(T,"-title"),o=void 0!==r.tooltip?"boolean"==typeof r.tooltip?r.tooltip?{title:r.title}:null:n(n({},r.tooltip),{title:r.tooltip.title||r.title}):void 0!==_?"boolean"==typeof _?_?{title:r.title}:null:n(n({},_),{title:_.title||r.title}):null,c=i("span",V?{className:t,children:V(r)}:De?{className:t,children:i("input",{type:"text",value:W||"",onChange:function(e){return null==q?void 0:q(e.target.value)},onKeyDown:function(e){"Enter"===e.key?null==Y||Y():"Escape"===e.key&&(null==G||G())},onBlur:function(){return null==Y?void 0:Y()},autoFocus:!0,className:"".concat(T,"-title-input"),style:{border:"1px solid #1890ff",borderRadius:"2px",padding:"0 4px",fontSize:"inherit",fontFamily:"inherit",outline:"none",width:"auto",minWidth:"60px"}})}:{className:t,children:r.title});return o&&!De?i(h,{title:o.title||r.title,placement:o.placement||"top",trigger:o.trigger||"hover",delay:null!==(e=o.delay)&&void 0!==e?e:100,backgroundColor:o.backgroundColor,style:o.style,className:o.className,children:c}):c}()}),function(){if(!A&&!I&&!j)return null;if(De)return null;var e="dropdown"===P,o=function(n){null==n||n.stopPropagation(),null==H||H(r),e&&le(!1)},c=function(n){null==n||n.stopPropagation(),null==R||R(r),e&&le(!1)},a=function(n){null==n||n.stopPropagation(),null==O||O(r),e&&le(!1)};if(e)return t("span",{className:"".concat(T,"-actions ").concat(T,"-actions-dropdown"),ref:ue,onMouseEnter:function(){return le(!0)},onMouseLeave:function(){return le(!1)},children:[i("button",{className:"".concat(T,"-action-trigger"),title:"操作",onClick:function(e){return e.stopPropagation()},children:"⋮"}),ae&&t("div",{className:"".concat(T,"-action-menu"),children:[A&&t("div",{className:f("".concat(T,"-action-menu-item"),"".concat(T,"-action-menu-add")),onClick:o,children:[i("span",{className:"".concat(T,"-action-menu-icon"),children:"+"}),i("span",{children:"添加子节点"})]}),j&&t("div",{className:f("".concat(T,"-action-menu-item"),"".concat(T,"-action-menu-edit")),onClick:a,children:[i("span",{className:"".concat(T,"-action-menu-icon"),children:"✎"}),i("span",{children:"编辑"})]}),I&&t("div",{className:f("".concat(T,"-action-menu-item"),"".concat(T,"-action-menu-remove")),onClick:c,children:[i("span",{className:"".concat(T,"-action-menu-icon"),children:"×"}),i("span",{children:"删除"})]})]})]});var l={padding:"0 4px",marginLeft:"4px",fontSize:"12px",cursor:"pointer",background:"transparent",border:"none",color:"#1890ff",transition:"opacity 0.2s"};return t("span",{className:"".concat(T,"-actions"),style:{marginLeft:"auto",display:"flex",alignItems:"center"},children:[A&&i("button",{onClick:o,style:l,title:"添加子节点",className:"".concat(T,"-action-btn ").concat(T,"-action-add"),children:"+"}),j&&i("button",{onClick:a,style:l,title:"编辑",className:"".concat(T,"-action-btn ").concat(T,"-action-edit"),children:"✎"}),I&&i("button",{onClick:c,style:n(n({},l),{color:"#ff4d4f"}),title:"删除",className:"".concat(T,"-action-btn ").concat(T,"-action-remove"),children:"×"})]})}(),!me&&i("div",{className:["".concat(T,"-child-tree"),pe&&"".concat(T,"-child-tree-expand")].filter(Boolean).join(" "),children:i("div",{children:fe?r.children.map(function(e,n){return i(S,{node:e,level:d+1,expanded:u,selected:M.includes(e.key),checked:z.includes(e.key),halfChecked:b(e,z),loading:e.loading||!1,isLeaf:!e.children||0===e.children.length,showIcon:C,showLine:w,checkable:E,draggable:D,checkStrictly:L,expandedKeys:K,selectedKeys:M,checkedKeys:z,motionDuration:B,prefixCls:T,renderNode:V,addable:A,removable:I,editable:j,actionDisplayMode:P,onAddNode:H,onRemoveNode:R,onEditNode:O,editingNodeKey:F,editValue:W,onEditChange:q,onEditConfirm:Y,onEditCancel:G,onExpand:J,onSelect:Q,onCheck:U,onNodeMount:X,onDrop:Z,dragEndCounter:$,tooltip:_},"".concat(e.key,"-").concat(n))}):i("div",{className:"".concat(T,"-empty-drop-zone"),style:{minHeight:"4px",width:"100%"}})})})]})});S.displayName="TreeNodeComponent";var K=d(function(r,d){var f=r.treeData,h=void 0===f?[]:f,p=r.defaultExpandedKeys,v=void 0===p?[]:p,y=r.expandedKeys,m=r.onExpand,g=r.defaultSelectedKeys,K=void 0===g?[]:g,M=r.selectedKeys,z=r.onSelect,B=r.defaultCheckedKeys,T=void 0===B?[]:B,V=r.checkedKeys,A=r.onCheck,I=r.checkable,j=void 0!==I&&I,P=r.checkStrictly,H=void 0!==P&&P,R=r.multiple,O=void 0!==R&&R,F=r.showSearch,W=void 0!==F&&F,q=r.filterOption,Y=r.showLine,G=void 0!==Y&&Y,J=r.showIndent,Q=void 0!==J&&J,U=r.showIcon,X=void 0===U||U,Z=r.loadData,$=r.motionDuration,_=void 0===$?200:$,ee=r.draggable,ne=void 0!==ee&&ee,te=r.renderNode,ie=r.addable,re=void 0!==ie&&ie,oe=r.removable,ce=void 0!==oe&&oe,ae=r.editable,le=void 0!==ae&&ae,de=r.actionDisplayMode,ue=void 0===de?"inline":de,se=r.onAddNode,fe=r.onRemoveNode,he=r.onEditNode,pe=r.prefixCls,ve=void 0===pe?"zjpcy-tree":pe,ye=r.className,me=void 0===ye?"":ye,ke=r.style,ge=void 0===ke?{}:ke,be=r.disabled,Ne=void 0!==be&&be,xe=r.defaultExpandAll,Ce=void 0!==xe&&xe,we=r.tooltip,Ee=r.onDrop,De=o(h),Le=De[0],Se=De[1],Ke=c(h);a(function(){Ke.current!==h&&(Ke.current=h,Se(h))},[h]);var Me=o(function(){if(Ce){var n=function(t){return t.reduce(function(t,i){return i.children&&i.children.length>0&&t.push.apply(t,e([i.key],n(i.children),!1)),t},[])};return n(h)}return v}),ze=Me[0],Be=Me[1],Te=o(K),Ve=Te[0],Ae=Te[1],Ie=o(T),je=Ie[0],Pe=Ie[1],He=o([]),Re=He[0],Oe=He[1],Fe=o(""),We=Fe[0],qe=Fe[1],Ye=o(null),Ge=Ye[0],Je=Ye[1],Qe=o(""),Ue=Qe[0],Xe=Qe[1],Ze=o(0),$e=Ze[0],_e=Ze[1],en=c(new Map),nn=c(null),tn=l(function(n){if(se){var t=se(n);if(t){var i=Array.isArray(t)?t:[t];Se(function(t){var r=e([],t,!0);return w(r,n.key,i),ze.includes(n.key)||Be(function(t){return e(e([],t,!0),[n.key],!1)}),r})}}},[se,ze]),rn=l(function(n){fe?fe(n)&&Se(function(t){var i=e([],t,!0);return E(i,n.key),Be(function(e){return e.filter(function(e){return e!==n.key})}),Ae(function(e){return e.filter(function(e){return e!==n.key})}),Pe(function(e){return e.filter(function(e){return e!==n.key})}),en.current.delete(n.key),i}):Se(function(t){var i=e([],t,!0);return E(i,n.key),Be(function(e){return e.filter(function(e){return e!==n.key})}),Ae(function(e){return e.filter(function(e){return e!==n.key})}),Pe(function(e){return e.filter(function(e){return e!==n.key})}),en.current.delete(n.key),i})},[fe]),on=l(function(e){Je(e.key),Xe(String(e.title||""))},[]),cn=l(function(e){Xe(e)},[]),an=l(function(){if(null!==Ge){if(he){var n=N(Le,Ge);if(n){var t=he(n,Ue),i=void 0!==t?t:Ue;Se(function(n){var t=e([],n,!0);return D(t,Ge,{title:i}),t})}}else Se(function(n){var t=e([],n,!0);return D(t,Ge,{title:Ue}),t});Je(null),Xe("")}},[Ge,Ue,he,Le]),ln=l(function(){Je(null),Xe("")},[]);u(d,function(){return{scrollTo:function(e){var n=en.current.get(e);n&&nn.current&&n.scrollIntoView({behavior:"smooth",block:"center"})},addNode:function(n,t){Se(function(i){var r=e([],i,!0),o=Array.isArray(t)?t:[t];return w(r,n,o),r})},removeNode:function(n){var t=!1;return Se(function(i){var r=e([],i,!0);return(t=E(r,n))&&(Be(function(e){return e.filter(function(e){return e!==n})}),Ae(function(e){return e.filter(function(e){return e!==n})}),Pe(function(e){return e.filter(function(e){return e!==n})}),en.current.delete(n)),r}),t},updateNode:function(n,t){var i=!1;return Se(function(r){var o=e([],r,!0);return i=D(o,n,t),o}),i}}});var dn=l(function(e,n){n?en.current.set(e,n):en.current.delete(e)},[]),un=void 0!==y,sn=void 0!==M,fn=void 0!==V,hn=un?y:ze,pn=sn?M:Ve,vn=fn?V:je,yn=l(function(n,t){if(!Ne){var i=hn.includes(n),r=i?hn.filter(function(e){return e!==n}):e(e([],hn,!0),[n],!1);if(!i&&Z){var o=N(Le,n);!o||o.children&&0!==o.children.length||(Oe(function(t){return e(e([],t,!0),[n],!1)}),Z(o).finally(function(){Oe(function(e){return e.filter(function(e){return e!==n})})}))}un||Be(r),null==m||m(r,{expanded:!i,node:N(Le,n),nativeEvent:t})}},[Ne,hn,un,m,Le,Z]),mn=l(function(n,t){if(!Ne){var i,r=pn.includes(n);i=O?r?pn.filter(function(e){return e!==n}):e(e([],pn,!0),[n],!1):r?[]:[n],sn||Ae(i),null==z||z(i,{selected:!r,node:N(Le,n),nativeEvent:t})}},[Ne,pn,sn,O,z,Le]),kn=l(function(n,t){if(!Ne){var i,r,o=vn.includes(n);if(o){if(i=vn.filter(function(e){return e!==n}),!H)if(null==(r=N(Le,n))?void 0:r.children){var c=x(r.children);i=i.filter(function(e){return!c.includes(e)})}}else if(i=e(e([],vn,!0),[n],!1),!H)if(null==(r=N(Le,n))?void 0:r.children){var a=x(r.children);i=i.concat(a.filter(function(e){return-1===i.indexOf(e)}))}fn||Pe(i),null==A||A(i,{checked:!o,node:N(Le,n),nativeEvent:t})}},[Ne,vn,fn,H,A,Le]),gn=l(function(t,i,r){if(t!==i){var o=N(Le,t),c=N(Le,i);if(o&&c){var a=function(e,n){if(e.children)for(var t=0,i=e.children;t<i.length;t++){var r=i[t];if(r.key===n)return!0;if(a(r,n))return!0}return!1};if(!a(o,i)){var l=void 0!==c.isLeaf?c.isLeaf:void 0===c.children,d=function(e){return n(n({},e),{children:e.children?e.children.map(d):void 0})};Se(function(n){var c=n.map(d);E(c,t);var a=d(o),u="inside"===r&&l?"after":r;if("inside"===u)w(c,i,[a]),ze.includes(i)||Be(function(n){return e(e([],n,!0),[i],!1)});else{var s=C(c,i),f=s?s.children||[]:c,h=f.findIndex(function(e){return e.key===i});if(-1!==h){var p="before"===u?h:h+1;f.splice(p,0,a)}}return c}),null==Ee||Ee({event:{},node:c,dragNode:o,dragPosition:r}),_e(function(e){return e+1})}}}},[Le,ze,Ee]),bn=s(function(){return W&&We&&q?L(Le,We,q):Le},[Le,W,We,q]),Nn=[ve,G&&"".concat(ve,"-show-line"),me].filter(Boolean).join(" ");return t("div",{ref:nn,className:Nn,style:ge,children:[W?i("div",{className:"".concat(ve,"-search-wrapper"),children:i("input",{type:"text",className:"".concat(ve,"-search-input"),placeholder:"Search...",value:We,onChange:function(e){return qe(e.target.value)}})}):null,t("div",{className:"".concat(ve,"-node-list"),children:[bn.map(function(e){return i(S,{node:e,level:0,expanded:hn.includes(e.key),selected:pn.includes(e.key),checked:vn.includes(e.key),halfChecked:b(e,vn),loading:Re.includes(e.key),isLeaf:void 0!==e.isLeaf?e.isLeaf:void 0===e.children,showIcon:X,showLine:G,showIndent:Q,checkable:j,draggable:ne,checkStrictly:H,expandedKeys:hn,selectedKeys:pn,checkedKeys:vn,motionDuration:_,prefixCls:ve,renderNode:te,addable:re,removable:ce,editable:le,actionDisplayMode:ue,onAddNode:tn,onRemoveNode:rn,onEditNode:on,editingNodeKey:Ge,editValue:Ue,onEditChange:cn,onEditConfirm:an,onEditCancel:ln,onExpand:yn,onSelect:mn,onCheck:kn,onNodeMount:dn,onDrop:gn,dragEndCounter:$e,tooltip:we},String(e.key))}),bn.length>0?null:t("div",{className:"".concat(ve,"-empty"),children:[i("div",{className:"".concat(ve,"-empty-icon"),children:i(k,{})}),i("div",{children:"No Data"})]})]})]})});K.displayName="Tree";var M=K;export{K as Tree,M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__spreadArray as e}from"tslib";import{jsxs as n,jsx as t,Fragment as r}from"react/jsx-runtime";import{useState as l,useRef as i,useCallback as o,useMemo as a,useEffect as s}from"react";import c from"classnames";import u from"../Empty/index.js";import{getTreeNodeWrapperClassName as d,getTreeNodeWrapperStyle as v,getTreeNodeClassName as f,getTreeNodeStyle as h,getExpandIconClassName as m,getExpandIconStyle as p,getCheckboxClassName as y,getCheckboxStyle as g,getCheckboxInnerClassName as N,getCheckboxInnerStyle as w,getNodeTitleClassName as C,getNodeTitleStyle as z,getTreeNodeChildrenClassName as x,getTreeNodeChildrenStyle as S,getSelectionItemClassName as L,getSelectionItemStyle as j,getTagClassName as B,getTagStyle as M,getTagContentClassName as k,getTagContentStyle as E,getTagCloseClassName as b,getTagCloseStyle as A,getWrapperClassName as P,getWrapperStyle as T,getSelectionClassName as V,getSelectionStyle as D,getSearchWrapperClassName as H,getSearchWrapperStyle as O,getSearchInputClassName as W,getSearchInputStyle as q,getRenderedClassName as F,getRenderedStyle as G,getClearIconClassName as I,getClearIconStyle as J,getArrowIconClassName as K,getArrowIconStyle as Q,getDropdownClassName as R,getDropdownStyle as U,getDropdownSearchWrapperClassName as X,getDropdownSearchWrapperStyle as Y,getDropdownSearchInputClassName as Z,getDropdownSearchInputStyle as $,getDropdownContentClassName as _,getDropdownContentStyle as ee,getEmptyWrapperClassName as ne,getEmptyWrapperStyle as te}from"./styles.js";var re=function(re){var le=re.treeData,ie=void 0===le?[]:le,oe=re.value,ae=re.defaultValue,se=re.onChange,ce=re.placeholder,ue=void 0===ce?"请选择":ce,de=re.disabled,ve=void 0!==de&&de,fe=re.multiple,he=void 0!==fe&&fe,me=re.maxTagCount,pe=re.allowClear,ye=void 0===pe||pe,ge=re.size,Ne=void 0===ge?"middle":ge,we=re.styles,Ce=re.className,ze=re.dropdownWidth,xe=re.dropdownHeight,Se=void 0===xe?300:xe,Le=re.showSearch,je=void 0!==Le&&Le,Be=re.filterOption,Me=re.autoClearSearchValue,ke=void 0===Me||Me,Ee=re.fieldNames,be=void 0===Ee?{}:Ee,Ae=re.width,Pe=re.style,Te=l(!1),Ve=Te[0],De=Te[1],He=l(!1),Oe=He[0],We=He[1],qe=l(!1),Fe=qe[0],Ge=qe[1],Ie=l(function(){return ae?Array.isArray(ae)?ae:[ae]:[]}),Je=Ie[0],Ke=Ie[1],Qe=l(""),Re=Qe[0],Ue=Qe[1],Xe=i(null),Ye=i(null),Ze=l(new Set),$e=Ze[0],_e=Ze[1],en=be.title,nn=void 0===en?"title":en,tn=be.value,rn=void 0===tn?"value":tn,ln=be.children,on=void 0===ln?"children":ln,an=o(function(e){return e[rn]||e.value},[rn]),sn=o(function(e){return e[nn]||e.title},[nn]),cn=o(function(e){return e[on]},[on]),un=a(function(){return void 0!==oe?he?Array.isArray(oe)?oe:[oe]:null!==oe&&""!==oe?[oe]:[]:Je},[oe,Je,he]),dn=o(function(e,n){void 0===n&&(n=ie);for(var t=0,r=n;t<r.length;t++){var l=r[t];if(an(l)===e)return l;var i=cn(l);if(i&&i.length>0){var o=dn(e,i);if(o)return o}}return null},[ie,an,cn]),vn=a(function(){return un.map(function(e){return dn(e)}).filter(Boolean)},[un,dn]),fn=Ve||Oe;s(function(){var e=function(e){Xe.current&&!Xe.current.contains(e.target)&&(De(!1),Ue(""))};return Ve&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[Ve]),s(function(){if(!Ve){var e=setTimeout(function(){return We(!1)},200);return function(){return clearTimeout(e)}}We(!0)},[Ve]),s(function(){Ve&&je&&Ye.current&&setTimeout(function(){var e;return null===(e=Ye.current)||void 0===e?void 0:e.focus()},0)},[Ve,je]);var hn=o(function(e){var n=[],t=function(e){var r=cn(e);r&&0!==r.length?r.forEach(t):n.push(an(e))};return t(e),n},[an,cn]),mn=o(function(n){var t=an(n),r=cn(n),l=r&&r.length>0;if(he){var i=l?hn(n):[t],o=void 0,a=(o=i.some(function(e){return un.includes(e)})?un.filter(function(e){return!i.includes(e)}):Array.from(new Set(e(e([],un,!0),i,!0)))).map(function(e){return dn(e)}).filter(Boolean);void 0===oe&&Ke(o),null==se||se(o,a)}else{if(l)return;void 0===oe&&Ke([t]),null==se||se(t,[n]),De(!1)}ke&&Ue("")},[un,he,an,cn,hn,dn,oe,se,ke]),pn=o(function(e){e.stopPropagation(),void 0===oe&&Ke([]),null==se||se(he?[]:void 0,[])},[oe,se,he]),yn=o(function(e,n){e.stopPropagation();var t=un.filter(function(e){return e!==n}),r=t.map(function(e){return dn(e)}).filter(Boolean);void 0===oe&&Ke(t),null==se||se(t,r)},[un,dn,oe,se]),gn=o(function(e,n){e.stopPropagation();var t=an(n),r=new Set($e);r.has(t)?r.delete(t):r.add(t),_e(r)},[$e,an]),Nn=o(function(e){if(!Re)return!0;var n=String(sn(e));return Be?Be(Re,e):n.toLowerCase().includes(Re.toLowerCase())},[Re,sn,Be]),wn=o(function(e){var n=cn(e);return!(!n||0===n.length)&&n.some(function(e){return Nn(e)||wn(e)})},[cn,Nn]),Cn=o(function(e){var n=hn(e);return 0!==n.length&&n.every(function(e){return un.includes(e)})},[hn,un]),zn=o(function(e,r){void 0===r&&(r=0);var l=an(e),i=sn(e),o=cn(e),a=o&&o.length>0,s=he?a?Cn(e):un.includes(l):!a&&un.includes(l),c=$e.has(l),u=!!e.disabled,L=Nn(e),j=wn(e);return L||j?n("div",{className:d({}),style:v({}),children:[n("div",{className:f({selected:s,disabled:u}),style:h({level:r,customStyles:null==we?void 0:we.treeNode}),onClick:function(){return!u&&mn(e)},children:[t("span",{className:m({expanded:c,hasChildren:!!a}),style:p({}),onClick:function(n){return a&&gn(n,e)},children:a&&t("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"12",height:"12",children:t("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})})}),he&&t("span",{className:y({}),style:g({}),children:t("span",{className:N({checked:s}),style:w({}),children:s&&t("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"10",height:"10",children:t("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})})})}),t("span",{className:C({}),style:z({}),children:i})]}),a&&c&&t("div",{className:x({}),style:S({}),children:o.map(function(e){return zn(e,r+1)})})]},String(l)):null},[un,$e,an,sn,cn,he,Nn,wn,Cn,mn,gn,null==we?void 0:we.treeNode]),xn=o(function(e){var n=[],t=function(e){var r=cn(e);r&&0!==r.length?r.forEach(t):un.includes(an(e))&&n.push(e)};return e.forEach(t),n},[un,an,cn]),Sn=o(function(){if(!he){var e=vn[0];return e?t("span",{className:L({}),style:j({}),children:sn(e)}):ue}var l=xn(ie);if(0===l.length)return ue;var i=l,o=0;return void 0!==me&&me>0&&l.length>me&&(i=l.slice(0,me),o=l.length-me),n(r,{children:[i.map(function(e){return n("span",{className:B({size:Ne}),style:M({customStyles:null==we?void 0:we.tag}),children:[t("span",{className:k({}),style:E({}),children:sn(e)}),t("span",{className:b({}),style:A({}),onClick:function(n){return yn(n,an(e))},children:t("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:t("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})})]},an(e))}),o>0&&n("span",{className:B({isMore:!0,size:Ne}),style:M({customStyles:null==we?void 0:we.tag}),children:["+",o]})]})},[he,vn,ie,me,an,sn,yn,xn,ue,Ne,null==we?void 0:we.tag]),Ln=vn.length>0,jn=ye&&!ve&&Ln&&Fe,Bn=!jn;return n("div",{ref:Xe,className:P({className:Ce}),style:T({width:Ae,style:Pe,customStyles:null==we?void 0:we.wrapper}),children:[n("div",{className:V({open:Ve,disabled:ve,size:Ne}),style:D({customStyles:null==we?void 0:we.selection}),onClick:function(){ve||(De(!Ve),Ve||Ue(""))},onMouseEnter:function(){return Ge(!0)},onMouseLeave:function(){return Ge(!1)},children:[t("div",je&&Ve?{className:H({}),style:O({}),children:t("input",{ref:Ye,type:"text",className:W({}),style:q({}),value:Re,onChange:function(e){return Ue(e.target.value)},placeholder:0===vn.length?ue:"",onClick:function(e){return e.stopPropagation()}})}:{className:F({isPlaceholder:0===vn.length}),style:G({}),children:Sn()}),n("span",{className:c("zjpcy-treeselect-suffix",{"zjpcy-treeselect-large":"large"===Ne,"zjpcy-treeselect-small":"small"===Ne}),children:[jn&&t("span",{className:I({}),style:J({}),onClick:pn,children:t("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:t("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})}),Bn&&t("span",{className:K({open:Ve}),style:Q({}),children:t("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:t("path",{d:"M7 10l5 5 5-5z"})})})]})]}),fn&&n("div",{className:c(R({}),{"zjpcy-treeselect-dropdown-open":Ve,"zjpcy-treeselect-dropdown-closing":!Ve&&Oe}),style:U({width:ze,height:Se,customStyles:null==we?void 0:we.dropdown}),children:[je&&!Ve&&t("div",{className:X({}),style:Y({}),children:t("input",{ref:Ye,type:"text",className:Z({}),style:$({}),value:Re,onChange:function(e){return Ue(e.target.value)},placeholder:"搜索"})}),t("div",{className:_({}),style:ee({}),children:ie.length>0?ie.map(function(e){return zn(e)}):t("div",{className:ne({}),style:te({}),children:t(u,{size:"small",description:"暂无数据"})})})]})]})};export{re as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import t from"classnames";var r=function(e){var r=e.className;return t("zjpcy-treeselect",r)},n=function(t){var r=t.width,n=t.style,c=t.customStyles,s=void 0!==r?{width:"number"==typeof r?"".concat(r,"px"):r}:{};return e(e(e({},s),n),c)},c=function(e){var r=e.open,n=e.disabled,c=e.size,s=void 0===c?"middle":c,l=e.className;return t("zjpcy-treeselect-selection",{"zjpcy-treeselect-selection-open":r,"zjpcy-treeselect-selection-disabled":n,"zjpcy-treeselect-selection-large":"large"===s,"zjpcy-treeselect-selection-small":"small"===s},l)},s=function(t){var r=t.customStyles;return e({},r)},l=function(e){var r=e.isPlaceholder,n=e.className;return t("zjpcy-treeselect-selection__rendered",{"zjpcy-treeselect-selection__rendered--placeholder":r},n)},a=function(t){var r=t.style;return e({},r)},o=function(e){var r=e.className;return t("zjpcy-treeselect-selection__item",r)},i=function(t){var r=t.style;return e({},r)},u=function(e){var r=e.isMore,n=e.size,c=void 0===n?"middle":n,s=e.className;return t("zjpcy-treeselect-selection__tag",{"zjpcy-treeselect-selection__tag--more":r,"zjpcy-treeselect-selection__tag-large":"large"===c,"zjpcy-treeselect-selection__tag-small":"small"===c},s)},p=function(t){var r=t.customStyles;return e({},r)},d=function(e){var r=e.className;return t("zjpcy-treeselect-selection__tag-content",r)},y=function(t){var r=t.style;return e({},r)},v=function(e){var r=e.className;return t("zjpcy-treeselect-selection__tag-close",r)},f=function(t){var r=t.style;return e({},r)},_=function(e){var r=e.className;return t("zjpcy-treeselect-selection__search",r)},m=function(t){var r=t.style;return e({},r)},z=function(e){var r=e.isDropdown,n=e.className;return t(r?"zjpcy-treeselect-dropdown__search-input":"zjpcy-treeselect-selection__search-input",n)},j=function(t){var r=t.style;return e({},r)},h=function(e){var r=e.className;return t("zjpcy-treeselect-selection__clear",r)},N=function(t){var r=t.style;return e({},r)},w=function(e){var r=e.open,n=e.className;return t("zjpcy-treeselect-selection__arrow",{"zjpcy-treeselect-selection__arrow-open":r},n)},x=function(t){var r=t.style;return e({},r)},g=function(e){var r=e.className;return t("zjpcy-treeselect-dropdown",r)},b=function(t){var r=t.width,n=t.height,c=t.customStyles,s={};return void 0!==r&&(s.width="number"==typeof r?"".concat(r,"px"):r),void 0!==n&&(s.maxHeight="number"==typeof n?"".concat(n,"px"):n),e(e({},s),c)},k=function(e){var r=e.className;return t("zjpcy-treeselect-dropdown__search",r)},S=function(t){var r=t.style;return e({},r)},C=function(e){var r=e.className;return t("zjpcy-treeselect-dropdown__search-input",r)},D=function(t){var r=t.style;return e({},r)},H=function(e){var r=e.className;return t("zjpcy-treeselect-dropdown__content",r)},L=function(t){var r=t.style;return e({},r)},M=function(e){var r=e.className;return t("zjpcy-treeselect-dropdown__empty",r)},P=function(t){var r=t.style;return e({},r)},q=function(e){var r=e.className;return t("zjpcy-treeselect-tree-node-wrapper",r)},A=function(t){var r=t.style;return e({},r)},B=function(e){var r=e.selected,n=e.disabled,c=e.className;return t("zjpcy-treeselect-tree-node",{"zjpcy-treeselect-tree-node-selected":r,"zjpcy-treeselect-tree-node-disabled":n},c)},E=function(t){var r=t.level,n=void 0===r?0:r,c=t.customStyles;return e({paddingLeft:"".concat(20*n+12,"px")},c)},F=function(e){var r=e.expanded,n=e.hasChildren,c=e.className;return t("zjpcy-treeselect-tree-node__expand-icon",{"zjpcy-treeselect-tree-node__expand-icon-expanded":r,"zjpcy-treeselect-tree-node__expand-icon-no-children":!n},c)},G=function(t){var r=t.style;return e({},r)},I=function(e){var r=e.className;return t("zjpcy-treeselect-tree-node__checkbox",r)},J=function(t){var r=t.style;return e({},r)},K=function(e){var r=e.checked,n=e.className;return t("zjpcy-treeselect-tree-node__checkbox-inner",{"zjpcy-treeselect-tree-node__checkbox-inner-checked":r},n)},O=function(t){var r=t.style;return e({},r)},Q=function(e){var r=e.className;return t("zjpcy-treeselect-tree-node__title",r)},R=function(t){var r=t.style;return e({},r)},T=function(e){var r=e.className;return t("zjpcy-treeselect-tree-node-children",r)},U=function(t){var r=t.style;return e({},r)};export{w as getArrowIconClassName,x as getArrowIconStyle,I as getCheckboxClassName,K as getCheckboxInnerClassName,O as getCheckboxInnerStyle,J as getCheckboxStyle,h as getClearIconClassName,N as getClearIconStyle,g as getDropdownClassName,H as getDropdownContentClassName,L as getDropdownContentStyle,C as getDropdownSearchInputClassName,D as getDropdownSearchInputStyle,k as getDropdownSearchWrapperClassName,S as getDropdownSearchWrapperStyle,b as getDropdownStyle,M as getEmptyWrapperClassName,P as getEmptyWrapperStyle,F as getExpandIconClassName,G as getExpandIconStyle,Q as getNodeTitleClassName,R as getNodeTitleStyle,l as getRenderedClassName,a as getRenderedStyle,z as getSearchInputClassName,j as getSearchInputStyle,_ as getSearchWrapperClassName,m as getSearchWrapperStyle,c as getSelectionClassName,o as getSelectionItemClassName,i as getSelectionItemStyle,s as getSelectionStyle,u as getTagClassName,v as getTagCloseClassName,f as getTagCloseStyle,d as getTagContentClassName,y as getTagContentStyle,p as getTagStyle,T as getTreeNodeChildrenClassName,U as getTreeNodeChildrenStyle,B as getTreeNodeClassName,E as getTreeNodeStyle,q as getTreeNodeWrapperClassName,A as getTreeNodeWrapperStyle,r as getWrapperClassName,n as getWrapperStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";var e=function(e){var a=e.children,i=e.width,o=e.rows,n=e.style,c=e.className,l=r(r({},n),{width:i}),p=["zjpcy-typography",function(r){return r?"zjpcy-typography--line-clamp-".concat(r):""}(o),c].filter(Boolean);return t("div",{className:p.join(" "),style:l,children:a})};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e,__awaiter as n,__generator as t,__spreadArray as r}from"tslib";import{jsxs as o,jsx as i,Fragment as a}from"react/jsx-runtime";import{useState as s,useRef as u,useCallback as c}from"react";import l from"classnames";import d from"../Icon/Icon.js";import p from"../Progress/index.js";import{useChunkUpload as f}from"./useChunkUpload.js";var m=function(e){var n=e.fileList,t=e.onRemove,r=e.showUploadList,a=e.chunkUploadState;if(!r||0===n.length)return null;var s="boolean"==typeof r?r:!1!==r.showRemoveIcon,u=function(e){switch(e){case"uploading":return i(d,{type:"loading",spin:!0});case"success":return i(d,{type:"check-circle",style:{color:"var(--success-color, #52c41a)"}});case"error":return i(d,{type:"close-circle",style:{color:"var(--error-color, #ff4d4f)"}});default:return i(d,{type:"file"})}},c=function(e){if(0===e)return"0 B";var n=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,n)).toFixed(2))+" "+["B","KB","MB","GB"][n]};return i("div",{className:"zjpcy-upload__list",children:n.map(function(e){var n;return o("div",{className:l("zjpcy-upload__list-item",{"zjpcy-upload__list-item-error":"error"===e.status,"zjpcy-upload__list-item-success":"success"===e.status}),children:[o("div",{className:"zjpcy-upload__list-item-info",children:[i("span",{className:"zjpcy-upload__list-item-icon",children:u(e.status)}),o("span",{className:"zjpcy-upload__list-item-name",title:e.name,children:[e.name,o("span",{style:{color:"var(--text-secondary, #999)",marginLeft:8,fontSize:12},children:["(",c(e.size),")"]})]})]}),o("span",{className:"zjpcy-upload__list-item-actions",children:[(null===(n=null==a?void 0:a.currentFile)||void 0===n?void 0:n.uid)===e.uid&&"uploading"===e.status&&a.isUploading&&i("button",{className:"zjpcy-upload__list-item-action",onClick:function(){var e,n;a.isPaused?null===(e=a.onResume)||void 0===e||e.call(a):null===(n=a.onPause)||void 0===n||n.call(a)},title:a.isPaused?"继续上传":"暂停上传",children:i(d,{type:a.isPaused?"play-circle":"pause-circle"})}),s&&i("button",{className:"zjpcy-upload__list-item-action",onClick:function(){return t(e)},title:"删除",children:i(d,{type:"trash"})})]}),i("div",{className:l("zjpcy-upload__progress-wrapper",{"zjpcy-upload__progress-wrapper-visible":"uploading"===e.status}),children:i(p,{percent:e.percent||0,size:"small",showInfo:!1})})]},e.uid)})})},h=function(e){var n=e.disabled,t=e.onFileDrop,r=e.children,p=e.accept,f=e.multiple,m=s(!1),h=m[0],v=m[1],y=u(null),g=c(function(e){e.preventDefault(),e.stopPropagation(),n||v(!0)},[n]),_=c(function(e){e.preventDefault(),e.stopPropagation(),v(!1)},[]),z=c(function(e){if(e.preventDefault(),e.stopPropagation(),v(!1),!n){var r=e.dataTransfer.files;r&&r.length>0&&t(r)}},[n,t]),w=c(function(){if(y.current&&!n){var e=document.createElement("input");e.type="file",p&&(e.accept=p),f&&(e.multiple=!0),e.onchange=function(e){var n=e.target.files;n&&t(n)},e.click()}},[p,f,n,t]);return i("div",{ref:y,className:l("zjpcy-upload__drag",{"zjpcy-upload__drag-over":h,"zjpcy-upload__drag-disabled":n}),onDragOver:g,onDragLeave:_,onDrop:z,onClick:w,children:r||o(a,{children:[i("div",{className:"zjpcy-upload__drag-icon",children:i(d,{type:"upload",style:{fontSize:48}})}),i("div",{className:"zjpcy-upload__drag-text",children:"点击或拖拽文件到此区域上传"}),i("div",{className:"zjpcy-upload__drag-hint",children:"支持单次或批量上传"})]})})},v=function(a){var p=a.action,v=a.defaultFileList,y=void 0===v?[]:v,g=a.fileList,_=a.onChange,z=a.beforeUpload,w=a.onProgress,j=a.onSuccess,b=a.onError,k=a.onRemove,C=a.headers,N=a.name,P=void 0===N?"file":N,U=a.data,R=a.withCredentials,S=void 0!==R&&R,E=a.accept,M=a.multiple,q=void 0!==M&&M,D=a.disabled,L=void 0!==D&&D,F=a.drag,x=void 0!==F&&F,O=a.style,B=a.className,I=a.customRequest,T=a.showUploadList,A=void 0===T||T,H=a.method,G=void 0===H?"POST":H,K=a.children,X=a.maxCount,J=a.chunked,Q=void 0!==J&&J,V=a.chunkOptions,W=a.mergeAction,Y=a.customChunkRequest,Z=a.customMergeRequest,$=a.onChunkProgress,ee=a.onChunkSuccess,ne=a.onChunkError,te=s(y),re=te[0],oe=te[1],ie=u(null),ae=u(null),se=void 0!==g,ue=se?g:re,ce=c(function(e){se||oe(e),_&&_(e)},[se,_]),le=c(function(n,t){var r=ue.map(function(r){return r.uid===n?e(e({},r),t):r});ce(r)},[ue,ce]),de=f({action:p,mergeAction:W,filename:P,data:U,headers:C,withCredentials:S,method:G,chunkOptions:V,customChunkRequest:Y,customMergeRequest:Z,onProgress:function(e,n){le(n.uid,{percent:e}),null==w||w(e,n)},onSuccess:function(e,n){le(n.uid,{status:"success",response:e,percent:100}),ae.current=null,null==j||j(e,n)},onError:function(e,n){le(n.uid,{status:"error",error:e}),ae.current=null,null==b||b(e,n)},onChunkProgress:$,onChunkSuccess:ee,onChunkError:ne}),pe=de.upload,fe=de.pause,me=de.resume,he=de.abort,ve=de.isUploading,ye=de.isPaused,ge=c(function(e){return n(void 0,void 0,void 0,function(){var n,r,o;return t(this,function(t){return p||I?(n=e.raw)?(le(e.uid,{status:"uploading",percent:0}),r="function"==typeof U?U(n):U,o={action:p||"",filename:P,file:n,data:r,headers:C,withCredentials:S,method:G.toUpperCase(),onProgress:function(n){le(e.uid,{percent:n}),w&&w(n,e)},onSuccess:function(n){le(e.uid,{status:"success",response:n,percent:100}),j&&j(n,e)},onError:function(n){le(e.uid,{status:"error",error:n}),b&&b(n,e)}},I?I(o):function(e){var n=e.action,t=e.filename,r=e.file,o=e.data,i=e.headers,a=e.withCredentials,s=e.onProgress,u=e.onSuccess,c=e.onError,l=e.method,d=new XMLHttpRequest;s&&d.upload&&(d.upload.onprogress=function(e){if(e.total>0){var n=Math.round(e.loaded/e.total*100);s(n)}}),d.onerror=function(){c(new Error("Upload failed"))},d.onload=function(){d.status>=200&&d.status<300?u(d.response):c(new Error("Upload failed with status ".concat(d.status)))},d.open(l,n,!0),a&&(d.withCredentials=!0),i&&Object.keys(i).forEach(function(e){d.setRequestHeader(e,i[e])});var p=new FormData;p.append(t,r),o&&Object.keys(o).forEach(function(e){p.append(e,o[e])}),d.send(p)}(o),[2]):[2]:(console.warn("Upload: action or customRequest is required"),[2])})})},[p,I,P,U,C,S,G,w,j,b,le]),_e=c(function(e){return n(void 0,void 0,void 0,function(){var n,r;return t(this,function(t){switch(t.label){case 0:if(!p)return console.warn("Upload: action is required for chunked upload"),[2];if(!(n=e.raw))return[2];ae.current=e,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,pe(n)];case 2:return t.sent(),[3,4];case 3:return r=t.sent(),console.error("Chunk upload failed:",r),[3,4];case 4:return[2]}})})},[p,pe]),ze=c(function(e){return n(void 0,void 0,void 0,function(){var n,o,i,a,s;return t(this,function(u){switch(u.label){case 0:if(!e||0===e.length)return[2];if(n=Array.from(e),void 0!==X&&ue.length+n.length>X)return console.warn("Upload: Maximum file count is ".concat(X)),[2];o=function(e){var o,i,a;return t(this,function(t){switch(t.label){case 0:if(o={uid:"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),name:e.name,size:e.size,type:e.type,status:"ready",percent:0,raw:e},!z)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,z(e,n)];case 2:return!1===(i=t.sent())?[2,"continue"]:(i instanceof File&&(o.raw=i,o.name=i.name,o.size=i.size,o.type=i.type),[3,4]);case 3:return t.sent(),[2,"continue"];case 4:return(p||I||Q&&p)&&(o.status="uploading"),a=r(r([],ue,!0),[o],!1),ce(a),Q&&p?setTimeout(function(){return _e(o)},0):(p||I)&&setTimeout(function(){return ge(o)},0),[2]}})},i=0,a=n,u.label=1;case 1:return i<a.length?(s=a[i],[5,o(s)]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},[ue,X,z,p,I,Q,ge,_e,ce]),we=c(function(e){ze(e.target.files),ie.current&&(ie.current.value="")},[ze]),je=c(function(){!L&&ie.current&&ie.current.click()},[L]),be=c(function(e){return n(void 0,void 0,void 0,function(){var n,r;return t(this,function(t){switch(t.label){case 0:return(null===(r=ae.current)||void 0===r?void 0:r.uid)===e.uid&&ve&&(he(),ae.current=null),k?[4,k(e)]:[3,2];case 1:if(!1===t.sent())return[2];t.label=2;case 2:return n=ue.filter(function(n){return n.uid!==e.uid}),ce(n),[2]}})})},[ue,k,ce,ve,he]),ke=c(function(e){ze(e)},[ze]),Ce=Q?{isUploading:ve,isPaused:ye,onPause:fe,onResume:me,currentFile:ae.current}:void 0;return o("div",{className:l("zjpcy-upload",B,{"zjpcy-upload--disabled":L}),style:O,children:[i("input",{ref:ie,type:"file",className:"zjpcy-upload__input",accept:E,multiple:q,onChange:we}),x?i(h,{disabled:L,onFileDrop:ke,accept:E,multiple:q,children:K}):i("div",{className:"zjpcy-upload__trigger",onClick:je,children:K||o("button",{className:"zjpcy-btn zjpcy-btn--primary",disabled:L,children:[i(d,{type:"upload",style:{marginRight:4}}),"点击上传"]})}),A&&i(m,{fileList:ue,onRemove:be,showUploadList:A,chunkUploadState:Ce})]})};export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{__assign as e,__spreadArray as n,__awaiter as t,__generator as r}from"tslib";import{useMemo as u,useState as o,useRef as a,useCallback as s}from"react";var i={chunkIndex:"chunkIndex",totalChunks:"totalChunks",fileId:"fileId",fileName:"fileName",fileSize:"fileSize"},c={fileId:"fileId",filename:"filename",totalChunks:"totalChunks",totalSize:"totalSize"},l={chunkSize:2097152,concurrency:3,resumable:!0,retryCount:3,retryDelay:1e3,fieldNames:i,mergeFieldNames:c},d=function(d){var f=d.action,h=void 0===f?"":f,p=d.mergeAction,m=d.filename,k=void 0===m?"file":m,v=d.data,w=d.headers,C=d.withCredentials,g=void 0!==C&&C,b=d.method,S=void 0===b?"POST":b,E=d.chunkOptions,y=void 0===E?{}:E,x=d.customChunkRequest,z=d.customMergeRequest,I=d.onSuccess,N=d.onError,M=d.onChunkProgress,P=d.onChunkSuccess,O=d.onChunkError,U=u(function(){return e(e({},l),y)},[y]),q=o(null),R=q[0],H=q[1],j=o(!1),D=j[0],F=j[1],T=o(!1),J=T[0],L=T[1],X=a(null),A=a(null),B=a(new Map),G=a(!1),K=a(new Set);G.current=J;var Q=s(function(t,r){H(function(u){if(!u)return u;var o=n([],u.chunks,!0);return o[t]=e(e({},o[t]),{status:r}),e(e({},u),{chunks:o})})},[]),V=s(function(n,u,o){return t(void 0,void 0,void 0,function(){return r(this,function(t){return[2,new Promise(function(t,r){if(G.current)r(new Error("Upload paused"));else{Q(n.index,"uploading"),K.current.add(n.index);var a="function"==typeof v?v(u):v,s={action:h,filename:k,file:u,fileId:o,chunk:n,totalChunks:(null==R?void 0:R.totalChunks)||Math.ceil(u.size/U.chunkSize),data:a,headers:w,withCredentials:g,method:S.toUpperCase(),fieldNames:U.fieldNames,onProgress:function(e){A.current&&(null==M||M(n.index,e,A.current))},onSuccess:function(e){Q(n.index,"success"),K.current.delete(n.index),A.current&&(null==P||P(n.index,e,A.current)),t()},onError:function(e){Q(n.index,"error"),K.current.delete(n.index),A.current&&(null==O||O(n.index,e,A.current)),r(e)}},c=x?x(s)||{abort:function(){}}:function(n){var t=n.action,r=n.filename,u=n.file,o=n.fileId,a=n.chunk,s=n.totalChunks,c=n.data,l=n.headers,d=n.withCredentials,f=n.method,h=n.fieldNames,p=n.onProgress,m=n.onSuccess,k=n.onError,v=e(e({},i),h),w=new XMLHttpRequest;w.upload&&(w.upload.onprogress=function(e){if(e.total>0){var n=Math.round(e.loaded/e.total*100);p(n)}}),w.onerror=function(){k(new Error("Chunk ".concat(a.index," upload failed")))},w.ontimeout=function(){k(new Error("Chunk ".concat(a.index," upload timeout")))},w.onload=function(){if(w.status>=200&&w.status<300)try{var e=JSON.parse(w.response);m(e)}catch(e){m(w.response)}else k(new Error("Chunk ".concat(a.index," upload failed with status ").concat(w.status)))},w.open(f,t,!0),d&&(w.withCredentials=!0),l&&Object.keys(l).forEach(function(e){w.setRequestHeader(e,l[e])});var C=new FormData;return C.append(r,a.blob,u.name),C.append(v.chunkIndex,String(a.index)),C.append(v.totalChunks,String(s)),C.append(v.fileId,o),C.append(v.fileName,u.name),C.append(v.fileSize,String(u.size)),c&&Object.keys(c).forEach(function(e){C.append(e,c[e])}),w.send(C),{abort:function(){w.abort()}}}(s);B.current.set(n.index,c)}})]})})},[h,k,v,w,g,S,R,U,x,Q,M,P,O]),W=s(function(u,o,a){return t(void 0,void 0,void 0,function(){var s,i,c,l,d,f,h,p;return r(this,function(m){switch(m.label){case 0:s=a.filter(function(e){return"pending"===e.status}),i=U.concurrency,c=U.retryCount,l=U.retryDelay,H(function(n){return n?e(e({},n),{uploadedChunks:a.length-s.length,uploadedChunkIndices:new Set(a.filter(function(e){return"success"===e.status}).map(function(e){return e.index}))}):null}),d=n([],s,!0),f=[],h=function(n){return t(void 0,void 0,void 0,function(){var t,a,s;return r(this,function(r){switch(r.label){case 0:t=null,a=0,r.label=1;case 1:if(!(a<=c))return[3,8];if(G.current)throw new Error("Upload paused");r.label=2;case 2:return r.trys.push([2,4,,7]),[4,V(n,u,o)];case 3:return r.sent(),H(function(n){if(!n)return n;var t=n.chunks.filter(function(e){return"success"===e.status}).length,r=Math.round(t/n.totalChunks*100);return e(e({},n),{uploadedChunks:t,percent:r})}),[2];case 4:if(s=r.sent(),t=s,s instanceof Error&&"Upload paused"===s.message)throw s;return a<c?[4,new Promise(function(e){return setTimeout(e,l)})]:[3,6];case 5:r.sent(),r.label=6;case 6:return[3,7];case 7:return a++,[3,1];case 8:throw t||new Error("Chunk ".concat(n.index," failed after ").concat(c," retries"))}})})},m.label=1;case 1:if(!(d.length>0||f.length>0))return[3,4];if(G.current)throw new Error("Upload paused");for(;f.length<i&&d.length>0;)p=d.shift(),f.push(h(p));return f.length>0?[4,Promise.race(f)]:[3,3];case 2:m.sent(),m.label=3;case 3:return[3,1];case 4:return[4,Promise.all(f)];case 5:return m.sent(),[2]}})})},[U,V]),Y=s(function(n,u,o){return t(void 0,void 0,void 0,function(){return r(this,function(t){return[2,new Promise(function(t,r){var a="function"==typeof v?v(n):v,s={action:p||h,fileId:u,filename:n.name,totalChunks:o,totalSize:n.size,data:a,headers:w,withCredentials:g,fieldNames:U.mergeFieldNames,onSuccess:t,onError:r},i=z?z(s)||{abort:function(){}}:function(n){var t,r=n.action,u=n.fileId,o=n.filename,a=n.totalChunks,s=n.totalSize,i=n.data,l=n.headers,d=n.withCredentials,f=n.fieldNames,h=n.onSuccess,p=n.onError,m=e(e({},c),f),k=new XMLHttpRequest;k.onerror=function(){p(new Error("Merge chunks failed"))},k.ontimeout=function(){p(new Error("Merge chunks timeout"))},k.onload=function(){if(k.status>=200&&k.status<300)try{var e=JSON.parse(k.response);h(e)}catch(e){h(k.response)}else p(new Error("Merge chunks failed with status ".concat(k.status)))},k.open("POST",r,!0),k.setRequestHeader("Content-Type","application/json"),d&&(k.withCredentials=!0),l&&Object.keys(l).forEach(function(e){k.setRequestHeader(e,l[e])});var v=JSON.stringify(e(((t={})[m.fileId]=u,t[m.filename]=o,t[m.totalChunks]=a,t[m.totalSize]=s,t),i));return k.send(v),{abort:function(){k.abort()}}}(s);B.current.set(-1,i)})]})})},[h,p,v,w,g,U.mergeFieldNames,z]),Z=s(function(n){return t(void 0,void 0,void 0,function(){var t,u,o,a,s,i;return r(this,function(r){switch(r.label){case 0:if(!h)throw new Error("Upload: action is required for chunked upload");X.current=n,t=function(e){return"".concat(e.name,"-").concat(e.size,"-").concat(e.lastModified,"-").concat(Date.now())}(n),u=function(e,n){for(var t=[],r=Math.ceil(e.size/n),u=0;u<r;u++){var o=u*n,a=Math.min(o+n,e.size);t.push({index:u,start:o,end:a,size:a-o,blob:e.slice(o,a),status:"pending",retryCount:0})}return t}(n,U.chunkSize),o={fileId:t,totalChunks:u.length,uploadedChunks:0,uploadedChunkIndices:new Set,chunks:u,percent:0},H(o),F(!0),L(!1),a={uid:t,name:n.name,size:n.size,type:n.type,status:"uploading",percent:0,raw:n},A.current=a,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,W(n,t,u)];case 2:return r.sent(),[4,Y(n,t,u.length)];case 3:return s=r.sent(),H(function(n){return n?e(e({},n),{percent:100}):null}),F(!1),A.current&&(A.current.status="success",A.current.percent=100,null==I||I(s,A.current)),[2,s];case 4:if(i=r.sent(),F(!1),i instanceof Error&&"Upload paused"===i.message)return[2];throw A.current&&(A.current.status="error",A.current.error=i,null==N||N(i,A.current)),i;case 5:return[2]}})})},[h,U,W,Y,I,N]),$=s(function(){L(!0),G.current=!0,B.current.forEach(function(e,n){-1!==n&&K.current.has(n)&&e.abort()})},[]),_=s(function(){return t(void 0,void 0,void 0,function(){var n,t;return r(this,function(r){switch(r.label){case 0:if(!R||!X.current||!G.current)return[2];L(!1),G.current=!1,F(!0),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,W(X.current,R.fileId,R.chunks)];case 2:return r.sent(),R.chunks.every(function(e){return"success"===e.status})?[4,Y(X.current,R.fileId,R.totalChunks)]:[3,4];case 3:n=r.sent(),H(function(n){return n?e(e({},n),{percent:100}):null}),F(!1),A.current&&(A.current.status="success",A.current.percent=100,null==I||I(n,A.current)),r.label=4;case 4:return[3,6];case 5:return t=r.sent(),F(!1),t instanceof Error&&"Upload paused"!==t.message&&A.current&&(A.current.status="error",A.current.error=t,null==N||N(t,A.current)),[3,6];case 6:return[2]}})})},[R,W,Y,I,N]);return{upload:Z,pause:$,resume:_,abort:s(function(){B.current.forEach(function(e){e.abort()}),B.current.clear(),K.current.clear(),F(!1),L(!1),G.current=!1,H(null),X.current=null,A.current=null},[]),state:R,isUploading:D,isPaused:J}};export{d as default,d as useChunkUpload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";export{default as Spin}from"./Spin/index.js";export{default as Carousel}from"./Carousel/index.js";export{default as Cascader}from"./Cascader/index.js";export{default as TreeSelect}from"./TreeSelect/index.js";export{default as ColorPicker}from"./ColorPicker/index.js";export{default as CopyToClipboard,useOnCopy as useCopy}from"./CopyToClipboard/index.js";export{default as Divider}from"./Divider/index.js";export{default as Empty}from"./Empty/index.js";export{default as Flex}from"./Flex/index.js";export{default as Icon}from"./Icon/Icon.js";export{default as Input}from"./Input/index.js";export{default as Marquee}from"./Marquee/index.js";export{MessageProvider,message,useMessage}from"./Message/index.js";export{default as Modal}from"./Modal/index.js";export{default as Notification}from"./Notification/Notification.js";export{default as Radio}from"./Radio/index.js";export{default as Select}from"./Select/index.js";export{default as Table}from"./Table/index.js";export{default as Top}from"./Top/index.js";export{default as Typography}from"./Typography/index.js";export{default as Masonry}from"./Masonry/index.js";export{default as Space}from"./Space/index.js";export{default as Anchor}from"./Anchor/index.js";export{default as Breadcrumb}from"./Breadcrumb/index.js";export{default as I18nProvider,load18n,useI18n}from"../i18n/I18nProvider.js";import"../i18n/index.js";export{default as Dropdown}from"./Dropdown/index.js";export{default as Menu}from"./Menu/index.js";export{default as Pagination}from"./Pagination/index.js";export{default as Rate}from"./Rate/index.js";export{default as Slider}from"./Slider/index.js";export{default as Steps}from"./Steps/index.js";export{default as Switch}from"./Switch/index.js";export{default as Tabs}from"./Tabs/index.js";export{default as Transfer}from"./Transfer/index.js";export{default as Label}from"./Label/index.js";export{default as Layout}from"./Layout/index.js";export{default as Form}from"./Form/index.js";export{Col,default as Grid,Row}from"./Grid/index.js";export{default as Drawer}from"./Drawer/index.js";export{default as Checkbox}from"./Checkbox/index.js";export{default as Tag}from"./Tag/index.js";export{default as Popconfirm}from"./Popconfirm/index.js";export{default as Progress}from"./Progress/index.js";export{default as TimePicker}from"./TimePicker/index.js";export{default as DatePicker}from"./DatePicker/index.js";export{default as Tree}from"./Tree/index.js";export{default as Upload}from"./Upload/index.js";export{useChunkUpload}from"./Upload/useChunkUpload.js";export{default as Splitter}from"./Splitter/index.js";export{default as Calendar}from"./Calendar/index.js";export{default as Message}from"./Message/Message.js";export{default as Button}from"./Button/Button.js";export{default as Textarea}from"./Input/Textarea.js";export{default as i18n}from"i18next";export{default as Tooltip}from"./Tooltip/Tooltip.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import n from"react";import"./index.js";import{useTranslation as a,I18nextProvider as o}from"react-i18next";import r from"i18next";var i=function(e){var n={};return Object.keys(e).forEach(function(a){var o=e[a];if(o&&"object"==typeof o){var r=void 0,i=o;if(o.language)r=o.language,o.translation&&"object"==typeof o.translation&&(i=o.translation);else if(o.locale)r=o.locale,o.translation&&"object"==typeof o.translation&&(i=o.translation);else if(1===Object.keys(o).length){var s=Object.keys(o)[0];/^[a-z]{2}(-[A-Za-z]{2})?$/.test(s)&&(r=s,i=o[s])}else if(o.translation&&"object"==typeof o.translation&&1===Object.keys(o.translation).length){s=Object.keys(o.translation)[0];/^[a-z]{2}(-[A-Za-z]{2})?$/.test(s)&&(r=s,i=o.translation[s])}if(!r){(r={JP:"ja-JP",HK:"zh-HK",US:"en-US",CN:"zh-CN",EN:"en-US",ZH:"zh-CN"}[a]||a)!==a||/^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)||console.warn('Using key "'.concat(a,'" as language code. For better results, ')+'please use explicit language codes like "ja-JP" or "zh-HK", or include language information in your JSON files.')}if(!r||"string"!=typeof r)return void console.warn("Invalid language code for resource ".concat(a));n[r]||(n[r]={}),i.translation&&"object"==typeof i.translation?n[r].translation=t(t({},n[r].translation),i.translation):n[r].translation=t(t({},n[r].translation),i)}}),n},s=function(){return a()},l=function(t){var a=t.children,i=t.locale,s=t.resources;return n.useEffect(function(){s&&Object.keys(s).forEach(function(t){var e=s[t];Object.keys(e).forEach(function(n){var a=e[n];r.addResourceBundle(t,n,a,!0)})})},[s]),n.useEffect(function(){i&&i!==r.language&&r.changeLanguage(i)},[i]),e(o,{i18n:r,children:a})};export{l as default,i as load18n,s as useI18n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./locales/zh-CN.json.js";import e from"./locales/en-US.json.js";import t from"i18next";export{default}from"i18next";import{initReactI18next as n}from"react-i18next";t.use(n).init({resources:{"zh-CN":{translation:o},"en-US":{translation:e}},lng:"zh-CN",fallbackLng:"zh-CN",interpolation:{escapeValue:!1}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="Title",t="OK",o="Cancel",n="Empty state component used to display friendly prompt messages when there is no data.",i="Please select",_="Introduction",a="Installation",E="Internationalization",s="Button",T="Color Picker",O="Copy to Clipboard",l="Divider",r="Empty State",C="Flex",I="icon",S="Input",N="Marquee",A="Message",c="Notification",h="Radio",d="Table",D="Back to Top",p="Typography",u="Variables",L="API Reference",R="ZjpCy Design",m="IDP Studio",M="Introduction to ZjpCy Design Component Library",P="How to install and reference",g="Internationalization support for component library",U="Customizable button component with multiple styles and sizes.",f="Color selection component that supports preset colors, opacity adjustment, and gradient colors.",y="Component for copying text to clipboard, supporting custom styles and status callbacks.",H="Component for dividing page content, supporting both horizontal and vertical orientations, and solid and dashed types.",G="General flex layout component that provides flexible layout options.",Y="Icon component",F="Input component",w="This is a customizable scrolling announcement component that supports various styles and configuration options.",b="Message component",B="Notice component",x="Notification component",W="Radio component",k="Select component",v="Table component",X="Back to top component",K="Typography component, supports custom width and row limits, displays ellipsis when exceeding row limits.",V="Customize component library theme colors",z="View component API documentation",Z="Language Switch",j="English",J="中文",q="Version",Q="Button Component",$="Basic Usage",ee="Display buttons with different variants and sizes.",te="Variant Buttons",oe="Size Buttons",ne="Disabled State",ie="Buttons with Icons",_e="Custom Style",ae="API Parameters",Ee="Parameter Name",se="Type",Te="Default Value",Oe="Description",le="children",re="Button text content",Ce="variant",Ie="Button variant style",Se="size",Ne="Button size",Ae="disabled",ce="Whether the button is disabled",he="onClick",de="Click event callback",De="className",pe="Custom CSS class name",ue="style",Le="Custom inline style",Re="Button prefix icon, supports string (built-in icon name) or custom icon node",me="Code Examples",Me="Usage in Other Projects",Pe="Basic Usage",ge="Different Sizes",Ue="Disabled Button",fe="Button with Icon",ye="Search",He="User",Ge="Delete",Ye="Confirm",Fe="Warning",we="Custom Style and Click Event",be="Installation",Be="ZjpCy Design component library supports multiple installation methods, you can choose the one that suits your needs.",xe="Installation from Local Files",We="If you have obtained the local files of the ZjpCy Design component library, you can install it in the following ways:",ke="Install from local directory using npm",ve="Install the local component library directory as a dependency in your project:",Xe="Install from local directory using yarn",Ke="/path/to/idp-design",Ve="is the absolute path to your local ZjpCy Design component library.",ze="Installation from Git Repository",Ze="You can directly install the ZjpCy Design component library from the Git repository, supporting specified branches or tags:",je="Install the latest version of the main branch",Je="Install a specified branch",qe="branch-name",Qe="Replace with the branch name you want to install, for example",$e="dev or feature/new-component.",et="Install a specified tag version",tt="v1.0.0",ot="Replace with the specific version tag you want to install.",nt="Updating Dependencies",it="When a new version of the ZjpCy Design component library is released, you can update the dependencies in the following ways:",_t="Update locally installed dependencies",at="Reinstall local file dependencies",Et="Use the --force parameter to force reinstallation to ensure you get the latest local files.",st="Update Git repository dependencies",Tt="Or uninstall and then reinstall:",Ot="Search",lt="User",rt="Delete",Ct="Confirm",It="Warning",St="Reference Component",Nt="ColorPicker Component",At="Divider orientation",ct="Divider type",ht="Divider color",dt="Divider Component",Dt="Display dividers with different orientations and types.",pt="Horizontal Divider",ut="Above is the default horizontal divider",Lt="Below is the default horizontal divider",Rt="Vertical Divider",mt="Left Content",Mt="Right Content",Pt="Solid and Dashed",gt="Above is the solid divider (default)",Ut="Content between solid and dashed dividers",ft="Below is the dashed divider",yt="Custom Color",Ht="Dividers with different colors",Gt="Combined Usage",Yt="Horizontal dashed line with custom color",Ft="Dividers with custom styles",wt="Divider with Text",bt="Text content",Bt="URL or text content to copy",xt="Copy status change callback",Wt="Custom child element",kt="Copy operation Promise",vt="Copy successful!",Xt="Copy failed!",Kt="CopyToClipboard Component",Vt="Display copy buttons with different styles.",zt="Text Link Style",Zt="Copy Link",jt="Button Style",Jt="Click to copy custom link",qt="Styled Link",Qt="Copy styled link",$t="Using useCopy Hook",eo="Use useCopy to copy link",to="Component",oo="Hook",no="success",io="Empty Empty State",_o="Default Empty State",ao="Custom Description",Eo="Custom Icon",so="Custom Image",To="With Action Button",Oo="Large Size",lo="Middle Size",ro="Small Size",Co="No Excel Files",Io="Upload File",So="View Template",No="Load Data",Ao="Transparency Adjustment",co="Enable transparency adjustment through the alpha property, supporting RGBA color format.",ho="With Transparency",Do="Preset Colors",po="Set common preset colors through the presetColors property for quick selection.",uo="Disable the color picker through the disabled property; cannot open the selection panel when disabled.",Lo="Color Square",Ro="Color Text",mo="Color Button",Mo="Select Color",Po="Customize the style of the color picker through the style property.",go="Custom Border Radius",Uo="Gradient Support",fo="Enable gradient color support through the gradient property, supporting linear gradient color selection.",yo="Basic Gradient",Ho="Gradient Color",Go="Features",Yo="Lightweight: Only 2.8KB gzipped (13 times lighter than reactColor)",Fo="Tree Shaking: Only import used parts",wo="Fast: Uses hooks and functional components",bo="Type Safe: Strict TypeScript support",Bo="Mobile Friendly: Supports touch devices",xo="Accessible: Follows WAI-ARIA guidelines",Wo="No Dependencies: Does not depend on other libraries",ko="Flex Component",vo="Interactive Example",Xo="Adjust various properties of the flex layout in real-time through the buttons and input boxes below.",Ko="Item Count",Vo="items",zo="Direction (higher priority than Layout)",Zo="Current Value",jo="Demonstration Effect",Jo="Current Configuration",qo="Multi-level Nesting Example",Qo="Demonstrates the multi-level nesting usage of the Flex component to achieve complex layout structures.",$o="Title Area",en="Vertical Layout",tn="Center Alignment",on="Space Between",nn="Wrap Layout",_n="Complex Usage",an="Action Area",En="Child component content",sn="Quickly set the layout direction, horizontal for horizontal layout, column for column layout",Tn="flex-direction property, with higher priority than layout",On="justify-content property",ln="align-items property",rn="flex-wrap property",Cn="gap property, supporting numeric values (px) and strings",In="Center Content",Sn="Marquee Announcement Component",Nn="1. Default Configuration",An="Default height: 40px, default speed: 50, default gradient background",cn="This is a default configured announcement message that scrolls from right to left and automatically repeats after playback!",hn="Supports custom notice bar height (default: 60px, range: 30-100px)",dn="Height: 60px",Dn="This is an announcement message with a custom height of 60px!",pn="3. Custom Speed",un="Slow Speed: 20",Ln="This is a slow-scrolling announcement message with a speed of 20!",Rn="Fast Speed: 100",mn="This is a fast-scrolling announcement message with a speed of 100!",Mn="4. Custom Background",Pn="Custom Gradient Background",gn="This is an announcement with a custom gradient background",Un="This is the second announcement with a custom gradient background",fn="5. Comprehensive Customization",yn="Height: 50px, Speed: 75, Custom Background",Hn="This is a comprehensively customized announcement, height 50px, speed 75, custom gradient background!",Gn="6. Fixed to Top",Yn="fixed=true, the announcement bar will be fixed at the top of the page",Fn="This is an announcement fixed at the top, remaining visible while scrolling!",wn="7. Close Callback",bn="Click the close button to trigger onClose callback",Bn="This is an announcement with close callback, click the X on the right to close!",xn="8. Full Functionality Example",Wn="Fixed Top + Custom Height + Custom Speed + Close Callback",kn="This is a fully functional announcement with fixed top, custom height and speed, and close support!",vn="Announcement text, can be a string or string array",Xn="Height of the announcement bar in pixels",Kn="Scrolling speed, larger values scroll faster",Vn="Background color of the announcement bar, can be solid color or gradient",zn="Whether to display the announcement bar",Zn="Whether to fix at the top of the page",jn="Distance from the top when fixed, in pixels",Jn="Whether to display the announcement icon",qn="Callback function when the close button is clicked",Qn="Current Color",$n="Current Gradient",ei="Current color value (supports HEX format)",ti="Callback function after confirming color selection",oi="Callback function when color changes in real-time",ni="Array of preset colors",ii="Whether to support gradient colors; after enabling, can select linear gradient colors",_i="Custom trigger area, supports any React node",ai="Custom icon",Ei="Custom image path",si="No data",Ti="Empty state description",Oi="Custom action area",li="Empty state size",ri="Custom style",Ci="Custom CSS class name",Ii="This is a scrolling notification bar component that uses to achieve seamless scrolling effects.",Si="Notice hidden",Ni="Hide notice",Ai="Show notice",ci="Custom Configuration",hi="Notice text",di="Enter notice text",Di="Notice bar height",pi="Show close button",ui="Float to top",Li="Uses Marquee component to achieve seamless scrolling effect",Ri="Scrolling speed configurable (default: 50, range: 10-100)",mi="Supports custom notice text content",Mi="Optional close button, 30px wide, click to hide the notice bar",Pi="Supports floating top function, fixed at the top of the page",gi="Component supports TypeScript type definitions",Ui="Usage Scenarios",fi="Website announcements",yi="System notifications",Hi="Promotional activity information",Gi="Important message reminders",Yi="Scrolling speed, larger values scroll faster",Fi="Height of the notice bar in pixels",wi="Custom notice bar styles",bi="Icon before the notice text",Bi="Whether to show the close button",xi="Custom close button style",Wi="Whether to fix and float at the top of the page",ki="Whether to pause scrolling when hovering",vi="Lightweight message prompt box for displaying success, warning and error messages.",Xi="Click the buttons to display different types of message prompts.",Ki="Show success message",Vi="Show warning message",zi="Show error message",Zi="Operation successful!",ji="Warning: Please check your input!",Ji="Operation failed, please try again!",qi="Message type",Qi="Message content",$i="Message auto-close duration (milliseconds)",e_="Message close callback",t_="Modal dialog component for displaying important information or operations that require user confirmation.",o_="Click the button to open the basic modal.",n_="Open Basic Modal",i_="Basic Modal",__="This is the content area of the modal, which can contain any content.",a_="The modal will be centered horizontally and vertically.",E_="Custom Size",s_="You can customize the width and height of the modal.",T_="Small Size Modal",O_="Large Size Modal",l_="This is a small size modal with a width of 400px.",r_="This is a large size modal with a width of 800px and height of 500px.",C_="You can place more content.",I_="Async Confirmation",S_="Click the confirm button to perform asynchronous operations, and close the modal after completion.",N_="Async Confirmation Modal",A_="After clicking the confirm button, it will simulate a 1-second asynchronous operation.",c_="The modal will automatically close after the operation is complete.",h_="Content Height Auto-adjustment",d_="When height is not set, the content area height adapts; when height is set, the content area height is automatically calculated.",D_="Auto-adjust Height",p_="Content Scroll Example",u_="Auto-adjust Height Modal",L_="This is a modal without height set, and the content area height will automatically adjust according to the content.",R_="You can add more content to test the adaptive effect.",m_="Content Scroll Modal",M_="Long Content Test",P_="This is a modal with fixed height, and the content area height is automatically calculated.",g_="When the content exceeds the calculated height, a scrollbar will be automatically displayed.",U_="Animation Direction Demonstration",f_="Supports four animation directions, and opening and closing will use the same direction setting.",y_="Center Animation",H_="Top Right Animation",G_="Bottom Right Animation",Y_="Normal Animation",F_="Open: Enlarge from the center point",w_="Close: Shrink from the center point",b_="Open: Move from top right and enlarge",B_="Close: Move to top right and shrink",x_="Open: Move from bottom right and enlarge",W_="Close: Move to bottom right and shrink",k_="Open: Slightly enlarge and fade in",v_="Close: Slightly shrink and fade out",X_="Custom Top Position",K_="You can customize the modal's distance from the top through the top parameter. When direction is set at the same time, direction will be forced to use normal.",V_="Use top and direction simultaneously",z_="This modal is 100px from the top",Z_="Use the top parameter to customize the vertical position of the modal",j_="This modal is 200px from the top",J_='Although direction="top-right" is set, direction is forced to normal because the top parameter is set at the same time',q_="Custom Footer",Q_="You can customize the bottom buttons through the footer parameter. When footer is null, default buttons are displayed; when a value is provided, custom buttons are displayed.",$_="Custom Footer Modal",ea="Cancel",ta="Save",oa="This is a modal with custom footer, which displays three buttons at the bottom: Cancel, Save, and Delete.",na="You can customize the content and style of the footer according to your needs.",ia="Custom Mount Container",_a="You can specify the HTML node where the Modal is mounted through the getContainer parameter. false means mount in the current DOM.",aa="Mount in Current DOM",Ea="Mount in Custom Container",sa="This is a custom mount container",Ta='Click the "Mount in Custom Container" button, and the Modal will be mounted here',Oa="This Modal is mounted in the current DOM, not in document.body.",la="You can achieve this effect through getContainer={false}.",ra="This Modal is mounted in a custom container on the page.",Ca="You can specify the mounted HTML node through the getContainer property.",Ia="Custom Mask Background Color",Sa="You can customize the mask background color and other styles through the maskStyle property.",Na="The mask layer of this Modal uses a custom background color (semi-transparent red).",Aa="You can set various styles of the mask through the maskStyle property, such as background color, opacity, etc.",ca="Custom zIndex",ha="You can set the level of the mask layer through the zIndex property, with a default value of 1000. In the case of nested Modals, you need to set different zIndex values to ensure the correct display level.",da="Open First Modal",Da="First Modal (zIndex: 1000)",pa="Close",ua="Open Second Modal",La="This is the first Modal, using the default zIndex value (1000).",Ra='Click the "Open Second Modal" button to pop up the second Modal.',ma="Second Modal (zIndex: 1010)",Ma="This is the second Modal, using a higher zIndex value (1010).",Pa="Due to the higher zIndex setting, it will be displayed above the first Modal.",ga="Controls whether the modal is displayed/hidden (required)",Ua="Modal title",fa="Modal width",ya="Modal height (optional, adapts if not set)",Ha="Top area height",Ga="Bottom area height",Ya="Whether the confirm button shows loading status",Fa="Animation direction for opening and closing",wa="Distance from the top of the modal; when set, direction will be forced to normal",ba="Bottom content, shows default buttons when null, shows custom content when provided",Ba="Cancel button click callback",xa="Confirm button click callback",Wa="Modal content",ka="Specifies the HTML node where the Modal is mounted; false means mount in current DOM",va="Confirm button text",Xa="Cancel button text",Ka="Custom mask layer style",Va="Custom mask layer class name",za="z-index value of the mask layer",Za="Typography component",ja="Demonstrates the basic usage of the Typography component.",Ja="Default display (no row limit)",qa="Limit to 1 row",Qa="Limit to 2 rows",$a="Limit to 3 rows",eE="Different widths",tE="Width 200px, limit to 1 row",oE="Width 300px, limit to 2 rows",nE="Width 500px, limit to 3 rows",iE="Mixed Chinese and English text (testing line break issues)",_E="This is a test text containing English, used to test line break issues when mixing Chinese and English. When the text content exceeds the container width, English should follow immediately after Chinese instead of starting a new line separately.",aE="Mixed Chinese and English text (limit to 2 rows)",EE="This is a long test text used to test the row limit function of the Typography component. When the text content exceeds the specified row limit, ellipsis should be displayed at the end. This component supports custom width and row limits to meet different layout needs.",sE="Text content",TE="Width limit",OE="Row limit",lE="Custom style",rE="Custom class name",CE="This is a test text containing English, used to test line break issues when mixing Chinese and English. When the text content exceeds the container width, English should follow immediately after Chinese instead of starting a new line separately.",IE="This is a test text containing English, used to test line break issues when mixing Chinese and English. When the text content exceeds the container width, English should follow immediately after Chinese instead of starting a new line separately.",SE="Default display (no row limit)",NE="Limit to 1 row",AE="Limit to 2 rows",cE="Limit to 3 rows",hE="Different widths",dE="Mixed Chinese and English text (testing line break issues)",DE="Mixed Chinese and English text (limit to 2 rows)",pE="Basic usage",uE="API parameters",LE="Code example",RE="Typography component that supports custom width and row limits, displaying ellipsis when exceeding row limits.",mE="Demonstrates the basic usage of the Typography component.",ME="Width 200px, limit to 1 row",PE="Width 300px, limit to 2 rows",gE="Width 500px, limit to 3 rows",UE={MODAL_TITLE:e,MODAL_OKTEXT:"OK",MODAL_CANCELTEXT:o,EMPTY_DESCRIPTION:n,SELECT_PLACEHOLDER:i,INTRO:_,INSTALL:a,I18N:E,BUTTON:s,COLORPICKER:T,COPYTOCLIPBOARD:O,DIVIDER:l,EMPTY:r,FLEX:C,ICON:I,INPUT:S,MARQUEE:N,MESSAGE:A,NOTIFICATION:c,RADIO:h,TABLE:d,TOP:D,TYPOGRAPHY:p,VARIABLES:u,API_REF:L,IDP_DESIGN:R,IDP_STUDIO:m,INTRO_DESCRIPTION:M,INSTALL_DESCRIPTION:P,I18N_DESCRIPTION:g,BUTTON_DESCRIPTION:U,COLORPICKER_DESCRIPTION:f,COPYTOCLIPBOARD_DESCRIPTION:y,DIVIDER_DESCRIPTION:H,FLEX_DESCRIPTION:G,ICON_DESCRIPTION:Y,INPUT_DESCRIPTION:F,MARQUEE_DESCRIPTION:w,MESSAGE_DESCRIPTION:b,NOTICE_DESCRIPTION:B,NOTIFICATION_DESCRIPTION:x,RADIO_DESCRIPTION:W,SELECT_DESCRIPTION:k,TABLE_DESCRIPTION:v,TOP_DESCRIPTION:X,TYPOGRAPHY_DESCRIPTION:K,VARIABLES_DESCRIPTION:V,API_REF_DESCRIPTION:z,LANGUAGE_SWITCH:Z,ENGLISH:j,CHINESE:"中文",VERSION:q,BUTTON_COMPONENT:Q,BASIC_USAGE:$,SHOW_VARIANTS_SIZES:ee,VARIANT_BUTTONS:te,SIZE_BUTTONS:oe,DISABLED_STATE:ne,ICON_BUTTONS:ie,CUSTOM_STYLE:_e,API_PARAMETERS:ae,PARAM_NAME:Ee,TYPE:se,DEFAULT_VALUE:Te,DESCRIPTION:Oe,CHILDREN:le,CHILDREN_DESC:re,VARIANT:Ce,VARIANT_DESC:Ie,SIZE:Se,SIZE_DESC:Ne,DISABLED:Ae,DISABLED_DESC:ce,ON_CLICK:he,ON_CLICK_DESC:de,CLASS_NAME:De,CLASS_NAME_DESC:pe,STYLE:ue,STYLE_DESC:Le,ICON_DESC:Re,CODE_EXAMPLES:me,USAGE_IN_OTHER_PROJECTS:Me,BASIC_USAGE_CODE:Pe,DIFFERENT_SIZES:ge,DISABLED_BUTTON:Ue,BUTTON_WITH_ICON:fe,BUTTON_SEARCH:ye,BUTTON_USER:He,BUTTON_DELETE:Ge,BUTTON_CONFIRM:Ye,BUTTON_WARNING:Fe,CUSTOM_STYLE_CLICK:we,INSTALLATION:be,INSTALLATION_DESCRIPTION:Be,LOCAL_FILE_INSTALLATION:xe,LOCAL_FILE_INSTALLATION_DESC:We,NPM_LOCAL_INSTALL:ke,NPM_LOCAL_INSTALL_DESC:ve,YARN_LOCAL_INSTALL:Xe,PATH_TO_IDP_DESIGN:Ke,PATH_TO_IDP_DESIGN_DESC:Ve,GIT_REPO_INSTALLATION:ze,GIT_REPO_INSTALLATION_DESC:Ze,LATEST_MAIN_BRANCH:je,SPECIFIC_BRANCH:Je,BRANCH_NAME:qe,BRANCH_NAME_DESC:Qe,EXAMPLE_BRANCHES:$e,SPECIFIC_TAG:et,V1_0_0:tt,V1_0_0_DESC:ot,UPDATING_DEPENDENCIES:nt,UPDATING_DEPENDENCIES_DESC:it,UPDATING_INSTALLED_DEPENDENCIES:_t,REINSTALLING_LOCAL_FILES:at,USING_FORCE_PARAM:Et,UPDATING_GIT_DEPENDENCIES:st,UNINSTALL_REINSTALL:Tt,SEARCH:Ot,USER:lt,DELETE:rt,CONFIRM:Ct,WARNING:It,REFERENCE_COMPONENT:St,COLORPICKER_COMPONENT:Nt,DIVIDER_ORIENTATION:At,DIVIDER_TYPE:ct,DIVIDER_COLOR:ht,DIVIDER_COMPONENT:dt,DIVIDER_SHOW_ORIENTATIONS_TYPES:Dt,HORIZONTAL_DIVIDER:pt,ABOVE_DEFAULT_HORIZONTAL:ut,BELOW_DEFAULT_HORIZONTAL:Lt,VERTICAL_DIVIDER:Rt,LEFT_CONTENT:mt,RIGHT_CONTENT:Mt,SOLID_DASHED:Pt,ABOVE_SOLID_DEFAULT:gt,CONTENT_BETWEEN_DIVIDERS:Ut,BELOW_DASHED:ft,CUSTOM_COLOR:yt,DIVIDERS_DIFFERENT_COLORS:Ht,COMBINED_USAGE:Gt,HORIZONTAL_DASHED_CUSTOM_COLOR:Yt,DIVIDERS_CUSTOM_STYLE:Ft,DIVIDER_WITH_TEXT:wt,TEXT_CONTENT:bt,COPY_URL_OR_TEXT_CONTENT:Bt,COPY_STATUS_CHANGE_CALLBACK:xt,CUSTOM_CHILD_ELEMENT:Wt,COPY_OPERATION_PROMISE:kt,COPY_SUCCESS:vt,COPY_FAILED:Xt,COPYTOCLIPBOARD_COMPONENT:Kt,DISPLAY_DIFFERENT_STYLES_COPY_BUTTONS:Vt,TEXT_LINK_STYLE:zt,COPY_LINK:Zt,BUTTON_STYLE:jt,CLICK_TO_COPY_CUSTOM_LINK:Jt,STYLED_LINK:qt,COPY_STYLED_LINK:Qt,USING_USECOPY_HOOK:$t,USE_USECOPY_TO_COPY_LINK:eo,COMPONENT:to,HOOK:oo,SUCCESS:no,EMPTY_COMPONENT:io,DEFAULT_EMPTY_STATE:_o,CUSTOM_DESCRIPTION:ao,CUSTOM_ICON:Eo,CUSTOM_IMAGE:so,WITH_ACTION_BUTTON:To,LARGE_SIZE:Oo,MIDDLE_SIZE:lo,SMALL_SIZE:ro,NO_EXCEL_FILE:Co,UPLOAD_FILE:Io,VIEW_TEMPLATE:So,LOAD_DATA:No,TRANSPARENCY_ADJUSTMENT:Ao,ENABLE_ALPHA_PROPERTY:co,WITH_TRANSPARENCY:ho,PRESET_COLORS:Do,SET_PRESET_COLORS:po,DISABLE_COLOR_PICKER:uo,COLOR_SQUARE:Lo,COLOR_TEXT:Ro,COLOR_BUTTON:mo,SELECT_COLOR:Mo,CUSTOM_STYLE_PROPERTY:Po,CUSTOM_BORDER_RADIUS:go,GRADIENT_SUPPORT:Uo,ENABLE_GRADIENT:fo,BASIC_GRADIENT:yo,GRADIENT_COLOR:Ho,FEATURES:Go,LIGHTWEIGHT:Yo,TREE_SHAKING:Fo,FAST:wo,TYPE_SAFE:bo,MOBILE_FRIENDLY:Bo,ACCESSIBLE:xo,NO_DEPENDENCIES:Wo,FLEX_COMPONENT:ko,INTERACTIVE_EXAMPLE:vo,ADJUST_PROPERTIES:Xo,ITEM_COUNT:Ko,ITEMS:Vo,DIRECTION:zo,CURRENT_VALUE:Zo,DEMONSTRATION_EFFECT:jo,CURRENT_CONFIGURATION:Jo,MULTI_LEVEL_NESTING:qo,NESTING_DESCRIPTION:Qo,TITLE_AREA:$o,VERTICAL_LAYOUT:en,CENTER_ALIGNMENT:tn,JUSTIFY_BETWEEN:on,WRAP_LAYOUT:nn,COMPLEX_USAGE:_n,ACTION_AREA:an,FLEX_CHILDREN_DESC:En,FLEX_LAYOUT_DESC:sn,FLEX_DIRECTION_DESC:Tn,FLEX_JUSTIFY_DESC:On,FLEX_ALIGN_DESC:ln,FLEX_WRAP_DESC:rn,FLEX_GAP_DESC:Cn,CENTER_CONTENT:In,MARQUEE_COMPONENT:Sn,DEFAULT_CONFIGURATION:Nn,DEFAULT_CONFIG_DESC:An,DEFAULT_ANNOUNCEMENT:cn,CUSTOM_HEIGHT:hn,HEIGHT_60PX:dn,CUSTOM_HEIGHT_ANNOUNCEMENT:Dn,CUSTOM_SPEED:pn,SLOW_SPEED:un,SLOW_SPEED_ANNOUNCEMENT:Ln,FAST_SPEED:Rn,FAST_SPEED_ANNOUNCEMENT:mn,CUSTOM_BACKGROUND:Mn,CUSTOM_GRADIENT_BACKGROUND:Pn,GRADIENT_BACKGROUND_ANNOUNCEMENT_1:gn,GRADIENT_BACKGROUND_ANNOUNCEMENT_2:Un,COMPREHENSIVE_CUSTOM:fn,COMPREHENSIVE_CUSTOM_DESC:yn,COMPREHENSIVE_ANNOUNCEMENT:Hn,FIXED_TOP:Gn,FIXED_TOP_DESC:Yn,FIXED_TOP_ANNOUNCEMENT:Fn,CLOSE_CALLBACK:wn,CLOSE_CALLBACK_DESC:bn,CLOSE_CALLBACK_ANNOUNCEMENT:Bn,FULL_FUNCTIONALITY:xn,FULL_FUNCTIONALITY_DESC:Wn,FULL_FUNCTIONALITY_ANNOUNCEMENT:kn,ANNOUNCEMENT_TEXT:vn,ANNOUNCEMENT_HEIGHT:Xn,SCROLL_SPEED:Kn,ANNOUNCEMENT_BACKGROUND:Vn,DISPLAY_ANNOUNCEMENT:zn,FIXED_POSITION:Zn,FIXED_DISTANCE:jn,DISPLAY_ICON:Jn,CLOSE_BUTTON_CALLBACK:qn,COLORPICKER_CURRENT_COLOR:Qn,COLORPICKER_CURRENT_GRADIENT:$n,COLORPICKER_COLOR_VALUE:ei,COLORPICKER_CONFIRM_CHANGE:ti,COLORPICKER_REAL_TIME_CHANGE:oi,COLORPICKER_PRESET_COLORS:ni,COLORPICKER_GRADIENT_SUPPORT:ii,COLORPICKER_CUSTOM_TRIGGER:_i,EMPTY_CUSTOM_ICON:ai,EMPTY_CUSTOM_IMAGE_PATH:Ei,EMPTY_DATA:si,EMPTY_STATUS_DESCRIPTION:Ti,EMPTY_CUSTOM_ACTION_AREA:Oi,EMPTY_SIZE:li,EMPTY_CUSTOM_STYLE:ri,EMPTY_CUSTOM_CLASS_NAME:Ci,NOTICE_COMPONENT_DESC:Ii,NOTICE_HIDDEN:Si,HIDE_NOTICE:Ni,SHOW_NOTICE:Ai,CUSTOM_CONFIGURATION:ci,NOTICE_TEXT:hi,ENTER_NOTICE_TEXT:di,NOTICE_BAR_HEIGHT:Di,SHOW_CLOSE_BUTTON:pi,FLOAT_TO_TOP:ui,SEAMLESS_SCROLL:Li,CONFIGURABLE_SPEED:Ri,CUSTOM_NOTICE_TEXT:mi,OPTIONAL_CLOSE_BUTTON:Mi,FLOATING_TOP_FUNCTION:Pi,TYPESCRIPT_SUPPORT:gi,USAGE_SCENARIOS:Ui,WEBSITE_ANNOUNCEMENT:fi,SYSTEM_NOTIFICATION:yi,PROMOTION_INFO:Hi,IMPORTANT_REMINDER:Gi,SPEED_DESC:Yi,HEIGHT_DESC:Fi,STYLES_DESC:wi,ICON_NOTICE_DESC:bi,SHOW_CLOSE_BUTTON_DESC:Bi,CLOSE_STYLE_DESC:xi,FLOATING_TOP_DESC:Wi,PAUSE_ON_HOVER_DESC:ki,MESSAGE_COMPONENT_DESC:vi,CLICK_BUTTONS_TO_SHOW_MESSAGES:Xi,SHOW_SUCCESS_MESSAGE:Ki,SHOW_WARNING_MESSAGE:Vi,SHOW_ERROR_MESSAGE:zi,OPERATION_SUCCESS:Zi,WARNING_CHECK_INPUT:ji,OPERATION_FAILED_RETRY:Ji,MESSAGE_TYPE:qi,MESSAGE_CONTENT:Qi,MESSAGE_DURATION:$i,MESSAGE_CLOSE_CALLBACK:e_,MODAL_COMPONENT_DESC:t_,CLICK_BUTTON_OPEN_BASIC_MODAL:o_,OPEN_BASIC_MODAL:n_,BASIC_MODAL:i_,MODAL_CONTENT_AREA:__,MODAL_CENTERED:a_,CUSTOM_SIZE:E_,CAN_CUSTOMIZE_MODAL_WIDTH_HEIGHT:s_,SMALL_SIZE_MODAL:T_,LARGE_SIZE_MODAL:O_,SMALL_SIZE_MODAL_CONTENT:l_,LARGE_SIZE_MODAL_CONTENT:r_,CAN_PLACE_MORE_CONTENT:C_,ASYNC_CONFIRMATION:I_,CLICK_CONFIRM_TO_PERFORM_ASYNC_OPERATION:S_,ASYNC_CONFIRMATION_MODAL:N_,AFTER_CLICK_CONFIRM_BUTTON:A_,MODAL_WILL_AUTOMATICALLY_CLOSE_AFTER_OPERATION_COMPLETE:c_,CONTENT_HEIGHT_AUTO_ADJUSTMENT:h_,WHEN_HEIGHT_NOT_SET_CONTENT_AREA_ADAPTS:d_,AUTO_ADJUST_HEIGHT:D_,CONTENT_SCROLL_EXAMPLE:p_,AUTO_ADJUST_HEIGHT_MODAL:u_,THIS_IS_A_MODAL_WITHOUT_HEIGHT_SET:L_,YOU_CAN_ADD_MORE_CONTENT_TO_TEST_ADAPTIVE_EFFECT:R_,CONTENT_SCROLL_MODAL:m_,LONG_CONTENT_TEST:M_,THIS_IS_A_MODAL_WITH_FIXED_HEIGHT:P_,WHEN_CONTENT_EXCEEDS_CALCULATED_HEIGHT:g_,ANIMATION_DIRECTION_DEMONSTRATION:U_,SUPPORT_FOUR_ANIMATION_DIRECTIONS:f_,CENTER_ANIMATION:y_,TOP_RIGHT_ANIMATION:H_,BOTTOM_RIGHT_ANIMATION:G_,NORMAL_ANIMATION:Y_,OPEN_FROM_CENTER_POINT_ENLARGE:F_,CLOSE_FROM_CENTER_POINT_SHRINK:w_,OPEN_FROM_TOP_RIGHT_MOVE_AND_ENLARGE:b_,CLOSE_TO_TOP_RIGHT_MOVE_AND_SHRINK:B_,OPEN_FROM_BOTTOM_RIGHT_MOVE_AND_ENLARGE:x_,CLOSE_TO_BOTTOM_RIGHT_MOVE_AND_SHRINK:W_,OPEN_SLIGHTLY_ENLARGE_AND_FADE_IN:k_,CLOSE_SLIGHTLY_SHRINK_AND_FADE_OUT:v_,CUSTOM_TOP_POSITION:X_,THROUGH_TOP_PARAM_CUSTOMIZE_MODAL_DISTANCE_FROM_TOP:K_,USE_TOP_AND_DIRECTION_SIMULTANEOUSLY:V_,THIS_MODAL_IS_100PX_FROM_TOP:z_,USE_TOP_PARAM_TO_CUSTOMIZE_MODAL_VERTICAL_POSITION:Z_,THIS_MODAL_IS_200PX_FROM_TOP:j_,ALTHOUGH_DIRECTION_TOP_RIGHT_SET_BUT_DUE_TO_TOP_PARAM:J_,CUSTOM_FOOTER:q_,CAN_CUSTOMIZE_BOTTOM_BUTTONS_THROUGH_FOOTER_PARAM:Q_,CUSTOM_FOOTER_MODAL:$_,CANCEL:ea,SAVE:ta,THIS_IS_A_MODAL_WITH_CUSTOM_FOOTER:oa,YOU_CAN_CUSTOMIZE_FOOTER_CONTENT_AND_STYLE:na,CUSTOM_MOUNT_CONTAINER:ia,CAN_SPECIFY_MODAL_MOUNT_HTML_NODE_THROUGH_GET_CONTAINER_PARAM:_a,MOUNT_IN_CURRENT_DOM:aa,MOUNT_IN_CUSTOM_CONTAINER:Ea,THIS_IS_A_CUSTOM_MOUNT_CONTAINER:sa,CLICK_MOUNT_IN_CUSTOM_CONTAINER_BUTTON:Ta,THIS_MODAL_IS_MOUNTED_IN_CURRENT_DOM:Oa,CAN_ACHIEVE_THIS_EFFECT_THROUGH_GET_CONTAINER_FALSE:la,THIS_MODAL_IS_MOUNTED_IN_CUSTOM_CONTAINER:ra,CAN_SPECIFY_MOUNTED_HTML_NODE_THROUGH_GET_CONTAINER_PROPERTY:Ca,CUSTOM_MASK_BACKGROUND_COLOR:Ia,CAN_CUSTOMIZE_MASK_BACKGROUND_COLOR_AND_OTHER_STYLES:Sa,THIS_MODAL_MASK_USES_CUSTOM_BACKGROUND_COLOR:Na,CAN_SET_VARIOUS_STYLES_OF_MASK_THROUGH_MASK_STYLE_PROPERTY:Aa,CUSTOM_ZINDEX:ca,CAN_SET_MASK_LAYER_LEVEL_THROUGH_ZINDEX_PROPERTY:ha,OPEN_FIRST_MODAL:da,FIRST_MODAL_ZINDEX_1000:Da,CLOSE:pa,OPEN_SECOND_MODAL:ua,THIS_IS_THE_FIRST_MODAL_USING_DEFAULT_ZINDEX_1000:La,CLICK_OPEN_SECOND_MODAL_BUTTON_TO_POP_UP_SECOND_MODAL:Ra,SECOND_MODAL_ZINDEX_1010:ma,THIS_IS_THE_SECOND_MODAL_USING_HIGHER_ZINDEX_1010:Ma,DUE_TO_HIGHER_ZINDEX_IT_WILL_DISPLAY_ABOVE_FIRST_MODAL:Pa,MODAL_VISIBLE_DESC:ga,MODAL_TITLE_DESC:Ua,MODAL_WIDTH_DESC:fa,MODAL_HEIGHT_DESC:ya,MODAL_HEADER_HEIGHT_DESC:Ha,MODAL_FOOTER_HEIGHT_DESC:Ga,MODAL_CONFIRM_LOADING_DESC:Ya,MODAL_DIRECTION_DESC:Fa,MODAL_TOP_DESC:wa,MODAL_FOOTER_DESC:ba,MODAL_ON_CANCEL_DESC:Ba,MODAL_ON_OK_DESC:xa,MODAL_CHILDREN_DESC:Wa,MODAL_GET_CONTAINER_DESC:ka,MODAL_OK_TEXT_DESC:va,MODAL_CANCEL_TEXT_DESC:Xa,MODAL_MASK_STYLE_DESC:Ka,MODAL_MASK_CLASS_NAME_DESC:Va,MODAL_Z_INDEX_DESC:za,TYPOGRAPHY_COMPONENT:Za,SHOW_BASIC_USAGE_TYPOGRAPHY:ja,DEFAULT_DISPLAY_NO_ROW_LIMIT:Ja,LIMIT_1_ROW:qa,LIMIT_2_ROWS:Qa,LIMIT_3_ROWS:$a,DIFFERENT_WIDTHS:eE,WIDTH_200PX_LIMIT_1_ROW:tE,WIDTH_300PX_LIMIT_2_ROWS:oE,WIDTH_500PX_LIMIT_3_ROWS:nE,MIXED_TEXT_WRAPPING:iE,MIXED_TEXT_CONTENT:_E,MIXED_TEXT_LIMIT_2_ROWS:aE,TYPOGRAPHY_LONG_TEXT:EE,TYPOGRAPHY_CHILDREN_DESC:sE,TYPOGRAPHY_WIDTH_DESC:TE,TYPOGRAPHY_ROWS_DESC:OE,TYPOGRAPHY_STYLE_DESC:lE,TYPOGRAPHY_CLASSNAME_DESC:rE,TYPOGRAPHY_MIXED_TEXT:CE,TYPOGRAPHY_MIXED_TEXT_2:IE,TYPOGRAPHY_DEFAULT_DISPLAY:SE,TYPOGRAPHY_LIMIT_1_ROW:NE,TYPOGRAPHY_LIMIT_2_ROWS:AE,TYPOGRAPHY_LIMIT_3_ROWS:cE,TYPOGRAPHY_DIFFERENT_WIDTHS:hE,TYPOGRAPHY_MIXED_TEXT_TEST:dE,TYPOGRAPHY_MIXED_TEXT_TEST_2:DE,TYPOGRAPHY_BASIC_USAGE:pE,TYPOGRAPHY_API_PARAMETERS:uE,TYPOGRAPHY_CODE_EXAMPLE:LE,TYPOGRAPHY_COMPONENT_DESCRIPTION:RE,TYPOGRAPHY_BASIC_USAGE_DESCRIPTION:mE,TYPOGRAPHY_WIDTH_200PX:ME,TYPOGRAPHY_WIDTH_300PX:PE,TYPOGRAPHY_WIDTH_500PX:gE};export{ut as ABOVE_DEFAULT_HORIZONTAL,gt as ABOVE_SOLID_DEFAULT,xo as ACCESSIBLE,an as ACTION_AREA,Xo as ADJUST_PROPERTIES,A_ as AFTER_CLICK_CONFIRM_BUTTON,J_ as ALTHOUGH_DIRECTION_TOP_RIGHT_SET_BUT_DUE_TO_TOP_PARAM,U_ as ANIMATION_DIRECTION_DEMONSTRATION,Vn as ANNOUNCEMENT_BACKGROUND,Xn as ANNOUNCEMENT_HEIGHT,vn as ANNOUNCEMENT_TEXT,ae as API_PARAMETERS,L as API_REF,z as API_REF_DESCRIPTION,I_ as ASYNC_CONFIRMATION,N_ as ASYNC_CONFIRMATION_MODAL,D_ as AUTO_ADJUST_HEIGHT,u_ as AUTO_ADJUST_HEIGHT_MODAL,yo as BASIC_GRADIENT,i_ as BASIC_MODAL,$ as BASIC_USAGE,Pe as BASIC_USAGE_CODE,ft as BELOW_DASHED,Lt as BELOW_DEFAULT_HORIZONTAL,G_ as BOTTOM_RIGHT_ANIMATION,qe as BRANCH_NAME,Qe as BRANCH_NAME_DESC,s as BUTTON,Q as BUTTON_COMPONENT,Ye as BUTTON_CONFIRM,Ge as BUTTON_DELETE,U as BUTTON_DESCRIPTION,ye as BUTTON_SEARCH,jt as BUTTON_STYLE,He as BUTTON_USER,Fe as BUTTON_WARNING,fe as BUTTON_WITH_ICON,ea as CANCEL,la as CAN_ACHIEVE_THIS_EFFECT_THROUGH_GET_CONTAINER_FALSE,Q_ as CAN_CUSTOMIZE_BOTTOM_BUTTONS_THROUGH_FOOTER_PARAM,Sa as CAN_CUSTOMIZE_MASK_BACKGROUND_COLOR_AND_OTHER_STYLES,s_ as CAN_CUSTOMIZE_MODAL_WIDTH_HEIGHT,C_ as CAN_PLACE_MORE_CONTENT,ha as CAN_SET_MASK_LAYER_LEVEL_THROUGH_ZINDEX_PROPERTY,Aa as CAN_SET_VARIOUS_STYLES_OF_MASK_THROUGH_MASK_STYLE_PROPERTY,_a as CAN_SPECIFY_MODAL_MOUNT_HTML_NODE_THROUGH_GET_CONTAINER_PARAM,Ca as CAN_SPECIFY_MOUNTED_HTML_NODE_THROUGH_GET_CONTAINER_PROPERTY,tn as CENTER_ALIGNMENT,y_ as CENTER_ANIMATION,In as CENTER_CONTENT,le as CHILDREN,re as CHILDREN_DESC,J as CHINESE,De as CLASS_NAME,pe as CLASS_NAME_DESC,Xi as CLICK_BUTTONS_TO_SHOW_MESSAGES,o_ as CLICK_BUTTON_OPEN_BASIC_MODAL,S_ as CLICK_CONFIRM_TO_PERFORM_ASYNC_OPERATION,Ta as CLICK_MOUNT_IN_CUSTOM_CONTAINER_BUTTON,Ra as CLICK_OPEN_SECOND_MODAL_BUTTON_TO_POP_UP_SECOND_MODAL,Jt as CLICK_TO_COPY_CUSTOM_LINK,pa as CLOSE,qn as CLOSE_BUTTON_CALLBACK,wn as CLOSE_CALLBACK,Bn as CLOSE_CALLBACK_ANNOUNCEMENT,bn as CLOSE_CALLBACK_DESC,w_ as CLOSE_FROM_CENTER_POINT_SHRINK,v_ as CLOSE_SLIGHTLY_SHRINK_AND_FADE_OUT,xi as CLOSE_STYLE_DESC,W_ as CLOSE_TO_BOTTOM_RIGHT_MOVE_AND_SHRINK,B_ as CLOSE_TO_TOP_RIGHT_MOVE_AND_SHRINK,me as CODE_EXAMPLES,T as COLORPICKER,ei as COLORPICKER_COLOR_VALUE,Nt as COLORPICKER_COMPONENT,ti as COLORPICKER_CONFIRM_CHANGE,Qn as COLORPICKER_CURRENT_COLOR,$n as COLORPICKER_CURRENT_GRADIENT,_i as COLORPICKER_CUSTOM_TRIGGER,f as COLORPICKER_DESCRIPTION,ii as COLORPICKER_GRADIENT_SUPPORT,ni as COLORPICKER_PRESET_COLORS,oi as COLORPICKER_REAL_TIME_CHANGE,mo as COLOR_BUTTON,Lo as COLOR_SQUARE,Ro as COLOR_TEXT,Gt as COMBINED_USAGE,_n as COMPLEX_USAGE,to as COMPONENT,Hn as COMPREHENSIVE_ANNOUNCEMENT,fn as COMPREHENSIVE_CUSTOM,yn as COMPREHENSIVE_CUSTOM_DESC,Ri as CONFIGURABLE_SPEED,Ct as CONFIRM,Ut as CONTENT_BETWEEN_DIVIDERS,h_ as CONTENT_HEIGHT_AUTO_ADJUSTMENT,p_ as CONTENT_SCROLL_EXAMPLE,m_ as CONTENT_SCROLL_MODAL,O as COPYTOCLIPBOARD,Kt as COPYTOCLIPBOARD_COMPONENT,y as COPYTOCLIPBOARD_DESCRIPTION,Xt as COPY_FAILED,Zt as COPY_LINK,kt as COPY_OPERATION_PROMISE,xt as COPY_STATUS_CHANGE_CALLBACK,Qt as COPY_STYLED_LINK,vt as COPY_SUCCESS,Bt as COPY_URL_OR_TEXT_CONTENT,Jo as CURRENT_CONFIGURATION,Zo as CURRENT_VALUE,Mn as CUSTOM_BACKGROUND,go as CUSTOM_BORDER_RADIUS,Wt as CUSTOM_CHILD_ELEMENT,yt as CUSTOM_COLOR,ci as CUSTOM_CONFIGURATION,ao as CUSTOM_DESCRIPTION,q_ as CUSTOM_FOOTER,$_ as CUSTOM_FOOTER_MODAL,Pn as CUSTOM_GRADIENT_BACKGROUND,hn as CUSTOM_HEIGHT,Dn as CUSTOM_HEIGHT_ANNOUNCEMENT,Eo as CUSTOM_ICON,so as CUSTOM_IMAGE,Ia as CUSTOM_MASK_BACKGROUND_COLOR,ia as CUSTOM_MOUNT_CONTAINER,mi as CUSTOM_NOTICE_TEXT,E_ as CUSTOM_SIZE,pn as CUSTOM_SPEED,_e as CUSTOM_STYLE,we as CUSTOM_STYLE_CLICK,Po as CUSTOM_STYLE_PROPERTY,X_ as CUSTOM_TOP_POSITION,ca as CUSTOM_ZINDEX,cn as DEFAULT_ANNOUNCEMENT,Nn as DEFAULT_CONFIGURATION,An as DEFAULT_CONFIG_DESC,Ja as DEFAULT_DISPLAY_NO_ROW_LIMIT,_o as DEFAULT_EMPTY_STATE,Te as DEFAULT_VALUE,rt as DELETE,jo as DEMONSTRATION_EFFECT,Oe as DESCRIPTION,ge as DIFFERENT_SIZES,eE as DIFFERENT_WIDTHS,zo as DIRECTION,Ae as DISABLED,Ue as DISABLED_BUTTON,ce as DISABLED_DESC,ne as DISABLED_STATE,uo as DISABLE_COLOR_PICKER,zn as DISPLAY_ANNOUNCEMENT,Vt as DISPLAY_DIFFERENT_STYLES_COPY_BUTTONS,Jn as DISPLAY_ICON,l as DIVIDER,Ft as DIVIDERS_CUSTOM_STYLE,Ht as DIVIDERS_DIFFERENT_COLORS,ht as DIVIDER_COLOR,dt as DIVIDER_COMPONENT,H as DIVIDER_DESCRIPTION,At as DIVIDER_ORIENTATION,Dt as DIVIDER_SHOW_ORIENTATIONS_TYPES,ct as DIVIDER_TYPE,wt as DIVIDER_WITH_TEXT,Pa as DUE_TO_HIGHER_ZINDEX_IT_WILL_DISPLAY_ABOVE_FIRST_MODAL,r as EMPTY,io as EMPTY_COMPONENT,Oi as EMPTY_CUSTOM_ACTION_AREA,Ci as EMPTY_CUSTOM_CLASS_NAME,ai as EMPTY_CUSTOM_ICON,Ei as EMPTY_CUSTOM_IMAGE_PATH,ri as EMPTY_CUSTOM_STYLE,si as EMPTY_DATA,n as EMPTY_DESCRIPTION,li as EMPTY_SIZE,Ti as EMPTY_STATUS_DESCRIPTION,co as ENABLE_ALPHA_PROPERTY,fo as ENABLE_GRADIENT,j as ENGLISH,di as ENTER_NOTICE_TEXT,$e as EXAMPLE_BRANCHES,wo as FAST,Rn as FAST_SPEED,mn as FAST_SPEED_ANNOUNCEMENT,Go as FEATURES,Da as FIRST_MODAL_ZINDEX_1000,jn as FIXED_DISTANCE,Zn as FIXED_POSITION,Gn as FIXED_TOP,Fn as FIXED_TOP_ANNOUNCEMENT,Yn as FIXED_TOP_DESC,C as FLEX,ln as FLEX_ALIGN_DESC,En as FLEX_CHILDREN_DESC,ko as FLEX_COMPONENT,G as FLEX_DESCRIPTION,Tn as FLEX_DIRECTION_DESC,Cn as FLEX_GAP_DESC,On as FLEX_JUSTIFY_DESC,sn as FLEX_LAYOUT_DESC,rn as FLEX_WRAP_DESC,Wi as FLOATING_TOP_DESC,Pi as FLOATING_TOP_FUNCTION,ui as FLOAT_TO_TOP,xn as FULL_FUNCTIONALITY,kn as FULL_FUNCTIONALITY_ANNOUNCEMENT,Wn as FULL_FUNCTIONALITY_DESC,ze as GIT_REPO_INSTALLATION,Ze as GIT_REPO_INSTALLATION_DESC,gn as GRADIENT_BACKGROUND_ANNOUNCEMENT_1,Un as GRADIENT_BACKGROUND_ANNOUNCEMENT_2,Ho as GRADIENT_COLOR,Uo as GRADIENT_SUPPORT,dn as HEIGHT_60PX,Fi as HEIGHT_DESC,Ni as HIDE_NOTICE,oo as HOOK,Yt as HORIZONTAL_DASHED_CUSTOM_COLOR,pt as HORIZONTAL_DIVIDER,E as I18N,g as I18N_DESCRIPTION,I as ICON,ie as ICON_BUTTONS,Re as ICON_DESC,Y as ICON_DESCRIPTION,bi as ICON_NOTICE_DESC,R as IDP_DESIGN,m as IDP_STUDIO,Gi as IMPORTANT_REMINDER,S as INPUT,F as INPUT_DESCRIPTION,a as INSTALL,be as INSTALLATION,Be as INSTALLATION_DESCRIPTION,P as INSTALL_DESCRIPTION,vo as INTERACTIVE_EXAMPLE,_ as INTRO,M as INTRO_DESCRIPTION,Vo as ITEMS,Ko as ITEM_COUNT,on as JUSTIFY_BETWEEN,Z as LANGUAGE_SWITCH,Oo as LARGE_SIZE,O_ as LARGE_SIZE_MODAL,r_ as LARGE_SIZE_MODAL_CONTENT,je as LATEST_MAIN_BRANCH,mt as LEFT_CONTENT,Yo as LIGHTWEIGHT,qa as LIMIT_1_ROW,Qa as LIMIT_2_ROWS,$a as LIMIT_3_ROWS,No as LOAD_DATA,xe as LOCAL_FILE_INSTALLATION,We as LOCAL_FILE_INSTALLATION_DESC,M_ as LONG_CONTENT_TEST,N as MARQUEE,Sn as MARQUEE_COMPONENT,w as MARQUEE_DESCRIPTION,A as MESSAGE,e_ as MESSAGE_CLOSE_CALLBACK,vi as MESSAGE_COMPONENT_DESC,Qi as MESSAGE_CONTENT,b as MESSAGE_DESCRIPTION,$i as MESSAGE_DURATION,qi as MESSAGE_TYPE,lo as MIDDLE_SIZE,_E as MIXED_TEXT_CONTENT,aE as MIXED_TEXT_LIMIT_2_ROWS,iE as MIXED_TEXT_WRAPPING,Bo as MOBILE_FRIENDLY,o as MODAL_CANCELTEXT,Xa as MODAL_CANCEL_TEXT_DESC,a_ as MODAL_CENTERED,Wa as MODAL_CHILDREN_DESC,t_ as MODAL_COMPONENT_DESC,Ya as MODAL_CONFIRM_LOADING_DESC,__ as MODAL_CONTENT_AREA,Fa as MODAL_DIRECTION_DESC,ba as MODAL_FOOTER_DESC,Ga as MODAL_FOOTER_HEIGHT_DESC,ka as MODAL_GET_CONTAINER_DESC,Ha as MODAL_HEADER_HEIGHT_DESC,ya as MODAL_HEIGHT_DESC,Va as MODAL_MASK_CLASS_NAME_DESC,Ka as MODAL_MASK_STYLE_DESC,t as MODAL_OKTEXT,va as MODAL_OK_TEXT_DESC,Ba as MODAL_ON_CANCEL_DESC,xa as MODAL_ON_OK_DESC,e as MODAL_TITLE,Ua as MODAL_TITLE_DESC,wa as MODAL_TOP_DESC,ga as MODAL_VISIBLE_DESC,fa as MODAL_WIDTH_DESC,c_ as MODAL_WILL_AUTOMATICALLY_CLOSE_AFTER_OPERATION_COMPLETE,za as MODAL_Z_INDEX_DESC,aa as MOUNT_IN_CURRENT_DOM,Ea as MOUNT_IN_CUSTOM_CONTAINER,qo as MULTI_LEVEL_NESTING,Qo as NESTING_DESCRIPTION,Y_ as NORMAL_ANIMATION,Di as NOTICE_BAR_HEIGHT,Ii as NOTICE_COMPONENT_DESC,B as NOTICE_DESCRIPTION,Si as NOTICE_HIDDEN,hi as NOTICE_TEXT,c as NOTIFICATION,x as NOTIFICATION_DESCRIPTION,Wo as NO_DEPENDENCIES,Co as NO_EXCEL_FILE,ke as NPM_LOCAL_INSTALL,ve as NPM_LOCAL_INSTALL_DESC,he as ON_CLICK,de as ON_CLICK_DESC,n_ as OPEN_BASIC_MODAL,da as OPEN_FIRST_MODAL,x_ as OPEN_FROM_BOTTOM_RIGHT_MOVE_AND_ENLARGE,F_ as OPEN_FROM_CENTER_POINT_ENLARGE,b_ as OPEN_FROM_TOP_RIGHT_MOVE_AND_ENLARGE,ua as OPEN_SECOND_MODAL,k_ as OPEN_SLIGHTLY_ENLARGE_AND_FADE_IN,Ji as OPERATION_FAILED_RETRY,Zi as OPERATION_SUCCESS,Mi as OPTIONAL_CLOSE_BUTTON,Ee as PARAM_NAME,Ke as PATH_TO_IDP_DESIGN,Ve as PATH_TO_IDP_DESIGN_DESC,ki as PAUSE_ON_HOVER_DESC,Do as PRESET_COLORS,Hi as PROMOTION_INFO,h as RADIO,W as RADIO_DESCRIPTION,St as REFERENCE_COMPONENT,at as REINSTALLING_LOCAL_FILES,Mt as RIGHT_CONTENT,ta as SAVE,Kn as SCROLL_SPEED,Li as SEAMLESS_SCROLL,Ot as SEARCH,ma as SECOND_MODAL_ZINDEX_1010,Mo as SELECT_COLOR,k as SELECT_DESCRIPTION,i as SELECT_PLACEHOLDER,po as SET_PRESET_COLORS,ja as SHOW_BASIC_USAGE_TYPOGRAPHY,pi as SHOW_CLOSE_BUTTON,Bi as SHOW_CLOSE_BUTTON_DESC,zi as SHOW_ERROR_MESSAGE,Ai as SHOW_NOTICE,Ki as SHOW_SUCCESS_MESSAGE,ee as SHOW_VARIANTS_SIZES,Vi as SHOW_WARNING_MESSAGE,Se as SIZE,oe as SIZE_BUTTONS,Ne as SIZE_DESC,un as SLOW_SPEED,Ln as SLOW_SPEED_ANNOUNCEMENT,ro as SMALL_SIZE,T_ as SMALL_SIZE_MODAL,l_ as SMALL_SIZE_MODAL_CONTENT,Pt as SOLID_DASHED,Je as SPECIFIC_BRANCH,et as SPECIFIC_TAG,Yi as SPEED_DESC,ue as STYLE,qt as STYLED_LINK,wi as STYLES_DESC,Le as STYLE_DESC,no as SUCCESS,f_ as SUPPORT_FOUR_ANIMATION_DIRECTIONS,yi as SYSTEM_NOTIFICATION,d as TABLE,v as TABLE_DESCRIPTION,bt as TEXT_CONTENT,zt as TEXT_LINK_STYLE,sa as THIS_IS_A_CUSTOM_MOUNT_CONTAINER,L_ as THIS_IS_A_MODAL_WITHOUT_HEIGHT_SET,oa as THIS_IS_A_MODAL_WITH_CUSTOM_FOOTER,P_ as THIS_IS_A_MODAL_WITH_FIXED_HEIGHT,La as THIS_IS_THE_FIRST_MODAL_USING_DEFAULT_ZINDEX_1000,Ma as THIS_IS_THE_SECOND_MODAL_USING_HIGHER_ZINDEX_1010,z_ as THIS_MODAL_IS_100PX_FROM_TOP,j_ as THIS_MODAL_IS_200PX_FROM_TOP,Oa as THIS_MODAL_IS_MOUNTED_IN_CURRENT_DOM,ra as THIS_MODAL_IS_MOUNTED_IN_CUSTOM_CONTAINER,Na as THIS_MODAL_MASK_USES_CUSTOM_BACKGROUND_COLOR,K_ as THROUGH_TOP_PARAM_CUSTOMIZE_MODAL_DISTANCE_FROM_TOP,$o as TITLE_AREA,D as TOP,X as TOP_DESCRIPTION,H_ as TOP_RIGHT_ANIMATION,Ao as TRANSPARENCY_ADJUSTMENT,Fo as TREE_SHAKING,se as TYPE,gi as TYPESCRIPT_SUPPORT,bo as TYPE_SAFE,p as TYPOGRAPHY,uE as TYPOGRAPHY_API_PARAMETERS,pE as TYPOGRAPHY_BASIC_USAGE,mE as TYPOGRAPHY_BASIC_USAGE_DESCRIPTION,sE as TYPOGRAPHY_CHILDREN_DESC,rE as TYPOGRAPHY_CLASSNAME_DESC,LE as TYPOGRAPHY_CODE_EXAMPLE,Za as TYPOGRAPHY_COMPONENT,RE as TYPOGRAPHY_COMPONENT_DESCRIPTION,SE as TYPOGRAPHY_DEFAULT_DISPLAY,K as TYPOGRAPHY_DESCRIPTION,hE as TYPOGRAPHY_DIFFERENT_WIDTHS,NE as TYPOGRAPHY_LIMIT_1_ROW,AE as TYPOGRAPHY_LIMIT_2_ROWS,cE as TYPOGRAPHY_LIMIT_3_ROWS,EE as TYPOGRAPHY_LONG_TEXT,CE as TYPOGRAPHY_MIXED_TEXT,IE as TYPOGRAPHY_MIXED_TEXT_2,dE as TYPOGRAPHY_MIXED_TEXT_TEST,DE as TYPOGRAPHY_MIXED_TEXT_TEST_2,OE as TYPOGRAPHY_ROWS_DESC,lE as TYPOGRAPHY_STYLE_DESC,ME as TYPOGRAPHY_WIDTH_200PX,PE as TYPOGRAPHY_WIDTH_300PX,gE as TYPOGRAPHY_WIDTH_500PX,TE as TYPOGRAPHY_WIDTH_DESC,Tt as UNINSTALL_REINSTALL,nt as UPDATING_DEPENDENCIES,it as UPDATING_DEPENDENCIES_DESC,st as UPDATING_GIT_DEPENDENCIES,_t as UPDATING_INSTALLED_DEPENDENCIES,Io as UPLOAD_FILE,Me as USAGE_IN_OTHER_PROJECTS,Ui as USAGE_SCENARIOS,lt as USER,V_ as USE_TOP_AND_DIRECTION_SIMULTANEOUSLY,Z_ as USE_TOP_PARAM_TO_CUSTOMIZE_MODAL_VERTICAL_POSITION,eo as USE_USECOPY_TO_COPY_LINK,Et as USING_FORCE_PARAM,$t as USING_USECOPY_HOOK,tt as V1_0_0,ot as V1_0_0_DESC,u as VARIABLES,V as VARIABLES_DESCRIPTION,Ce as VARIANT,te as VARIANT_BUTTONS,Ie as VARIANT_DESC,q as VERSION,Rt as VERTICAL_DIVIDER,en as VERTICAL_LAYOUT,So as VIEW_TEMPLATE,It as WARNING,ji as WARNING_CHECK_INPUT,fi as WEBSITE_ANNOUNCEMENT,g_ as WHEN_CONTENT_EXCEEDS_CALCULATED_HEIGHT,d_ as WHEN_HEIGHT_NOT_SET_CONTENT_AREA_ADAPTS,tE as WIDTH_200PX_LIMIT_1_ROW,oE as WIDTH_300PX_LIMIT_2_ROWS,nE as WIDTH_500PX_LIMIT_3_ROWS,To as WITH_ACTION_BUTTON,ho as WITH_TRANSPARENCY,nn as WRAP_LAYOUT,Xe as YARN_LOCAL_INSTALL,R_ as YOU_CAN_ADD_MORE_CONTENT_TO_TEST_ADAPTIVE_EFFECT,na as YOU_CAN_CUSTOMIZE_FOOTER_CONTENT_AND_STYLE,UE as default};
|