@ailaw/venus 0.4.2 → 0.4.6

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/dist/en3.js CHANGED
@@ -869,6 +869,8 @@ var lang3 = {
869
869
  lastUpdatedTime: "Last Updated Time",
870
870
  lastUpdatedBy: "Last Updated By",
871
871
  searchTaskPlaceholder: "Search Task name/Tag",
872
- taskManagement: "Task Management"
872
+ taskManagement: "Task Management",
873
+ addFromList: "Add from list",
874
+ createANewTask: "Create a new task"
873
875
  };
874
876
  export { lang3 as default };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- /*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.container[data-v-678cdf3c]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.taskTemplateInline[data-v-c3a26010]{float:right}a.taskTemplateInline[data-v-c3a26010]{margin-left:10px}div.taskTemplateInline[data-v-c3a26010]{margin-top:5px!important}
1
+ /*! tailwindcss v2.2.17 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}button{background-color:transparent;background-image:none}fieldset{margin:0;padding:0}ol,ul{list-style:none;margin:0;padding:0}html{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{font-family:inherit;line-height:inherit}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#a1a1aa}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#a1a1aa}input::placeholder,textarea::placeholder{opacity:1;color:#a1a1aa}button,[role=button]{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}pre,code,kbd,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{border-color:currentColor}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.relative{position:relative}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mr-2{margin-right:.5rem}.mb-5{margin-bottom:1.25rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.h-6{height:1.5rem}.h-screen{height:100vh}.w-6{width:1.5rem}.w-60{width:15rem}.w-72{width:18rem}.flex-1{flex:1 1 0%}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.items-center{align-items:center}.justify-end{justify-content:flex-end}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.border{border-width:1px}.p-4{padding:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.capitalize{text-transform:capitalize}.text-secondary{--tw-text-opacity: 1;color:rgba(102,102,102,var(--tw-text-opacity))}*,:before,:after{--tw-shadow: 0 0 #0000}*,:before,:after{--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59, 130, 246, .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000}.filter{--tw-blur: var(--tw-empty, );--tw-brightness: var(--tw-empty, );--tw-contrast: var(--tw-empty, );--tw-grayscale: var(--tw-empty, );--tw-hue-rotate: var(--tw-empty, );--tw-invert: var(--tw-empty, );--tw-saturate: var(--tw-empty, );--tw-sepia: var(--tw-empty, );--tw-drop-shadow: var(--tw-empty, );filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur{--tw-blur: blur(8px)}.container[data-v-38dac57e]{border:1px solid #cccccc;border-radius:6px;padding:0 4px;min-height:30px;cursor:pointer}.tags-container[data-v-18554545]{word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.taskTemplateInline[data-v-c3a26010]{float:right}a.taskTemplateInline[data-v-c3a26010]{margin-left:10px}div.taskTemplateInline[data-v-c3a26010]{margin-top:5px!important}
package/dist/venus.es.js CHANGED
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, ref, watch, computed, toRefs, getCurrentScope, shallowRef } from "vue-demi";
21
- import { Select, Modal, Form, Input, Checkbox, Divider, Button, Tag, Tooltip, Upload, Row, Col, Radio, Popconfirm, Table, Badge, Card, message } from "ant-design-vue";
21
+ import { Select, Modal, Form, Input, Checkbox, Divider, Button, Upload, Tag, Tooltip, Row, Col, Radio, Popconfirm, Table, Badge, Card, message } from "ant-design-vue";
22
22
  import { useQuery, useResult, useMutation, useApolloClient } from "@vue/apollo-composable";
23
23
  import gql from "graphql-tag";
24
24
  import { path, uniqBy, prop } from "ramda";
@@ -707,6 +707,132 @@ var index$2 = [
707
707
  i864,
708
708
  i864a
709
709
  ];
710
+ const acceptableFormats = [
711
+ ".rar",
712
+ ".zip",
713
+ ".doc",
714
+ ".pdf",
715
+ ".docx",
716
+ ".jpg",
717
+ ".jpeg",
718
+ ".png"
719
+ ];
720
+ var __vue2_script$b = defineComponent({
721
+ name: "aFileUploader",
722
+ components: { AntUpload: Upload, AntTag: Tag, AntModal: Modal },
723
+ props: {
724
+ value: {
725
+ type: Array,
726
+ default: () => []
727
+ },
728
+ uploadFilesFunc: {
729
+ type: Function,
730
+ required: true
731
+ },
732
+ disabled: {
733
+ type: Boolean
734
+ },
735
+ previewMode: {
736
+ type: Boolean,
737
+ default: false
738
+ }
739
+ },
740
+ setup(props, { emit }) {
741
+ const me = useMe();
742
+ const loading = ref(false);
743
+ const changeVal = (k, v) => {
744
+ emit("change", __spreadProps(__spreadValues({}, props.value), {
745
+ [k]: v
746
+ }));
747
+ };
748
+ const remove = (id) => {
749
+ emit("change", props.value.filter((v) => v.id !== id));
750
+ };
751
+ const beforeUpload = (file) => {
752
+ var _a, _b;
753
+ if (loading.value)
754
+ return false;
755
+ loading.value = true;
756
+ props.uploadFilesFunc([file], {
757
+ office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
758
+ user_id: (_b = me.value) == null ? void 0 : _b.id
759
+ }).then(([
760
+ {
761
+ status,
762
+ value: { id, name, link }
763
+ }
764
+ ]) => {
765
+ if (status === "fulfilled") {
766
+ emit("change", [
767
+ ...props.value,
768
+ {
769
+ id,
770
+ name,
771
+ link
772
+ }
773
+ ]);
774
+ }
775
+ }).finally(() => {
776
+ loading.value = false;
777
+ });
778
+ loading.value = false;
779
+ return false;
780
+ };
781
+ const previewImage = ref();
782
+ const typeOf = (filename) => {
783
+ if (/\.(gif|jpe?g|png)$/i.test(filename)) {
784
+ return "img";
785
+ } else if (/\.docx?$/i.test(filename)) {
786
+ return "doc";
787
+ } else if (/\.pdf$/i.test(filename)) {
788
+ return "pdf";
789
+ }
790
+ return "other";
791
+ };
792
+ const clickItem = (item, event) => {
793
+ if (typeOf(item.name) !== "img") {
794
+ return;
795
+ }
796
+ event.preventDefault();
797
+ previewImage.value = item.link;
798
+ };
799
+ return {
800
+ previewImage,
801
+ clickItem,
802
+ changeVal,
803
+ remove,
804
+ beforeUpload,
805
+ loading,
806
+ acceptableFormats
807
+ };
808
+ }
809
+ });
810
+ var render$b = function() {
811
+ var _vm = this;
812
+ var _h = _vm.$createElement;
813
+ var _c = _vm._self._c || _h;
814
+ return _c("div", { class: { container: !_vm.previewMode } }, [_c("ant-modal", { attrs: { "visible": !!_vm.previewImage, "footer": null }, on: { "cancel": function($event) {
815
+ _vm.previewImage = null;
816
+ } } }, [_c("img", { staticStyle: { "width": "100%" }, attrs: { "src": _vm.previewImage } })]), _c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [], "accept": _vm.acceptableFormats.join(",") } }, [!_vm.previewMode ? _c("ant-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]) : _vm._e(), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
817
+ return _c("ant-tag", { key: file.id, attrs: { "closable": !_vm.previewMode && !_vm.disabled }, on: { "close": function($event) {
818
+ return _vm.remove(file.id);
819
+ } } }, [_c("a", { staticStyle: { "color": "#111" }, attrs: { "href": file.link, "target": "_blank" }, on: { "click": function($event) {
820
+ return _vm.clickItem(file, $event);
821
+ } } }, [_vm._v(" " + _vm._s(file.name) + " ")])]);
822
+ }), 1) : !_vm.previewMode ? _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))]) : _vm._e()], 1)], 1);
823
+ };
824
+ var staticRenderFns$b = [];
825
+ var index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
826
+ const __cssModules$b = {};
827
+ var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "38dac57e", null, null);
828
+ function __vue2_injectStyles$b(context) {
829
+ for (let o in __cssModules$b) {
830
+ this[o] = __cssModules$b[o];
831
+ }
832
+ }
833
+ var AFileUploader = /* @__PURE__ */ function() {
834
+ return __component__$b.exports;
835
+ }();
710
836
  var AssigneeTypes;
