@ailaw/venus 0.7.0 → 0.9.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/forms/{I-129_Main with H supplement.d.ts → G-28-Company.d.ts} +0 -0
- package/dist/forms/I-129 with H Supplement-Company Petitioner.d.ts +2 -0
- package/dist/forms/index.d.ts +2 -1
- package/dist/hooks/useVm.d.ts +1 -0
- package/dist/profile-select/profile-create-modal.vue.d.ts +2 -0
- package/dist/venus.es.js +34 -18
- package/package.json +1 -1
|
File without changes
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const formRecords: {
|
|
2
|
+
g28Company: import("../types/form").Form;
|
|
2
3
|
g28Person: import("../types/form").Form;
|
|
3
4
|
g1145: import("../types/form").Form;
|
|
4
5
|
i129Attachment: import("../types/form").Form;
|
|
5
|
-
|
|
6
|
+
i129Hs: import("../types/form").Form;
|
|
6
7
|
i130: import("../types/form").Form;
|
|
7
8
|
i130a: import("../types/form").Form;
|
|
8
9
|
i131: import("../types/form").Form;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useVm(): any;
|
|
@@ -27,6 +27,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
27
27
|
loading: import("@vue/composition-api").Ref<boolean>;
|
|
28
28
|
canSubmit: import("@vue/composition-api").ComputedRef<boolean>;
|
|
29
29
|
handleSubmit: () => Promise<void>;
|
|
30
|
+
handleValidate: (_: string, result: boolean) => void;
|
|
30
31
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
31
32
|
enabledTypes: {
|
|
32
33
|
type: PropType<RoleType[]>;
|
|
@@ -63,6 +64,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
63
64
|
loading: import("@vue/composition-api").Ref<boolean>;
|
|
64
65
|
canSubmit: import("@vue/composition-api").ComputedRef<boolean>;
|
|
65
66
|
handleSubmit: () => Promise<void>;
|
|
67
|
+
handleValidate: (_: string, result: boolean) => void;
|
|
66
68
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
67
69
|
enabledTypes: RoleType[];
|
|
68
70
|
} & {}, {
|
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, reactive, computed, toRefs, getCurrentScope, shallowRef } from "vue-demi";
|
|
21
|
-
import { Select, Modal,
|
|
21
|
+
import { Select, Modal, FormModel, Input, Checkbox, Divider, Button, Upload, Tag, Tooltip, Form, 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, sort } from "ramda";
|
|
@@ -292,8 +292,8 @@ var __vue2_script$h = defineComponent({
|
|
|
292
292
|
},
|
|
293
293
|
components: {
|
|
294
294
|
Modal,
|
|
295
|
-
Form,
|
|
296
|
-
FormItem:
|
|
295
|
+
Form: FormModel,
|
|
296
|
+
FormItem: FormModel.Item,
|
|
297
297
|
ProfileTypeSelect,
|
|
298
298
|
Input,
|
|
299
299
|
Checkbox
|
|
@@ -305,10 +305,9 @@ var __vue2_script$h = defineComponent({
|
|
|
305
305
|
email: "",
|
|
306
306
|
sendEmail: false
|
|
307
307
|
});
|
|
308
|
+
const hasValidationError = ref(false);
|
|
308
309
|
const canSubmit = computed(() => {
|
|
309
|
-
if (value.name === "" || value.profileType == null)
|
|
310
|
-
return false;
|
|
311
|
-
if (value.email !== "" && !value.email.includes("@"))
|
|
310
|
+
if (value.name === "" || value.profileType == null || hasValidationError.value)
|
|
312
311
|
return false;
|
|
313
312
|
return true;
|
|
314
313
|
});
|
|
@@ -317,6 +316,9 @@ var __vue2_script$h = defineComponent({
|
|
|
317
316
|
name: { required: true },
|
|
318
317
|
email: { type: "email" }
|
|
319
318
|
};
|
|
319
|
+
const handleValidate = (_2, result) => {
|
|
320
|
+
hasValidationError.value = !result;
|
|
321
|
+
};
|
|
320
322
|
const clearValue = () => Object.assign(value, {});
|
|
321
323
|
const { createProfile, loading } = useCreateProfile();
|
|
322
324
|
const hide = () => emit("cancel");
|
|
@@ -331,7 +333,8 @@ var __vue2_script$h = defineComponent({
|
|
|
331
333
|
clearValue,
|
|
332
334
|
loading,
|
|
333
335
|
canSubmit,
|
|
334
|
-
handleSubmit
|
|
336
|
+
handleSubmit,
|
|
337
|
+
handleValidate
|
|
335
338
|
};
|
|
336
339
|
}
|
|
337
340
|
});
|
|
@@ -339,7 +342,7 @@ var render$h = function() {
|
|
|
339
342
|
var _vm = this;
|
|
340
343
|
var _h = _vm.$createElement;
|
|
341
344
|
var _c = _vm._self._c || _h;
|
|
342
|
-
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules } }, [_c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes": _vm.enabledTypes }, model: { value: _vm.value.profileType, callback: function($$v) {
|
|
345
|
+
return _c("modal", _vm._g(_vm._b({ attrs: { "closable": false, "ok-text": "Create", "width": 320, "okButtonProps": { props: { disabled: !_vm.canSubmit, loading: _vm.loading } } }, on: { "cancel": _vm.clearValue, "ok": _vm.handleSubmit } }, "modal", _vm.$attrs, false), _vm.$listeners), [_c("Form", { attrs: { "layout": "vertical", "validate-trigger": "blur", "model": _vm.value, "rules": _vm.rules }, on: { "validate": _vm.handleValidate } }, [_c("form-item", { attrs: { "label": "Profile type", "prop": "profileType" } }, [_c("profile-type-select", { attrs: { "enabledTypes": _vm.enabledTypes }, model: { value: _vm.value.profileType, callback: function($$v) {
|
|
343
346
|
_vm.$set(_vm.value, "profileType", $$v);
|
|
344
347
|
}, expression: "value.profileType" } })], 1), _c("form-item", { attrs: { "label": "Name", "prop": "name" } }, [_c("Input", { model: { value: _vm.value.name, callback: function($$v) {
|
|
345
348
|
_vm.$set(_vm.value, "name", $$v);
|
|
@@ -802,14 +805,22 @@ var g28Person = createForm({
|
|
|
802
805
|
Preparer: "PREPARERPROFILE"
|
|
803
806
|
}
|
|
804
807
|
});
|
|
808
|
+
var g28Company = createForm({
|
|
809
|
+
displayName: "G-28-Company",
|
|
810
|
+
roles: {
|
|
811
|
+
Petitioner: "CLIENTPROFILE",
|
|
812
|
+
Beneficiary: "USERPROFILE",
|
|
813
|
+
Preparer: "PREPARERPROFILE"
|
|
814
|
+
}
|
|
815
|
+
});
|
|
805
816
|
var i129Attachment = createForm({
|
|
806
817
|
displayName: "I-129 Attachment",
|
|
807
818
|
roles: {
|
|
808
819
|
Beneficiary: "USERPROFILE"
|
|
809
820
|
}
|
|
810
821
|
});
|
|
811
|
-
var
|
|
812
|
-
displayName: "I-
|
|
822
|
+
var i129Hs = createForm({
|
|
823
|
+
displayName: "I-129 with H Supplement-Company Petitioner",
|
|
813
824
|
roles: {
|
|
814
825
|
Petitioner: "CLIENTPROFILE",
|
|
815
826
|
Beneficiary: "USERPROFILE",
|
|
@@ -876,10 +887,11 @@ var i864a = createForm({
|
|
|
876
887
|
}
|
|
877
888
|
});
|
|
878
889
|
const formRecords = {
|
|
890
|
+
g28Company,
|
|
879
891
|
g28Person,
|
|
880
892
|
g1145,
|
|
881
893
|
i129Attachment,
|
|
882
|
-
|
|
894
|
+
i129Hs,
|
|
883
895
|
i130,
|
|
884
896
|
i130a,
|
|
885
897
|
i131,
|
|
@@ -1263,14 +1275,14 @@ var render$8 = function() {
|
|
|
1263
1275
|
return _vm.changeVal("descriptions", $event.target.value);
|
|
1264
1276
|
} } })], 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) {
|
|
1265
1277
|
return _vm.changeVal("sampleDocs", $event);
|
|
1266
|
-
} } })], 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) {
|
|
1278
|
+
} } })], 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) {
|
|
1267
1279
|
return _vm.changeVal("tagList", $event);
|
|
1268
1280
|
} } })], 1)], 1);
|
|
1269
1281
|
};
|
|
1270
1282
|
var staticRenderFns$8 = [];
|
|
1271
1283
|
var index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
|
|
1272
1284
|
const __cssModules$8 = {};
|
|
1273
|
-
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "
|
|
1285
|
+
var __component__$8 = /* @__PURE__ */ normalizeComponent(__vue2_script$8, render$8, staticRenderFns$8, false, __vue2_injectStyles$8, "55282ee4", null, null);
|
|
1274
1286
|
function __vue2_injectStyles$8(context) {
|
|
1275
1287
|
for (let o in __cssModules$8) {
|
|
1276
1288
|
this[o] = __cssModules$8[o];
|
|
@@ -1337,11 +1349,11 @@ var __vue2_script$7 = defineComponent({
|
|
|
1337
1349
|
const changeVal = useChangeVal(props, emit);
|
|
1338
1350
|
const submit2 = () => {
|
|
1339
1351
|
taskForm.value.validFields((passed, ts) => {
|
|
1340
|
-
console.log(props.value.taskTemplateObj.taskType);
|
|
1341
1352
|
if (passed) {
|
|
1342
1353
|
const data = {
|
|
1343
1354
|
taskTemplateObj: __spreadProps(__spreadValues({}, ts), {
|
|
1344
|
-
taskType: props.value.taskTemplateObj.taskType
|
|
1355
|
+
taskType: props.value.taskTemplateObj.taskType,
|
|
1356
|
+
tagList: ts.tagList || []
|
|
1345
1357
|
}),
|
|
1346
1358
|
selfUserId: props.userId,
|
|
1347
1359
|
selfLawFirmId: props.lawFirmId,
|
|
@@ -1398,7 +1410,7 @@ var render$7 = function() {
|
|
|
1398
1410
|
var staticRenderFns$7 = [];
|
|
1399
1411
|
var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
|
|
1400
1412
|
const __cssModules$7 = {};
|
|
1401
|
-
var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "
|
|
1413
|
+
var __component__$7 = /* @__PURE__ */ normalizeComponent(__vue2_script$7, render$7, staticRenderFns$7, false, __vue2_injectStyles$7, "07b3605d", null, null);
|
|
1402
1414
|
function __vue2_injectStyles$7(context) {
|
|
1403
1415
|
for (let o in __cssModules$7) {
|
|
1404
1416
|
this[o] = __cssModules$7[o];
|
|
@@ -1479,9 +1491,13 @@ function __vue2_injectStyles$6(context) {
|
|
|
1479
1491
|
var TaskTemplateFilter = /* @__PURE__ */ function() {
|
|
1480
1492
|
return __component__$6.exports;
|
|
1481
1493
|
}();
|
|
1482
|
-
function
|
|
1494
|
+
function useVm() {
|
|
1483
1495
|
const scope = getCurrentScope();
|
|
1484
|
-
return
|
|
1496
|
+
return scope.vm;
|
|
1497
|
+
}
|
|
1498
|
+
function useT() {
|
|
1499
|
+
const vm = useVm();
|
|
1500
|
+
return (key) => vm.$i18n.t(key);
|
|
1485
1501
|
}
|
|
1486
1502
|
var __vue2_script$5 = defineComponent({
|
|
1487
1503
|
name: "TaskTablePure",
|