@ailaw/venus 0.14.0 → 0.14.1

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.
@@ -1,9 +1,9 @@
1
- import { RoleType } from './profile';
1
+ import { GlueRoleType } from './profile';
2
2
  export interface Form {
3
3
  displayName: string;
4
4
  roles: {
5
- Petitioner?: RoleType;
6
- Beneficiary?: RoleType;
7
- Preparer?: RoleType;
5
+ Petitioner?: GlueRoleType[];
6
+ Beneficiary?: GlueRoleType[];
7
+ Preparer?: GlueRoleType[];
8
8
  };
9
9
  }
@@ -1,4 +1,9 @@
1
1
  export declare type RoleType = 'USERPROFILE' | 'CLIENTPROFILE' | 'PREPARERPROFILE';
2
+ export declare enum GlueRoleType {
3
+ USERPROFILE = 0,
4
+ CLIENTPROFILE = 1,
5
+ PREPARERPROFILE = 2
6
+ }
2
7
  export interface Profile {
3
8
  id: number;
4
9
  profileContent: Record<string, any>;
package/dist/venus.es.js CHANGED
@@ -177,6 +177,7 @@ const profilesQuery = gql`
177
177
  $lawFirmId: Int!
178
178
  $keywords: String
179
179
  $profileType: String
180
+ $profileTypeInt: [Int!]
180
181
  $profileIds: [Int!]
181
182
  $isDisabled: Int
182
183
  ) {
@@ -185,6 +186,7 @@ const profilesQuery = gql`
185
186
  lawFirmId: $lawFirmId
186
187
  keywords: $keywords
187
188
  profileType: $profileType
189
+ profileTypeInt: $profileTypeInt
188
190
  profileId: $profileIds
189
191
  isDisabled: $isDisabled
190
192
  }
@@ -402,7 +404,11 @@ var __vue2_script$g = defineComponent({
402
404
  });
403
405
  const handleChange = (value) => emit("input", props.source.find((v) => String(v.id) == value));
404
406
  const handleProfileCreate = () => emit("create-profile");
