@ailaw/venus 0.13.8 → 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.
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { default as CaseTemplateSelect } from './case-template-select/index.vue'
4
4
  export { default as CaseTemplateTypeBadge } from './case-template-select/components/case-template-type-badge.vue';
5
5
  export { default as getLanguageMessage } from './utils/languages';
6
6
  export { default as forms, formRecords } from './forms';
7
+ export { GlueRoleType } from './types/profile';
7
8
  export { default as AFileUploader } from './a-file-uploader/index.vue';
8
9
  export { default as AssigneeTag } from './assignee-tag/index.vue';
9
10
  export { default as TagsWithTooltip } from './tags-with-tooltip/index.vue';
@@ -1,6 +1,6 @@
1
- import { Profile, RoleType } from '@/types/profile';
1
+ import { GlueRoleType, Profile, RoleType } from '@/types/profile';
2
2
  import { Ref } from 'vue-demi';
3
- export default function useProfiles(keywords: Ref<string>, onlyRole: Ref<RoleType | undefined>, profileIds: Ref<number[] | undefined>, disabledProfile: Ref<Boolean | undefined>): {
3
+ export default function useProfiles(keywords: Ref<string>, onlyRole: Ref<RoleType | undefined>, roleTypes: Ref<GlueRoleType[]>, profileIds: Ref<number[] | undefined>, disabledProfile: Ref<Boolean | undefined>): {
4
4
  profiles: Readonly<Ref<readonly Profile[]>>;
5
5
  loading: Ref<boolean>;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { Profile, RoleType } from '@/types/profile';
2
+ import { GlueRoleType, Profile, RoleType } from '@/types/profile';
3
3
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
4
  profiles: import("@vue/composition-api").ComputedRef<Profile[]>;
5
5
  isModalVisible: import("@vue/composition-api").Ref<boolean>;
@@ -20,6 +20,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
20
20
  onlyRole: {
21
21
  type: PropType<RoleType>;
22
22
  };
23
+ roleTypes: {
24
+ type: PropType<GlueRoleType[]>;
25
+ required: true;
26
+ };
23
27
  preLoaded: {
24
28
  type: PropType<Profile[]>;
25
29
  default: () => never[];
@@ -38,6 +42,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
38
42
  }, {
39
43
  simpleCreate: boolean;
40
44
  creatable: boolean;
45
+ roleTypes: GlueRoleType[];
41
46
  preLoaded: Profile[];
42
47
  disabledProfile: boolean;
43
48
  } & {
@@ -47,6 +52,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
47
52
  }> & Pick<import("vue").VueConstructor<import("vue").default>, "filter" | "extend" | "nextTick" | "set" | "delete" | "directive" | "component" | "use" | "mixin" | "compile" | "observable" | "util" | "config" | "version"> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
48
53
  simpleCreate: boolean;
49
54
  creatable: boolean;
55
+ roleTypes: GlueRoleType[];
50
56
  preLoaded: Profile[];
51
57
  disabledProfile: boolean;
52
58
  } & {
@@ -65,6 +71,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
65
71
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
66
72
  simpleCreate: boolean;
67
73
  creatable: boolean;
74
+ roleTypes: GlueRoleType[];
68
75
  preLoaded: Profile[];
69
76
  disabledProfile: boolean;
70
77
  } & {
@@ -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
  }
@@ -436,7 +438,7 @@ function __vue2_injectStyles$g(context) {
436
438
  var ProfileSelector = /* @__PURE__ */ function() {
437
439
  return __component__$g.exports;
438
440
  }();
439
- function useProfiles(keywords, onlyRole, profileIds, disabledProfile) {
441
+ function useProfiles(keywords, onlyRole, roleTypes, profileIds, disabledProfile) {
440
442
  const me = useMe();
441
443
  const isDisabled = computed(() => {
442
444
  if (disabledProfile.value === true) {
@@ -453,6 +455,7 @@ function useProfiles(keywords, onlyRole, profileIds, disabledProfile) {
453
455
  lawFirmId: (_a = me.value) == null ? void 0 : _a.lawFirmId,
454
456
  keywords: keywords.value,
455
457
  profileType: onlyRole.value,
458
+ profileTypeInt: roleTypes.value,
456
459
  profileIds: profileIds.value,
457
460
  isDisabled: isDisabled.value
458
461
  };
@@ -475,6 +478,10 @@ var __vue2_script$f = defineComponent({
475
478
  onlyRole: {
476
479
  type: String
477
480
  },
481
+ roleTypes: {
482
+ type: Array,
483
+ required: true
484
+ },
478
485
  preLoaded: {
479
486
  type: Array,
480
487
  default: () => []
@@ -494,8 +501,8 @@ var __vue2_script$f = defineComponent({
494
501
  setup(props, { emit }) {
495
502
  const keywords = ref("");
496
503
  const handleSearch = (value) => keywords.value = value;
497
- const { onlyRole, profileIds, disabledProfile } = toRefs(props);
498
- 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);
499
506
  const createdProfile = ref();
500
507
  const profiles = computed(() => {
501
508
  const list = [
@@ -837,216 +844,222 @@ async function getLanguageMessage(lang) {
837
844
  return loaded.get(lang);
838
845
  }
839
846
  const createForm = (form) => form;
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 = {}));
840
853
  var g28Company = createForm({
841
854
  displayName: "G-28-Company",
842
855
  roles: {
843
- Petitioner: "CLIENTPROFILE",
844
- Beneficiary: "USERPROFILE",
845
- Preparer: "PREPARERPROFILE"
856
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
857
+ Beneficiary: [GlueRoleType.USERPROFILE],
858
+ Preparer: [GlueRoleType.PREPARERPROFILE]
846
859
  }
847
860
  });
848
861
  var g28Person = createForm({
849
862
  displayName: "G-28-Person",
850
863
  roles: {
851
- Petitioner: "USERPROFILE",
852
- Beneficiary: "USERPROFILE",
853
- Preparer: "PREPARERPROFILE"
864
+ Petitioner: [GlueRoleType.USERPROFILE],
865
+ Beneficiary: [GlueRoleType.USERPROFILE],
866
+ Preparer: [GlueRoleType.PREPARERPROFILE]
854
867
  }
855
868
  });
856
869
  var g639 = createForm({
857
870
  displayName: "G-639",
858
871
  roles: {
859
- Beneficiary: "USERPROFILE",
860
- Preparer: "PREPARERPROFILE"
872
+ Beneficiary: [GlueRoleType.USERPROFILE],
873
+ Preparer: [GlueRoleType.PREPARERPROFILE]
861
874
  }
862
875
  });
863
876
  var g1145 = createForm({
864
877
  displayName: "G-1145",
865
878
  roles: {
866
- Petitioner: "USERPROFILE",
867
- Beneficiary: "USERPROFILE",
868
- Preparer: "PREPARERPROFILE"
879
+ Petitioner: [GlueRoleType.USERPROFILE],
880
+ Beneficiary: [GlueRoleType.USERPROFILE],
881
+ Preparer: [GlueRoleType.PREPARERPROFILE]
869
882
  }
870
883
  });
871
884
  var g1450 = createForm({
872
885
  displayName: "G-1450",
873
886
  roles: {
874
- Beneficiary: "USERPROFILE"
887
+ Beneficiary: [GlueRoleType.USERPROFILE]
875
888
  }
876
889
  });
877
890
  var i129Attachment = createForm({
878
891
  displayName: "I-129 Attachment",
879
892
  roles: {
880
- Beneficiary: "USERPROFILE"
893
+ Beneficiary: [GlueRoleType.USERPROFILE]
881
894
  }
882
895
  });
883
896
  var i129TAS = createForm({
884
897
  displayName: "I-129 Trade Agreement Supplement",
885
898
  roles: {
886
- Petitioner: "CLIENTPROFILE",
887
- Beneficiary: "USERPROFILE",
888
- Preparer: "PREPARERPROFILE"
899
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
900
+ Beneficiary: [GlueRoleType.USERPROFILE],
901
+ Preparer: [GlueRoleType.PREPARERPROFILE]
889
902
  }
890
903
  });
891
904
  var i129HS = createForm({
892
905
  displayName: "I-129 with H Supplement-Company Petitioner",
893
906
  roles: {
894
- Petitioner: "CLIENTPROFILE",
895
- Beneficiary: "USERPROFILE",
896
- Preparer: "PREPARERPROFILE"
907
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
908
+ Beneficiary: [GlueRoleType.USERPROFILE],
909
+ Preparer: [GlueRoleType.PREPARERPROFILE]
897
910
  }
898
911
  });
899
912
  var i130 = createForm({
900
913
  displayName: "I-130",
901
914
  roles: {
902
- Petitioner: "USERPROFILE",
903
- Beneficiary: "USERPROFILE",
904
- Preparer: "PREPARERPROFILE"
915
+ Petitioner: [GlueRoleType.USERPROFILE],
916
+ Beneficiary: [GlueRoleType.USERPROFILE],
917
+ Preparer: [GlueRoleType.PREPARERPROFILE]
905
918
  }
906
919
  });
907
920
  var i130A = createForm({
908
921
  displayName: "I-130A",
909
922
  roles: {
910
- Beneficiary: "USERPROFILE",
911
- Preparer: "PREPARERPROFILE"
923
+ Beneficiary: [GlueRoleType.USERPROFILE],
924
+ Preparer: [GlueRoleType.PREPARERPROFILE]
912
925
  }
913
926
  });
914
927
  var i131 = createForm({
915
928
  displayName: "I-131",
916
929
  roles: {
917
- Beneficiary: "USERPROFILE",
918
- Preparer: "PREPARERPROFILE"
930
+ Beneficiary: [GlueRoleType.USERPROFILE],
931
+ Preparer: [GlueRoleType.PREPARERPROFILE]
919
932
  }
920
933
  });
921
934
  var i134 = createForm({
922
935
  displayName: "I-134",
923
936
  roles: {
924
- Beneficiary: "USERPROFILE",
925
- Petitioner: "USERPROFILE",
926
- Preparer: "PREPARERPROFILE"
937
+ Beneficiary: [GlueRoleType.USERPROFILE],
938
+ Petitioner: [GlueRoleType.USERPROFILE],
939
+ Preparer: [GlueRoleType.PREPARERPROFILE]
927
940
  }
928
941
  });
929
942
  var i192 = createForm({
930
943
  displayName: "I-192",
931
944
  roles: {
932
- Beneficiary: "USERPROFILE",
933
- Preparer: "PREPARERPROFILE"
945
+ Beneficiary: [GlueRoleType.USERPROFILE],
946
+ Preparer: [GlueRoleType.PREPARERPROFILE]
934
947
  }
935
948
  });
936
949
  var i485 = createForm({
937
950
  displayName: "I-485",
938
951
  roles: {
939
- Beneficiary: "USERPROFILE",
940
- Preparer: "PREPARERPROFILE"
952
+ Beneficiary: [GlueRoleType.USERPROFILE],
953
+ Preparer: [GlueRoleType.PREPARERPROFILE]
941
954
  }
942
955
  });
943
956
  var i485A = createForm({
944
957
  displayName: "I-485A",
945
958
  roles: {
946
- Beneficiary: "USERPROFILE",
947
- Preparer: "PREPARERPROFILE"
959
+ Beneficiary: [GlueRoleType.USERPROFILE],
960
+ Preparer: [GlueRoleType.PREPARERPROFILE]
948
961
  }
949
962
  });
950
963
  var i508 = createForm({
951
964
  displayName: "I-508",
952
965
  roles: {
953
- Beneficiary: "USERPROFILE",
954
- Preparer: "PREPARERPROFILE"
966
+ Beneficiary: [GlueRoleType.USERPROFILE],
967
+ Preparer: [GlueRoleType.PREPARERPROFILE]
955
968
  }
956
969
  });
957
970
  var i539 = createForm({
958
971
  displayName: "I-539",
959
972
  roles: {
960
- Beneficiary: "USERPROFILE",
961
- Preparer: "PREPARERPROFILE"
973
+ Beneficiary: [GlueRoleType.USERPROFILE],
974
+ Preparer: [GlueRoleType.PREPARERPROFILE]
962
975
  }
963
976
  });
964
977
  var i539A = createForm({
965
978
  displayName: "I-539A",
966
979
  roles: {
967
- Beneficiary: "USERPROFILE",
968
- Preparer: "PREPARERPROFILE"
980
+ Beneficiary: [GlueRoleType.USERPROFILE],
981
+ Preparer: [GlueRoleType.PREPARERPROFILE]
969
982
  }
970
983
  });
971
984
  var i589 = createForm({
972
985
  displayName: "I-589",
973
986
  roles: {
974
- Beneficiary: "USERPROFILE",
975
- Preparer: "PREPARERPROFILE"
987
+ Beneficiary: [GlueRoleType.USERPROFILE],
988
+ Preparer: [GlueRoleType.PREPARERPROFILE]
976
989
  }
977
990
  });
978
991
  var i601A = createForm({
979
992
  displayName: "I-601A",
980
993
  roles: {
981
- Beneficiary: "USERPROFILE",
982
- Preparer: "PREPARERPROFILE"
994
+ Beneficiary: [GlueRoleType.USERPROFILE],
995
+ Preparer: [GlueRoleType.PREPARERPROFILE]
983
996
  }
984
997
  });
985
998
  var i765 = createForm({
986
999
  displayName: "I-765",
987
1000
  roles: {
988
- Beneficiary: "USERPROFILE",
989
- Preparer: "PREPARERPROFILE"
1001
+ Beneficiary: [GlueRoleType.USERPROFILE],
1002
+ Preparer: [GlueRoleType.PREPARERPROFILE]
990
1003
  }
991
1004
  });
992
1005
  var i864 = createForm({
993
1006
  displayName: "I-864",
994
1007
  roles: {
995
- Petitioner: "USERPROFILE",
996
- Beneficiary: "USERPROFILE",
997
- Preparer: "PREPARERPROFILE"
1008
+ Petitioner: [GlueRoleType.USERPROFILE],
1009
+ Beneficiary: [GlueRoleType.USERPROFILE],
1010
+ Preparer: [GlueRoleType.PREPARERPROFILE]
998
1011
  }
999
1012
  });
1000
1013
  var i864A = createForm({
1001
1014
  displayName: "I-864A",
1002
1015
  roles: {
1003
- Petitioner: "USERPROFILE",
1004
- Beneficiary: "USERPROFILE",
1005
- Preparer: "PREPARERPROFILE"
1016
+ Petitioner: [GlueRoleType.USERPROFILE],
1017
+ Beneficiary: [GlueRoleType.USERPROFILE],
1018
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1006
1019
  }
1007
1020
  });
1008
1021
  var i864EZ = createForm({
1009
1022
  displayName: "I-864EZ",
1010
1023
  roles: {
1011
- Petitioner: "USERPROFILE",
1012
- Beneficiary: "USERPROFILE",
1013
- Preparer: "PREPARERPROFILE"
1024
+ Petitioner: [GlueRoleType.USERPROFILE],
1025
+ Beneficiary: [GlueRoleType.USERPROFILE],
1026
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1014
1027
  }
1015
1028
  });
1016
1029
  var i864W = createForm({
1017
1030
  displayName: "I-864W",
1018
1031
  roles: {
1019
- Beneficiary: "USERPROFILE",
1020
- Preparer: "PREPARERPROFILE"
1032
+ Beneficiary: [GlueRoleType.USERPROFILE],
1033
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1021
1034
  }
1022
1035
  });
1023
1036
  var i907 = createForm({
1024
1037
  displayName: "I-907",
1025
1038
  roles: {
1026
- Petitioner: "CLIENTPROFILE",
1027
- Beneficiary: "USERPROFILE",
1028
- Preparer: "PREPARERPROFILE"
1039
+ Petitioner: [GlueRoleType.CLIENTPROFILE],
1040
+ Beneficiary: [GlueRoleType.USERPROFILE],
1041
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1029
1042
  }
1030
1043
  });
1031
1044
  var i918 = createForm({
1032
1045
  displayName: "I-918",
1033
1046
  roles: {
1034
- Beneficiary: "USERPROFILE",
1035
- Preparer: "PREPARERPROFILE"
1047
+ Beneficiary: [GlueRoleType.USERPROFILE],
1048
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1036
1049
  }
1037
1050
  });
1038
1051
  var i918A = createForm({
1039
1052
  displayName: "I-918A",
1040
1053
  roles: {
1041
- Petitioner: "USERPROFILE",
1042
- Beneficiary: "USERPROFILE",
1043
- Preparer: "PREPARERPROFILE"
1054
+ Petitioner: [GlueRoleType.USERPROFILE],
1055
+ Beneficiary: [GlueRoleType.USERPROFILE],
1056
+ Preparer: [GlueRoleType.PREPARERPROFILE]
1044
1057
  }
1045
1058
  });
1046
1059
  var i918B = createForm({
1047
1060
  displayName: "I-918B",
1048
1061
  roles: {
1049
- Beneficiary: "USERPROFILE"
1062
+ Beneficiary: [GlueRoleType.USERPROFILE]
1050
1063
  }
1051
1064
  });
1052
1065
  const formRecords = {
@@ -2536,4 +2549,4 @@ function __vue2_injectStyles(context) {
2536
2549
  var index = /* @__PURE__ */ function() {
2537
2550
  return __component__.exports;
2538
2551
  }();
2539
- 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.13.8",
3
+ "version": "0.14.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],