@ailaw/venus 0.3.21 → 0.4.0
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/en2.js +1 -1
- package/dist/en3.js +6 -0
- package/dist/style.css +1 -1
- package/dist/venus.es.js +92 -1038
- package/package.json +7 -11
package/dist/venus.es.js
CHANGED
|
@@ -17,12 +17,11 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, ref
|
|
20
|
+
import { defineComponent, ref, watch, computed, toRefs, getCurrentScope, shallowRef } from "vue-demi";
|
|
21
21
|
import { Select, Modal, Form, Input, Checkbox, Divider, Button, Tag, Tooltip, Upload, Row, Col, Radio, 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";
|
|
25
|
-
import "vue";
|
|
26
25
|
var index$4 = "";
|
|
27
26
|
function __variableDynamicImportRuntime0__$1(path2) {
|
|
28
27
|
switch (path2) {
|
|
@@ -46,7 +45,7 @@ var __vue2_script$h = defineComponent({
|
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
47
|
setup(props) {
|
|
49
|
-
const iconUrl = ref
|
|
48
|
+
const iconUrl = ref();
|
|
50
49
|
watch(() => props.type, (value) => {
|
|
51
50
|
let iconName = "";
|
|
52
51
|
switch (value) {
|
|
@@ -168,7 +167,9 @@ const meQuery = gql`
|
|
|
168
167
|
}
|
|
169
168
|
`;
|
|
170
169
|
function useMe() {
|
|
171
|
-
const { result } = useQuery(meQuery
|
|
170
|
+
const { result } = useQuery(meQuery, void 0, {
|
|
171
|
+
fetchPolicy: "cache-first"
|
|
172
|
+
});
|
|
172
173
|
return useResult(result);
|
|
173
174
|
}
|
|
174
175
|
const profilesQuery = gql`
|
|
@@ -289,8 +290,8 @@ var __vue2_script$e = defineComponent({
|
|
|
289
290
|
Checkbox
|
|
290
291
|
},
|
|
291
292
|
setup(_, { emit }) {
|
|
292
|
-
const value = ref
|
|
293
|
-
const shouldSendPassword = ref
|
|
293
|
+
const value = ref({});
|
|
294
|
+
const shouldSendPassword = ref(false);
|
|
294
295
|
const canSubmit = computed(() => value.value.profileName && value.value.profileType);
|
|
295
296
|
const rules = {
|
|
296
297
|
profileType: { required: true },
|
|
@@ -445,11 +446,11 @@ var __vue2_script$c = defineComponent({
|
|
|
445
446
|
}
|
|
446
447
|
},
|
|
447
448
|
setup(props, { emit }) {
|
|
448
|
-
const keywords = ref
|
|
449
|
+
const keywords = ref("");
|
|
449
450
|
const handleSearch = (value) => keywords.value = value;
|
|
450
|
-
const { onlyRole, profileIds } = toRefs
|
|
451
|
+
const { onlyRole, profileIds } = toRefs(props);
|
|
451
452
|
const { profiles: rawProfiles } = useProfiles(keywords, onlyRole, profileIds);
|
|
452
|
-
const createdProfile = ref
|
|
453
|
+
const createdProfile = ref();
|
|
453
454
|
const profiles = computed(() => {
|
|
454
455
|
const list = [
|
|
455
456
|
...props.preLoaded,
|
|
@@ -457,7 +458,7 @@ var __vue2_script$c = defineComponent({
|
|
|
457
458
|
];
|
|
458
459
|
return uniqBy(prop("id"), list);
|
|
459
460
|
});
|
|
460
|
-
const isModalVisible = ref
|
|
461
|
+
const isModalVisible = ref(false);
|
|
461
462
|
const toggleModal = (value) => isModalVisible.value = value;
|
|
462
463
|
const updateValue = (value) => emit("input", value);
|
|
463
464
|
const handleProfileCreated = (profile) => {
|
|
@@ -766,7 +767,7 @@ function __vue2_injectStyles$b(context) {
|
|
|
766
767
|
var AssigneeTag = /* @__PURE__ */ function() {
|
|
767
768
|
return __component__$b.exports;
|
|
768
769
|
}();
|
|
769
|
-
var __vue2_script$a = {
|
|
770
|
+
var __vue2_script$a = defineComponent({
|
|
770
771
|
name: "index",
|
|
771
772
|
components: {
|
|
772
773
|
AntTooltip: Tooltip
|
|
@@ -784,7 +785,7 @@ var __vue2_script$a = {
|
|
|
784
785
|
default: 100
|
|
785
786
|
}
|
|
786
787
|
}
|
|
787
|
-
};
|
|
788
|
+
});
|
|
788
789
|
var render$a = function() {
|
|
789
790
|
var _vm = this;
|
|
790
791
|
var _h = _vm.$createElement;
|
|
@@ -794,7 +795,7 @@ var render$a = function() {
|
|
|
794
795
|
var staticRenderFns$a = [];
|
|
795
796
|
var index_vue_vue_type_style_index_0_scoped_true_lang$4 = "";
|
|
796
797
|
const __cssModules$a = {};
|
|
797
|
-
var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "
|
|
798
|
+
var __component__$a = /* @__PURE__ */ normalizeComponent(__vue2_script$a, render$a, staticRenderFns$a, false, __vue2_injectStyles$a, "18554545", null, null);
|
|
798
799
|
function __vue2_injectStyles$a(context) {
|
|
799
800
|
for (let o in __cssModules$a) {
|
|
800
801
|
this[o] = __cssModules$a[o];
|
|
@@ -822,6 +823,16 @@ var useChangeVal = (props, emit) => (k, v) => {
|
|
|
822
823
|
[k]: v
|
|
823
824
|
}));
|
|
824
825
|
};
|
|
826
|
+
const acceptableFormats = [
|
|
827
|
+
".rar",
|
|
828
|
+
".zip",
|
|
829
|
+
".doc",
|
|
830
|
+
".pdf",
|
|
831
|
+
".docx",
|
|
832
|
+
".jpg",
|
|
833
|
+
".jpeg",
|
|
834
|
+
".png"
|
|
835
|
+
];
|
|
825
836
|
var __vue2_script$9 = defineComponent({
|
|
826
837
|
name: "aFileUploader",
|
|
827
838
|
components: { AntUpload: Upload, AntTag: Tag },
|
|
@@ -833,11 +844,14 @@ var __vue2_script$9 = defineComponent({
|
|
|
833
844
|
uploadFilesFunc: {
|
|
834
845
|
type: Function,
|
|
835
846
|
required: true
|
|
847
|
+
},
|
|
848
|
+
disabled: {
|
|
849
|
+
type: Boolean
|
|
836
850
|
}
|
|
837
851
|
},
|
|
838
852
|
setup(props, { emit }) {
|
|
839
853
|
const me = useMe();
|
|
840
|
-
const loading = ref
|
|
854
|
+
const loading = ref(false);
|
|
841
855
|
const changeVal = (k, v) => {
|
|
842
856
|
emit("change", __spreadProps(__spreadValues({}, props.value), {
|
|
843
857
|
[k]: v
|
|
@@ -851,7 +865,10 @@ var __vue2_script$9 = defineComponent({
|
|
|
851
865
|
if (loading.value)
|
|
852
866
|
return false;
|
|
853
867
|
loading.value = true;
|
|
854
|
-
props.uploadFilesFunc([file], {
|
|
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(([
|
|
855
872
|
{
|
|
856
873
|
status,
|
|
857
874
|
value: { id, name, link }
|
|
@@ -878,16 +895,7 @@ var __vue2_script$9 = defineComponent({
|
|
|
878
895
|
remove,
|
|
879
896
|
beforeUpload,
|
|
880
897
|
loading,
|
|
881
|
-
|
|
882
|
-
".rar",
|
|
883
|
-
".zip",
|
|
884
|
-
".doc",
|
|
885
|
-
".pdf",
|
|
886
|
-
".docx",
|
|
887
|
-
".jpg",
|
|
888
|
-
".jpeg",
|
|
889
|
-
".png"
|
|
890
|
-
]
|
|
898
|
+
acceptableFormats
|
|
891
899
|
};
|
|
892
900
|
}
|
|
893
901
|
});
|
|
@@ -895,16 +903,16 @@ var render$9 = function() {
|
|
|
895
903
|
var _vm = this;
|
|
896
904
|
var _h = _vm.$createElement;
|
|
897
905
|
var _c = _vm._self._c || _h;
|
|
898
|
-
return _c("div", { staticClass: "container" }, [_c("ant-upload", { staticStyle: { "display": "inline" }, attrs: { "disabled": _vm.loading, "before-upload": _vm.beforeUpload, "action": "javascript:;", "fileList": [] } }, [_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) {
|
|
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) {
|
|
899
907
|
return _c("ant-tag", { key: file.id, attrs: { "closable": "" }, on: { "close": function($event) {
|
|
900
908
|
return _vm.remove(file.id);
|
|
901
909
|
} } }, [_vm._v(_vm._s(file.name) + " ")]);
|
|
902
|
-
}), 1) : _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.
|
|
910
|
+
}), 1) : _c("span", { staticStyle: { "color": "#ccc" } }, [_vm._v(_vm._s(_vm.acceptableFormats.join(" ")))])], 1)], 1);
|
|
903
911
|
};
|
|
904
912
|
var staticRenderFns$9 = [];
|
|
905
913
|
var aFileUploader_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
906
914
|
const __cssModules$9 = {};
|
|
907
|
-
var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "
|
|
915
|
+
var __component__$9 = /* @__PURE__ */ normalizeComponent(__vue2_script$9, render$9, staticRenderFns$9, false, __vue2_injectStyles$9, "678cdf3c", null, null);
|
|
908
916
|
function __vue2_injectStyles$9(context) {
|
|
909
917
|
for (let o in __cssModules$9) {
|
|
910
918
|
this[o] = __cssModules$9[o];
|
|
@@ -971,11 +979,14 @@ var __vue2_script$8 = defineComponent({
|
|
|
971
979
|
uploadFilesFunc: {
|
|
972
980
|
type: Function,
|
|
973
981
|
required: true
|
|
982
|
+
},
|
|
983
|
+
disabled: {
|
|
984
|
+
type: Boolean
|
|
974
985
|
}
|
|
975
986
|
},
|
|
976
987
|
setup(props, { emit }) {
|
|
977
|
-
const nameError = ref
|
|
978
|
-
const typeError = ref
|
|
988
|
+
const nameError = ref(false);
|
|
989
|
+
const typeError = ref(false);
|
|
979
990
|
const changeVal = useChangeVal(props, emit);
|
|
980
991
|
const validFields = (callback) => {
|
|
981
992
|
const data = refactorParams(props.value);
|
|
@@ -1011,26 +1022,26 @@ var render$8 = function() {
|
|
|
1011
1022
|
var _c = _vm._self._c || _h;
|
|
1012
1023
|
return _c("ant-form", { staticClass: "add-edit-task-modal", on: { "submit": function(e) {
|
|
1013
1024
|
return e.preventDefault();
|
|
1014
|
-
} } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t("message.required") : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("ant-input", { attrs: { "value": _vm.value.taskName }, on: { "input": function($event) {
|
|
1025
|
+
} } }, [_c("ant-row", { attrs: { "gutter": 20 } }, [_c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "name": "taskName", "label": _vm.$t("message.taskName"), "help": _vm.nameError ? _vm.$t("message.required") : void 0, "validate-status": _vm.nameError ? "error" : void 0 } }, [_c("ant-input", { attrs: { "disabled": _vm.disabled, "value": _vm.value.taskName }, on: { "input": function($event) {
|
|
1015
1026
|
return _vm.changeVal("taskName", $event.target.value);
|
|
1016
|
-
} } })], 1)], 1), _c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "label": _vm.$t("message.assignee") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { staticStyle: { "min-width": "170px" }, attrs: { "value": _vm.value.isEmployee, "allowClear": true }, on: { "change": function($event) {
|
|
1027
|
+
} } })], 1)], 1), _c("ant-col", { attrs: { "span": 12 } }, [_c("ant-form-item", { attrs: { "label": _vm.$t("message.assignee") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { staticStyle: { "min-width": "170px" }, attrs: { "disabled": _vm.disabled, "value": _vm.value.isEmployee, "allowClear": true }, on: { "change": function($event) {
|
|
1017
1028
|
return _vm.changeVal("isEmployee", $event);
|
|
1018
1029
|
} } }, _vm._l(_vm.roles, function(role) {
|
|
1019
1030
|
return _c("ant-select-option", { key: role.id, attrs: { "value": role.key } }, [_c("span", { staticStyle: { "text-transform": "capitalize" } }, [_vm._v(" " + _vm._s(_vm.$t("message." + role.i18nKey)) + " ")])]);
|
|
1020
|
-
}), 1)], 1)], 1)], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.type"), "help": _vm.typeError ? _vm.$t("message.required") : void 0, "validate-status": _vm.typeError ? "error" : void 0 } }, [_vm.value.generalTaskType !== _vm.TaskTypes.worksheet ? _c("ant-radio-group", { attrs: { "value": _vm.value.generalTaskType }, on: { "change": function($event) {
|
|
1031
|
+
}), 1)], 1)], 1)], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.type"), "help": _vm.typeError ? _vm.$t("message.required") : void 0, "validate-status": _vm.typeError ? "error" : void 0 } }, [_vm.value.generalTaskType !== _vm.TaskTypes.worksheet ? _c("ant-radio-group", { attrs: { "disabled": _vm.disabled, "value": _vm.value.generalTaskType }, on: { "change": function($event) {
|
|
1021
1032
|
return _vm.changeVal("generalTaskType", $event.target.value);
|
|
1022
|
-
} } }, [_c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientUpload } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientUpload")) + " ")]), _c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientReview, "disabled": _vm.isAttorneySelected } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientReview")) + " ")])], 1) : _vm.
|
|
1033
|
+
} } }, [_c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientUpload } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientUpload")) + " ")]), _c("ant-radio", { attrs: { "value": _vm.TaskTypes.clientReview, "disabled": _vm.isAttorneySelected } }, [_vm._v(" " + _vm._s(_vm.$t("message.clientReview")) + " ")])], 1) : _c("div", [_vm._v(_vm._s(_vm.$t("message.worksheet")))])], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.descriptions") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-textarea", { attrs: { "disabled": _vm.disabled, "value": _vm.value.descriptions }, on: { "input": function($event) {
|
|
1023
1034
|
return _vm.changeVal("descriptions", $event.target.value);
|
|
1024
|
-
} } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.attachment") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-file-uploader", { attrs: { "value": _vm.value.sampleDocs, "uploadFilesFunc": _vm.uploadFilesFunc }, on: { "change": function($event) {
|
|
1035
|
+
} } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.attachment") + "(" + _vm.$t("message.optional") + ")" } }, [_c("a-file-uploader", { attrs: { "disabled": _vm.disabled, "value": _vm.value.sampleDocs, "uploadFilesFunc": _vm.uploadFilesFunc }, on: { "change": function($event) {
|
|
1025
1036
|
return _vm.changeVal("sampleDocs", $event);
|
|
1026
|
-
} } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.tags") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { attrs: { "mode": "tags", "value": _vm.value.tagList, "options": [] }, on: { "change": function($event) {
|
|
1037
|
+
} } })], 1), _c("ant-form-item", { attrs: { "label": _vm.$t("message.tags") + "(" + _vm.$t("message.optional") + ")" } }, [_c("ant-select", { attrs: { "disabled": _vm.disabled, "mode": "tags", "value": _vm.value.tagList, "options": [] }, on: { "change": function($event) {
|
|
1027
1038
|
return _vm.changeVal("tagList", $event);
|
|
1028
1039
|
} } })], 1)], 1);
|
|
1029
1040
|
};
|
|
1030
1041
|
var staticRenderFns$8 = [];
|
|
1031
1042
|
var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
|
|
1032
1043
|
const __cssModules$8 = {};
|
|
1033
|
-
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "
|
|
1044
|
+
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "daa8be96", null, null);
|
|
1034
1045
|
function __vue2_injectStyles$8(context) {
|
|
1035
1046
|
for (let o in __cssModules$8) {
|
|
1036
1047
|
this[o] = __cssModules$8[o];
|
|
@@ -1077,12 +1088,12 @@ var __vue2_script$7 = defineComponent({
|
|
|
1077
1088
|
}
|
|
1078
1089
|
},
|
|
1079
1090
|
setup(props, { emit }) {
|
|
1080
|
-
const taskForm = ref
|
|
1091
|
+
const taskForm = ref();
|
|
1081
1092
|
const changeVisible = (visible) => {
|
|
1082
1093
|
emit("update:visible", visible);
|
|
1083
1094
|
};
|
|
1084
|
-
const nameError = ref
|
|
1085
|
-
const typeError = ref
|
|
1095
|
+
const nameError = ref(false);
|
|
1096
|
+
const typeError = ref(false);
|
|
1086
1097
|
const changeVal = useChangeVal(props, emit);
|
|
1087
1098
|
const submit2 = () => {
|
|
1088
1099
|
taskForm.value.validFields((passed, ts) => {
|
|
@@ -1220,967 +1231,6 @@ function __vue2_injectStyles$6(context) {
|
|
|
1220
1231
|
var TaskTemplateFilter = /* @__PURE__ */ function() {
|
|
1221
1232
|
return __component__$6.exports;
|
|
1222
1233
|
}();
|
|
1223
|
-
var toString = function(x) {
|
|
1224
|
-
return Object.prototype.toString.call(x);
|
|
1225
|
-
};
|
|
1226
|
-
function isNative(Ctor) {
|
|
1227
|
-
return typeof Ctor === "function" && /native code/.test(Ctor.toString());
|
|
1228
|
-
}
|
|
1229
|
-
var hasSymbol = typeof Symbol !== "undefined" && isNative(Symbol) && typeof Reflect !== "undefined" && isNative(Reflect.ownKeys);
|
|
1230
|
-
var noopFn = function(_) {
|
|
1231
|
-
return _;
|
|
1232
|
-
};
|
|
1233
|
-
function proxy(target, key, _a) {
|
|
1234
|
-
var get2 = _a.get, set2 = _a.set;
|
|
1235
|
-
Object.defineProperty(target, key, {
|
|
1236
|
-
enumerable: true,
|
|
1237
|
-
configurable: true,
|
|
1238
|
-
get: get2 || noopFn,
|
|
1239
|
-
set: set2 || noopFn
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
function def(obj, key, val, enumerable) {
|
|
1243
|
-
Object.defineProperty(obj, key, {
|
|
1244
|
-
value: val,
|
|
1245
|
-
enumerable: !!enumerable,
|
|
1246
|
-
writable: true,
|
|
1247
|
-
configurable: true
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
function hasOwn(obj, key) {
|
|
1251
|
-
return Object.hasOwnProperty.call(obj, key);
|
|
1252
|
-
}
|
|
1253
|
-
function isArray(x) {
|
|
1254
|
-
return Array.isArray(x);
|
|
1255
|
-
}
|
|
1256
|
-
var MAX_VALID_ARRAY_LENGTH = 4294967295;
|
|
1257
|
-
function isValidArrayIndex(val) {
|
|
1258
|
-
var n = parseFloat(String(val));
|
|
1259
|
-
return n >= 0 && Math.floor(n) === n && isFinite(val) && n <= MAX_VALID_ARRAY_LENGTH;
|
|
1260
|
-
}
|
|
1261
|
-
function isObject(val) {
|
|
1262
|
-
return val !== null && typeof val === "object";
|
|
1263
|
-
}
|
|
1264
|
-
function isPlainObject(x) {
|
|
1265
|
-
return toString(x) === "[object Object]";
|
|
1266
|
-
}
|
|
1267
|
-
function isFunction(x) {
|
|
1268
|
-
return typeof x === "function";
|
|
1269
|
-
}
|
|
1270
|
-
/*! *****************************************************************************
|
|
1271
|
-
Copyright (c) Microsoft Corporation.
|
|
1272
|
-
|
|
1273
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1274
|
-
purpose with or without fee is hereby granted.
|
|
1275
|
-
|
|
1276
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1277
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1278
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1279
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1280
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1281
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1282
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1283
|
-
***************************************************************************** */
|
|
1284
|
-
var extendStatics = function(d, b) {
|
|
1285
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1286
|
-
d2.__proto__ = b2;
|
|
1287
|
-
} || function(d2, b2) {
|
|
1288
|
-
for (var p in b2)
|
|
1289
|
-
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
1290
|
-
d2[p] = b2[p];
|
|
1291
|
-
};
|
|
1292
|
-
return extendStatics(d, b);
|
|
1293
|
-
};
|
|
1294
|
-
function __extends(d, b) {
|
|
1295
|
-
if (typeof b !== "function" && b !== null)
|
|
1296
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1297
|
-
extendStatics(d, b);
|
|
1298
|
-
function __() {
|
|
1299
|
-
this.constructor = d;
|
|
1300
|
-
}
|
|
1301
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1302
|
-
}
|
|
1303
|
-
function __values(o) {
|
|
1304
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1305
|
-
if (m)
|
|
1306
|
-
return m.call(o);
|
|
1307
|
-
if (o && typeof o.length === "number")
|
|
1308
|
-
return {
|
|
1309
|
-
next: function() {
|
|
1310
|
-
if (o && i >= o.length)
|
|
1311
|
-
o = void 0;
|
|
1312
|
-
return { value: o && o[i++], done: !o };
|
|
1313
|
-
}
|
|
1314
|
-
};
|
|
1315
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1316
|
-
}
|
|
1317
|
-
var activeEffectScope;
|
|
1318
|
-
var effectScopeStack = [];
|
|
1319
|
-
var EffectScopeImpl = function() {
|
|
1320
|
-
function EffectScopeImpl2(vm) {
|
|
1321
|
-
this.active = true;
|
|
1322
|
-
this.effects = [];
|
|
1323
|
-
this.cleanups = [];
|
|
1324
|
-
this.vm = vm;
|
|
1325
|
-
}
|
|
1326
|
-
EffectScopeImpl2.prototype.run = function(fn) {
|
|
1327
|
-
if (this.active) {
|
|
1328
|
-
try {
|
|
1329
|
-
this.on();
|
|
1330
|
-
return fn();
|
|
1331
|
-
} finally {
|
|
1332
|
-
this.off();
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
return;
|
|
1336
|
-
};
|
|
1337
|
-
EffectScopeImpl2.prototype.on = function() {
|
|
1338
|
-
if (this.active) {
|
|
1339
|
-
effectScopeStack.push(this);
|
|
1340
|
-
activeEffectScope = this;
|
|
1341
|
-
}
|
|
1342
|
-
};
|
|
1343
|
-
EffectScopeImpl2.prototype.off = function() {
|
|
1344
|
-
if (this.active) {
|
|
1345
|
-
effectScopeStack.pop();
|
|
1346
|
-
activeEffectScope = effectScopeStack[effectScopeStack.length - 1];
|
|
1347
|
-
}
|
|
1348
|
-
};
|
|
1349
|
-
EffectScopeImpl2.prototype.stop = function() {
|
|
1350
|
-
if (this.active) {
|
|
1351
|
-
this.vm.$destroy();
|
|
1352
|
-
this.effects.forEach(function(e) {
|
|
1353
|
-
return e.stop();
|
|
1354
|
-
});
|
|
1355
|
-
this.cleanups.forEach(function(cleanup) {
|
|
1356
|
-
return cleanup();
|
|
1357
|
-
});
|
|
1358
|
-
this.active = false;
|
|
1359
|
-
}
|
|
1360
|
-
};
|
|
1361
|
-
return EffectScopeImpl2;
|
|
1362
|
-
}();
|
|
1363
|
-
(function(_super) {
|
|
1364
|
-
__extends(EffectScope, _super);
|
|
1365
|
-
function EffectScope(detached) {
|
|
1366
|
-
if (detached === void 0) {
|
|
1367
|
-
detached = false;
|
|
1368
|
-
}
|
|
1369
|
-
var _this = this;
|
|
1370
|
-
var vm = void 0;
|
|
1371
|
-
withCurrentInstanceTrackingDisabled(function() {
|
|
1372
|
-
vm = defineComponentInstance(getVueConstructor());
|
|
1373
|
-
});
|
|
1374
|
-
_this = _super.call(this, vm) || this;
|
|
1375
|
-
if (!detached) {
|
|
1376
|
-
recordEffectScope(_this);
|
|
1377
|
-
}
|
|
1378
|
-
return _this;
|
|
1379
|
-
}
|
|
1380
|
-
return EffectScope;
|
|
1381
|
-
})(EffectScopeImpl);
|
|
1382
|
-
function recordEffectScope(effect, scope) {
|
|
1383
|
-
var _a;
|
|
1384
|
-
scope = scope || activeEffectScope;
|
|
1385
|
-
if (scope && scope.active) {
|
|
1386
|
-
scope.effects.push(effect);
|
|
1387
|
-
return;
|
|
1388
|
-
}
|
|
1389
|
-
var vm = (_a = getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.proxy;
|
|
1390
|
-
vm && vm.$on("hook:destroyed", function() {
|
|
1391
|
-
return effect.stop();
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
function getCurrentScope() {
|
|
1395
|
-
return activeEffectScope;
|
|
1396
|
-
}
|
|
1397
|
-
function bindCurrentScopeToVM(vm) {
|
|
1398
|
-
if (!vm.scope) {
|
|
1399
|
-
var scope_1 = new EffectScopeImpl(vm.proxy);
|
|
1400
|
-
vm.scope = scope_1;
|
|
1401
|
-
vm.proxy.$on("hook:destroyed", function() {
|
|
1402
|
-
return scope_1.stop();
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
return vm.scope;
|
|
1406
|
-
}
|
|
1407
|
-
var vueDependency = void 0;
|
|
1408
|
-
try {
|
|
1409
|
-
var requiredVue = require("vue");
|
|
1410
|
-
if (requiredVue && isVue(requiredVue)) {
|
|
1411
|
-
vueDependency = requiredVue;
|
|
1412
|
-
} else if (requiredVue && "default" in requiredVue && isVue(requiredVue.default)) {
|
|
1413
|
-
vueDependency = requiredVue.default;
|
|
1414
|
-
}
|
|
1415
|
-
} catch (_a) {
|
|
1416
|
-
}
|
|
1417
|
-
var vueConstructor = null;
|
|
1418
|
-
var currentInstance = null;
|
|
1419
|
-
var currentInstanceTracking = true;
|
|
1420
|
-
var PluginInstalledFlag = "__composition_api_installed__";
|
|
1421
|
-
function isVue(obj) {
|
|
1422
|
-
return obj && isFunction(obj) && obj.name === "Vue";
|
|
1423
|
-
}
|
|
1424
|
-
function isVueRegistered(Vue) {
|
|
1425
|
-
return vueConstructor && hasOwn(Vue, PluginInstalledFlag);
|
|
1426
|
-
}
|
|
1427
|
-
function getVueConstructor() {
|
|
1428
|
-
return vueConstructor;
|
|
1429
|
-
}
|
|
1430
|
-
function getRegisteredVueOrDefault() {
|
|
1431
|
-
var constructor = vueConstructor || vueDependency;
|
|
1432
|
-
return constructor;
|
|
1433
|
-
}
|
|
1434
|
-
function setVueConstructor(Vue) {
|
|
1435
|
-
vueConstructor = Vue;
|
|
1436
|
-
Object.defineProperty(Vue, PluginInstalledFlag, {
|
|
1437
|
-
configurable: true,
|
|
1438
|
-
writable: true,
|
|
1439
|
-
value: true
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
function withCurrentInstanceTrackingDisabled(fn) {
|
|
1443
|
-
var prev = currentInstanceTracking;
|
|
1444
|
-
currentInstanceTracking = false;
|
|
1445
|
-
try {
|
|
1446
|
-
fn();
|
|
1447
|
-
} finally {
|
|
1448
|
-
currentInstanceTracking = prev;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
function setCurrentInstance(instance) {
|
|
1452
|
-
if (!currentInstanceTracking)
|
|
1453
|
-
return;
|
|
1454
|
-
var prev = currentInstance;
|
|
1455
|
-
prev === null || prev === void 0 ? void 0 : prev.scope.off();
|
|
1456
|
-
currentInstance = instance;
|
|
1457
|
-
currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope.on();
|
|
1458
|
-
}
|
|
1459
|
-
function getCurrentInstance() {
|
|
1460
|
-
return currentInstance;
|
|
1461
|
-
}
|
|
1462
|
-
var instanceMapCache = new WeakMap();
|
|
1463
|
-
function toVue3ComponentInstance(vm) {
|
|
1464
|
-
if (instanceMapCache.has(vm)) {
|
|
1465
|
-
return instanceMapCache.get(vm);
|
|
1466
|
-
}
|
|
1467
|
-
var instance = {
|
|
1468
|
-
proxy: vm,
|
|
1469
|
-
update: vm.$forceUpdate,
|
|
1470
|
-
type: vm.$options,
|
|
1471
|
-
uid: vm._uid,
|
|
1472
|
-
emit: vm.$emit.bind(vm),
|
|
1473
|
-
parent: null,
|
|
1474
|
-
root: null
|
|
1475
|
-
};
|
|
1476
|
-
bindCurrentScopeToVM(instance);
|
|
1477
|
-
var instanceProps = [
|
|
1478
|
-
"data",
|
|
1479
|
-
"props",
|
|
1480
|
-
"attrs",
|
|
1481
|
-
"refs",
|
|
1482
|
-
"vnode",
|
|
1483
|
-
"slots"
|
|
1484
|
-
];
|
|
1485
|
-
instanceProps.forEach(function(prop2) {
|
|
1486
|
-
proxy(instance, prop2, {
|
|
1487
|
-
get: function() {
|
|
1488
|
-
return vm["$" + prop2];
|
|
1489
|
-
}
|
|
1490
|
-
});
|
|
1491
|
-
});
|
|
1492
|
-
proxy(instance, "isMounted", {
|
|
1493
|
-
get: function() {
|
|
1494
|
-
return vm._isMounted;
|
|
1495
|
-
}
|
|
1496
|
-
});
|
|
1497
|
-
proxy(instance, "isUnmounted", {
|
|
1498
|
-
get: function() {
|
|
1499
|
-
return vm._isDestroyed;
|
|
1500
|
-
}
|
|
1501
|
-
});
|
|
1502
|
-
proxy(instance, "isDeactivated", {
|
|
1503
|
-
get: function() {
|
|
1504
|
-
return vm._inactive;
|
|
1505
|
-
}
|
|
1506
|
-
});
|
|
1507
|
-
proxy(instance, "emitted", {
|
|
1508
|
-
get: function() {
|
|
1509
|
-
return vm._events;
|
|
1510
|
-
}
|
|
1511
|
-
});
|
|
1512
|
-
instanceMapCache.set(vm, instance);
|
|
1513
|
-
if (vm.$parent) {
|
|
1514
|
-
instance.parent = toVue3ComponentInstance(vm.$parent);
|
|
1515
|
-
}
|
|
1516
|
-
if (vm.$root) {
|
|
1517
|
-
instance.root = toVue3ComponentInstance(vm.$root);
|
|
1518
|
-
}
|
|
1519
|
-
return instance;
|
|
1520
|
-
}
|
|
1521
|
-
function defineComponentInstance(Ctor, options) {
|
|
1522
|
-
if (options === void 0) {
|
|
1523
|
-
options = {};
|
|
1524
|
-
}
|
|
1525
|
-
var silent = Ctor.config.silent;
|
|
1526
|
-
Ctor.config.silent = true;
|
|
1527
|
-
var vm = new Ctor(options);
|
|
1528
|
-
Ctor.config.silent = silent;
|
|
1529
|
-
return vm;
|
|
1530
|
-
}
|
|
1531
|
-
function isComponentInstance(obj) {
|
|
1532
|
-
var Vue = getVueConstructor();
|
|
1533
|
-
return Vue && obj instanceof Vue;
|
|
1534
|
-
}
|
|
1535
|
-
function createSlotProxy(vm, slotName) {
|
|
1536
|
-
return function() {
|
|
1537
|
-
var args = [];
|
|
1538
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1539
|
-
args[_i] = arguments[_i];
|
|
1540
|
-
}
|
|
1541
|
-
if (!vm.$scopedSlots[slotName]) {
|
|
1542
|
-
return;
|
|
1543
|
-
}
|
|
1544
|
-
return vm.$scopedSlots[slotName].apply(vm, args);
|
|
1545
|
-
};
|
|
1546
|
-
}
|
|
1547
|
-
function resolveSlots(slots, normalSlots) {
|
|
1548
|
-
var res;
|
|
1549
|
-
if (!slots) {
|
|
1550
|
-
res = {};
|
|
1551
|
-
} else if (slots._normalized) {
|
|
1552
|
-
return slots._normalized;
|
|
1553
|
-
} else {
|
|
1554
|
-
res = {};
|
|
1555
|
-
for (var key in slots) {
|
|
1556
|
-
if (slots[key] && key[0] !== "$") {
|
|
1557
|
-
res[key] = true;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
for (var key in normalSlots) {
|
|
1562
|
-
if (!(key in res)) {
|
|
1563
|
-
res[key] = true;
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
return res;
|
|
1567
|
-
}
|
|
1568
|
-
var RefKey = "composition-api.refKey";
|
|
1569
|
-
var accessModifiedSet = new WeakMap();
|
|
1570
|
-
var readonlySet = new WeakMap();
|
|
1571
|
-
function set$1(target, key, val) {
|
|
1572
|
-
var Vue = getVueConstructor();
|
|
1573
|
-
var _a = Vue.util;
|
|
1574
|
-
_a.warn;
|
|
1575
|
-
var defineReactive = _a.defineReactive;
|
|
1576
|
-
var ob = target.__ob__;
|
|
1577
|
-
function ssrMockReactivity() {
|
|
1578
|
-
if (ob && isObject(val) && !hasOwn(val, "__ob__")) {
|
|
1579
|
-
mockReactivityDeep(val);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
if (isArray(target)) {
|
|
1583
|
-
if (isValidArrayIndex(key)) {
|
|
1584
|
-
target.length = Math.max(target.length, key);
|
|
1585
|
-
target.splice(key, 1, val);
|
|
1586
|
-
ssrMockReactivity();
|
|
1587
|
-
return val;
|
|
1588
|
-
} else if (key === "length" && val !== target.length) {
|
|
1589
|
-
target.length = val;
|
|
1590
|
-
ob === null || ob === void 0 ? void 0 : ob.dep.notify();
|
|
1591
|
-
return val;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
if (key in target && !(key in Object.prototype)) {
|
|
1595
|
-
target[key] = val;
|
|
1596
|
-
ssrMockReactivity();
|
|
1597
|
-
return val;
|
|
1598
|
-
}
|
|
1599
|
-
if (target._isVue || ob && ob.vmCount) {
|
|
1600
|
-
return val;
|
|
1601
|
-
}
|
|
1602
|
-
if (!ob) {
|
|
1603
|
-
target[key] = val;
|
|
1604
|
-
return val;
|
|
1605
|
-
}
|
|
1606
|
-
defineReactive(ob.value, key, val);
|
|
1607
|
-
defineAccessControl(target, key, val);
|
|
1608
|
-
ssrMockReactivity();
|
|
1609
|
-
ob.dep.notify();
|
|
1610
|
-
return val;
|
|
1611
|
-
}
|
|
1612
|
-
var RefImpl = function() {
|
|
1613
|
-
function RefImpl2(_a) {
|
|
1614
|
-
var get2 = _a.get, set2 = _a.set;
|
|
1615
|
-
proxy(this, "value", {
|
|
1616
|
-
get: get2,
|
|
1617
|
-
set: set2
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
return RefImpl2;
|
|
1621
|
-
}();
|
|
1622
|
-
function createRef(options, isReadonly, isComputed) {
|
|
1623
|
-
if (isReadonly === void 0) {
|
|
1624
|
-
isReadonly = false;
|
|
1625
|
-
}
|
|
1626
|
-
if (isComputed === void 0) {
|
|
1627
|
-
isComputed = false;
|
|
1628
|
-
}
|
|
1629
|
-
var r = new RefImpl(options);
|
|
1630
|
-
if (isComputed)
|
|
1631
|
-
r.effect = true;
|
|
1632
|
-
var sealed = Object.seal(r);
|
|
1633
|
-
if (isReadonly)
|
|
1634
|
-
readonlySet.set(sealed, true);
|
|
1635
|
-
return sealed;
|
|
1636
|
-
}
|
|
1637
|
-
function ref(raw) {
|
|
1638
|
-
var _a;
|
|
1639
|
-
if (isRef(raw)) {
|
|
1640
|
-
return raw;
|
|
1641
|
-
}
|
|
1642
|
-
var value = reactive((_a = {}, _a[RefKey] = raw, _a));
|
|
1643
|
-
return createRef({
|
|
1644
|
-
get: function() {
|
|
1645
|
-
return value[RefKey];
|
|
1646
|
-
},
|
|
1647
|
-
set: function(v) {
|
|
1648
|
-
return value[RefKey] = v;
|
|
1649
|
-
}
|
|
1650
|
-
});
|
|
1651
|
-
}
|
|
1652
|
-
function isRef(value) {
|
|
1653
|
-
return value instanceof RefImpl;
|
|
1654
|
-
}
|
|
1655
|
-
function toRefs(obj) {
|
|
1656
|
-
if (!isPlainObject(obj))
|
|
1657
|
-
return obj;
|
|
1658
|
-
var ret = {};
|
|
1659
|
-
for (var key in obj) {
|
|
1660
|
-
ret[key] = toRef(obj, key);
|
|
1661
|
-
}
|
|
1662
|
-
return ret;
|
|
1663
|
-
}
|
|
1664
|
-
function toRef(object, key) {
|
|
1665
|
-
if (!(key in object))
|
|
1666
|
-
set$1(object, key, void 0);
|
|
1667
|
-
var v = object[key];
|
|
1668
|
-
if (isRef(v))
|
|
1669
|
-
return v;
|
|
1670
|
-
return createRef({
|
|
1671
|
-
get: function() {
|
|
1672
|
-
return object[key];
|
|
1673
|
-
},
|
|
1674
|
-
set: function(v2) {
|
|
1675
|
-
return object[key] = v2;
|
|
1676
|
-
}
|
|
1677
|
-
});
|
|
1678
|
-
}
|
|
1679
|
-
function isRaw(obj) {
|
|
1680
|
-
var _a;
|
|
1681
|
-
return Boolean(obj && hasOwn(obj, "__ob__") && typeof obj.__ob__ === "object" && ((_a = obj.__ob__) === null || _a === void 0 ? void 0 : _a.__raw__));
|
|
1682
|
-
}
|
|
1683
|
-
function isReactive(obj) {
|
|
1684
|
-
var _a;
|
|
1685
|
-
return Boolean(obj && hasOwn(obj, "__ob__") && typeof obj.__ob__ === "object" && !((_a = obj.__ob__) === null || _a === void 0 ? void 0 : _a.__raw__));
|
|
1686
|
-
}
|
|
1687
|
-
function setupAccessControl(target) {
|
|
1688
|
-
if (!isPlainObject(target) || isRaw(target) || isArray(target) || isRef(target) || isComponentInstance(target) || accessModifiedSet.has(target))
|
|
1689
|
-
return;
|
|
1690
|
-
accessModifiedSet.set(target, true);
|
|
1691
|
-
var keys = Object.keys(target);
|
|
1692
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1693
|
-
defineAccessControl(target, keys[i]);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
function defineAccessControl(target, key, val) {
|
|
1697
|
-
if (key === "__ob__")
|
|
1698
|
-
return;
|
|
1699
|
-
if (isRaw(target[key]))
|
|
1700
|
-
return;
|
|
1701
|
-
var getter;
|
|
1702
|
-
var setter;
|
|
1703
|
-
var property = Object.getOwnPropertyDescriptor(target, key);
|
|
1704
|
-
if (property) {
|
|
1705
|
-
if (property.configurable === false) {
|
|
1706
|
-
return;
|
|
1707
|
-
}
|
|
1708
|
-
getter = property.get;
|
|
1709
|
-
setter = property.set;
|
|
1710
|
-
if ((!getter || setter) && arguments.length === 2) {
|
|
1711
|
-
val = target[key];
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
setupAccessControl(val);
|
|
1715
|
-
proxy(target, key, {
|
|
1716
|
-
get: function getterHandler() {
|
|
1717
|
-
var value = getter ? getter.call(target) : val;
|
|
1718
|
-
if (key !== RefKey && isRef(value)) {
|
|
1719
|
-
return value.value;
|
|
1720
|
-
} else {
|
|
1721
|
-
return value;
|
|
1722
|
-
}
|
|
1723
|
-
},
|
|
1724
|
-
set: function setterHandler(newVal) {
|
|
1725
|
-
if (getter && !setter)
|
|
1726
|
-
return;
|
|
1727
|
-
if (key !== RefKey && isRef(val) && !isRef(newVal)) {
|
|
1728
|
-
val.value = newVal;
|
|
1729
|
-
} else if (setter) {
|
|
1730
|
-
setter.call(target, newVal);
|
|
1731
|
-
val = newVal;
|
|
1732
|
-
} else {
|
|
1733
|
-
val = newVal;
|
|
1734
|
-
}
|
|
1735
|
-
setupAccessControl(newVal);
|
|
1736
|
-
}
|
|
1737
|
-
});
|
|
1738
|
-
}
|
|
1739
|
-
function observe(obj) {
|
|
1740
|
-
var Vue = getRegisteredVueOrDefault();
|
|
1741
|
-
var observed;
|
|
1742
|
-
if (Vue.observable) {
|
|
1743
|
-
observed = Vue.observable(obj);
|
|
1744
|
-
} else {
|
|
1745
|
-
var vm = defineComponentInstance(Vue, {
|
|
1746
|
-
data: {
|
|
1747
|
-
$$state: obj
|
|
1748
|
-
}
|
|
1749
|
-
});
|
|
1750
|
-
observed = vm._data.$$state;
|
|
1751
|
-
}
|
|
1752
|
-
if (!hasOwn(observed, "__ob__")) {
|
|
1753
|
-
mockReactivityDeep(observed);
|
|
1754
|
-
}
|
|
1755
|
-
return observed;
|
|
1756
|
-
}
|
|
1757
|
-
function mockReactivityDeep(obj, seen) {
|
|
1758
|
-
var e_1, _a;
|
|
1759
|
-
if (seen === void 0) {
|
|
1760
|
-
seen = new Set();
|
|
1761
|
-
}
|
|
1762
|
-
if (seen.has(obj) || hasOwn(obj, "__ob__") || !Object.isExtensible(obj))
|
|
1763
|
-
return;
|
|
1764
|
-
def(obj, "__ob__", mockObserver(obj));
|
|
1765
|
-
seen.add(obj);
|
|
1766
|
-
try {
|
|
1767
|
-
for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1768
|
-
var key = _c.value;
|
|
1769
|
-
var value = obj[key];
|
|
1770
|
-
if (!(isPlainObject(value) || isArray(value)) || isRaw(value) || !Object.isExtensible(value)) {
|
|
1771
|
-
continue;
|
|
1772
|
-
}
|
|
1773
|
-
mockReactivityDeep(value, seen);
|
|
1774
|
-
}
|
|
1775
|
-
} catch (e_1_1) {
|
|
1776
|
-
e_1 = { error: e_1_1 };
|
|
1777
|
-
} finally {
|
|
1778
|
-
try {
|
|
1779
|
-
if (_c && !_c.done && (_a = _b.return))
|
|
1780
|
-
_a.call(_b);
|
|
1781
|
-
} finally {
|
|
1782
|
-
if (e_1)
|
|
1783
|
-
throw e_1.error;
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
function mockObserver(value) {
|
|
1788
|
-
if (value === void 0) {
|
|
1789
|
-
value = {};
|
|
1790
|
-
}
|
|
1791
|
-
return {
|
|
1792
|
-
value,
|
|
1793
|
-
dep: {
|
|
1794
|
-
notify: noopFn,
|
|
1795
|
-
depend: noopFn,
|
|
1796
|
-
addSub: noopFn,
|
|
1797
|
-
removeSub: noopFn
|
|
1798
|
-
}
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
function createObserver() {
|
|
1802
|
-
return observe({}).__ob__;
|
|
1803
|
-
}
|
|
1804
|
-
function reactive(obj) {
|
|
1805
|
-
if (!isObject(obj)) {
|
|
1806
|
-
return obj;
|
|
1807
|
-
}
|
|
1808
|
-
if (!(isPlainObject(obj) || isArray(obj)) || isRaw(obj) || !Object.isExtensible(obj)) {
|
|
1809
|
-
return obj;
|
|
1810
|
-
}
|
|
1811
|
-
var observed = observe(obj);
|
|
1812
|
-
setupAccessControl(observed);
|
|
1813
|
-
return observed;
|
|
1814
|
-
}
|
|
1815
|
-
function set(vm, key, value) {
|
|
1816
|
-
var state = vm.__composition_api_state__ = vm.__composition_api_state__ || {};
|
|
1817
|
-
state[key] = value;
|
|
1818
|
-
}
|
|
1819
|
-
function get(vm, key) {
|
|
1820
|
-
return (vm.__composition_api_state__ || {})[key];
|
|
1821
|
-
}
|
|
1822
|
-
var vmStateManager = {
|
|
1823
|
-
set,
|
|
1824
|
-
get
|
|
1825
|
-
};
|
|
1826
|
-
function asVmProperty(vm, propName, propValue) {
|
|
1827
|
-
var props = vm.$options.props;
|
|
1828
|
-
if (!(propName in vm) && !(props && hasOwn(props, propName))) {
|
|
1829
|
-
if (isRef(propValue)) {
|
|
1830
|
-
proxy(vm, propName, {
|
|
1831
|
-
get: function() {
|
|
1832
|
-
return propValue.value;
|
|
1833
|
-
},
|
|
1834
|
-
set: function(val) {
|
|
1835
|
-
propValue.value = val;
|
|
1836
|
-
}
|
|
1837
|
-
});
|
|
1838
|
-
} else {
|
|
1839
|
-
proxy(vm, propName, {
|
|
1840
|
-
get: function() {
|
|
1841
|
-
if (isReactive(propValue)) {
|
|
1842
|
-
propValue.__ob__.dep.depend();
|
|
1843
|
-
}
|
|
1844
|
-
return propValue;
|
|
1845
|
-
},
|
|
1846
|
-
set: function(val) {
|
|
1847
|
-
propValue = val;
|
|
1848
|
-
}
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
function updateTemplateRef(vm) {
|
|
1854
|
-
var rawBindings = vmStateManager.get(vm, "rawBindings") || {};
|
|
1855
|
-
if (!rawBindings || !Object.keys(rawBindings).length)
|
|
1856
|
-
return;
|
|
1857
|
-
var refs = vm.$refs;
|
|
1858
|
-
var oldRefKeys = vmStateManager.get(vm, "refs") || [];
|
|
1859
|
-
for (var index2 = 0; index2 < oldRefKeys.length; index2++) {
|
|
1860
|
-
var key = oldRefKeys[index2];
|
|
1861
|
-
var setupValue = rawBindings[key];
|
|
1862
|
-
if (!refs[key] && setupValue && isRef(setupValue)) {
|
|
1863
|
-
setupValue.value = null;
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
var newKeys = Object.keys(refs);
|
|
1867
|
-
var validNewKeys = [];
|
|
1868
|
-
for (var index2 = 0; index2 < newKeys.length; index2++) {
|
|
1869
|
-
var key = newKeys[index2];
|
|
1870
|
-
var setupValue = rawBindings[key];
|
|
1871
|
-
if (refs[key] && setupValue && isRef(setupValue)) {
|
|
1872
|
-
setupValue.value = refs[key];
|
|
1873
|
-
validNewKeys.push(key);
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
vmStateManager.set(vm, "refs", validNewKeys);
|
|
1877
|
-
}
|
|
1878
|
-
function updateVmAttrs(vm, ctx) {
|
|
1879
|
-
var e_1, _a;
|
|
1880
|
-
if (!vm) {
|
|
1881
|
-
return;
|
|
1882
|
-
}
|
|
1883
|
-
var attrBindings = vmStateManager.get(vm, "attrBindings");
|
|
1884
|
-
if (!attrBindings && !ctx) {
|
|
1885
|
-
return;
|
|
1886
|
-
}
|
|
1887
|
-
if (!attrBindings) {
|
|
1888
|
-
var observedData = reactive({});
|
|
1889
|
-
attrBindings = { ctx, data: observedData };
|
|
1890
|
-
vmStateManager.set(vm, "attrBindings", attrBindings);
|
|
1891
|
-
proxy(ctx, "attrs", {
|
|
1892
|
-
get: function() {
|
|
1893
|
-
return attrBindings === null || attrBindings === void 0 ? void 0 : attrBindings.data;
|
|
1894
|
-
},
|
|
1895
|
-
set: function() {
|
|
1896
|
-
}
|
|
1897
|
-
});
|
|
1898
|
-
}
|
|
1899
|
-
var source = vm.$attrs;
|
|
1900
|
-
var _loop_1 = function(attr2) {
|
|
1901
|
-
if (!hasOwn(attrBindings.data, attr2)) {
|
|
1902
|
-
proxy(attrBindings.data, attr2, {
|
|
1903
|
-
get: function() {
|
|
1904
|
-
return vm.$attrs[attr2];
|
|
1905
|
-
}
|
|
1906
|
-
});
|
|
1907
|
-
}
|
|
1908
|
-
};
|
|
1909
|
-
try {
|
|
1910
|
-
for (var _b = __values(Object.keys(source)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1911
|
-
var attr = _c.value;
|
|
1912
|
-
_loop_1(attr);
|
|
1913
|
-
}
|
|
1914
|
-
} catch (e_1_1) {
|
|
1915
|
-
e_1 = { error: e_1_1 };
|
|
1916
|
-
} finally {
|
|
1917
|
-
try {
|
|
1918
|
-
if (_c && !_c.done && (_a = _b.return))
|
|
1919
|
-
_a.call(_b);
|
|
1920
|
-
} finally {
|
|
1921
|
-
if (e_1)
|
|
1922
|
-
throw e_1.error;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
function resolveScopedSlots(vm, slotsProxy) {
|
|
1927
|
-
var parentVNode = vm.$options._parentVnode;
|
|
1928
|
-
if (!parentVNode)
|
|
1929
|
-
return;
|
|
1930
|
-
var prevSlots = vmStateManager.get(vm, "slots") || [];
|
|
1931
|
-
var curSlots = resolveSlots(parentVNode.data.scopedSlots, vm.$slots);
|
|
1932
|
-
for (var index2 = 0; index2 < prevSlots.length; index2++) {
|
|
1933
|
-
var key = prevSlots[index2];
|
|
1934
|
-
if (!curSlots[key]) {
|
|
1935
|
-
delete slotsProxy[key];
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
var slotNames = Object.keys(curSlots);
|
|
1939
|
-
for (var index2 = 0; index2 < slotNames.length; index2++) {
|
|
1940
|
-
var key = slotNames[index2];
|
|
1941
|
-
if (!slotsProxy[key]) {
|
|
1942
|
-
slotsProxy[key] = createSlotProxy(vm, key);
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
vmStateManager.set(vm, "slots", slotNames);
|
|
1946
|
-
}
|
|
1947
|
-
function activateCurrentInstance(instance, fn, onError) {
|
|
1948
|
-
var preVm = getCurrentInstance();
|
|
1949
|
-
setCurrentInstance(instance);
|
|
1950
|
-
try {
|
|
1951
|
-
return fn(instance);
|
|
1952
|
-
} catch (err) {
|
|
1953
|
-
if (onError) {
|
|
1954
|
-
onError(err);
|
|
1955
|
-
} else {
|
|
1956
|
-
throw err;
|
|
1957
|
-
}
|
|
1958
|
-
} finally {
|
|
1959
|
-
setCurrentInstance(preVm);
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
function mixin(Vue) {
|
|
1963
|
-
Vue.mixin({
|
|
1964
|
-
beforeCreate: functionApiInit,
|
|
1965
|
-
mounted: function() {
|
|
1966
|
-
updateTemplateRef(this);
|
|
1967
|
-
},
|
|
1968
|
-
beforeUpdate: function() {
|
|
1969
|
-
updateVmAttrs(this);
|
|
1970
|
-
},
|
|
1971
|
-
updated: function() {
|
|
1972
|
-
var _a;
|
|
1973
|
-
updateTemplateRef(this);
|
|
1974
|
-
if ((_a = this.$vnode) === null || _a === void 0 ? void 0 : _a.context) {
|
|
1975
|
-
updateTemplateRef(this.$vnode.context);
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
});
|
|
1979
|
-
function functionApiInit() {
|
|
1980
|
-
var vm = this;
|
|
1981
|
-
var $options = vm.$options;
|
|
1982
|
-
var setup = $options.setup, render2 = $options.render;
|
|
1983
|
-
if (render2) {
|
|
1984
|
-
$options.render = function() {
|
|
1985
|
-
var _this = this;
|
|
1986
|
-
var args = [];
|
|
1987
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1988
|
-
args[_i] = arguments[_i];
|
|
1989
|
-
}
|
|
1990
|
-
return activateCurrentInstance(toVue3ComponentInstance(vm), function() {
|
|
1991
|
-
return render2.apply(_this, args);
|
|
1992
|
-
});
|
|
1993
|
-
};
|
|
1994
|
-
}
|
|
1995
|
-
if (!setup) {
|
|
1996
|
-
return;
|
|
1997
|
-
}
|
|
1998
|
-
if (!isFunction(setup)) {
|
|
1999
|
-
return;
|
|
2000
|
-
}
|
|
2001
|
-
var data = $options.data;
|
|
2002
|
-
$options.data = function wrappedData() {
|
|
2003
|
-
initSetup(vm, vm.$props);
|
|
2004
|
-
return isFunction(data) ? data.call(vm, vm) : data || {};
|
|
2005
|
-
};
|
|
2006
|
-
}
|
|
2007
|
-
function initSetup(vm, props) {
|
|
2008
|
-
if (props === void 0) {
|
|
2009
|
-
props = {};
|
|
2010
|
-
}
|
|
2011
|
-
var setup = vm.$options.setup;
|
|
2012
|
-
var ctx = createSetupContext(vm);
|
|
2013
|
-
var instance = toVue3ComponentInstance(vm);
|
|
2014
|
-
instance.setupContext = ctx;
|
|
2015
|
-
def(props, "__ob__", createObserver());
|
|
2016
|
-
resolveScopedSlots(vm, ctx.slots);
|
|
2017
|
-
var binding;
|
|
2018
|
-
activateCurrentInstance(instance, function() {
|
|
2019
|
-
binding = setup(props, ctx);
|
|
2020
|
-
});
|
|
2021
|
-
if (!binding)
|
|
2022
|
-
return;
|
|
2023
|
-
if (isFunction(binding)) {
|
|
2024
|
-
var bindingFunc_1 = binding;
|
|
2025
|
-
vm.$options.render = function() {
|
|
2026
|
-
resolveScopedSlots(vm, ctx.slots);
|
|
2027
|
-
return activateCurrentInstance(instance, function() {
|
|
2028
|
-
return bindingFunc_1();
|
|
2029
|
-
});
|
|
2030
|
-
};
|
|
2031
|
-
return;
|
|
2032
|
-
} else if (isObject(binding)) {
|
|
2033
|
-
if (isReactive(binding)) {
|
|
2034
|
-
binding = toRefs(binding);
|
|
2035
|
-
}
|
|
2036
|
-
vmStateManager.set(vm, "rawBindings", binding);
|
|
2037
|
-
var bindingObj_1 = binding;
|
|
2038
|
-
Object.keys(bindingObj_1).forEach(function(name) {
|
|
2039
|
-
var bindingValue = bindingObj_1[name];
|
|
2040
|
-
if (!isRef(bindingValue)) {
|
|
2041
|
-
if (!isReactive(bindingValue)) {
|
|
2042
|
-
if (isFunction(bindingValue)) {
|
|
2043
|
-
var copy_1 = bindingValue;
|
|
2044
|
-
bindingValue = bindingValue.bind(vm);
|
|
2045
|
-
Object.keys(copy_1).forEach(function(ele) {
|
|
2046
|
-
bindingValue[ele] = copy_1[ele];
|
|
2047
|
-
});
|
|
2048
|
-
} else if (!isObject(bindingValue)) {
|
|
2049
|
-
bindingValue = ref(bindingValue);
|
|
2050
|
-
} else if (hasReactiveArrayChild(bindingValue)) {
|
|
2051
|
-
customReactive(bindingValue);
|
|
2052
|
-
}
|
|
2053
|
-
} else if (isArray(bindingValue)) {
|
|
2054
|
-
bindingValue = ref(bindingValue);
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
asVmProperty(vm, name, bindingValue);
|
|
2058
|
-
});
|
|
2059
|
-
return;
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
function customReactive(target, seen) {
|
|
2063
|
-
if (seen === void 0) {
|
|
2064
|
-
seen = new Set();
|
|
2065
|
-
}
|
|
2066
|
-
if (seen.has(target))
|
|
2067
|
-
return;
|
|
2068
|
-
if (!isPlainObject(target) || isRef(target) || isReactive(target) || isRaw(target))
|
|
2069
|
-
return;
|
|
2070
|
-
var Vue2 = getVueConstructor();
|
|
2071
|
-
var defineReactive = Vue2.util.defineReactive;
|
|
2072
|
-
Object.keys(target).forEach(function(k) {
|
|
2073
|
-
var val = target[k];
|
|
2074
|
-
defineReactive(target, k, val);
|
|
2075
|
-
if (val) {
|
|
2076
|
-
seen.add(val);
|
|
2077
|
-
customReactive(val, seen);
|
|
2078
|
-
}
|
|
2079
|
-
return;
|
|
2080
|
-
});
|
|
2081
|
-
}
|
|
2082
|
-
function hasReactiveArrayChild(target, visited) {
|
|
2083
|
-
if (visited === void 0) {
|
|
2084
|
-
visited = new Map();
|
|
2085
|
-
}
|
|
2086
|
-
if (visited.has(target)) {
|
|
2087
|
-
return visited.get(target);
|
|
2088
|
-
}
|
|
2089
|
-
visited.set(target, false);
|
|
2090
|
-
if (isArray(target) && isReactive(target)) {
|
|
2091
|
-
visited.set(target, true);
|
|
2092
|
-
return true;
|
|
2093
|
-
}
|
|
2094
|
-
if (!isPlainObject(target) || isRaw(target) || isRef(target)) {
|
|
2095
|
-
return false;
|
|
2096
|
-
}
|
|
2097
|
-
return Object.keys(target).some(function(x) {
|
|
2098
|
-
return hasReactiveArrayChild(target[x], visited);
|
|
2099
|
-
});
|
|
2100
|
-
}
|
|
2101
|
-
function createSetupContext(vm) {
|
|
2102
|
-
var ctx = { slots: {} };
|
|
2103
|
-
var propsPlain = [
|
|
2104
|
-
"root",
|
|
2105
|
-
"parent",
|
|
2106
|
-
"refs",
|
|
2107
|
-
"listeners",
|
|
2108
|
-
"isServer",
|
|
2109
|
-
"ssrContext"
|
|
2110
|
-
];
|
|
2111
|
-
var methodReturnVoid = ["emit"];
|
|
2112
|
-
propsPlain.forEach(function(key) {
|
|
2113
|
-
var srcKey = "$" + key;
|
|
2114
|
-
proxy(ctx, key, {
|
|
2115
|
-
get: function() {
|
|
2116
|
-
return vm[srcKey];
|
|
2117
|
-
},
|
|
2118
|
-
set: function() {
|
|
2119
|
-
}
|
|
2120
|
-
});
|
|
2121
|
-
});
|
|
2122
|
-
updateVmAttrs(vm, ctx);
|
|
2123
|
-
methodReturnVoid.forEach(function(key) {
|
|
2124
|
-
var srcKey = "$" + key;
|
|
2125
|
-
proxy(ctx, key, {
|
|
2126
|
-
get: function() {
|
|
2127
|
-
return function() {
|
|
2128
|
-
var args = [];
|
|
2129
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2130
|
-
args[_i] = arguments[_i];
|
|
2131
|
-
}
|
|
2132
|
-
var fn = vm[srcKey];
|
|
2133
|
-
fn.apply(vm, args);
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
});
|
|
2137
|
-
});
|
|
2138
|
-
return ctx;
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
function mergeData(from, to) {
|
|
2142
|
-
if (!from)
|
|
2143
|
-
return to;
|
|
2144
|
-
if (!to)
|
|
2145
|
-
return from;
|
|
2146
|
-
var key;
|
|
2147
|
-
var toVal;
|
|
2148
|
-
var fromVal;
|
|
2149
|
-
var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);
|
|
2150
|
-
for (var i = 0; i < keys.length; i++) {
|
|
2151
|
-
key = keys[i];
|
|
2152
|
-
if (key === "__ob__")
|
|
2153
|
-
continue;
|
|
2154
|
-
toVal = to[key];
|
|
2155
|
-
fromVal = from[key];
|
|
2156
|
-
if (!hasOwn(to, key)) {
|
|
2157
|
-
to[key] = fromVal;
|
|
2158
|
-
} else if (toVal !== fromVal && isPlainObject(toVal) && !isRef(toVal) && isPlainObject(fromVal) && !isRef(fromVal)) {
|
|
2159
|
-
mergeData(fromVal, toVal);
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
return to;
|
|
2163
|
-
}
|
|
2164
|
-
function install(Vue) {
|
|
2165
|
-
if (isVueRegistered(Vue)) {
|
|
2166
|
-
return;
|
|
2167
|
-
}
|
|
2168
|
-
Vue.config.optionMergeStrategies.setup = function(parent, child) {
|
|
2169
|
-
return function mergedSetupFn(props, context) {
|
|
2170
|
-
return mergeData(isFunction(parent) ? parent(props, context) || {} : void 0, isFunction(child) ? child(props, context) || {} : void 0);
|
|
2171
|
-
};
|
|
2172
|
-
};
|
|
2173
|
-
setVueConstructor(Vue);
|
|
2174
|
-
mixin(Vue);
|
|
2175
|
-
}
|
|
2176
|
-
var Plugin = {
|
|
2177
|
-
install: function(Vue) {
|
|
2178
|
-
return install(Vue);
|
|
2179
|
-
}
|
|
2180
|
-
};
|
|
2181
|
-
if (typeof window !== "undefined" && window.Vue) {
|
|
2182
|
-
window.Vue.use(Plugin);
|
|
2183
|
-
}
|
|
2184
1234
|
function useT() {
|
|
2185
1235
|
const scope = getCurrentScope();
|
|
2186
1236
|
return (key) => scope.vm.$i18n.t(key);
|
|
@@ -2220,7 +1270,7 @@ var __vue2_script$5 = defineComponent({
|
|
|
2220
1270
|
}
|
|
2221
1271
|
},
|
|
2222
1272
|
setup(props) {
|
|
2223
|
-
const { addedTasks } = toRefs
|
|
1273
|
+
const { addedTasks } = toRefs(props);
|
|
2224
1274
|
const t = useT();
|
|
2225
1275
|
const columns = [
|
|
2226
1276
|
{
|
|
@@ -2292,7 +1342,7 @@ function __vue2_injectStyles$5(context) {
|
|
|
2292
1342
|
var TaskTablePure = /* @__PURE__ */ function() {
|
|
2293
1343
|
return __component__$5.exports;
|
|
2294
1344
|
}();
|
|
2295
|
-
var useSearchTaskTemplates = (pagination, conditions = ref
|
|
1345
|
+
var useSearchTaskTemplates = (pagination, conditions = ref({}), lawFirmId) => {
|
|
2296
1346
|
const startIndex = computed(() => (pagination.value.current - 1) * pagination.value.pageSize);
|
|
2297
1347
|
const endIndex = computed(() => startIndex.value + pagination.value.pageSize);
|
|
2298
1348
|
watch(() => conditions.value, () => {
|
|
@@ -2365,7 +1415,7 @@ var useTaskActions = (addedTasks, emit) => {
|
|
|
2365
1415
|
removeTask
|
|
2366
1416
|
};
|
|
2367
1417
|
};
|
|
2368
|
-
var useSearchTaskConditions = () => ref
|
|
1418
|
+
var useSearchTaskConditions = () => ref({
|
|
2369
1419
|
keywords: "",
|
|
2370
1420
|
isEmployee: [
|
|
2371
1421
|
AssigneeTypes.ATTORNEY,
|
|
@@ -2374,12 +1424,12 @@ var useSearchTaskConditions = () => ref$1({
|
|
|
2374
1424
|
]
|
|
2375
1425
|
});
|
|
2376
1426
|
var useTaskTemplateTableData = (props, emit) => {
|
|
2377
|
-
const initialPagination = ref
|
|
1427
|
+
const initialPagination = ref({
|
|
2378
1428
|
current: 1,
|
|
2379
1429
|
pageSize: props.pageSize || 10,
|
|
2380
1430
|
total: 0
|
|
2381
1431
|
});
|
|
2382
|
-
const { conditions = useSearchTaskConditions(), addedTasks = ref
|
|
1432
|
+
const { conditions = useSearchTaskConditions(), addedTasks = ref([]) } = toRefs(props);
|
|
2383
1433
|
const { result, loading, variables } = useSearchTaskTemplates(initialPagination, conditions, props.lawFirmId);
|
|
2384
1434
|
const dataSource = computed(() => {
|
|
2385
1435
|
var _a;
|
|
@@ -2512,7 +1562,7 @@ var __vue2_script$3 = defineComponent({
|
|
|
2512
1562
|
}
|
|
2513
1563
|
},
|
|
2514
1564
|
setup(props, { emit }) {
|
|
2515
|
-
const taskTable = ref
|
|
1565
|
+
const taskTable = ref();
|
|
2516
1566
|
const conditions = useSearchTaskConditions();
|
|
2517
1567
|
const currentComponent = shallowRef(props.showPage ? Card : Modal);
|
|
2518
1568
|
const editAction = (record) => {
|
|
@@ -2608,8 +1658,8 @@ var __vue2_script$2 = defineComponent({
|
|
|
2608
1658
|
}
|
|
2609
1659
|
},
|
|
2610
1660
|
setup(props, { emit }) {
|
|
2611
|
-
const { addedTasks } = toRefs
|
|
2612
|
-
const pagination = ref
|
|
1661
|
+
const { addedTasks } = toRefs(props);
|
|
1662
|
+
const pagination = ref({
|
|
2613
1663
|
total: addedTasks.value.length,
|
|
2614
1664
|
current: 1,
|
|
2615
1665
|
pageSize: 10
|
|
@@ -2751,14 +1801,6 @@ var __vue2_script$1 = defineComponent({
|
|
|
2751
1801
|
type: Boolean,
|
|
2752
1802
|
default: false
|
|
2753
1803
|
},
|
|
2754
|
-
userId: {
|
|
2755
|
-
type: String,
|
|
2756
|
-
required: true
|
|
2757
|
-
},
|
|
2758
|
-
lawFirmId: {
|
|
2759
|
-
type: Number,
|
|
2760
|
-
required: true
|
|
2761
|
-
},
|
|
2762
1804
|
value: {
|
|
2763
1805
|
type: Array,
|
|
2764
1806
|
default: () => []
|
|
@@ -2794,16 +1836,25 @@ var __vue2_script$1 = defineComponent({
|
|
|
2794
1836
|
type: Number
|
|
2795
1837
|
}
|
|
2796
1838
|
},
|
|
2797
|
-
setup(
|
|
1839
|
+
setup(_, { emit }) {
|
|
2798
1840
|
const { client } = useApolloClient();
|
|
2799
|
-
const mainModal = ref
|
|
2800
|
-
const reviewModal = ref
|
|
2801
|
-
const newTaskVisible = ref
|
|
2802
|
-
const reviewModalVisible = ref
|
|
2803
|
-
const tempTask = ref
|
|
1841
|
+
const mainModal = ref();
|
|
1842
|
+
const reviewModal = ref();
|
|
1843
|
+
const newTaskVisible = ref(false);
|
|
1844
|
+
const reviewModalVisible = ref(false);
|
|
1845
|
+
const tempTask = ref(defaultTaskTemplate);
|
|
2804
1846
|
const updateTemplate = useMutateTaskTemplate();
|
|
2805
1847
|
const createTemplate = useCreateTaskTemplate();
|
|
2806
|
-
const addedTasks = ref
|
|
1848
|
+
const addedTasks = ref([]);
|
|
1849
|
+
const me = useMe();
|
|
1850
|
+
const userId = computed(() => {
|
|
1851
|
+
var _a;
|
|
1852
|
+
return (_a = me.value) == null ? void 0 : _a.id;
|
|
1853
|
+
});
|
|
1854
|
+
const lawFirmId = computed(() => {
|
|
1855
|
+
var _a;
|
|
1856
|
+
return (_a = me.value) == null ? void 0 : _a.lawFirmId;
|
|
1857
|
+
});
|
|
2807
1858
|
watch(() => newTaskVisible.value, (visible) => {
|
|
2808
1859
|
if (!visible) {
|
|
2809
1860
|
tempTask.value = defaultTaskTemplate;
|
|
@@ -2844,19 +1895,21 @@ var __vue2_script$1 = defineComponent({
|
|
|
2844
1895
|
});
|
|
2845
1896
|
};
|
|
2846
1897
|
const _submit = async (record) => {
|
|
2847
|
-
const {
|
|
2848
|
-
newRecord,
|
|
2849
|
-
success,
|
|
2850
|
-
isUpdate
|
|
2851
|
-
} = await submit(record, updateTemplate, createTemplate);
|
|
1898
|
+
const { newRecord, success, isUpdate } = await submit(record, updateTemplate, createTemplate);
|
|
2852
1899
|
if (success) {
|
|
2853
1900
|
if (!isUpdate)
|
|
2854
1901
|
writeQuery(record.taskTemplateId, newRecord);
|
|
2855
1902
|
newTaskVisible.value = false;
|
|
2856
1903
|
updateReviewModalContent(record, newRecord);
|
|
1904
|
+
emit("task-added", newRecord);
|
|
2857
1905
|
}
|
|
2858
1906
|
};
|
|
2859
1907
|
const submitting = computed(() => updateTemplate.loading.value || createTemplate.loading.value);
|
|
1908
|
+
const endReviewing = (result) => {
|
|
1909
|
+
emit("submit", result);
|
|
1910
|
+
reviewModalVisible.value = false;
|
|
1911
|
+
newTaskVisible.value = false;
|
|
1912
|
+
};
|
|
2860
1913
|
const editTask = (record) => {
|
|
2861
1914
|
newTaskVisible.value = true;
|
|
2862
1915
|
tempTask.value = __spreadValues({}, record);
|
|
@@ -2869,9 +1922,12 @@ var __vue2_script$1 = defineComponent({
|
|
|
2869
1922
|
reviewModalVisible,
|
|
2870
1923
|
submitting,
|
|
2871
1924
|
addedTasks,
|
|
1925
|
+
userId,
|
|
1926
|
+
lawFirmId,
|
|
2872
1927
|
writeQuery,
|
|
2873
1928
|
editTask,
|
|
2874
|
-
_submit
|
|
1929
|
+
_submit,
|
|
1930
|
+
endReviewing
|
|
2875
1931
|
};
|
|
2876
1932
|
}
|
|
2877
1933
|
});
|
|
@@ -2879,7 +1935,7 @@ var render$1 = function() {
|
|
|
2879
1935
|
var _vm = this;
|
|
2880
1936
|
var _h = _vm.$createElement;
|
|
2881
1937
|
var _c = _vm._self._c || _h;
|
|
2882
|
-
return _c("div", { attrs: { "id": "venus-component-task-cart" } }, [_c("main-modal", { ref: "mainModal", attrs: { "visible": _vm.visible, "show-page": _vm.pageMode, "page-size": _vm.pageSize, "law-firm-id": _vm.lawFirmId, "tempTask": _vm.tempTask, "added-tasks": _vm.addedTasks, "newTaskVisible": _vm.newTaskVisible, "task-setting-page-url": _vm.taskSettingPageUrl, "reviewModalVisible": _vm.reviewModalVisible, "open-review-button-text": _vm.openReviewButtonText }, on: { "update:tempTask": function($event) {
|
|
1938
|
+
return _vm.lawFirmId != null ? _c("div", { attrs: { "id": "venus-component-task-cart" } }, [_c("main-modal", { ref: "mainModal", attrs: { "visible": _vm.visible, "show-page": _vm.pageMode, "page-size": _vm.pageSize, "law-firm-id": _vm.lawFirmId, "tempTask": _vm.tempTask, "added-tasks": _vm.addedTasks, "newTaskVisible": _vm.newTaskVisible, "task-setting-page-url": _vm.taskSettingPageUrl, "reviewModalVisible": _vm.reviewModalVisible, "open-review-button-text": _vm.openReviewButtonText }, on: { "update:tempTask": function($event) {
|
|
2883
1939
|
_vm.tempTask = $event;
|
|
2884
1940
|
}, "update:temp-task": function($event) {
|
|
2885
1941
|
_vm.tempTask = $event;
|
|
@@ -2917,20 +1973,18 @@ var render$1 = function() {
|
|
|
2917
1973
|
_vm.newTaskVisible = $event;
|
|
2918
1974
|
}, "update:new-task-visible": function($event) {
|
|
2919
1975
|
_vm.newTaskVisible = $event;
|
|
2920
|
-
}, "submit": function($event) {
|
|
2921
|
-
return _vm.$emit("submit", $event);
|
|
2922
|
-
}, "update:sendEmail": function($event) {
|
|
1976
|
+
}, "submit": _vm.endReviewing, "update:sendEmail": function($event) {
|
|
2923
1977
|
return _vm.$emit("update:sendEmail", $event);
|
|
2924
1978
|
} } }), _c("new-task", { attrs: { "user-id": _vm.userId, "loading": _vm.submitting, "value": _vm.tempTask, "law-firm-id": _vm.lawFirmId, "visible": _vm.newTaskVisible, "upload-files-func": _vm.uploadFilesFunc }, on: { "update:value": function($event) {
|
|
2925
1979
|
_vm.tempTask = $event;
|
|
2926
1980
|
}, "update:visible": function($event) {
|
|
2927
1981
|
_vm.newTaskVisible = $event;
|
|
2928
|
-
}, "submit": _vm._submit } })], 1);
|
|
1982
|
+
}, "submit": _vm._submit } })], 1) : _vm._e();
|
|
2929
1983
|
};
|
|
2930
1984
|
var staticRenderFns$1 = [];
|
|
2931
1985
|
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
2932
1986
|
const __cssModules$1 = {};
|
|
2933
|
-
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "
|
|
1987
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, "ffef8fd2", null, null);
|
|
2934
1988
|
function __vue2_injectStyles$1(context) {
|
|
2935
1989
|
for (let o in __cssModules$1) {
|
|
2936
1990
|
this[o] = __cssModules$1[o];
|
|
@@ -2941,8 +1995,8 @@ var index$1 = /* @__PURE__ */ function() {
|
|
|
2941
1995
|
}();
|
|
2942
1996
|
var __vue2_script = defineComponent({
|
|
2943
1997
|
setup() {
|
|
2944
|
-
const notBoolean = ref
|
|
2945
|
-
const test = ref
|
|
1998
|
+
const notBoolean = ref(123);
|
|
1999
|
+
const test = ref(false);
|
|
2946
2000
|
const isDisabled = computed(() => test.value);
|
|
2947
2001
|
return {
|
|
2948
2002
|
isDisabled,
|