711
837
  (function(AssigneeTypes2) {
712
838
  AssigneeTypes2[AssigneeTypes2["EMPTY_DEFAULT"] = 4] = "EMPTY_DEFAULT";
@@ -732,7 +858,7 @@ var ResponseCode;
732
858
  ResponseCode2["success"] = "SUCCESS";
733
859
  ResponseCode2["failed"] = "FAILED";
734
860
  })(ResponseCode || (ResponseCode = {}));
735
- var __vue2_script$b = defineComponent({
861
+ var __vue2_script$a = defineComponent({
736
862
  components: {
737
863
  AntTag: Tag
738
864
  },
@@ -749,25 +875,25 @@ var __vue2_script$b = defineComponent({
749
875
  };
750
876
  }
751
877
  });
752
- var render$b = function() {
878
+ var render$a = function() {
753
879
  var _vm = this;
754
880
  var _h = _vm.$createElement;
755
881
  var _c = _vm._self._c || _h;
756
882
  return _c("ant-tag", { attrs: { "color": _vm.tagColor(_vm.assigneeType) } }, [_vm._v(" " + _vm._s(_vm.$t(_vm.AssigneeTypesText[_vm.assigneeType])) + " ")]);
757
883
  };
758
- var staticRenderFns$b = [];
884
+ var staticRenderFns$a = [];
759
885
  var index_vue_vue_type_style_index_0_scoped_true_lang$5 = "";
760
- const __cssModules$b = {};
761
- var __component__$b = /* @__PURE__ */ normalizeComponent(__vue2_script$b, render$b, staticRenderFns$b, false, __vue2_injectStyles$b, "145c1099", null, null);
762
- function __vue2_injectStyles$b(context) {
763
- for (let o in __cssModules$b) {
764
- this[o] = __cssModules$b[o];
886
+ const __cssModules$a = {};
887
+ var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "145c1099", null, null);
888
+ function __vue2_injectStyles$a(context) {
889
+ for (let o in __cssModules$a) {
890
+ this[o] = __cssModules$a[o];
765
891
  }
766
892
  }
767
893
  var AssigneeTag = /* @__PURE__ */ function() {
768
- return __component__$b.exports;
894
+ return __component__$a.exports;
769
895
  }();
770
- var __vue2_script$a = defineComponent({
896
+ var __vue2_script$9 = defineComponent({
771
897
  name: "index",
772
898
  components: {
773
899
  AntTooltip: Tooltip
@@ -786,23 +912,23 @@ var __vue2_script$a = defineComponent({
786
912
  }
787
913
  }
788
914
  });
789
- var render$a = function() {
915
+ var render$9 = function() {
790
916
  var _vm = this;
791
917
  var _h = _vm.$createElement;
792
918
  var _c = _vm._self._c || _h;
793
919
  return _c("ant-tooltip", { attrs: { "placement": _vm.placement, "title": _vm.tags ? _vm.tags.join(", ") : "-" } }, [_c("div", { staticClass: "tags-container", style: "max-width:" + _vm.maxWidth + "px" }, [_c("span", [_vm._v(_vm._s(_vm.tags ? _vm.tags.join(", ") : "-"))])])]);
794
920
  };
795
- var staticRenderFns$a = [];
921
+ var staticRenderFns$9 = [];
796
922
  var index_vue_vue_type_style_index_0_scoped_true_lang$4 = "";
797
- const __cssModules$a = {};
798
- var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "18554545", null, null);
799
- function __vue2_injectStyles$a(context) {
800
- for (let o in __cssModules$a) {
801
- this[o] = __cssModules$a[o];
923
+ const __cssModules$9 = {};
924
+ var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "18554545", null, null);
925
+ function __vue2_injectStyles$9(context) {
926
+ for (let o in __cssModules$9) {
927
+ this[o] = __cssModules$9[o];
802
928
  }
803
929
  }
804
930
  var TagsWithTooltip = /* @__PURE__ */ function() {
805
- return __component__$a.exports;
931
+ return __component__$9.exports;
806
932
  }();
807
933
  var TaskTypes;
808
934
  (function(TaskTypes2) {
@@ -823,104 +949,6 @@ var useChangeVal = (props, emit) => (k, v) => {
823
949
  [k]: v
824
950
  }));
825
951
  };
826
- const acceptableFormats = [
827
- ".rar",
828
- ".zip",
829
- ".doc",
830
- ".pdf",
831
- ".docx",
832
- ".jpg",
833
- ".jpeg",
834
- ".png"
835
- ];
836
- var __vue2_script$9 = defineComponent({
837
- name: "aFileUploader",
838
- components: { AntUpload: Upload, AntTag: Tag },
839
- props: {
840
- value: {
841
- type: Array,
842
- default: () => []
843
- },
844
- uploadFilesFunc: {
845
- type: Function,
846
- required: true
847
- },
848
- disabled: {
849
- type: Boolean
850
- }
851
- },
852
- setup(props, { emit }) {
853
- const me = useMe();
854
- const loading = ref(false);
855
- const changeVal = (k, v) => {
856
- emit("change", __spreadProps(__spreadValues({}, props.value), {
857
- [k]: v
858
- }));
859
- };
860
- const remove = (id) => {
861
- emit("change", props.value.filter((v) => v.id !== id));
862
- };
863
- const beforeUpload = (file) => {
864
- var _a, _b;
865
- if (loading.value)
866
- return false;
867
- loading.value = true;
868
- props.uploadFilesFunc([file], {
869
- office_id: (_a = me.value) == null ? void 0 : _a.lawFirmId,
870
- user_id: (_b = me.value) == null ? void 0 : _b.id
871
- }).then(([
872
- {
873
- status,
874
- value: { id, name, link }
875
- }
876
- ]) => {
877
- if (status === "fulfilled") {
878
- emit("change", [
879
- ...props.value,
880
- {
881
- id,
882
- name,
883
- link
884
- }
885
- ]);
886
- }
887
- }).finally(() => {
888
- loading.value = false;
889
- });
890
- loading.value = false;
891
- return false;
892
- };
893
- return {
894
- changeVal,
895
- remove,
896
- beforeUpload,
897
- loading,
898
- acceptableFormats
899
- };
900
- }
901
- });
902
- var render$9 = function() {
903
- var _vm = this;
904
- var _h = _vm.$createElement;
905
- var _c = _vm._self._c || _h;
906
- return _c("div", { staticClass: "container" }, [_c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.disabled || _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [], "accept": _vm.acceptableFormats.join(",") } }, [_c("ant-tag", [_vm._v(" " + _vm._s(_vm.$t("message.selectFile")) + " ")]), _vm.value.length ? _c("div", { staticStyle: { "display": "inline-block" } }, _vm._l(_vm.value, function(file) {
907
- return _c("ant-tag", { key: file.id, attrs: { "closable": "" }, on: { "close": function($event) {
908
- return _vm.remove(file.id);
909
- } } }, [_vm._v(_vm._s(file.name) + " ")]);
910
- }), 1) : _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))])], 1)], 1);
911
- };
912
- var staticRenderFns$9 = [];
913
- var aFileUploader_vue_vue_type_style_index_0_scoped_true_lang = "";
914
- const __cssModules$9 = {};
915
- var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "678cdf3c", null, null);
916
- function __vue2_injectStyles$9(context) {
917
- for (let o in __cssModules$9) {
918
- this[o] = __cssModules$9[o];
919
- }
920
- }
921
- var AFileUploader = /* @__PURE__ */ function() {
922
- return __component__$9.exports;
923
- }();
924
952
  var refactorParams = (record) => {
925
953
  var _a;
926
954
  return {
@@ -1044,7 +1072,7 @@ var render$8 = function() {
1044
1072
  var staticRenderFns$8 = [];
1045
1073
  var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
1046
1074
  const __cssModules$8 = {};
1047
- var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "119be748", null, null);
1075
+ var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "58dbc3e8", null, null);
1048
1076
  function __vue2_injectStyles$8(context) {
1049
1077
  for (let o in __cssModules$8) {
1050
1078
  this[o] = __cssModules$8[o];
@@ -1165,7 +1193,7 @@ var render$7 = function() {
1165
1193
  var staticRenderFns$7 = [];
1166
1194
  var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
1167
1195
  const __cssModules$7 = {};
1168
- var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "26be016f", null, null);
1196
+ var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "2617d5ac", null, null);
1169
1197
  function __vue2_injectStyles$7(context) {
1170
1198
  for (let o in __cssModules$7) {
1171
1199
  this[o] = __cssModules$7[o];
@@ -1877,6 +1905,12 @@ var __vue2_script$1 = defineComponent({
1877
1905
  tempTask.value = defaultTaskTemplate;
1878
1906
  }
1879
1907
  });
1908
+ watch(() => props.visible, (visible) => {
1909
+ if (!visible) {
1910
+ addedTasks.value = [];
1911
+ emit("update:value", []);
1912
+ }
1913
+ });
1880
1914
  const updateReviewModalContent = (record, newRecord) => {
1881
1915
  if (reviewModalVisible.value) {
1882
1916
  const newValue = addedTasks.value.map((originTask) => {
@@ -2003,7 +2037,7 @@ var render$1 = function() {
2003
2037
  var staticRenderFns$1 = [];
2004
2038
  var index_vue_vue_type_style_index_0_scoped_true_lang = "";
2005
2039
  const __cssModules$1 = {};
2006
- var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "1a57bb26", null, null);
2040
+ var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "5099cd32", null, null);
2007
2041
  function __vue2_injectStyles$1(context) {
2008
2042
  for (let o in __cssModules$1) {
2009
2043
  this[o] = __cssModules$1[o];
@@ -2041,4 +2075,4 @@ function __vue2_injectStyles(context) {
2041
2075
  var index = /* @__PURE__ */ function() {
2042
2076
  return __component__.exports;
2043
2077
  }();
2044
- export { AssigneeTag, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
2078
+ export { AFileUploader, AssigneeTag, NewTask, index$3 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ailaw/venus",
3
- "version": "0.4.2",
3
+ "version": "0.4.6",
4
4
  "files": [
5
5
  "dist"
6
6
  ],