cnhis-design-vue 3.1.44-release.2 → 3.1.44-release.4

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.
Files changed (82) hide show
  1. package/es/components/base-search/index.d.ts +1 -0
  2. package/es/components/base-search/src/index.vue.d.ts +1 -0
  3. package/es/components/base-search/style/index.css +1 -1
  4. package/es/components/classification/index.d.ts +6 -2
  5. package/es/components/classification/src/components/search-filter/index.vue.d.ts +6 -2
  6. package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -2
  7. package/es/components/classification/src/index.vue.d.ts +6 -2
  8. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  9. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -1
  10. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -0
  11. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/useRight.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useTop.d.ts +1 -1
  17. package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
  18. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  19. package/es/components/form-render/style/index.css +1 -1
  20. package/es/components/iho-select-label/index.d.ts +5 -0
  21. package/es/components/iho-select-label/src/SelectLabel.vue.d.ts +5 -0
  22. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  23. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  24. package/es/components/iho-select-label/style/index.css +1 -1
  25. package/es/components/iho-table/index.d.ts +2 -0
  26. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  27. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  28. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  29. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
  30. package/es/components/iho-table/src/types/index.d.ts +2 -0
  31. package/es/components/index.css +1 -1
  32. package/es/components/quick-search/index.d.ts +1 -0
  33. package/es/components/quick-search/src/index.vue.d.ts +1 -0
  34. package/es/components/quick-search/style/index.css +1 -1
  35. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  36. package/es/components/search-cascader/style/index.css +1 -1
  37. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +6 -2
  38. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +6 -2
  39. package/es/components/table-filter/src/components/render-widget/basicData.js +1 -1
  40. package/es/components/table-filter/src/components/render-widget/components/{DateRange.vue.d.ts → DateRangeInner.vue.d.ts} +1 -14
  41. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -0
  42. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +141 -0
  43. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -0
  44. package/es/components/table-filter/src/components/render-widget/components/Label.vue.d.ts +70 -0
  45. package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +1 -0
  46. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.d.ts +56 -0
  47. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +1 -0
  48. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +5 -2
  49. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  50. package/es/components/table-filter/src/components/render-widget/enums.d.ts +28 -7
  51. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  52. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
  53. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -1
  54. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  55. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +297 -14
  56. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  57. package/es/components/table-filter/src/directive/resize.d.ts +4 -0
  58. package/es/components/table-filter/src/directive/resize.js +1 -0
  59. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
  60. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  61. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  62. package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
  63. package/es/components/table-filter/src/tool/resizeSensor.js +1 -0
  64. package/es/components/table-filter/src/types/enums.d.ts +6 -2
  65. package/es/components/table-filter/src/types/enums.js +1 -1
  66. package/es/components/table-filter/src/types/index.d.ts +14 -0
  67. package/es/shared/package.json.js +1 -1
  68. package/package.json +2 -2
  69. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
  70. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
  71. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
  72. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
  74. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
  75. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
  76. package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
  77. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
  78. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
  79. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
  80. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
  81. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
  82. package/es/components/table-filter/src/components/render-widget/components/DateRange.vue.js +0 -1
