@vtx/components 2.5.13 → 2.5.15
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/CHANGELOG.md +842 -0
- package/lib/_util/filterSpecialCharacters.js +43 -54
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +3 -0
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +6 -0
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +32 -14
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +22 -0
- package/lib/index.js.map +1 -1
- package/lib/vtx-color-picker/index.js +21 -5
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +73 -33
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +45 -20
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-combogrid/style/index.less +29 -29
- package/lib/vtx-datagrid/Alert.js +11 -3
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +44 -19
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +13 -2
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +137 -77
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +35 -5
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/style/index.less +131 -131
- package/lib/vtx-date-picker/QdatePicker.js +46 -16
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/YearPicker.js +30 -7
- package/lib/vtx-date-picker/YearPicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +46 -5
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +8 -2
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +38 -38
- package/lib/vtx-editor/index.js +23 -5
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +2 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +2 -0
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-editor/style/index.less +6 -6
- package/lib/vtx-export/index.js +55 -23
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +6 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +6 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +26 -5
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +5 -0
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +34 -9
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +7 -2
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +6 -0
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +2 -0
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +41 -41
- package/lib/vtx-form-layout/index.js +22 -8
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +8 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +8 -0
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +148 -148
- package/lib/vtx-image/Image.js +92 -56
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +51 -20
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +40 -11
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +6 -0
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-image/style/index.less +46 -46
- package/lib/vtx-import/index.js +72 -37
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +24 -7
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +2 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +2 -0
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-input/TextArea.js +22 -6
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +37 -11
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +20 -20
- package/lib/vtx-input/useLength.js +16 -4
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +6 -1
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +70 -32
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +2 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +2 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-modal/style/index.less +83 -83
- package/lib/vtx-page-layout/Basic.js +6 -2
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +19 -7
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +10 -2
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +52 -22
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +15 -3
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +34 -4
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +8 -0
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +139 -139
- package/lib/vtx-rps-frame/index.js +44 -21
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +55 -19
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/css.js +1 -0
- package/lib/vtx-scrollable-row/style/css.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.js +1 -0
- package/lib/vtx-scrollable-row/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.less +111 -111
- package/lib/vtx-search/VtxCol.js +21 -0
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +12 -6
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +87 -36
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +5 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +5 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search/style/index.less +81 -81
- package/lib/vtx-search-map-input/index.js +68 -39
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +64 -20
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-select/style/index.less +66 -66
- package/lib/vtx-signature/index.js +28 -14
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +32 -32
- package/lib/vtx-split-pane/Pane.js +14 -2
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +30 -10
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +104 -52
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +4 -0
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-split-pane/style/index.less +59 -59
- package/lib/vtx-statistics-column/Back.js +7 -1
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +22 -5
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +22 -5
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +2 -0
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +16 -0
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +61 -61
- package/lib/vtx-time-picker/index.js +16 -3
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-time-picker/style/css.js.map +1 -1
- package/lib/vtx-time-picker/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +28 -9
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +136 -67
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +6 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +6 -0
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +59 -59
- package/lib/vtx-ztree/index.js +103 -51
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree/style/index.less +30 -30
- package/lib/vtx-ztree-select/index.js +97 -38
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +4 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +4 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +76 -76
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","names":["VtxImportResult","props","useSet","visible","dataSource","columns","modalWidth","state","modalProps","bodyStyle","backgroundColor","title","onCancel","hideVisible","width","maskClosable","footer","newTableProps","startIndex","size","headFootHeight","pagination","autoFit","maxHeight","overflow","propTypes","PropTypes","bool","array","number","func"],"sources":["vtx-import/result.jsx"],"sourcesContent":["import React from 'react';\nimport Modal from 'antd/lib/modal';\nimport Button from 'antd/lib/button';\nimport PropTypes from 'prop-types';\nimport useSet from '../_util/useSet';\nimport VtxDatagrid from '../vtx-datagrid';\n\nfunction VtxImportResult(props) {\n const [state] = useSet({\n visible: props.visible || false,\n dataSource: props.dataSource || [],\n columns: props.columns,\n modalWidth: props.modalWidth,\n });\n const modalProps = {\n bodyStyle: {\n backgroundColor: '#f8f8f8',\n },\n visible: state.visible,\n title: '导入结果',\n onCancel: () => {\n if (typeof props.hideVisible === 'function') {\n props.hideVisible();\n }\n },\n width: state.modalWidth,\n maskClosable: false,\n footer: [\n <Button\n key=\"closeWindow\"\n onClick={() => {\n if (typeof props.hideVisible === 'function') {\n props.hideVisible();\n }\n }}\n >\n 关闭\n </Button>,\n ],\n };\n let newTableProps = {\n columns: state.columns,\n dataSource: state.dataSource,\n startIndex: 1,\n size: 'small',\n headFootHeight: 50,\n pagination: false,\n autoFit: false,\n };\n return (\n <Modal {...modalProps}>\n <div style={{ maxHeight: 600, width: '100%', overflow: 'auto' }}>\n <VtxDatagrid toolbar={false} {...newTableProps} />\n </div>\n </Modal>\n );\n}\nVtxImportResult.propTypes = {\n visible: PropTypes.bool,\n dataSource: PropTypes.array,\n columns: PropTypes.array,\n modalWidth: PropTypes.number,\n hideVisible: PropTypes.func,\n};\nexport default VtxImportResult;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"result.js","names":["VtxImportResult","props","useSet","visible","dataSource","columns","modalWidth","state","modalProps","bodyStyle","backgroundColor","title","onCancel","hideVisible","width","maskClosable","footer","newTableProps","startIndex","size","headFootHeight","pagination","autoFit","maxHeight","overflow","propTypes","PropTypes","bool","array","number","func"],"sources":["vtx-import/result.jsx"],"sourcesContent":["import React from 'react';\r\nimport Modal from 'antd/lib/modal';\r\nimport Button from 'antd/lib/button';\r\nimport PropTypes from 'prop-types';\r\nimport useSet from '../_util/useSet';\r\nimport VtxDatagrid from '../vtx-datagrid';\r\n\r\nfunction VtxImportResult(props) {\r\n const [state] = useSet({\r\n visible: props.visible || false,\r\n dataSource: props.dataSource || [],\r\n columns: props.columns,\r\n modalWidth: props.modalWidth,\r\n });\r\n const modalProps = {\r\n bodyStyle: {\r\n backgroundColor: '#f8f8f8',\r\n },\r\n visible: state.visible,\r\n title: '导入结果',\r\n onCancel: () => {\r\n if (typeof props.hideVisible === 'function') {\r\n props.hideVisible();\r\n }\r\n },\r\n width: state.modalWidth,\r\n maskClosable: false,\r\n footer: [\r\n <Button\r\n key=\"closeWindow\"\r\n onClick={() => {\r\n if (typeof props.hideVisible === 'function') {\r\n props.hideVisible();\r\n }\r\n }}\r\n >\r\n 关闭\r\n </Button>,\r\n ],\r\n };\r\n let newTableProps = {\r\n columns: state.columns,\r\n dataSource: state.dataSource,\r\n startIndex: 1,\r\n size: 'small',\r\n headFootHeight: 50,\r\n pagination: false,\r\n autoFit: false,\r\n };\r\n return (\r\n <Modal {...modalProps}>\r\n <div style={{ maxHeight: 600, width: '100%', overflow: 'auto' }}>\r\n <VtxDatagrid toolbar={false} {...newTableProps} />\r\n </div>\r\n </Modal>\r\n );\r\n}\r\nVtxImportResult.propTypes = {\r\n visible: PropTypes.bool,\r\n dataSource: PropTypes.array,\r\n columns: PropTypes.array,\r\n modalWidth: PropTypes.number,\r\n hideVisible: PropTypes.func,\r\n};\r\nexport default VtxImportResult;\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AAEA,SAASA,eAAT,CAAyBC,KAAzB,EAAgC;EAC5B,cAAgB,IAAAC,mBAAA,EAAO;IACnBC,OAAO,EAAEF,KAAK,CAACE,OAAN,IAAiB,KADP;IAEnBC,UAAU,EAAEH,KAAK,CAACG,UAAN,IAAoB,EAFb;IAGnBC,OAAO,EAAEJ,KAAK,CAACI,OAHI;IAInBC,UAAU,EAAEL,KAAK,CAACK;EAJC,CAAP,CAAhB;EAAA;EAAA,IAAOC,KAAP;;EAMA,IAAMC,UAAU,GAAG;IACfC,SAAS,EAAE;MACPC,eAAe,EAAE;IADV,CADI;IAIfP,OAAO,EAAEI,KAAK,CAACJ,OAJA;IAKfQ,KAAK,EAAE,MALQ;IAMfC,QAAQ,EAAE,oBAAM;MACZ,IAAI,OAAOX,KAAK,CAACY,WAAb,KAA6B,UAAjC,EAA6C;QACzCZ,KAAK,CAACY,WAAN;MACH;IACJ,CAVc;IAWfC,KAAK,EAAEP,KAAK,CAACD,UAXE;IAYfS,YAAY,EAAE,KAZC;IAafC,MAAM,EAAE,cACJ,gCAAC,kBAAD;MACI,GAAG,EAAC,aADR;MAEI,OAAO,EAAE,mBAAM;QACX,IAAI,OAAOf,KAAK,CAACY,WAAb,KAA6B,UAAjC,EAA6C;UACzCZ,KAAK,CAACY,WAAN;QACH;MACJ;IANL,kBADI;EAbO,CAAnB;EA0BA,IAAII,aAAa,GAAG;IAChBZ,OAAO,EAAEE,KAAK,CAACF,OADC;IAEhBD,UAAU,EAAEG,KAAK,CAACH,UAFF;IAGhBc,UAAU,EAAE,CAHI;IAIhBC,IAAI,EAAE,OAJU;IAKhBC,cAAc,EAAE,EALA;IAMhBC,UAAU,EAAE,KANI;IAOhBC,OAAO,EAAE;EAPO,CAApB;EASA,oBACI,gCAAC,iBAAD,EAAWd,UAAX,eACI;IAAK,KAAK,EAAE;MAAEe,SAAS,EAAE,GAAb;MAAkBT,KAAK,EAAE,MAAzB;MAAiCU,QAAQ,EAAE;IAA3C;EAAZ,gBACI,gCAAC,uBAAD;IAAa,OAAO,EAAE;EAAtB,GAAiCP,aAAjC,EADJ,CADJ,CADJ;AAOH;;AACDjB,eAAe,CAACyB,SAAhB,GAA4B;EACxBtB,OAAO,EAAEuB,qBAAA,CAAUC,IADK;EAExBvB,UAAU,EAAEsB,qBAAA,CAAUE,KAFE;EAGxBvB,OAAO,EAAEqB,qBAAA,CAAUE,KAHK;EAIxBtB,UAAU,EAAEoB,qBAAA,CAAUG,MAJE;EAKxBhB,WAAW,EAAEa,qBAAA,CAAUI;AALC,CAA5B;eAOe9B,e"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-import/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style/css';\nimport 'antd/lib/button/style/css';\nimport 'antd/lib/message/style/css';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-import/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style/css';\r\nimport 'antd/lib/button/style/css';\r\nimport 'antd/lib/message/style/css';\r\n"],"mappings":";;AAAA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-import/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style/css';\nimport 'antd/lib/button/style/css';\nimport 'antd/lib/message/style/css';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-import/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style/css';\r\nimport 'antd/lib/button/style/css';\r\nimport 'antd/lib/message/style/css';\r\n"],"mappings":";;AAAA;;AACA;;AACA"}
|
|
@@ -1,38 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
15
|
+
|
|
11
16
|
var _useLength = _interopRequireDefault(require("./useLength"));
|
|
17
|
+
|
|
12
18
|
var _excluded = ["maxLength", "showCount", "placeholder"];
|
|
19
|
+
|
|
13
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
14
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
15
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
16
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
+
|
|
17
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
18
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
19
32
|
var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
20
33
|
var _props$maxLength = props.maxLength,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
maxLength = _props$maxLength === void 0 ? 200 : _props$maxLength,
|
|
35
|
+
_props$showCount = props.showCount,
|
|
36
|
+
showCount = _props$showCount === void 0 ? true : _props$showCount,
|
|
37
|
+
_props$placeholder = props.placeholder,
|
|
38
|
+
placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
|
|
39
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
40
|
+
|
|
27
41
|
var len = (0, _useLength["default"])(props.value, {
|
|
28
42
|
showCount: showCount
|
|
29
43
|
});
|
|
44
|
+
|
|
30
45
|
var render = /*#__PURE__*/_react["default"].createElement(_input["default"].TextArea, _extends({
|
|
31
46
|
placeholder: placeholder,
|
|
32
47
|
maxLength: maxLength
|
|
33
48
|
}, rest, {
|
|
34
49
|
ref: ref
|
|
35
50
|
}));
|
|
51
|
+
|
|
36
52
|
showCount && 'value' in props && (render = /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
53
|
className: "vtx-input-textarea",
|
|
38
54
|
"data-count": "".concat(len, "/").concat(maxLength)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/es/input';\nimport useLength from './useLength';\n\nconst TextArea = forwardRef((props, ref) => {\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\n const len = useLength(props.value, { showCount });\n\n let render = (\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\n );\n\n showCount &&\n 'value' in props &&\n (render = (\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\n {render}\n </div>\n ));\n return render;\n});\n\nexport default TextArea;\n\nTextArea.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n placeholder: PropTypes.string,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Input from 'antd/es/input';\r\nimport useLength from './useLength';\r\n\r\nconst TextArea = forwardRef((props, ref) => {\r\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\r\n const len = useLength(props.value, { showCount });\r\n\r\n let render = (\r\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\r\n );\r\n\r\n showCount &&\r\n 'value' in props &&\r\n (render = (\r\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\r\n {render}\r\n </div>\r\n ));\r\n return render;\r\n});\r\n\r\nexport default TextArea;\r\n\r\nTextArea.propTypes = {\r\n maxLength: PropTypes.number,\r\n value: PropTypes.string,\r\n showCount: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n};\r\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,uBAA4ED,KAA5E,CAAQE,SAAR;EAAA,IAAQA,SAAR,iCAAoB,GAApB;EAAA,uBAA4EF,KAA5E,CAAyBG,SAAzB;EAAA,IAAyBA,SAAzB,iCAAqC,IAArC;EAAA,yBAA4EH,KAA5E,CAA2CI,WAA3C;EAAA,IAA2CA,WAA3C,mCAAyD,KAAzD;EAAA,IAAmEC,IAAnE,4BAA4EL,KAA5E;;EACA,IAAMM,GAAG,GAAG,IAAAC,qBAAA,EAAUP,KAAK,CAACQ,KAAhB,EAAuB;IAAEL,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIM,MAAM,gBACN,gCAAC,iBAAD,CAAO,QAAP;IAAgB,WAAW,EAAEL,WAA7B;IAA0C,SAAS,EAAEF;EAArD,GAAoEG,IAApE;IAA0E,GAAG,EAAEJ;EAA/E,GADJ;;EAIAE,SAAS,IACL,WAAWH,KADf,KAEKS,MAAM,gBACH;IAAK,SAAS,EAAC,oBAAf;IAAoC,wBAAeH,GAAf,cAAsBJ,SAAtB;EAApC,GACKO,MADL,CAHR;EAOA,OAAOA,MAAP;AACH,CAhBgB,CAAjB;eAkBeX,Q;;AAEfA,QAAQ,CAACY,SAAT,GAAqB;EACjBR,SAAS,EAAES,qBAAA,CAAUC,MADJ;EAEjBJ,KAAK,EAAEG,qBAAA,CAAUE,MAFA;EAGjBV,SAAS,EAAEQ,qBAAA,CAAUG,IAHJ;EAIjBV,WAAW,EAAEO,qBAAA,CAAUE;AAJN,CAArB"}
|
package/lib/vtx-input/index.js
CHANGED
|
@@ -1,44 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
15
|
+
|
|
11
16
|
var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
|
|
17
|
+
|
|
12
18
|
var _TextArea = _interopRequireDefault(require("./TextArea"));
|
|
19
|
+
|
|
13
20
|
var _useLength = _interopRequireDefault(require("./useLength"));
|
|
21
|
+
|
|
14
22
|
var _getComponentProps = _interopRequireDefault(require("../_util/getComponentProps"));
|
|
23
|
+
|
|
15
24
|
var _filterSpecialCharacters = _interopRequireDefault(require("../_util/filterSpecialCharacters"));
|
|
25
|
+
|
|
16
26
|
var _excluded = ["showCount", "maxLength", "specialCharactersFilter", "trim", "onChange", "onBlur", "placeholder"];
|
|
27
|
+
|
|
17
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
18
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
19
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
20
34
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
+
|
|
21
36
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
22
38
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
+
|
|
23
40
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
+
|
|
24
42
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
|
+
|
|
25
44
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
|
+
|
|
26
46
|
var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
27
47
|
var showCount = props.showCount,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
_props$maxLength = props.maxLength,
|
|
49
|
+
maxLength = _props$maxLength === void 0 ? 32 : _props$maxLength,
|
|
50
|
+
_props$specialCharact = props.specialCharactersFilter,
|
|
51
|
+
specialCharactersFilter = _props$specialCharact === void 0 ? true : _props$specialCharact,
|
|
52
|
+
_props$trim = props.trim,
|
|
53
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
54
|
+
onChange = props.onChange,
|
|
55
|
+
_onBlur = props.onBlur,
|
|
56
|
+
_props$placeholder = props.placeholder,
|
|
57
|
+
placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
|
|
58
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
59
|
+
|
|
39
60
|
var len = (0, _useLength["default"])(props.value, {
|
|
40
61
|
showCount: showCount
|
|
41
62
|
});
|
|
63
|
+
|
|
42
64
|
var newProps = _objectSpread({
|
|
43
65
|
ref: ref,
|
|
44
66
|
maxLength: maxLength,
|
|
@@ -46,18 +68,22 @@ var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
46
68
|
onBlur: function onBlur(e) {
|
|
47
69
|
var value = e.target.value;
|
|
48
70
|
var $e = e;
|
|
71
|
+
|
|
49
72
|
if (trim) {
|
|
50
73
|
value = value.trim();
|
|
51
74
|
}
|
|
75
|
+
|
|
52
76
|
if (specialCharactersFilter && value) {
|
|
53
77
|
$e = (0, _lodash["default"])(e);
|
|
54
78
|
$e.target.value = (0, _filterSpecialCharacters["default"])(value, (0, _getComponentProps["default"])(specialCharactersFilter));
|
|
55
79
|
onChange && onChange($e);
|
|
56
80
|
}
|
|
81
|
+
|
|
57
82
|
_onBlur && _onBlur($e);
|
|
58
83
|
},
|
|
59
84
|
onChange: onChange
|
|
60
85
|
}, rest);
|
|
86
|
+
|
|
61
87
|
showCount && 'value' in props && (newProps = _objectSpread({
|
|
62
88
|
suffix: "".concat(len, "/").concat(maxLength)
|
|
63
89
|
}, newProps));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/es/input';\nimport cloneDeep from 'lodash.clonedeep';\nimport TextArea from './TextArea';\nimport useLength from './useLength';\nimport getComponentProps from '../_util/getComponentProps';\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\n\nconst VtxInput = forwardRef((props, ref) => {\n const {\n showCount,\n maxLength = 32,\n specialCharactersFilter = true,\n trim = true,\n onChange,\n onBlur,\n placeholder = '请输入',\n ...rest\n } = props;\n\n const len = useLength(props.value, { showCount });\n\n let newProps = {\n ref,\n maxLength,\n placeholder,\n onBlur(e) {\n let value = e.target.value;\n let $e = e;\n if (trim) {\n value = value.trim();\n }\n if (specialCharactersFilter && value) {\n $e = cloneDeep(e);\n $e.target.value = filterSpecialCharacters(\n value,\n getComponentProps(specialCharactersFilter),\n );\n onChange && onChange($e);\n }\n onBlur && onBlur($e);\n },\n onChange,\n ...rest,\n };\n\n showCount &&\n 'value' in props &&\n (newProps = {\n suffix: `${len}/${maxLength}`,\n ...newProps,\n });\n\n return <Input {...newProps} autoComplete=\"off\" />;\n});\n\nVtxInput.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n placeholder: PropTypes.string,\n trim: PropTypes.bool,\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n};\n\nVtxInput.Search = Input.Search;\nVtxInput.Group = Input.Group;\nVtxInput.Password = Input.Password;\nVtxInput.TextArea = TextArea;\n\nexport default VtxInput;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Input from 'antd/es/input';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nimport TextArea from './TextArea';\r\nimport useLength from './useLength';\r\nimport getComponentProps from '../_util/getComponentProps';\r\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\r\n\r\nconst VtxInput = forwardRef((props, ref) => {\r\n const {\r\n showCount,\r\n maxLength = 32,\r\n specialCharactersFilter = true,\r\n trim = true,\r\n onChange,\r\n onBlur,\r\n placeholder = '请输入',\r\n ...rest\r\n } = props;\r\n\r\n const len = useLength(props.value, { showCount });\r\n\r\n let newProps = {\r\n ref,\r\n maxLength,\r\n placeholder,\r\n onBlur(e) {\r\n let value = e.target.value;\r\n let $e = e;\r\n if (trim) {\r\n value = value.trim();\r\n }\r\n if (specialCharactersFilter && value) {\r\n $e = cloneDeep(e);\r\n $e.target.value = filterSpecialCharacters(\r\n value,\r\n getComponentProps(specialCharactersFilter),\r\n );\r\n onChange && onChange($e);\r\n }\r\n onBlur && onBlur($e);\r\n },\r\n onChange,\r\n ...rest,\r\n };\r\n\r\n showCount &&\r\n 'value' in props &&\r\n (newProps = {\r\n suffix: `${len}/${maxLength}`,\r\n ...newProps,\r\n });\r\n\r\n return <Input {...newProps} autoComplete=\"off\" />;\r\n});\r\n\r\nVtxInput.propTypes = {\r\n maxLength: PropTypes.number,\r\n value: PropTypes.string,\r\n showCount: PropTypes.bool,\r\n onChange: PropTypes.func,\r\n onBlur: PropTypes.func,\r\n placeholder: PropTypes.string,\r\n trim: PropTypes.bool,\r\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\r\n};\r\n\r\nVtxInput.Search = Input.Search;\r\nVtxInput.Group = Input.Group;\r\nVtxInput.Password = Input.Password;\r\nVtxInput.TextArea = TextArea;\r\n\r\nexport default VtxInput;\r\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,IACIC,SADJ,GASIF,KATJ,CACIE,SADJ;EAAA,uBASIF,KATJ,CAEIG,SAFJ;EAAA,IAEIA,SAFJ,iCAEgB,EAFhB;EAAA,4BASIH,KATJ,CAGII,uBAHJ;EAAA,IAGIA,uBAHJ,sCAG8B,IAH9B;EAAA,kBASIJ,KATJ,CAIIK,IAJJ;EAAA,IAIIA,IAJJ,4BAIW,IAJX;EAAA,IAKIC,QALJ,GASIN,KATJ,CAKIM,QALJ;EAAA,IAMIC,OANJ,GASIP,KATJ,CAMIO,MANJ;EAAA,yBASIP,KATJ,CAOIQ,WAPJ;EAAA,IAOIA,WAPJ,mCAOkB,KAPlB;EAAA,IAQOC,IARP,4BASIT,KATJ;;EAWA,IAAMU,GAAG,GAAG,IAAAC,qBAAA,EAAUX,KAAK,CAACY,KAAhB,EAAuB;IAAEV,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIW,QAAQ;IACRZ,GAAG,EAAHA,GADQ;IAERE,SAAS,EAATA,SAFQ;IAGRK,WAAW,EAAXA,WAHQ;IAIRD,MAJQ,kBAIDO,CAJC,EAIE;MACN,IAAIF,KAAK,GAAGE,CAAC,CAACC,MAAF,CAASH,KAArB;MACA,IAAII,EAAE,GAAGF,CAAT;;MACA,IAAIT,IAAJ,EAAU;QACNO,KAAK,GAAGA,KAAK,CAACP,IAAN,EAAR;MACH;;MACD,IAAID,uBAAuB,IAAIQ,KAA/B,EAAsC;QAClCI,EAAE,GAAG,IAAAC,kBAAA,EAAUH,CAAV,CAAL;QACAE,EAAE,CAACD,MAAH,CAAUH,KAAV,GAAkB,IAAAM,mCAAA,EACdN,KADc,EAEd,IAAAO,6BAAA,EAAkBf,uBAAlB,CAFc,CAAlB;QAIAE,QAAQ,IAAIA,QAAQ,CAACU,EAAD,CAApB;MACH;;MACDT,OAAM,IAAIA,OAAM,CAACS,EAAD,CAAhB;IACH,CAnBO;IAoBRV,QAAQ,EAARA;EApBQ,GAqBLG,IArBK,CAAZ;;EAwBAP,SAAS,IACL,WAAWF,KADf,KAEKa,QAAQ;IACLO,MAAM,YAAKV,GAAL,cAAYP,SAAZ;EADD,GAEFU,QAFE,CAFb;EAOA,oBAAO,gCAAC,iBAAD,eAAWA,QAAX;IAAqB,YAAY,EAAC;EAAlC,GAAP;AACH,CA9CgB,CAAjB;AAgDAf,QAAQ,CAACuB,SAAT,GAAqB;EACjBlB,SAAS,EAAEmB,qBAAA,CAAUC,MADJ;EAEjBX,KAAK,EAAEU,qBAAA,CAAUE,MAFA;EAGjBtB,SAAS,EAAEoB,qBAAA,CAAUG,IAHJ;EAIjBnB,QAAQ,EAAEgB,qBAAA,CAAUI,IAJH;EAKjBnB,MAAM,EAAEe,qBAAA,CAAUI,IALD;EAMjBlB,WAAW,EAAEc,qBAAA,CAAUE,MANN;EAOjBnB,IAAI,EAAEiB,qBAAA,CAAUG,IAPC;EAQjBrB,uBAAuB,EAAEkB,qBAAA,CAAUK,SAAV,CAAoB,CAACL,qBAAA,CAAUG,IAAX,EAAiBH,qBAAA,CAAUM,MAA3B,CAApB;AARR,CAArB;AAWA9B,QAAQ,CAAC+B,MAAT,GAAkBC,iBAAA,CAAMD,MAAxB;AACA/B,QAAQ,CAACiC,KAAT,GAAiBD,iBAAA,CAAMC,KAAvB;AACAjC,QAAQ,CAACkC,QAAT,GAAoBF,iBAAA,CAAME,QAA1B;AACAlC,QAAQ,CAACmC,QAAT,GAAoBA,oBAApB;eAEenC,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/es/input/style/css';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.vtx-input-textarea {
|
|
2
|
-
position: relative;
|
|
3
|
-
&::after {
|
|
4
|
-
position: absolute;
|
|
5
|
-
right: 12px;
|
|
6
|
-
bottom: 8px;
|
|
7
|
-
color: rgba(0, 0, 0, 0.45);
|
|
8
|
-
line-height: 1.5;
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
content: attr(data-count);
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ant-input-affix-wrapper .ant-input-suffix {
|
|
16
|
-
color: rgba(0, 0, 0, 0.45);
|
|
17
|
-
}
|
|
18
|
-
.ant-input-affix-wrapper .ant-input:not(:last-child) {
|
|
19
|
-
padding-right: 48px;
|
|
20
|
-
}
|
|
1
|
+
.vtx-input-textarea {
|
|
2
|
+
position: relative;
|
|
3
|
+
&::after {
|
|
4
|
+
position: absolute;
|
|
5
|
+
right: 12px;
|
|
6
|
+
bottom: 8px;
|
|
7
|
+
color: rgba(0, 0, 0, 0.45);
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
content: attr(data-count);
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ant-input-affix-wrapper .ant-input-suffix {
|
|
16
|
+
color: rgba(0, 0, 0, 0.45);
|
|
17
|
+
}
|
|
18
|
+
.ant-input-affix-wrapper .ant-input:not(:last-child) {
|
|
19
|
+
padding-right: 48px;
|
|
20
|
+
}
|
|
@@ -4,26 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = require("react");
|
|
9
|
+
|
|
8
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
|
|
9
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
10
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
|
|
11
16
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
|
|
12
18
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
+
|
|
13
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
|
|
14
22
|
var useLength = function useLength() {
|
|
15
23
|
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
24
|
+
|
|
16
25
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
17
|
-
|
|
26
|
+
showCount = _ref.showCount;
|
|
27
|
+
|
|
18
28
|
var _useState = (0, _react.useState)(0),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
len = _useState2[0],
|
|
31
|
+
setLen = _useState2[1];
|
|
32
|
+
|
|
22
33
|
(0, _react.useEffect)(function () {
|
|
23
34
|
showCount && setLen(String(val !== null && val !== void 0 ? val : '').length);
|
|
24
35
|
}, [val]);
|
|
25
36
|
return len;
|
|
26
37
|
};
|
|
38
|
+
|
|
27
39
|
var _default = useLength;
|
|
28
40
|
exports["default"] = _default;
|
|
29
41
|
//# sourceMappingURL=useLength.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLength.js","names":["useLength","val","showCount","useState","len","setLen","useEffect","String","length"],"sources":["vtx-input/useLength.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useLength = (val = '', { showCount } = {}) => {\n const [len, setLen] = useState(0);\n useEffect(() => {\n showCount && setLen(String(val ?? '').length);\n }, [val]);\n return len;\n};\n\nexport default useLength;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLength.js","names":["useLength","val","showCount","useState","len","setLen","useEffect","String","length"],"sources":["vtx-input/useLength.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useLength = (val = '', { showCount } = {}) => {\n const [len, setLen] = useState(0);\n useEffect(() => {\n showCount && setLen(String(val ?? '').length);\n }, [val]);\n return len;\n};\n\nexport default useLength;\n"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAkC;EAAA,IAAjCC,GAAiC,uEAA3B,EAA2B;;EAAA,+EAAP,EAAO;EAAA,IAArBC,SAAqB,QAArBA,SAAqB;;EAChD,gBAAsB,IAAAC,eAAA,EAAS,CAAT,CAAtB;EAAA;EAAA,IAAOC,GAAP;EAAA,IAAYC,MAAZ;;EACA,IAAAC,gBAAA,EAAU,YAAM;IACZJ,SAAS,IAAIG,MAAM,CAACE,MAAM,CAACN,GAAD,aAACA,GAAD,cAACA,GAAD,GAAQ,EAAR,CAAN,CAAkBO,MAAnB,CAAnB;EACH,CAFD,EAEG,CAACP,GAAD,CAFH;EAGA,OAAOG,GAAP;AACH,CAND;;eAQeJ,S"}
|
package/lib/vtx-modal/Title.js
CHANGED
|
@@ -4,12 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
9
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
10
14
|
function Title(props) {
|
|
11
15
|
var text = props.text,
|
|
12
|
-
|
|
16
|
+
subtitle = props.subtitle;
|
|
13
17
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
14
18
|
className: "vtx-modal-header-title"
|
|
15
19
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -18,6 +22,7 @@ function Title(props) {
|
|
|
18
22
|
className: "vtx-modal-header-subtitle"
|
|
19
23
|
}, subtitle));
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
Title.propTypes = {
|
|
22
27
|
text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
|
|
23
28
|
subtitle: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","names":["Title","props","text","subtitle","propTypes","PropTypes","oneOfType","string","node"],"sources":["vtx-modal/Title.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction Title(props) {\n const { text, subtitle } = props;\n return (\n <div className=\"vtx-modal-header-title\">\n <span className=\"vtx-modal-header-text\">{text}</span>\n {subtitle && <span className=\"vtx-modal-header-subtitle\">{subtitle}</span>}\n </div>\n );\n}\n\nTitle.propTypes = {\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n};\n\nexport default Title;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Title.js","names":["Title","props","text","subtitle","propTypes","PropTypes","oneOfType","string","node"],"sources":["vtx-modal/Title.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction Title(props) {\n const { text, subtitle } = props;\n return (\n <div className=\"vtx-modal-header-title\">\n <span className=\"vtx-modal-header-text\">{text}</span>\n {subtitle && <span className=\"vtx-modal-header-subtitle\">{subtitle}</span>}\n </div>\n );\n}\n\nTitle.propTypes = {\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n};\n\nexport default Title;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,SAASA,KAAT,CAAeC,KAAf,EAAsB;EAClB,IAAQC,IAAR,GAA2BD,KAA3B,CAAQC,IAAR;EAAA,IAAcC,QAAd,GAA2BF,KAA3B,CAAcE,QAAd;EACA,oBACI;IAAK,SAAS,EAAC;EAAf,gBACI;IAAM,SAAS,EAAC;EAAhB,GAAyCD,IAAzC,CADJ,EAEKC,QAAQ,iBAAI;IAAM,SAAS,EAAC;EAAhB,GAA6CA,QAA7C,CAFjB,CADJ;AAMH;;AAEDH,KAAK,CAACI,SAAN,GAAkB;EACdF,IAAI,EAAEG,qBAAA,CAAUC,SAAV,CAAoB,CAACD,qBAAA,CAAUE,MAAX,EAAmBF,qBAAA,CAAUG,IAA7B,CAApB,CADQ;EAEdL,QAAQ,EAAEE,qBAAA,CAAUC,SAAV,CAAoB,CAACD,qBAAA,CAAUE,MAAX,EAAmBF,qBAAA,CAAUG,IAA7B,CAApB;AAFI,CAAlB;eAKeR,K"}
|