@jari-ace/element-plus-component 0.3.2 → 0.3.3
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/components/autoComplete/JaAutoComplete.vue.d.ts +956 -1179
- package/dist/components/autoComplete/JaAutoComplete.vue.d.ts.map +1 -1
- package/dist/components/button/JaButton.vue.d.ts +114 -450
- package/dist/components/button/JaButton.vue.d.ts.map +1 -1
- package/dist/components/checkbox/JaCheckbox.vue.d.ts +228 -150
- package/dist/components/checkbox/JaCheckbox.vue.d.ts.map +1 -1
- package/dist/components/checkboxGroup/JaCheckboxGroup.vue.d.ts +215 -137
- package/dist/components/checkboxGroup/JaCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/dropdownButton/JaDropdownButton.vue.d.ts +700 -1596
- package/dist/components/dropdownButton/JaDropdownButton.vue.d.ts.map +1 -1
- package/dist/components/form/JaForm.vue.d.ts +1 -1
- package/dist/components/formItem/JaFormItem.vue.d.ts +83 -293
- package/dist/components/formItem/JaFormItem.vue.d.ts.map +1 -1
- package/dist/components/input/JaInput.vue.d.ts +244 -609
- package/dist/components/input/JaInput.vue.d.ts.map +1 -1
- package/dist/components/inputI18n/I18nBundleEditor.vue.d.ts +1 -1
- package/dist/components/inputI18n/I18nBundleEditor.vue.d.ts.map +1 -1
- package/dist/components/inputI18n/I18nBundleEditor.vue.js +1 -1
- package/dist/components/inputI18n/I18nBundleEditor.vue.js.map +1 -1
- package/dist/components/inputI18n/InputI18n.vue.d.ts.map +1 -1
- package/dist/components/inputI18n/InputI18n.vue.js +14 -5
- package/dist/components/inputI18n/InputI18n.vue.js.map +1 -1
- package/dist/components/inputNumber/JaInputNumber.vue.d.ts +117 -471
- package/dist/components/inputNumber/JaInputNumber.vue.d.ts.map +1 -1
- package/dist/components/inputNumber/JaInputNumber.vue.js +4 -1
- package/dist/components/inputNumber/JaInputNumber.vue.js.map +1 -1
- package/dist/components/properyPicker/PropertyPicker.vue.d.ts.map +1 -1
- package/dist/components/properyPicker/PropertyPicker.vue.js +4 -8
- package/dist/components/properyPicker/PropertyPicker.vue.js.map +1 -1
- package/dist/components/radioGroup/JaRadioGroup.vue.d.ts +96 -287
- package/dist/components/radioGroup/JaRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/rolePicker/RoleCategorySelector.vue.d.ts +14 -0
- package/dist/components/rolePicker/RoleCategorySelector.vue.d.ts.map +1 -0
- package/dist/components/rolePicker/RoleCategorySelector.vue.js +410 -0
- package/dist/components/rolePicker/RoleCategorySelector.vue.js.map +1 -0
- package/dist/components/rolePicker/RoleEditor.vue.d.ts +1 -0
- package/dist/components/rolePicker/RoleEditor.vue.d.ts.map +1 -1
- package/dist/components/rolePicker/RoleEditor.vue.js +64 -31
- package/dist/components/rolePicker/RoleEditor.vue.js.map +1 -1
- package/dist/components/rolePicker/baseRolePicker.vue.d.ts.map +1 -1
- package/dist/components/rolePicker/baseRolePicker.vue.js +7 -9
- package/dist/components/rolePicker/baseRolePicker.vue.js.map +1 -1
- package/dist/components/rolePicker/index.d.ts +2 -0
- package/dist/components/rolePicker/index.d.ts.map +1 -1
- package/dist/components/rolePicker/index.js +2 -0
- package/dist/components/rolePicker/index.js.map +1 -1
- package/dist/components/scrollbar/Scrollbar.vue.d.ts +110 -378
- package/dist/components/scrollbar/Scrollbar.vue.d.ts.map +1 -1
- package/dist/components/switch/JaSwitch.vue.d.ts +96 -431
- package/dist/components/switch/JaSwitch.vue.d.ts.map +1 -1
- package/dist/components/upload/JaUploader.vue.d.ts +50 -6
- package/dist/components/upload/JaUploader.vue.d.ts.map +1 -1
- package/dist/components/upload/index.d.ts +76 -9
- package/dist/components/upload/index.d.ts.map +1 -1
- package/dist/components/upload/index.js +1 -0
- package/dist/components/upload/index.js.map +1 -1
- package/dist/components/upload/types.d.ts +3 -0
- package/dist/components/upload/types.d.ts.map +1 -0
- package/dist/components/upload/types.js +2 -0
- package/dist/components/upload/types.js.map +1 -0
- package/dist/components/upload/uploader.vue.d.ts +26 -3
- package/dist/components/upload/uploader.vue.d.ts.map +1 -1
- package/dist/components/upload/uploader.vue.js +28 -11
- package/dist/components/upload/uploader.vue.js.map +1 -1
- package/dist/components/userGroupTree/src/userGroupTree.vue.d.ts +1808 -0
- package/dist/components/userGroupTree/src/userGroupTree.vue.d.ts.map +1 -0
- package/dist/components/userGroupTree/src/userGroupTree.vue.js +23 -14
- package/dist/components/userGroupTree/src/userGroupTree.vue.js.map +1 -1
- package/dist/components/userSelectDialog/src/userSelectDialog.vue.d.ts.map +1 -1
- package/dist/components/userSelectDialog/src/userSelectDialog.vue.js +2 -0
- package/dist/components/userSelectDialog/src/userSelectDialog.vue.js.map +1 -1
- package/dist/hooks/useAppInstances.d.ts +17 -4
- package/dist/hooks/useAppInstances.d.ts.map +1 -1
- package/dist/hooks/useAppInstances.js +109 -24
- package/dist/hooks/useAppInstances.js.map +1 -1
- package/dist/hooks/useClassificationLevels.d.ts.map +1 -1
- package/dist/hooks/useClassificationLevels.js +30 -7
- package/dist/hooks/useClassificationLevels.js.map +1 -1
- package/dist/hooks/useConstraintProviders.d.ts +5 -0
- package/dist/hooks/useConstraintProviders.d.ts.map +1 -0
- package/dist/hooks/useConstraintProviders.js +31 -0
- package/dist/hooks/useConstraintProviders.js.map +1 -0
- package/dist/hooks/useEntities.d.ts +9 -0
- package/dist/hooks/useEntities.d.ts.map +1 -0
- package/dist/hooks/useEntities.js +40 -0
- package/dist/hooks/useEntities.js.map +1 -0
- package/dist/hooks/useEntityPropDataTypes.d.ts +5 -0
- package/dist/hooks/useEntityPropDataTypes.d.ts.map +1 -0
- package/dist/hooks/useEntityPropDataTypes.js +31 -0
- package/dist/hooks/useEntityPropDataTypes.js.map +1 -0
- package/dist/hooks/useFileConfigurations.d.ts +6 -0
- package/dist/hooks/useFileConfigurations.d.ts.map +1 -0
- package/dist/hooks/useFileConfigurations.js +37 -0
- package/dist/hooks/useFileConfigurations.js.map +1 -0
- package/dist/hooks/useGroups.d.ts +7 -0
- package/dist/hooks/useGroups.d.ts.map +1 -0
- package/dist/hooks/useGroups.js +75 -0
- package/dist/hooks/useGroups.js.map +1 -0
- package/dist/hooks/useNumberTemplates.d.ts +6 -0
- package/dist/hooks/useNumberTemplates.d.ts.map +1 -0
- package/dist/hooks/useNumberTemplates.js +37 -0
- package/dist/hooks/useNumberTemplates.js.map +1 -0
- package/dist/hooks/useProperties.d.ts +9 -0
- package/dist/hooks/useProperties.d.ts.map +1 -0
- package/dist/hooks/useProperties.js +40 -0
- package/dist/hooks/useProperties.js.map +1 -0
- package/dist/hooks/useRoleCategories.d.ts +6 -0
- package/dist/hooks/useRoleCategories.d.ts.map +1 -0
- package/dist/hooks/useRoleCategories.js +37 -0
- package/dist/hooks/useRoleCategories.js.map +1 -0
- package/dist/hooks/useRoles.d.ts +6 -0
- package/dist/hooks/useRoles.d.ts.map +1 -0
- package/dist/hooks/useRoles.js +38 -0
- package/dist/hooks/useRoles.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.js +9264 -8794
- package/lib/index.umd.cjs +34 -34
- package/package.json +7 -7
- package/packages/components/input/JaInput.vue +1 -1
- package/packages/components/inputI18n/I18nBundleEditor.vue +2 -2
- package/packages/components/inputI18n/InputI18n.vue +33 -25
- package/packages/components/inputNumber/JaInputNumber.vue +6 -5
- package/packages/components/properyPicker/PropertyPicker.vue +4 -8
- package/packages/components/rolePicker/RoleCategorySelector.vue +154 -0
- package/packages/components/rolePicker/RoleEditor.vue +16 -7
- package/packages/components/rolePicker/baseRolePicker.vue +6 -13
- package/packages/components/rolePicker/index.ts +3 -0
- package/packages/components/upload/index.ts +1 -0
- package/packages/components/upload/types.ts +4 -0
- package/packages/components/upload/uploader.vue +456 -381
- package/packages/components/userGroupTree/src/userGroupTree.vue +54 -17
- package/packages/components/userSelectDialog/src/userSelectDialog.vue +1 -1
- package/packages/hooks/useAppInstances.ts +121 -25
- package/packages/hooks/useClassificationLevels.ts +31 -7
- package/packages/hooks/useConstraintProviders.ts +36 -0
- package/packages/hooks/useEntities.ts +44 -0
- package/packages/hooks/useEntityPropDataTypes.ts +37 -0
- package/packages/hooks/useFileConfigurations.ts +41 -0
- package/packages/hooks/useGroups.ts +81 -0
- package/packages/hooks/useNumberTemplates.ts +43 -0
- package/packages/hooks/useProperties.ts +44 -0
- package/packages/hooks/useRoleCategories.ts +42 -0
- package/packages/hooks/useRoles.ts +44 -0
- package/packages/index.ts +9 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAxiosWithoutCache, type ProjectedPropertyDefinition, useEntityApi
|
|
3
|
+
} from "@jari-ace/app-bolts";
|
|
4
|
+
|
|
5
|
+
const cache: Map<string, ProjectedPropertyDefinition[] | undefined> = new Map()
|
|
6
|
+
let loadingPromises: Map<string, Promise<ProjectedPropertyDefinition[]>> = new Map()
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 属性定义信息加载Hooks
|
|
10
|
+
*/
|
|
11
|
+
export function useProperties() {
|
|
12
|
+
return {
|
|
13
|
+
refreshProperties(entityId: string) {
|
|
14
|
+
cache.delete(entityId)
|
|
15
|
+
},
|
|
16
|
+
async getProperties(entityId: string) {
|
|
17
|
+
let properties = cache.get(entityId);
|
|
18
|
+
if (properties) {
|
|
19
|
+
return properties;
|
|
20
|
+
}
|
|
21
|
+
let loadingPromise = loadingPromises.get(entityId);
|
|
22
|
+
if (loadingPromise) {
|
|
23
|
+
return await loadingPromise
|
|
24
|
+
}
|
|
25
|
+
// 3. 没有缓存,也没有正在进行的请求,创建新请求
|
|
26
|
+
const axios = createAxiosWithoutCache();
|
|
27
|
+
const api = useEntityApi(axios);
|
|
28
|
+
|
|
29
|
+
// 创建 Promise
|
|
30
|
+
loadingPromise = api.getProperties(entityId)
|
|
31
|
+
.then(result => {
|
|
32
|
+
cache.set(entityId, result);
|
|
33
|
+
return result;
|
|
34
|
+
})
|
|
35
|
+
.finally(() => {
|
|
36
|
+
loadingPromises.delete(entityId);
|
|
37
|
+
});
|
|
38
|
+
// 4. 将新创建的 Promise 存入 Map
|
|
39
|
+
loadingPromises.set(entityId, loadingPromise);
|
|
40
|
+
// 5. 等待这个新的 Promise 完成并返回
|
|
41
|
+
return await loadingPromise;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAxiosWithoutCache, type ProjectedFileConfiguration,
|
|
3
|
+
type RoleCategory, useFileConfigurationApi, useRoleCategoryApi,
|
|
4
|
+
} from "@jari-ace/app-bolts";
|
|
5
|
+
|
|
6
|
+
const cache: Map<string, RoleCategory[] | undefined> = new Map()
|
|
7
|
+
let loadingPromises: Map<string, Promise<RoleCategory[]>> = new Map()
|
|
8
|
+
|
|
9
|
+
export function useRoleCategories() {
|
|
10
|
+
return {
|
|
11
|
+
refreshRoleCategoryCache(appId: string) {
|
|
12
|
+
cache.delete(appId)
|
|
13
|
+
},
|
|
14
|
+
async getRoleCategories(appId: string) {
|
|
15
|
+
let roles = cache.get(appId);
|
|
16
|
+
if (roles) {
|
|
17
|
+
return roles;
|
|
18
|
+
}
|
|
19
|
+
let loadingPromise = loadingPromises.get(appId);
|
|
20
|
+
if (loadingPromise) {
|
|
21
|
+
return await loadingPromise
|
|
22
|
+
}
|
|
23
|
+
// 3. 没有缓存,也没有正在进行的请求,创建新请求
|
|
24
|
+
const axios = createAxiosWithoutCache();
|
|
25
|
+
const api = useRoleCategoryApi(axios);
|
|
26
|
+
|
|
27
|
+
// 创建 Promise
|
|
28
|
+
loadingPromise = api.getAllRole(appId)
|
|
29
|
+
.then(result => {
|
|
30
|
+
cache.set(appId, result);
|
|
31
|
+
return result;
|
|
32
|
+
})
|
|
33
|
+
.finally(() => {
|
|
34
|
+
loadingPromises.delete(appId);
|
|
35
|
+
});
|
|
36
|
+
// 4. 将新创建的 Promise 存入 Map
|
|
37
|
+
loadingPromises.set(appId, loadingPromise);
|
|
38
|
+
// 5. 等待这个新的 Promise 完成并返回
|
|
39
|
+
return await loadingPromise;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAxiosWithoutCache,
|
|
3
|
+
type ProjectedRole,
|
|
4
|
+
useRoleApi
|
|
5
|
+
} from "@jari-ace/app-bolts";
|
|
6
|
+
|
|
7
|
+
const rolesCache: Map<string, ProjectedRole[] | undefined> = new Map()
|
|
8
|
+
let loadingPromises: Map<string, Promise<ProjectedRole[]>> = new Map()
|
|
9
|
+
|
|
10
|
+
export function useRoles() {
|
|
11
|
+
return {
|
|
12
|
+
refreshRolesCache(appId: string) {
|
|
13
|
+
rolesCache.delete(appId)
|
|
14
|
+
console.log('roles cache cleared for app:', appId, rolesCache.get(appId))
|
|
15
|
+
},
|
|
16
|
+
async getRoles(appId: string) {
|
|
17
|
+
let roles = rolesCache.get(appId);
|
|
18
|
+
if (roles) {
|
|
19
|
+
return roles;
|
|
20
|
+
}
|
|
21
|
+
let loadingPromise = loadingPromises.get(appId);
|
|
22
|
+
if (loadingPromise) {
|
|
23
|
+
return await loadingPromise
|
|
24
|
+
}
|
|
25
|
+
// 3. 没有缓存,也没有正在进行的请求,创建新请求
|
|
26
|
+
const axios = createAxiosWithoutCache();
|
|
27
|
+
const api = useRoleApi(axios);
|
|
28
|
+
|
|
29
|
+
// 创建 Promise
|
|
30
|
+
loadingPromise = api.getAllRole(appId)
|
|
31
|
+
.then(result => {
|
|
32
|
+
rolesCache.set(appId, result);
|
|
33
|
+
return result;
|
|
34
|
+
})
|
|
35
|
+
.finally(() => {
|
|
36
|
+
loadingPromises.delete(appId);
|
|
37
|
+
});
|
|
38
|
+
// 4. 将新创建的 Promise 存入 Map
|
|
39
|
+
loadingPromises.set(appId, loadingPromise);
|
|
40
|
+
// 5. 等待这个新的 Promise 完成并返回
|
|
41
|
+
return await loadingPromise;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/packages/index.ts
CHANGED
|
@@ -22,3 +22,12 @@ export * from "./hooks/useBridage"
|
|
|
22
22
|
export * from "./hooks/useRealms"
|
|
23
23
|
export * from "./hooks/useUserRefQuery"
|
|
24
24
|
export * from "./hooks/useClassificationLevels"
|
|
25
|
+
export * from "./hooks/useRoles"
|
|
26
|
+
export * from "./hooks/useEntityPropDataTypes"
|
|
27
|
+
export * from "./hooks/useConstraintProviders"
|
|
28
|
+
export * from "./hooks/useFileConfigurations"
|
|
29
|
+
export * from "./hooks/useNumberTemplates"
|
|
30
|
+
export * from "./hooks/useEntities"
|
|
31
|
+
export * from "./hooks/useGroups"
|
|
32
|
+
export * from "./hooks/useRoleCategories"
|
|
33
|
+
export * from "./hooks/useProperties"
|