@@ -1 +1 @@
1
- .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{align-items:center;display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
1
+ .classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
@@ -1 +1 @@
1
- import{defineComponent as e,computed as r,inject as t,createVNode as o,withModifiers as n,ref as a,createTextVNode as l}from"vue";import{traverse as c}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as i}from"@vue/shared";import{useVirtualList as d}from"@vueuse/core";import{isNumber as p,isArray as f,isEqual as v,isString as y,isFunction as h}from"lodash-es";import{NCheckbox as m}from"naive-ui";import{InjectionSearchCascaderLoadingNode as g,InjectionSearchCascaderValue as N,InjectionSearchCascaderCheckAbleLevel as C,InjectionKeyboardEventBus as b}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},cursorNode:{type:Object,default:()=>({})}},emits:["nodeClick","changeCursor"],setup(e,{emit:a}){const l=r((()=>e.options)),{list:c,containerProps:h,wrapperProps:k}=d(l,{itemHeight:32,overscan:5}),K=t(g),_=t(N),x=t(C),A=t(b),S=r((()=>p(x.value)&&x.value<=e.level));function j(e){return Object.keys(e).length<=0}function w(r){return e.cursorNode==r}function I(r){const t=function(e){const r=[e];let t=e;for(;t.parent;)t=t.parent,r.unshift(t);return r}(r);if(f(_.value))return v(o(t,e.valueKey),o(_.value,e.valueKey));if(y(_.value)){const r=_.value.split("/").map((e=>e.trim()));return v(r,o(t,e.labelKey))}return!1;function o(e,r){return e.map((e=>e[r]))}}function O(e){const r=h.ref.value;if(r){const t=32*e-(null==r?void 0:r.clientHeight);r.scrollTo(0,t>0?t:0)}}return A.on((function(r){function t(){return S.value?a("nodeClick",{type:"update",node:e.cursorNode}):a("nodeClick",{type:"search",node:e.cursorNode})}if("ArrowUp"===r){if(j(e.cursorNode))return;const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=0===r?l.value.length-1:r-1,t=l.value[e];a("changeCursor",t),O(e+3)}}if("ArrowRight"===r){if(j(e.cursorNode))return;a("nodeClick",{type:"search",node:e.cursorNode}),a("changeCursor",{})}if("ArrowDown"===r){if(j(e.cursorNode))return a("changeCursor",l.value[0]);const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=r>=l.value.length-1?0:r+1,t=l.value[e];a("changeCursor",t),O(e+1)}}if("ArrowLeft"===r&&e.activeNodes.length){const r=e.activeNodes.slice(-1);a("changeCursor",r[0])}" "===r&&t(),"Enter"===r&&t()})),()=>o("div",{class:"search-cascader__optionWrapper",ref:h.ref,style:h.style,onScroll:h.onScroll},[o("div",{style:k.value.style},[c.value.map((r=>{return o("div",{class:["search-cascader__option",{"search-cascader__option--active":(t=r.data,(null==(l=e.activeNodes)?void 0:l.includes(t))||w(r.data))}],onClick:()=>a("nodeClick",{type:"search",node:r.data}),title:r.data[e.labelKey]},[o("div",{class:"search-cascader__optionText"},[S.value?o(m,{style:{marginRight:"8px"},checked:I(r.data),onClick:n(i,["stop"]),onUpdateChecked:e=>e&&function(e){a("nodeClick",{type:"update",node:e})}(r.data)},null):null,r.data[e.labelKey]]),K.value===r.data?o(s,{class:"rotate"},null):r.data.isLeaf?null:o(u,null,null)]);var t,l}))])])}}),K=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object},cursorNode:{type:Object}},emits:["nodeClick","changeCursor"],setup(e,{slots:r,emit:t}){const n=a([]);function s(r,a){return o(k,{level:a+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:n.value,onNodeClick:e=>t("nodeClick",e),onChangeCursor:e=>t("changeCursor",e),options:r,cursorNode:e.cursorNode},null)}function u(r){let t=!1;return c(r,((r,o)=>{r===e.currentNode&&(t=!0,o())}),["children"]),t}function i(){if(!f(e.options)||!e.currentNode)return[];const r=[e.options];let t=e.options;for(n.value.length=0;f(t);){const o=t.find(u);if(!o)break;n.value.push(o),t=o[e.childKey],r.push(t)}if(e.cursorNode){const t=r.findIndex((r=>r.findIndex((r=>r===e.cursorNode))>=0));if(t>=0){const e=r.slice(0,t+1);return n.value.splice(t,r.length),e}}return r}return()=>o("section",{class:"search-cascader__menuWrapper"},[f(e.options)&&e.options.length?e.currentNode?i().map(s):s(e.options,0):o("section",{class:"search-cascader__emptyWrapper"},[h(r.empty)?r.empty():o("section",null,[l("empty")])])])}});export{K as SearchMenu};
1
+ import{defineComponent as e,computed as r,inject as t,createVNode as o,withModifiers as n,ref as a,createTextVNode as l}from"vue";import{traverse as c}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as i}from"@vue/shared";import{useVirtualList as d}from"@vueuse/core";import{isNumber as p,isArray as f,isEqual as v,isString as y,isFunction as h}from"lodash-es";import{NCheckbox as m}from"naive-ui";import{InjectionSearchCascaderLoadingNode as g,InjectionSearchCascaderValue as N,InjectionSearchCascaderCheckAbleLevel as C,InjectionKeyboardEventBus as b}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},cursorNode:{type:Object,default:()=>({})}},emits:["nodeClick","changeCursor"],setup(e,{emit:a}){const l=r((()=>e.options)),{list:c,containerProps:h,wrapperProps:k}=d(l,{itemHeight:32,overscan:5}),K=t(g),_=t(N),x=t(C),A=t(b),S=r((()=>p(x.value)&&x.value<=e.level));function j(e){return Object.keys(e).length<=0}function w(r){return e.cursorNode==r}function I(r){const t=function(e){const r=[e];let t=e;for(;t.parent;)t=t.parent,r.unshift(t);return r}(r);if(f(_.value))return v(o(t,e.valueKey),o(_.value,e.valueKey));if(y(_.value)){const r=_.value.split("/").map((e=>e.trim()));return v(r,o(t,e.labelKey))}return!1;function o(e,r){return e.map((e=>e[r]))}}function O(e){const r=h.ref.value;if(r){const t=32*e-(null==r?void 0:r.clientHeight);r.scrollTo(0,t>0?t:0)}}return A.on((function(r){if("ArrowUp"===r){if(j(e.cursorNode))return;const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=0===r?l.value.length-1:r-1,t=l.value[e];a("changeCursor",t),O(e+3)}}if("ArrowRight"===r){if(j(e.cursorNode))return;a("nodeClick",{type:"search",node:e.cursorNode}),a("changeCursor",{})}if("ArrowDown"===r){if(j(e.cursorNode))return a("changeCursor",l.value[0]);const r=l.value.findIndex((r=>r===e.cursorNode));if(r>=0){const e=r>=l.value.length-1?0:r+1,t=l.value[e];a("changeCursor",t),O(e+1)}}if("ArrowLeft"===r&&e.activeNodes.length){const r=e.activeNodes.slice(-1);a("changeCursor",r[0])}"Enter"===r&&(S.value?a("nodeClick",{type:"update",node:e.cursorNode}):a("nodeClick",{type:"search",node:e.cursorNode}))})),()=>o("div",{class:"search-cascader__optionWrapper",ref:h.ref,style:h.style,onScroll:h.onScroll},[o("div",{style:k.value.style},[c.value.map((r=>{return o("div",{class:["search-cascader__option",{"search-cascader__option--active":(t=r.data,(null==(l=e.activeNodes)?void 0:l.includes(t))||w(r.data))}],onClick:()=>a("nodeClick",{type:"search",node:r.data}),title:r.data[e.labelKey]},[o("div",{class:"search-cascader__optionText"},[S.value?o(m,{style:{marginRight:"8px"},checked:I(r.data),onClick:n(i,["stop"]),onUpdateChecked:e=>e&&function(e){a("nodeClick",{type:"update",node:e})}(r.data)},null):null,r.data[e.labelKey]]),K.value===r.data?o(s,{class:"rotate"},null):r.data.isLeaf?null:o(u,null,null)]);var t,l}))])])}}),K=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object},cursorNode:{type:Object}},emits:["nodeClick","changeCursor"],setup(e,{slots:r,emit:t}){const n=a([]);function s(r,a){return o(k,{level:a+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:n.value,onNodeClick:e=>t("nodeClick",e),onChangeCursor:e=>t("changeCursor",e),options:r,cursorNode:e.cursorNode},null)}function u(r){let t=!1;return c(r,((r,o)=>{r===e.currentNode&&(t=!0,o())}),["children"]),t}function i(){if(!f(e.options)||!e.currentNode)return[];const r=[e.options];let t=e.options;for(n.value.length=0;f(t);){const o=t.find(u);if(!o)break;n.value.push(o),t=o[e.childKey],r.push(t)}if(e.cursorNode){const t=r.findIndex((r=>(r&&r.findIndex((r=>r===e.cursorNode)))>=0));if(t>=0){const e=r.slice(0,t+1);return n.value.splice(t,r.length),e}}return r}return()=>o("section",{class:"search-cascader__menuWrapper"},[f(e.options)&&e.options.length?e.currentNode?i().map(s):s(e.options,0):o("section",{class:"search-cascader__emptyWrapper"},[h(r.empty)?r.empty():o("section",null,[l("empty")])])])}});export{K as SearchMenu};
@@ -1 +1 @@
1
- .search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__input input{cursor:pointer!important}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;padding:0 8px 0 16px;width:100%}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:calc(100% - 20px)}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:300px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
1
+ .search-cascader__menuWrapper{display:flex;flex-wrap:nowrap;margin:-8px -14px}.search-cascader__input input{cursor:pointer!important}.search-cascader__option{align-items:center;border-radius:4px;box-sizing:border-box;display:flex;height:32px;justify-content:space-between;min-width:100%;padding:0 8px 0 16px;width:fit-content}.search-cascader__option--active{background:#f8f8f8}.search-cascader__option:hover{background:#f5f5f5;cursor:pointer}.search-cascader__optionWrapper{background:#fff;height:256px;overflow-x:auto;width:calc(var(--menu-width)*1px)}.search-cascader__optionWrapper:not(:last-of-type){border:solid #e5e5e5;border-width:0 1px 0 0}.search-cascader__optionText{white-space:nowrap}.search-cascader__option svg{color:#bfbfbf;flex-shrink:0;font-size:12px;width:20px}.search-cascader__option svg.rotate{animation:rotate 1s linear infinite}.search-cascader__emptyWrapper{align-items:center;background:#fff;box-sizing:border-box;display:flex;height:300px;justify-content:center;padding:16px;width:100%}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}
@@ -51,8 +51,12 @@ declare const _default: import("vue").DefineComponent<{
51
51
  DATE_TIME: string;
52
52
  CHECKBOX_GROUP: string;
53
53
  INPUTNUMBER_RANGE: string;
54
- DATE_RANGE: string;
55
- DATETIME_RANGE: string;
54
+ DATE_RANGE_OUT: string;
55
+ DATE_RANGE_INNER: string;
56
+ DATETIME_RANGE_OUT: string;
57
+ DATETIME_RANGE_INNER: string;
58
+ LABEL: string;
59
+ SELECTLABEL: string;
56
60
  };
57
61
  WidgetValEnums: {
58
62
  CUSTOM: string;
@@ -171,8 +171,12 @@ declare const _default: import("vue").DefineComponent<{
171
171
  DATE_TIME: string;
172
172
  CHECKBOX_GROUP: string;
173
173
  INPUTNUMBER_RANGE: string;
174
- DATE_RANGE: string;
175
- DATETIME_RANGE: string;
174
+ DATE_RANGE_OUT: string;
175
+ DATE_RANGE_INNER: string;
176
+ DATETIME_RANGE_OUT: string;
177
+ DATETIME_RANGE_INNER: string;
178
+ LABEL: string;
179
+ SELECTLABEL: string;
176
180
  };
177
181
  WidgetValEnums: {
178
182
  CUSTOM: string;
@@ -1 +1 @@
1
- const l=[{value:"TODAY",label:"今天"},{value:"TOMORROW",label:"明天"},{value:"YESTERDAY",label:"昨天"},{value:"THIS_WEEK",label:"本周"},{value:"NEXT_WEEK",label:"下周"},{value:"PREV_WEEK",label:"上周"},{value:"THIS_MONTH",label:"本月"},{value:"NEXT_MONTH",label:"下月"},{value:"PREV_MONTH",label:"上月"},{value:"THIS_QUATER",label:"本季度"},{value:"NEXT_QUATER",label:"下季度"},{value:"PREV_QUATER",label:"上季度"},{value:"THIS_YEAR",label:"本年"},{value:"NEXT_YEAR",label:"下年"},{value:"PREV_YEAR",label:"上年"}];export{l as DateRangeOptions};
1
+ const l=[{value:"TODAY",label:"今天"},{value:"TOMORROW",label:"明天"},{value:"YESTERDAY",label:"昨天"},{value:"THIS_WEEK",label:"本周"},{value:"NEXT_WEEK",label:"下周"},{value:"LAST_WEEK",label:"上周"},{value:"THIS_MONTH",label:"本月"},{value:"NEXT_MONTH",label:"下月"},{value:"LAST_MONTH",label:"上月"},{value:"THIS_QUARTER",label:"本季度"},{value:"NEXT_QUARTER",label:"下季度"},{value:"LAST_QUARTER",label:"上季度"},{value:"THIS_YEAR",label:"本年"},{value:"NEXT_YEAR",label:"下年"},{value:"LAST_YEAR",label:"上年"}];export{l as DateRangeOptions};
@@ -5,10 +5,6 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: PropType<ITypeDate>;
6
6
  default: string;
7
7
  };
8
- filterExplicit: {
9
- type: NumberConstructor;
10
- default: number;
11
- };
12
8
  clearable: {
13
9
  type: BooleanConstructor;
14
10
  default: boolean;
@@ -35,10 +31,6 @@ declare const _default: import("vue").DefineComponent<{
35
31
  type: PropType<ITypeDate>;
36
32
  default: string;
37
33
  };
38
- filterExplicit: {
39
- type: NumberConstructor;
40
- default: number;
41
- };
42
34
  clearable: {
43
35
  type: BooleanConstructor;
44
36
  default: boolean;
@@ -64,7 +56,7 @@ declare const _default: import("vue").DefineComponent<{
64
56
  }>>;
65
57
  emit: (event: "update:value", ...args: any[]) => void;
66
58
  dateList: import("vue").Ref<any[]>;
67
- isShow: import("vue").Ref<boolean>;
59
+ isShowDateRange: import("vue").Ref<boolean>;
68
60
  radioValue: import("vue").Ref<string>;
69
61
  startDate: import("vue").Ref<any>;
70
62
  endDate: import("vue").Ref<any>;
@@ -120,10 +112,6 @@ declare const _default: import("vue").DefineComponent<{
120
112
  type: PropType<ITypeDate>;
121
113
  default: string;
122
114
  };
123
- filterExplicit: {
124
- type: NumberConstructor;
125
- default: number;
126
- };
127
115
  clearable: {
128
116
  type: BooleanConstructor;
129
117
  default: boolean;
@@ -149,7 +137,6 @@ declare const _default: import("vue").DefineComponent<{
149
137
  }, {
150
138
  type: ITypeDate;
151
139
  value: string;
152
- filterExplicit: number;
153
140
  clearable: boolean;
154
141
  startPlaceholder: string;
155
142
  endPlaceholder: string;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as u,createElementBlock as r,Fragment as v,renderList as i,normalizeClass as d,toDisplayString as n,createCommentVNode as o,createVNode as s,unref as c,withCtx as p,createTextVNode as m,createElementVNode as f}from"vue";import{NButton as y}from"naive-ui";import h from"../../../../../date-picker/index.js";import b from"moment";import{isString as g}from"lodash-es";import{getAllDateRangeInfo as k}from"../helpers/presetValToTimestamp.js";import Y from"../../../../../../_virtual/plugin-vue_export-helper.js";const F={class:"render-widget-date-range"},_={key:0,class:"radio-date-group"},D=["onClick"],M={key:1,class:"date-detail-range"},S=f("span",{class:"divider"},null,-1);var w=Y(e({__name:"DateRangeInner",props:{type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:f}){const Y=e,w=a([]),P=a(!1),j=a(""),x=a(),C=a(),H=l((()=>{let e="";switch(Y.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),I=l((()=>{let e="";switch(Y.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e}));function O(e,a){switch(a){case"start":x.value=e;break;case"end":C.value=e}const l=x.value?b(x.value).format(H.value):null,t=C.value?b(C.value).format(H.value):null;f("update:value",l||t?`${null!=l?l:""} ~ ${null!=t?t:""}`:"")}function R(e){return!!C.value&&e>C.value}function T(e){return!!x.value&&e<x.value}return t((()=>Y.value),(e=>{if(e&&g(e)&&e.includes("~")){const[a,l]=e.split("~");return a.trim()&&(x.value=b(a.trim()).valueOf()),void(l.trim()&&(C.value=b(l.trim()).valueOf()))}x.value=C.value=null,j.value=""}),{immediate:!0}),function(){const e=k(H.value);w.value=e}(),(a,l)=>(u(),r("div",F,[P.value?o("v-if",!0):(u(),r("div",_,[(u(!0),r(v,null,i(w.value,(e=>(u(),r("span",{key:e.value,class:d(["radio-date-item",j.value===e.value?"radio-date-item-active":""]),onClick:a=>{return l=e.value,j.value===l?j.value="":j.value=l,void(j.value&&f("update:value",j.value));var l}},n(e.label),11,D)))),128))])),s(c(y),{secondary:"",class:d(P.value?"select-date-right":"select-date-left"),onClick:l[0]||(l[0]=e=>P.value=!P.value)},{default:p((()=>[m(n(c(I)),1)])),_:1},8,["class"]),P.value?(u(),r("div",M,[s(c(h),{type:e.type,"default-time":"00:00:00",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:x.value,"is-date-disabled":R,"onUpdate:value":l[1]||(l[1]=e=>O(e,"start"))},null,8,["type","clearable","valueFormat","placeholder","value"]),S,s(c(h),{type:e.type,"default-time":"23:59:59",clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:C.value,"is-date-disabled":T,"onUpdate:value":l[2]||(l[2]=e=>O(e,"end"))},null,8,["type","clearable","valueFormat","placeholder","value"])])):o("v-if",!0)]))}}),[["__file","DateRangeInner.vue"]]);export{w as default};
@@ -0,0 +1,141 @@
1
+ import { PropType } from 'vue';
2
+ declare type ITypeDate = 'daterange' | 'datetimerange';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ type: {
5
+ type: PropType<ITypeDate>;
6
+ default: string;
7
+ };
8
+ clearable: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
12
+ startPlaceholder: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ endPlaceholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ componentCfg: {
21
+ type: ObjectConstructor;
22
+ default: () => {};
23
+ };
24
+ value: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ }, {
29
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
30
+ type: {
31
+ type: PropType<ITypeDate>;
32
+ default: string;
33
+ };
34
+ clearable: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ startPlaceholder: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ endPlaceholder: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ componentCfg: {
47
+ type: ObjectConstructor;
48
+ default: () => {};
49
+ };
50
+ value: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
54
+ }>> & {
55
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
56
+ }>>;
57
+ emit: (event: "update:value", ...args: any[]) => void;
58
+ valueCp: import("vue").Ref<any>;
59
+ dateFormat: import("vue").ComputedRef<string>;
60
+ rangeShortcuts: {
61
+ 今天: number[];
62
+ 昨天: number[];
63
+ 近一周: number[];
64
+ 近一月: number[];
65
+ };
66
+ handleChange: (val: any) => void;
67
+ CDatePicker: import("../../../../..").SFCWithInstall<import("vue").DefineComponent<{
68
+ updateUnchangedValue: {
69
+ type: BooleanConstructor;
70
+ };
71
+ onConfirm: {
72
+ type: FunctionConstructor;
73
+ };
74
+ }, {
75
+ attrs: {
76
+ [x: string]: unknown;
77
+ };
78
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
79
+ updateUnchangedValue: {
80
+ type: BooleanConstructor;
81
+ };
82
+ onConfirm: {
83
+ type: FunctionConstructor;
84
+ };
85
+ }>> & {}>>;
86
+ datePickerRef: import("vue").Ref<import("../../../../..").AnyObject | null>;
87
+ panelInstRef: import("vue").Ref<null>;
88
+ isDateTime: import("vue").ComputedRef<boolean>;
89
+ formatRef: import("vue").ComputedRef<string>;
90
+ panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
91
+ focus: () => any;
92
+ blur: () => any;
93
+ onUpdateShow: (show: boolean) => void;
94
+ onConfirm: (...args: any[]) => void;
95
+ NDatePicker: any;
96
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
97
+ updateUnchangedValue: {
98
+ type: BooleanConstructor;
99
+ };
100
+ onConfirm: {
101
+ type: FunctionConstructor;
102
+ };
103
+ }>>, {
104
+ updateUnchangedValue: boolean;
105
+ }>>;
106
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
107
+ type: {
108
+ type: PropType<ITypeDate>;
109
+ default: string;
110
+ };
111
+ clearable: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ startPlaceholder: {
116
+ type: StringConstructor;
117
+ default: string;
118
+ };
119
+ endPlaceholder: {
120
+ type: StringConstructor;
121
+ default: string;
122
+ };
123
+ componentCfg: {
124
+ type: ObjectConstructor;
125
+ default: () => {};
126
+ };
127
+ value: {
128
+ type: StringConstructor;
129
+ default: string;
130
+ };
131
+ }>> & {
132
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
133
+ }, {
134
+ type: ITypeDate;
135
+ value: string;
136
+ clearable: boolean;
137
+ startPlaceholder: string;
138
+ endPlaceholder: string;
139
+ componentCfg: Record<string, any>;
140
+ }>;
141
+ export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as r,createBlock as u,unref as d}from"vue";import f from"../../../../../date-picker/index.js";import s from"moment";import{isString as n}from"lodash-es";import o from"../../../../../../_virtual/plugin-vue_export-helper.js";var p=o(e({__name:"DateRangeOut",props:{type:{type:String,default:"daterange"},clearable:{type:Boolean,default:!1},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},componentCfg:{type:Object,default:()=>({})},value:{type:String,default:""}},emits:["update:value"],setup(e,{emit:o}){const p=e,c=a(),v=t((()=>{let e="";switch(p.type){case"daterange":e="YYYY-MM-DD";break;case"datetimerange":e="YYYY-MM-DD HH:mm:ss"}return e})),i={"今天":[s().startOf("day").valueOf(),s().endOf("day").valueOf()],"昨天":[s().subtract(1,"days").startOf("day").valueOf(),s().subtract(1,"days").endOf("day").valueOf()],"近一周":[s().subtract(1,"w").startOf("day").valueOf(),s().endOf("day").valueOf()],"近一月":[s().subtract(1,"months").startOf("day").valueOf(),s().endOf("day").valueOf()]};function m(e){if(e){const[a,t]=e,l=`${s(a).format(v.value)} ~ ${s(t).format(v.value)}`;o("update:value",l)}else o("update:value",e)}return l((()=>p.value),(e=>{if(e&&n(e)&&e.includes("~")){const[a,t]=e.split("~");c.value=[s(a.trim()).valueOf(),s(t.trim()).valueOf()]}else c.value=null}),{immediate:!0}),(a,t)=>(r(),u(d(f),{type:e.type,clearable:e.clearable,startPlaceholder:e.startPlaceholder,endPlaceholder:e.endPlaceholder,value:c.value,shortcuts:i,"onUpdate:value":m},null,8,["type","clearable","startPlaceholder","endPlaceholder","value"]))}}),[["__file","DateRangeOut.vue"]]);export{p as default};
@@ -0,0 +1,70 @@
1
+ import { PropType } from 'vue';
2
+ import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType, ISearchType } from '../../../../../../../es/components/table-filter/src/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ componentCfg: {
5
+ type: PropType<ISearchType>;
6
+ };
7
+ value: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ filterApiConfig: {
12
+ type: ObjectConstructor;
13
+ };
14
+ }, {
15
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
16
+ baseActiveColor: string;
17
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
18
+ componentCfg: {
19
+ type: PropType<ISearchType>;
20
+ };
21
+ value: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ filterApiConfig: {
26
+ type: ObjectConstructor;
27
+ };
28
+ }>> & {
29
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
30
+ }>>;
31
+ emit: (event: "update:value", ...args: any[]) => void;
32
+ selectedList: import("vue").Ref<string[]>;
33
+ tagList: import("vue").Ref<never[]>;
34
+ categoryList: import("vue").ComputedRef<IFilterCategoryLabelItemType[]>;
35
+ onResize: (el: HTMLElement, categoryItem: IFilterCategoryLabelItemType) => void;
36
+ handleLabelUpfold: (categoryItem: IFilterCategoryLabelItemType) => void;
37
+ formatStyle: (item: IhoFilterTabLabelItemType) => {
38
+ background: string;
39
+ borderColor: string;
40
+ } | {
41
+ background?: undefined;
42
+ borderColor?: undefined;
43
+ };
44
+ handleLabelChange: (isSelect: boolean, item: IhoFilterTabLabelItemType) => void;
45
+ initTagList: () => Promise<void>;
46
+ NTag: any;
47
+ NTooltip: any;
48
+ NIcon: any;
49
+ ChevronUpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
50
+ ChevronDownCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
51
+ vResize: {
52
+ mounted(el: any, binding: any): void;
53
+ };
54
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
55
+ componentCfg: {
56
+ type: PropType<ISearchType>;
57
+ };
58
+ value: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ filterApiConfig: {
63
+ type: ObjectConstructor;
64
+ };
65
+ }>> & {
66
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
67
+ }, {
68
+ value: string;
69
+ }>;
70
+ export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,watch as t,computed as o,openBlock as s,createElementBlock as a,Fragment as i,renderList as n,unref as c,createElementVNode as r,toDisplayString as p,normalizeClass as u,withDirectives as d,createBlock as f,normalizeStyle as m,withCtx as b,createVNode as v,withModifiers as h,createCommentVNode as g}from"vue";import{NTag as y,NTooltip as k,NIcon as S}from"naive-ui";import{ChevronUpCircleOutline as C,ChevronDownCircleOutline as w}from"@vicons/ionicons5";import x from"../../../directive/resize.js";import _ from"../../../hooks/useMixins.js";import{isString as L}from"lodash-es";import U from"../../../../../../_virtual/plugin-vue_export-helper.js";const j={class:"label-attr-filter-container"},B={class:"edit-f-label"},T={class:"label-f-content"},z={key:0,class:"label-f-unfold-btn"},A=["onClick"],I=r("span",null,"收起",-1),O=r("span",null,"展开",-1);var q=U(e({__name:"Label",props:{componentCfg:{type:Object},value:{type:String,default:""},filterApiConfig:{type:Object}},emits:["update:value"],setup(e,{emit:U}){const q=e,{handleGetConfigApi:G}=_(),H="rgb(85, 133, 245)",M=l([]),N=l([]);t((()=>q.value),(e=>{const l=e&&L(e)?e.split("|#|"):[];M.value=l}),{immediate:!0});const D=o((()=>N.value&&N.value.length>0?N.value.map((e=>(e.labelList.map((e=>{e.isSelect=M.value.includes(e.labelShowText)})),e))):[])),E=e=>e.isSelect?{background:e.backgroundColor||H,borderColor:e.backgroundColor||H}:{};return(async()=>{try{const{widgetCfg:e={}}=q.componentCfg,{classifyStr:l=""}=e;let t=await G({classifyStr:l},"requestListByClassify",{},q.filterApiConfig);if(t){const{data:e}=t,{list:l=[]}=e;N.value=l}}catch(e){console.log(e)}})(),(e,l)=>(s(),a("div",j,[(s(!0),a(i,null,n(c(D),(e=>(s(),a("div",{class:"edit-labels-content",key:e.classifyId},[r("span",B,p(e.classifyName)+":",1),r("div",{class:u(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[d((s(),a("div",T,[(s(!0),a(i,null,n(e.labelList,(e=>(s(),f(c(y),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)M.value.push(l.labelShowText);else{const e=M.value.findIndex((e=>e===l.labelShowText));e>-1&&M.value.splice(e,1)}U("update:value",M.value.join("|#|"))})(l,e),style:m(E(e))},{default:b((()=>[v(c(k),{placement:"top-start",duration:0},{trigger:b((()=>[r("span",null,p(e.labelShowText),1)])),default:b((()=>[r("span",null,p(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[c(x),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(s(),a("div",z,[r("span",{class:"operate-btn",onClick:h((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(s(),a(i,{key:0},[I,v(c(S),{component:c(C),size:"16"},null,8,["component"])],64)):(s(),a(i,{key:1},[O,v(c(S),{component:c(w),size:"16"},null,8,["component"])],64))],8,A)])):g("v-if",!0)])))),128))]))}}),[["__file","Label.vue"]]);export{q as default};
@@ -0,0 +1,56 @@
1
+ import { PropType } from 'vue';
2
+ import { SelectOption } from 'naive-ui';
3
+ import { ISearchType } from '../../../../../../../es/components/table-filter/src/types';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ componentCfg: {
6
+ type: PropType<ISearchType>;
7
+ };
8
+ value: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ filterApiConfig: {
13
+ type: ObjectConstructor;
14
+ };
15
+ }, {
16
+ handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
17
+ $attrs: {
18
+ [x: string]: unknown;
19
+ };
20
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
21
+ componentCfg: {
22
+ type: PropType<ISearchType>;
23
+ };
24
+ value: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ filterApiConfig: {
29
+ type: ObjectConstructor;
30
+ };
31
+ }>> & {
32
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
33
+ }>>;
34
+ emit: (event: "update:value", ...args: any[]) => void;
35
+ tagList: import("vue").Ref<never[]>;
36
+ valueCp: import("vue").WritableComputedRef<string[]>;
37
+ optionList: import("vue").ComputedRef<SelectOption[]>;
38
+ initTagList: () => Promise<void>;
39
+ NSelect: any;
40
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
+ componentCfg: {
42
+ type: PropType<ISearchType>;
43
+ };
44
+ value: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ filterApiConfig: {
49
+ type: ObjectConstructor;
50
+ };
51
+ }>> & {
52
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
53
+ }, {
54
+ value: string;
55
+ }>;
56
+ export default _default;
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,ref as l,computed as a,openBlock as o,createBlock as i,unref as u,mergeProps as s,isRef as n}from"vue";import{NSelect as r}from"naive-ui";import p from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var v=f(e({__name:"SelectLabel",props:{componentCfg:{type:Object},value:{type:String,default:""},filterApiConfig:{type:Object}},emits:["update:value"],setup(e,{emit:f}){const v=e,{handleGetConfigApi:c}=p(),h=t(),m=l([]),g=a({set(e){const t=e?e.join("|#|"):e;f("update:value",t)},get:()=>v.value?v.value.split("|#|"):[]}),b=a((()=>{if(m.value&&m.value.length>0){let e=[],t=[];return m.value.forEach((l=>{l.labelList.forEach((l=>{e.includes(l.labelShowText)||(e.push(l.labelShowText),t.push({label:l.labelShowText,value:l.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=v.componentCfg,{classifyStr:t=""}=e;let l=await c({classifyStr:t},"requestListByClassify",{},v.filterApiConfig);if(l){const{data:e}=l,{list:t=[]}=e;m.value=t}}catch(e){console.log(e)}})(),(e,t)=>(o(),i(u(r),s(u(h),{value:u(g),"onUpdate:value":t[0]||(t[0]=e=>n(g)?g.value=e:null),options:u(b)}),null,16,["value","options"]))}}),[["__file","SelectLabel.vue"]]);export{v as default};
@@ -1,5 +1,8 @@
1
1
  import CheckboxGroup from './CheckboxGroup.vue';
2
2
  import InputNumberGroup from './InputNumberGroup.vue';
3
3
  import Date from './Date.vue';
4
- import DateRange from './DateRange.vue';
5
- export { CheckboxGroup, InputNumberGroup, Date, DateRange };
4
+ import DateRangeInner from './DateRangeInner.vue';
5
+ import DateRangeOut from './DateRangeOut.vue';
6
+ import Label from './Label.vue';
7
+ import SelectLabel from './SelectLabel.vue';
8
+ export { CheckboxGroup, InputNumberGroup, Date, DateRangeInner, DateRangeOut, Label, SelectLabel };
@@ -1 +1 @@
1
- export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRange}from"./DateRange.vue.js";
1
+ export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRangeInner}from"./DateRangeInner.vue.js";export{default as DateRangeOut}from"./DateRangeOut.vue.js";export{default as Label}from"./Label.vue.js";export{default as SelectLabel}from"./SelectLabel.vue.js";
@@ -15,20 +15,41 @@ export declare const DatePresetValEnums: {
15
15
  MONTH_START: string;
16
16
  MONTH_END: string;
17
17
  };
18
- export declare const DateRangeValEnums: {
18
+ export declare const DateRangeInnerValEnums: {
19
19
  TODAY: string;
20
20
  TOMORROW: string;
21
21
  YESTERDAY: string;
22
22
  THIS_WEEK: string;
23
23
  NEXT_WEEK: string;
24
- PREV_WEEK: string;
24
+ LAST_WEEK: string;
25
25
  THIS_MONTH: string;
26
+ LAST_MONTH: string;
26
27
  NEXT_MONTH: string;
27
- PREV_MONTH: string;
28
- THIS_QUATER: string;
29
- NEXT_QUATER: string;
30
- PREV_QUATER: string;
28
+ THIS_QUARTER: string;
29
+ LAST_QUARTER: string;
30
+ NEXT_QUARTER: string;
31
31
  THIS_YEAR: string;
32
+ LAST_YEAR: string;
32
33
  NEXT_YEAR: string;
33
- PREV_YEAR: string;
34
+ };
35
+ export declare const DateRangeOutDefEnums: {
36
+ PAST_WEEK: string;
37
+ PAST_MONTH: string;
38
+ PAST_HALF_YEAR: string;
39
+ TODAY: string;
40
+ TOMORROW: string;
41
+ YESTERDAY: string;
42
+ THIS_WEEK: string;
43
+ NEXT_WEEK: string;
44
+ LAST_WEEK: string;
45
+ THIS_MONTH: string;
46
+ LAST_MONTH: string;
47
+ NEXT_MONTH: string;
48
+ THIS_QUARTER: string;
49
+ LAST_QUARTER: string;
50
+ NEXT_QUARTER: string;
51
+ THIS_YEAR: string;
52
+ LAST_YEAR: string;
53
+ NEXT_YEAR: string;
54
+ CUSTOM: string;
34
55
  };
@@ -1 +1 @@
1
- const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"},E={TODAY:"TODAY",TOMORROW:"TOMORROW",YESTERDAY:"YESTERDAY",THIS_WEEK:"THIS_WEEK",NEXT_WEEK:"NEXT_WEEK",PREV_WEEK:"PREV_WEEK",THIS_MONTH:"THIS_MONTH",NEXT_MONTH:"NEXT_MONTH",PREV_MONTH:"PREV_MONTH",THIS_QUATER:"THIS_QUATER",NEXT_QUATER:"NEXT_QUATER",PREV_QUATER:"PREV_QUATER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",PREV_YEAR:"PREV_YEAR"};export{T as DatePresetValEnums,E as DateRangeValEnums};
1
+ const T={CUSTOM:"CUSTOM",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END"},E={TODAY:"TODAY",TOMORROW:"TOMORROW",YESTERDAY:"YESTERDAY",THIS_WEEK:"THIS_WEEK",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",LAST_MONTH:"LAST_MONTH",NEXT_MONTH:"NEXT_MONTH",THIS_QUARTER:"THIS_QUARTER",LAST_QUARTER:"LAST_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",THIS_YEAR:"THIS_YEAR",LAST_YEAR:"LAST_YEAR",NEXT_YEAR:"NEXT_YEAR"},A={CUSTOM:"CUSTOM",...E,PAST_WEEK:"PAST_WEEK",PAST_MONTH:"PAST_MONTH",PAST_HALF_YEAR:"PAST_HALF_YEAR"};export{T as DatePresetValEnums,E as DateRangeInnerValEnums,A as DateRangeOutDefEnums};
@@ -4,3 +4,4 @@ export declare const getAllDateRangeInfo: (format?: string) => {
4
4
  value: string | number | never[];
5
5
  }[];
6
6
  export declare const formatDateRangeInfo: (key: string, format?: string) => string | number | never[];
7
+ export declare const presetValToDateRangestr: (presetVal: string, format?: string) => string | null;
@@ -1 +1 @@
1
- import{DatePresetValEnums as t,DateRangeValEnums as a}from"../enums.js";import{DateRangeOptions as r}from"../basicData.js";import d from"moment";const e=new Map([[t.NOW,()=>d()],[t.TODAY,()=>d().startOf("day")],[t.TODAY_START,()=>d().startOf("day")],[t.TODAY_END,()=>d().endOf("day")],[t.TOMORROW,()=>d().add(1,"days").startOf("day")],[t.TOMORROW_START,()=>d().add(1,"days").startOf("day")],[t.TOMORROW_END,()=>d().add(1,"days").endOf("day")],[t.YESTERDAY,()=>d().subtract(1,"days").startOf("day")],[t.YESTERDAY_START,()=>d().subtract(1,"days").startOf("day")],[t.YESTERDAY_END,()=>d().subtract(1,"days").endOf("day")],[t.WEEK_START,()=>d().startOf("week")],[t.WEEK_END,()=>d().endOf("week")],[t.MONTH_START,()=>d().startOf("month")],[t.MONTH_END,()=>d().endOf("month")]]),O=(t,a="x")=>{if(!e.has(t))return;const r=e.get(t)().format(a);return"x"===a||"X"===a?Number(r):r},s=new Map([[a.TODAY,()=>[d().startOf("day"),d().endOf("day")]],[a.TOMORROW,()=>[d().add(1,"days").startOf("day"),d().add(1,"days").endOf("day")]],[a.YESTERDAY,()=>[d().subtract(1,"days").startOf("day"),d().subtract(1,"days").endOf("day")]],[a.THIS_WEEK,()=>[d().startOf("week"),d().endOf("week")]],[a.NEXT_WEEK,()=>[d().add(1,"w").startOf("week"),d().add(1,"w").endOf("week")]],[a.PREV_WEEK,()=>[d().subtract(1,"w").startOf("week"),d().subtract(1,"w").endOf("week")]],[a.THIS_MONTH,()=>[d().startOf("month"),d().endOf("month")]],[a.NEXT_MONTH,()=>[d().add(1,"months").startOf("month"),d().add(1,"months").endOf("month")]],[a.PREV_MONTH,()=>[d().subtract(1,"months").startOf("month"),d().subtract(1,"months").endOf("month")]],[a.THIS_QUATER,()=>[d().startOf("quarter"),d().endOf("quarter")]],[a.NEXT_QUATER,()=>[d().add(1,"Q").startOf("quarter"),d().add(1,"Q").endOf("quarter")]],[a.PREV_QUATER,()=>[d().subtract(1,"Q").startOf("quarter"),d().subtract(1,"Q").endOf("quarter")]],[a.THIS_YEAR,()=>[d().startOf("year"),d().endOf("year")]],[a.NEXT_YEAR,()=>[d().add(1,"y").startOf("year"),d().add(1,"y").endOf("year")]],[a.PREV_YEAR,()=>[d().subtract(1,"y").startOf("year"),d().subtract(1,"y").endOf("year")]]]),f=(t="x")=>r.map((a=>{const r=n(a.value,t);return{label:a.label,value:r}})),n=(t,a="x")=>{const r=s.get(t);if(r){const[t,d]=r(),e=`${t.format(a)} ~ ${d.format(a)}`;return"x"===a||"X"===a?Number(e):e}return[]};export{n as formatDateRangeInfo,f as getAllDateRangeInfo,O as presetValToTimestamp};
1
+ import{DateRangeOutDefEnums as t,DatePresetValEnums as a,DateRangeInnerValEnums as r}from"../enums.js";import{DateRangeOptions as d}from"../basicData.js";import e from"moment";const O=new Map([[a.NOW,()=>e()],[a.TODAY,()=>e().startOf("day")],[a.TODAY_START,()=>e().startOf("day")],[a.TODAY_END,()=>e().endOf("day")],[a.TOMORROW,()=>e().add(1,"days").startOf("day")],[a.TOMORROW_START,()=>e().add(1,"days").startOf("day")],[a.TOMORROW_END,()=>e().add(1,"days").endOf("day")],[a.YESTERDAY,()=>e().subtract(1,"days").startOf("day")],[a.YESTERDAY_START,()=>e().subtract(1,"days").startOf("day")],[a.YESTERDAY_END,()=>e().subtract(1,"days").endOf("day")],[a.WEEK_START,()=>e().startOf("week")],[a.WEEK_END,()=>e().endOf("week")],[a.MONTH_START,()=>e().startOf("month")],[a.MONTH_END,()=>e().endOf("month")]]),s=(t,a="x")=>{if(!O.has(t))return;const r=O.get(t)().format(a);return"x"===a||"X"===a?Number(r):r},f=new Map([[r.TODAY,()=>[e().startOf("day"),e().endOf("day")]],[r.TOMORROW,()=>[e().add(1,"days").startOf("day"),e().add(1,"days").endOf("day")]],[r.YESTERDAY,()=>[e().subtract(1,"days").startOf("day"),e().subtract(1,"days").endOf("day")]],[r.THIS_WEEK,()=>[e().startOf("week"),e().endOf("week")]],[r.NEXT_WEEK,()=>[e().add(1,"w").startOf("week"),e().add(1,"w").endOf("week")]],[r.LAST_WEEK,()=>[e().subtract(1,"w").startOf("week"),e().subtract(1,"w").endOf("week")]],[r.THIS_MONTH,()=>[e().startOf("month"),e().endOf("month")]],[r.NEXT_MONTH,()=>[e().add(1,"months").startOf("month"),e().add(1,"months").endOf("month")]],[r.LAST_MONTH,()=>[e().subtract(1,"months").startOf("month"),e().subtract(1,"months").endOf("month")]],[r.THIS_QUARTER,()=>[e().startOf("quarter"),e().endOf("quarter")]],[r.NEXT_QUARTER,()=>[e().add(1,"Q").startOf("quarter"),e().add(1,"Q").endOf("quarter")]],[r.LAST_QUARTER,()=>[e().subtract(1,"Q").startOf("quarter"),e().subtract(1,"Q").endOf("quarter")]],[r.THIS_YEAR,()=>[e().startOf("year"),e().endOf("year")]],[r.NEXT_YEAR,()=>[e().add(1,"y").startOf("year"),e().add(1,"y").endOf("year")]],[r.LAST_YEAR,()=>[e().subtract(1,"y").startOf("year"),e().subtract(1,"y").endOf("year")]]]),n=(t="x")=>d.map((a=>{const r=T(a.value,t);return{label:a.label,value:r}})),T=(t,a="x")=>{const r=f.get(t);if(r){const[t,d]=r(),e=`${t.format(a)} ~ ${d.format(a)}`;return"x"===a||"X"===a?Number(e):e}return[]},y=new Map([...f,[t.PAST_WEEK,()=>[e().subtract(1,"w").startOf("day"),e().endOf("day")]],[t.PAST_MONTH,()=>[e().subtract(1,"months").startOf("day"),e().endOf("day")]],[t.PAST_HALF_YEAR,()=>[e().subtract(6,"months").startOf("day"),e().endOf("day")]]]),u=(t,a="x")=>{if(!y.has(t))return null;const r=y.get(t);if(r){const[t,d]=r();return`${t.format(a)} ~ ${d.format(a)}`}return null};export{T as formatDateRangeInfo,n as getAllDateRangeInfo,u as presetValToDateRangestr,s as presetValToTimestamp};
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as r}from"./widgetCfgMaps.js";import n from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=n(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:r,filterExplicit:n}=e;if(a.includes(t))return;const l=i.SELECT===t&&r.multiple?"200px":"100%";return{width:0===n?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:n,title:a,placeholder:l,widgetCfg:s,rangeFilter:o,filterExplicit:p}=e,{props:h,handlerProps:d}=r.get(i);let u={...h};d&&(u=d(u,{...s,title:n||a,rangeFilter:o,_frontId:t,filterExplicit:p})),!o&&l&&(u.placeholder=l),this.initialProps=u,u.value&&(this.valueCp=u.value)},generateWidget(e){const{widgetType:i}=e;if(!r.has(i))return null;const{value:n}=e,{component:a,style:l,eventsBySearch:s=[]}=r.get(i),o={...this.initialProps,value:n,filterApiConfig:this.filterApiConfig},p=s.reduce(((e,t)=>{const{name:i,handler:r}=t;let n=this.search;return r&&(n=e=>{r(e,this.search,o)}),{...e,[`on${i}`]:n}}),{});return t(a,{...l,...o,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:r}=e;if(a.includes(t))return;const l=i.SELECT!==t&&i.SELECTLABEL!==t||!n.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:r,title:a,placeholder:l,widgetCfg:o,filterExplicit:s}=e,{props:p,handlerProps:h}=n.get(i);let d={...p};h&&(d=h(d,{...o,title:r||a,_frontId:t,filterExplicit:s})),l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:r}=e,{component:a,style:l,eventsBySearch:o=[]}=n.get(i),s={...this.initialProps,value:r,componentCfg:e,filterApiConfig:this.filterApiConfig},p=o.reduce(((e,t)=>{const{name:i,handler:n}=t;let r=this.search;return n&&(r=e=>{n(e,this.search,s)}),{...e,[`on${i}`]:r}}),{});return t(a,{...l,...s,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};