405
- const filterOption = (val, option) => option.data.attrs.name === "create-btn" || option.data.attrs.name.includes(val);
407
+ const filterOption = (val, option) => {
408
+ if (!option.data.attrs.name)
409
+ return true;
410
+ return option.data.attrs.name === "create-btn" || option.data.attrs.name.toUpperCase().includes(val.toUpperCase());
411
+ };
406
412
  return {
407
413
  filterOption,
408
414
  selectedId,
@@ -416,13 +422,14 @@ var render$g = function() {
416
422
  var _vm = this;
417
423
  var _h = _vm.$createElement;
418
424
  var _c = _vm._self._c || _h;
419
- return _c("Select", _vm._g(_vm._b({ staticClass: "w-72", attrs: { "allowClear": "", "showSearch": "", "optionFilterProp": "name", "value": _vm.selectedId, "filterOption": _vm.filterOption }, on: { "change": _vm.handleChange } }, "Select", _vm.$attrs, false), _vm.$listeners), [_c("Option", { key: "create-btn", attrs: { "value": "create-btn", "disabled": "", "name": "create-btn" } }, [_c("Button", { staticStyle: { "width": "100%" }, on: { "click": _vm.handleProfileCreate } }, [_vm._v("Create new profile ")]), _vm.creatable ? _c("Divider", { staticClass: "m-0 mt-3" }) : _vm._e()], 1), _vm._l(_vm.source, function(v) {
425
+ return _c("Select", _vm._g(_vm._b({ staticClass: "w-72", attrs: { "allowClear": "", "showSearch": "", "optionFilterProp": "name", "value": _vm.selectedId, "filterOption": _vm.filterOption }, on: { "change": _vm.handleChange } }, "Select", _vm.$attrs, false), _vm.$listeners), [_c("Option", { key: "create-btn", attrs: { "value": "create-btn", "disabled": "", "name": "create-btn" } }, [_c("Button", { staticStyle: { "width": "100%" }, on: { "click": _vm.handleProfileCreate } }, [_vm._v("Create new profile ")]), _vm.creatable ? _c("Divider", { staticClass: "btn-divider" }) : _vm._e()], 1), _vm._l(_vm.source, function(v) {
420
426
  return _c("Option", { key: v.id, attrs: { "value": v.id, "name": v.profileName } }, [_c("ProfileSelectItem", { attrs: { "source": v } })], 1);
421
427
  })], 2);
422
428
  };
423
429
  var staticRenderFns$g = [];
430
+ var profileSelector_vue_vue_type_style_index_0_scoped_true_lang = "";
424
431
  const __cssModules$g = {};
425
- var __component__$g = /* @__PURE__ */ normalizeComponent(__vue2_script$g, render$g, staticRenderFns$g, false, __vue2_injectStyles$g, null, null, null);
432
+ var __component__$g = /* @__PURE__ */ normalizeComponent(__vue2_script$g, render$g, staticRenderFns$g, false, __vue2_injectStyles$g, "599bdbb2", null, null);
426
433
  function __vue2_injectStyles$g(context) {
427
434
  for (let o in __cssModules$g) {
428
435
  this[o] = __cssModules$g[o];
@@ -431,7 +438,7 @@ function __vue2_injectStyles$g(context) {
431
438
  var ProfileSelector = /* @__PURE__ */ function() {
432
439
  return __component__$g.exports;
433
440
  }();
434
- function useProfiles(keywords, onlyRole, profileIds, disabledProfile) {
441
+ function useProfiles(keywords, onlyRole, roleTypes, profileIds, disabledProfile) {
435
442
  const me = useMe();
436
443
  const isDisabled = computed(() => {
437
444
  if (disabledProfile.value === true) {
@@ -448,6 +455,7 @@ function useProfiles(keywords, onlyRole, profileIds, disabledProfile) {
448
455
  lawFirmId: (_a = me.value) == null ? void 0 : _a.lawFirmId,
449
456
  keywords: keywords.value,
450
457
  profileType: onlyRole.value,
458
+ profileTypeInt: roleTypes.value,
451
459
  profileIds: profileIds.value,
452
460
  isDisabled: isDisabled.value
453
461
  };
@@ -470,6 +478,10 @@ var __vue2_script$f = defineComponent({
470
478
  onlyRole: {
471
479
  type: String
472
480
  },
481
+ roleTypes: {
482
+ type: Array,
483
+ required: true
484
+ },
473
485
  preLoaded: {
474
486
  type: Array,
475
487
  default: () => []
@@ -489,8 +501,8 @@ var __vue2_script$f = defineComponent({
489
501
  setup(props, { emit }) {
490
502
  const keywords = ref("");
491
503
  const handleSearch = (value) => keywords.value = value;
492
- const { onlyRole, profileIds, disabledProfile } = toRefs(props);
493
- const { profiles: rawProfiles } = useProfiles(keywords, onlyRole, profileIds, disabledProfile);
504
+ const { onlyRole, roleTypes, profileIds, disabledProfile } = toRefs(props);
505
+ const { profiles: rawProfiles } = useProfiles(keywords, onlyRole, roleTypes, profileIds, disabledProfile);
494
506
  const createdProfile = ref();
495
507
  const profiles = computed(() => {
496
508
  const list = [
@@ -811,6 +823,12 @@ function __variableDynamicImportRuntime0__(path2) {
811
823
  return import("./ru2.js");
812
824
  case "../languages/ru3.ts":
813
825
  return import("./ru3.js");
826
+ case "../languages/tr.ts":
827
+ return import("./tr.js");
828
+ case "../languages/tr2.ts":
829
+ return import("./tr2.js");
830
+ case "../languages/tr3.ts":
831
+ return import("./tr3.js");
814
832
  default:
815
833
  return new Promise(function(resolve, reject) {
816
834
  (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path2)));
@@ -826,166 +844,254 @@ async function getLanguageMessage(lang) {
826
844
  return loaded.get(lang);
827
845
  }
828
846
  const createForm = (form) => form;
829
- var g1145 = createForm({
830
- displayName: "G-1145",
847
+ var GlueRoleType;
848
+ (function(GlueRoleType2) {
849
+ GlueRoleType2[GlueRoleType2["USERPROFILE"] = 0] = "USERPROFILE";
850
+ GlueRoleType2[GlueRoleType2["CLIENTPROFILE"] = 1] = "CLIENTPROFILE";
851
+ GlueRoleType2[GlueRoleType2["PREPARERPROFILE"] = 2] = "PREPARERPROFILE";
852
+ })(GlueRoleType || (GlueRoleType = {}));
853
+ var g28Company = createForm({
854
+ displayName: "G-28-Company",
831
855
  roles: {
832
- Petitioner: "USERPROFILE",
833
- Beneficiary: "USERPROFILE",
834
- Preparer: "PREPARERPROFILE"
856
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
857
+ Beneficiary: [GlueRoleType.USERPROFILE],
858
+ Preparer: [GlueRoleType.PREPARERPROFILE]
835
859
  }
836
860
  });
837
861
  var g28Person = createForm({
838
862
  displayName: "G-28-Person",
839
863
  roles: {
840
- Petitioner: "USERPROFILE",
841
- Beneficiary: "USERPROFILE",
842
- Preparer: "PREPARERPROFILE"
864
+ Petitioner: [GlueRoleType.USERPROFILE],
865
+ Beneficiary: [GlueRoleType.USERPROFILE],
866
+ Preparer: [GlueRoleType.PREPARERPROFILE]
843
867
  }
844
868
  });
845
- var g28Company = createForm({
846
- displayName: "G-28-Company",
869
+ var g639 = createForm({
870
+ displayName: "G-639",
871
+ roles: {
872
+ Beneficiary: [GlueRoleType.USERPROFILE],
873
+ Preparer: [GlueRoleType.PREPARERPROFILE]
874
+ }
875
+ });
876
+ var g1145 = createForm({
877
+ displayName: "G-1145",
847
878
  roles: {
848
- Petitioner: "CLIENTPROFILE",
849
- Beneficiary: "USERPROFILE",
850
- Preparer: "PREPARERPROFILE"
879
+ Petitioner: [GlueRoleType.USERPROFILE],
880
+ Beneficiary: [GlueRoleType.USERPROFILE],
881
+ Preparer: [GlueRoleType.PREPARERPROFILE]
882
+ }
883
+ });
884
+ var g1450 = createForm({
885
+ displayName: "G-1450",
886
+ roles: {
887
+ Beneficiary: [GlueRoleType.USERPROFILE]
851
888
  }
852
889
  });
853
890
  var i129Attachment = createForm({
854
891
  displayName: "I-129 Attachment",
855
892
  roles: {
856
- Beneficiary: "USERPROFILE"
893
+ Beneficiary: [GlueRoleType.USERPROFILE]
894
+ }
895
+ });
896
+ var i129TAS = createForm({
897
+ displayName: "I-129 Trade Agreement Supplement",
898
+ roles: {
899
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
900
+ Beneficiary: [GlueRoleType.USERPROFILE],
901
+ Preparer: [GlueRoleType.PREPARERPROFILE]
857
902
  }
858
903
  });
859
- var i129Hs = createForm({
904
+ var i129HS = createForm({
860
905
  displayName: "I-129 with H Supplement-Company Petitioner",
861
906
  roles: {
862
- Petitioner: "CLIENTPROFILE",
863
- Beneficiary: "USERPROFILE",
864
- Preparer: "PREPARERPROFILE"
907
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
908
+ Beneficiary: [GlueRoleType.USERPROFILE],
909
+ Preparer: [GlueRoleType.PREPARERPROFILE]
865
910
  }
866
911
  });
867
912
  var i130 = createForm({
868
913
  displayName: "I-130",
869
914
  roles: {
870
- Petitioner: "USERPROFILE",
871
- Beneficiary: "USERPROFILE",
872
- Preparer: "PREPARERPROFILE"
915
+ Petitioner: [GlueRoleType.USERPROFILE],
916
+ Beneficiary: [GlueRoleType.USERPROFILE],
917
+ Preparer: [GlueRoleType.PREPARERPROFILE]
873
918
  }
874
919
  });
875
- var i130a = createForm({
920
+ var i130A = createForm({
876
921
  displayName: "I-130A",
877
922
  roles: {
878
- Beneficiary: "USERPROFILE",
879
- Preparer: "PREPARERPROFILE"
923
+ Beneficiary: [GlueRoleType.USERPROFILE],
924
+ Preparer: [GlueRoleType.PREPARERPROFILE]
880
925
  }
881
926
  });
882
927
  var i131 = createForm({
883
928
  displayName: "I-131",
884
929
  roles: {
885
- Beneficiary: "USERPROFILE",
886
- Preparer: "PREPARERPROFILE"
930
+ Beneficiary: [GlueRoleType.USERPROFILE],
931
+ Preparer: [GlueRoleType.PREPARERPROFILE]
932
+ }
933
+ });
934
+ var i134 = createForm({
935
+ displayName: "I-134",
936
+ roles: {
937
+ Beneficiary: [GlueRoleType.USERPROFILE],
938
+ Petitioner: [GlueRoleType.USERPROFILE],
939
+ Preparer: [GlueRoleType.PREPARERPROFILE]
940
+ }
941
+ });
942
+ var i192 = createForm({
943
+ displayName: "I-192",
944
+ roles: {
945
+ Beneficiary: [GlueRoleType.USERPROFILE],
946
+ Preparer: [GlueRoleType.PREPARERPROFILE]
887
947
  }
888
948
  });
889
949
  var i485 = createForm({
890
950
  displayName: "I-485",
891
951
  roles: {
892
- Beneficiary: "USERPROFILE",
893
- Preparer: "PREPARERPROFILE"
952
+ Beneficiary: [GlueRoleType.USERPROFILE],
953
+ Preparer: [GlueRoleType.PREPARERPROFILE]
894
954
  }
895
955
  });
896
- var i485a = createForm({
956
+ var i485A = createForm({
897
957
  displayName: "I-485A",
898
958
  roles: {
899
- Beneficiary: "USERPROFILE",
900
- Preparer: "PREPARERPROFILE"
959
+ Beneficiary: [GlueRoleType.USERPROFILE],
960
+ Preparer: [GlueRoleType.PREPARERPROFILE]
961
+ }
962
+ });
963
+ var i508 = createForm({
964
+ displayName: "I-508",
965
+ roles: {
966
+ Beneficiary: [GlueRoleType.USERPROFILE],
967
+ Preparer: [GlueRoleType.PREPARERPROFILE]
968
+ }
969
+ });
970
+ var i539 = createForm({
971
+ displayName: "I-539",
972
+ roles: {
973
+ Beneficiary: [GlueRoleType.USERPROFILE],
974
+ Preparer: [GlueRoleType.PREPARERPROFILE]
975
+ }
976
+ });
977
+ var i539A = createForm({
978
+ displayName: "I-539A",
979
+ roles: {
980
+ Beneficiary: [GlueRoleType.USERPROFILE],
981
+ Preparer: [GlueRoleType.PREPARERPROFILE]
982
+ }
983
+ });
984
+ var i589 = createForm({
985
+ displayName: "I-589",
986
+ roles: {
987
+ Beneficiary: [GlueRoleType.USERPROFILE],
988
+ Preparer: [GlueRoleType.PREPARERPROFILE]
989
+ }
990
+ });
991
+ var i601A = createForm({
992
+ displayName: "I-601A",
993
+ roles: {
994
+ Beneficiary: [GlueRoleType.USERPROFILE],
995
+ Preparer: [GlueRoleType.PREPARERPROFILE]
901
996
  }
902
997
  });
903
998
  var i765 = createForm({
904
999
  displayName: "I-765",
905
1000
  roles: {
906
- Beneficiary: "USERPROFILE",
907
- Preparer: "PREPARERPROFILE"
1001
+ Beneficiary: [GlueRoleType.USERPROFILE],
1002
+ Preparer: [GlueRoleType.PREPARERPROFILE]
908
1003
  }
909
1004
  });
910
1005
  var i864 = createForm({
911
1006
  displayName: "I-864",
912
1007
  roles: {
913
- Petitioner: "USERPROFILE",
914
- Beneficiary: "USERPROFILE",
915
- Preparer: "PREPARERPROFILE"
1008
+ Petitioner: [GlueRoleType.USERPROFILE],
1009
+ Beneficiary: [GlueRoleType.USERPROFILE],
1010
+ Preparer: [GlueRoleType.PREPARERPROFILE]
916
1011
  }
917
1012
  });
918
- var i864a = createForm({
1013
+ var i864A = createForm({
919
1014
  displayName: "I-864A",
920
1015
  roles: {
921
- Petitioner: "USERPROFILE",
922
- Beneficiary: "USERPROFILE",
923
- Preparer: "PREPARERPROFILE"
1016
+ Petitioner: [GlueRoleType.USERPROFILE],
1017
+ Beneficiary: [GlueRoleType.USERPROFILE],
1018
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1019
+ }
1020
+ });
1021
+ var i864EZ = createForm({
1022
+ displayName: "I-864EZ",
1023
+ roles: {
1024
+ Petitioner: [GlueRoleType.USERPROFILE],
1025
+ Beneficiary: [GlueRoleType.USERPROFILE],
1026
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1027
+ }
1028
+ });
1029
+ var i864W = createForm({
1030
+ displayName: "I-864W",
1031
+ roles: {
1032
+ Beneficiary: [GlueRoleType.USERPROFILE],
1033
+ Preparer: [GlueRoleType.PREPARERPROFILE]
924
1034
  }
925
1035
  });
926
1036
  var i907 = createForm({
927
1037
  displayName: "I-907",
928
1038
  roles: {
929
- Petitioner: "CLIENTPROFILE",
930
- Beneficiary: "USERPROFILE",
931
- Preparer: "PREPARERPROFILE"
1039
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
1040
+ Beneficiary: [GlueRoleType.USERPROFILE],
1041
+ Preparer: [GlueRoleType.PREPARERPROFILE]
932
1042
  }
933
1043
  });
934
1044
  var i918 = createForm({
935
1045
  displayName: "I-918",
936
1046
  roles: {
937
- Beneficiary: "USERPROFILE",
938
- Preparer: "PREPARERPROFILE"
1047
+ Beneficiary: [GlueRoleType.USERPROFILE],
1048
+ Preparer: [GlueRoleType.PREPARERPROFILE]
939
1049
  }
940
1050
  });
941
1051
  var i918A = createForm({
942
1052
  displayName: "I-918A",
943
1053
  roles: {
944
- Petitioner: "USERPROFILE",
945
- Beneficiary: "USERPROFILE",
946
- Preparer: "PREPARERPROFILE"
947
- }
948
- });
949
- var i192 = createForm({
950
- displayName: "I-192",
951
- roles: {
952
- Beneficiary: "USERPROFILE",
953
- Preparer: "PREPARERPROFILE"
1054
+ Petitioner: [GlueRoleType.USERPROFILE],
1055
+ Beneficiary: [GlueRoleType.USERPROFILE],
1056
+ Preparer: [GlueRoleType.PREPARERPROFILE]
954
1057
  }
955
1058
  });
956
1059
  var i918B = createForm({
957
1060
  displayName: "I-918B",
958
1061
  roles: {
959
- Beneficiary: "USERPROFILE"
960
- }
961
- });
962
- var i539 = createForm({
963
- displayName: "I-539",
964
- roles: {
965
- Beneficiary: "USERPROFILE",
966
- Preparer: "PREPARERPROFILE"
1062
+ Beneficiary: [GlueRoleType.USERPROFILE]
967
1063
  }
968
1064
  });
969
1065
  const formRecords = {
970
1066
  g28Company,
971
1067
  g28Person,
1068
+ g639,
972
1069
  g1145,
1070
+ g1450,
973
1071
  i129Attachment,
974
- i129Hs,
1072
+ i129TAS,
1073
+ i129HS,
975
1074
  i130,
976
- i130a,
1075
+ i130A,
977
1076
  i131,
1077
+ i134,
1078
+ i192,
978
1079
  i485,
979
- i485a,
1080
+ i485A,
1081
+ i508,
1082
+ i539,
1083
+ i539A,
1084
+ i589,
1085
+ i601A,
980
1086
  i765,
981
1087
  i864,
982
- i864a,
1088
+ i864A,
1089
+ i864EZ,
1090
+ i864W,
983
1091
  i907,
984
1092
  i918,
985
1093
  i918A,
986
- i192,
987
- i918B,
988
- i539
1094
+ i918B
989
1095
  };
990
1096
  var index$2 = Object.values(formRecords);
991
1097
  const acceptableFormats = [
@@ -2443,4 +2549,4 @@ function __vue2_injectStyles(context) {
2443
2549
  var index = /* @__PURE__ */ function() {
2444
2550
  return __component__.exports;
2445
2551
  }();
2446
- export { AFileUploader, AssigneeTag, index$3 as CaseTemplateSelect, CaseTemplateTypeBadge, NewTask, index$4 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, formRecords, index$2 as forms, getLanguageMessage, refactorParams as refactorTaskTemplateParams, submit as submitTaskTemplate, useCreateTaskTemplate, useMutateTaskTemplate, useSearchTaskConditions, useSearchTaskTemplates };
2552
+ export { AFileUploader, AssigneeTag, index$3 as CaseTemplateSelect, CaseTemplateTypeBadge, GlueRoleType, NewTask, index$4 as ProfileSelect, TagsWithTooltip, index$1 as TaskCart, TaskForm, TaskTable, TaskTemplateFilter, index as TestComponent, formRecords, 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.14.0",
3
+ "version": "0.14.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],