boke-devops 0.0.30 → 0.0.38
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +14 -11
- package/packages/boke-devops-vue/package-lock.json +15276 -3531
- package/packages/boke-devops-vue/package.json +60 -58
- package/packages/boke-devops-vue/src/Provider/Provider.vue +6 -0
- package/packages/boke-devops-vue/src/Provider/store.ts +7 -2
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/__tests__/__snapshots__/Avatar.test.js.snap +63 -60
- package/packages/boke-devops-vue/src/{AegisUser/store.ts → UserAvatar/avatar.store.ts} +10 -1
- package/packages/boke-devops-vue/src/UserAvatar/user-avatar-card.vue +188 -0
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/user-avatar-group.vue +2 -2
- package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/user-avatar.vue +79 -68
- package/packages/boke-devops-vue/src/{AegisUser → UserSelect}/multiple-user-select.vue +13 -22
- package/packages/boke-devops-vue/src/index.ts +22 -22
- package/packages/boke-devops-vue/src/utils/encode.ts +132 -0
- package/packages/boke-devops-vue/types/Provider/store.d.ts +4 -0
- package/packages/boke-devops-vue/types/UserAvatar/avatar.store.d.ts +9 -0
- package/packages/boke-devops-vue/types/UserAvatar/encode.d.ts +1 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar-card.vue.d.ts +24 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar-group.vue.d.ts +44 -0
- package/packages/boke-devops-vue/types/UserAvatar/user-avatar.vue.d.ts +207 -0
- package/packages/boke-devops-vue/types/UserSelect/multiple-user-select.vue.d.ts +106 -0
- package/packages/boke-devops-vue/types/index.d.ts +10 -8
- package/packages/boke-devops-vue/vite.config.ts +29 -29
- package/packages/boke-docs/.dumirc.ts +3 -2
- package/packages/boke-docs/docs/components/Avatar/__test__/__snapshots__/user_avatar.test.js.snap +255 -0
- package/packages/boke-docs/docs/components/Avatar/__test__/user_avatar.test.js +18 -0
- package/packages/boke-docs/docs/components/Avatar/demo/normal.vue +1 -0
- package/packages/boke-docs/docs/components/Avatar/index.md +18 -0
- package/packages/boke-docs/docs/components/AvatarGroup/__test__/__snapshots__/user_avatar.test.js.snap +174 -0
- package/packages/boke-docs/docs/components/AvatarGroup/__test__/user_avatar.test.js +18 -0
- package/packages/boke-docs/docs/components/AvatarGroup/demo/normal.vue +36 -0
- package/packages/boke-docs/docs/components/AvatarGroup/demo/with_provider.vue +59 -0
- package/packages/boke-docs/docs/components/AvatarGroup/index.md +28 -0
- package/packages/boke-docs/docs/components/UserSelect/__test__/__snapshots__/user_select.test.js.snap +347 -0
- package/packages/boke-docs/docs/components/UserSelect/__test__/user_select.test.js +18 -0
- package/packages/boke-docs/docs/components/UserSelect/demo/normal.vue +14 -0
- package/packages/boke-docs/docs/components/UserSelect/index.md +29 -2
- package/packages/boke-docs/node_modules/.cache/logger/umi.log +14 -0
- package/packages/boke-docs/package.json +1 -1
- package/packages/boke-docs/public/logo.png +0 -0
- package/packages/boke-js-bridge/package.json +2 -2
- package/test-setup-env.js +52 -0
- package/vitest.config.js +6 -1
- package/packages/boke-devops-vue/demo/App.vue +0 -62
- package/packages/boke-devops-vue/demo/main.ts +0 -7
- /package/packages/boke-devops-vue/src/{AegisUser → UserAvatar}/__tests__/Avatar.test.js +0 -0
- /package/packages/boke-devops-vue/src/{style/variables.less → utils/style.global.less} +0 -0
@@ -1,49 +1,56 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
<a-popover placement="bottomLeft" v-model:open="popoverVisible" :arrow="false" :mouseEnterDelay="0.1"
|
3
|
+
:mouseLeaveDelay="0.3" transitionName="ant-zoom-big"
|
4
|
+
:trigger="props.disabledPopover || props.disabled || global_disabled_avatar_card ? 'contextmenu' : 'hover'"
|
5
|
+
:overlayStyle="{ zIndex: '9999', }">
|
6
|
+
<template #content>
|
7
|
+
<userAvatarCard :userinfo="{ user_name, dept_name, user_id, user_icon }" @pinCard="popoverVisible = true">
|
8
|
+
</userAvatarCard>
|
9
|
+
</template>
|
10
|
+
<div style="display:inline-flex" ref="avatarRef">
|
11
|
+
<ATag class="boke-useravator-wrapper" :class="{
|
12
|
+
'wrapper-only-name': props.onlyName,
|
13
|
+
is_tag: props.tag && !props.color,
|
14
|
+
is_highlight: isHigh(),
|
15
|
+
disabled: props.disabled,
|
16
|
+
'only-icon-style': props.onlyIcon
|
17
|
+
}" :style="{ padding: '2px', paddingRight: '12px', borderRadius: '50px' }" v-bind="attrs" v-if="data"
|
18
|
+
:color="props.color || 'default'" :title="data?.[DEPT_KEY]">
|
19
|
+
<div class="left-icon" ref="targetRef">
|
20
|
+
<AAvatar v-if="!props.onlyName" :src="user_icon" :class="'avator-icon'" :size="props.size"></AAvatar>
|
21
|
+
<span v-else>
|
22
|
+
<span v-if="props.linkType == 'text'">
|
23
|
+
{{ user_name }}
|
24
|
+
</span>
|
25
|
+
<el-link v-else :type="props.linkType" :underline="false">
|
26
|
+
{{ user_name }}
|
27
|
+
</el-link>
|
18
28
|
</span>
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</
|
33
|
-
<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
<
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<slot name="default" :scoped="data"></slot>
|
45
|
-
</ATag>
|
46
|
-
</div>
|
29
|
+
</div>
|
30
|
+
<slot name="prefix"></slot>
|
31
|
+
<div class="label" v-if="!props.onlyIcon && !props.onlyName">
|
32
|
+
<span class="realname">
|
33
|
+
{{
|
34
|
+
isLoading
|
35
|
+
? "加载中..."
|
36
|
+
: user_name
|
37
|
+
}}
|
38
|
+
</span>
|
39
|
+
<span class="id" v-if="!props.noID">
|
40
|
+
<span>{{ dept_name }}</span>
|
41
|
+
</span>
|
42
|
+
</div>
|
43
|
+
<div v-if="props.suffix">{{ props.suffix }}</div>
|
44
|
+
<AButton size="small" v-if="props.closable" @click.stop.prevent="onClose" :color="props.color" type="text"
|
45
|
+
shape="circle" style="margin-left: 3px; transform: translateY(0) scale(0.6); opacity: 0.8">
|
46
|
+
<template #icon>
|
47
|
+
<CloseOutlined />
|
48
|
+
</template>
|
49
|
+
</AButton>
|
50
|
+
<slot name="default" :scoped="data"></slot>
|
51
|
+
</ATag>
|
52
|
+
</div>
|
53
|
+
</a-popover>
|
47
54
|
</template>
|
48
55
|
|
49
56
|
<script lang="jsx">
|
@@ -53,10 +60,11 @@ import {
|
|
53
60
|
defineEmits,
|
54
61
|
computed,
|
55
62
|
} from "vue";
|
56
|
-
import { Avatar as AAvatar, Button as AButton, Tag as ATag } from "ant-design-vue/es"
|
57
|
-
import { useCustomProps } from "./store"
|
63
|
+
import { Avatar as AAvatar, Button as AButton, Tag as ATag, Popover as APopover, BadgeRibbon as ABadgeRibbon } from "ant-design-vue/es"
|
64
|
+
import { useCustomProps } from "./avatar.store"
|
58
65
|
import { isFunction } from "lodash-es"
|
59
|
-
import {CloseOutlined} from "@ant-design/icons-vue"
|
66
|
+
import { CloseOutlined } from "@ant-design/icons-vue"
|
67
|
+
import userAvatarCard from "./user-avatar-card.vue";
|
60
68
|
|
61
69
|
export default defineComponent({
|
62
70
|
inheritAttrs: false,
|
@@ -65,7 +73,10 @@ export default defineComponent({
|
|
65
73
|
'AAvatar': AAvatar,
|
66
74
|
"AButton": AButton,
|
67
75
|
"ATag": ATag,
|
68
|
-
CloseOutlined
|
76
|
+
CloseOutlined,
|
77
|
+
APopover,
|
78
|
+
userAvatarCard,
|
79
|
+
'ABadgeRibbon': ABadgeRibbon
|
69
80
|
},
|
70
81
|
props: {
|
71
82
|
size: {
|
@@ -88,6 +99,11 @@ export default defineComponent({
|
|
88
99
|
required: false,
|
89
100
|
default: false
|
90
101
|
},
|
102
|
+
noID: {
|
103
|
+
type: Boolean,
|
104
|
+
required: false,
|
105
|
+
default: false
|
106
|
+
},
|
91
107
|
linkType: {
|
92
108
|
type: null,
|
93
109
|
required: false,
|
@@ -103,17 +119,7 @@ export default defineComponent({
|
|
103
119
|
required: false,
|
104
120
|
default: "circle"
|
105
121
|
},
|
106
|
-
|
107
|
-
type: Boolean,
|
108
|
-
required: false,
|
109
|
-
default: false
|
110
|
-
},
|
111
|
-
noID: {
|
112
|
-
type: Boolean,
|
113
|
-
required: false,
|
114
|
-
default: false
|
115
|
-
},
|
116
|
-
noDialogDetail: {
|
122
|
+
disabledPopover: {
|
117
123
|
type: Boolean,
|
118
124
|
required: false,
|
119
125
|
default: false
|
@@ -151,14 +157,11 @@ export default defineComponent({
|
|
151
157
|
},
|
152
158
|
emits: ['close'],
|
153
159
|
setup(props, { attrs, emit }) {
|
154
|
-
const { NAME_KEY, AVATAR_KEY, DEPT_KEY, USERID_KEY, global_always_avatar_is_hihglight } = useCustomProps()
|
160
|
+
const { NAME_KEY, AVATAR_KEY, DEPT_KEY, USERID_KEY, global_always_avatar_is_hihglight, global_disabled_avatar_card } = useCustomProps()
|
155
161
|
const appVersion = "1.0.0";
|
156
|
-
console.log(emit,"emits")
|
157
162
|
const targetRef = ref();
|
158
|
-
const onShowPopover = () => { };
|
159
163
|
const showViewer = ref(false);
|
160
164
|
|
161
|
-
const onClosePopover = () => { };
|
162
165
|
const isMyself = ref(false);
|
163
166
|
|
164
167
|
const user_name = computed(() => {
|
@@ -172,7 +175,7 @@ export default defineComponent({
|
|
172
175
|
const user_id = computed(() => {
|
173
176
|
return props.data[USERID_KEY.value] || "未知用户";
|
174
177
|
});
|
175
|
-
const data = ref
|
178
|
+
const data = ref(props.data);
|
176
179
|
const user_icon = ref(props.data[AVATAR_KEY.value]);
|
177
180
|
const isLoading = ref(false);
|
178
181
|
|
@@ -183,9 +186,15 @@ export default defineComponent({
|
|
183
186
|
return isFunction(props.is_highlight) ? props?.is_highlight(data.value) : props.is_highlight
|
184
187
|
}
|
185
188
|
|
186
|
-
const onClose= ()=> {
|
189
|
+
const onClose = () => {
|
187
190
|
emit("close")
|
188
191
|
}
|
192
|
+
const avatarRef = ref()
|
193
|
+
const getPopupContainer = () => {
|
194
|
+
console.log(avatarRef.value, "targetRef.value")
|
195
|
+
return avatarRef.value
|
196
|
+
}
|
197
|
+
const popoverVisible = ref(false)
|
189
198
|
return {
|
190
199
|
user_name,
|
191
200
|
dept_name,
|
@@ -195,11 +204,13 @@ export default defineComponent({
|
|
195
204
|
isLoading,
|
196
205
|
isHigh,
|
197
206
|
props,
|
198
|
-
onShowPopover,
|
199
|
-
onClosePopover,
|
200
207
|
attrs,
|
201
208
|
emit,
|
202
|
-
onClose
|
209
|
+
onClose,
|
210
|
+
global_disabled_avatar_card,
|
211
|
+
targetRef,
|
212
|
+
avatarRef,
|
213
|
+
popoverVisible
|
203
214
|
}
|
204
215
|
}
|
205
216
|
})
|
@@ -19,7 +19,8 @@
|
|
19
19
|
v-bind="$attrs"
|
20
20
|
>
|
21
21
|
<template #tagRender="{ label, closable, onClose, option }">
|
22
|
-
<
|
22
|
+
<slot name="tagRender" v-bind="{label, closable, onClose, option}">
|
23
|
+
<BokeUserAvatar
|
23
24
|
v-if="option?.data"
|
24
25
|
:data="option?.data"
|
25
26
|
:size="18"
|
@@ -31,8 +32,10 @@
|
|
31
32
|
:closable="closable"
|
32
33
|
@close="onClose"
|
33
34
|
:customProps="$attrs.customProps"
|
35
|
+
v-bind="props.tagRenderProps"
|
34
36
|
>
|
35
|
-
</
|
37
|
+
</BokeUserAvatar>
|
38
|
+
</slot>
|
36
39
|
</template>
|
37
40
|
<template #placeholder>
|
38
41
|
<div
|
@@ -86,33 +89,30 @@ import {
|
|
86
89
|
|
87
90
|
import {find as _find} from "lodash-es";
|
88
91
|
import { Select as ASelect, Avatar as AAvatar} from "ant-design-vue/es";
|
89
|
-
import
|
92
|
+
import {BokeUserAvatar, avatarStore} from "./../index";
|
90
93
|
import { UserOutlined } from "@ant-design/icons-vue";
|
91
94
|
|
92
|
-
import {useCustomProps} from "./store"
|
93
95
|
import { onErrorCaptured } from "vue";
|
96
|
+
const {useCustomProps} = avatarStore;
|
94
97
|
|
95
98
|
const props = defineProps([
|
96
99
|
"modelValue",
|
97
100
|
"options",
|
98
101
|
"disabled",
|
99
|
-
"userSource",
|
100
102
|
"optionDisabledProp",
|
101
103
|
"hideValues",
|
102
104
|
"placeholder",
|
103
105
|
"maxTagCount",
|
106
|
+
"tagRenderProps"
|
104
107
|
]);
|
105
108
|
|
109
|
+
const emits = defineEmits(["update:modelValue", "blur", "focus", "change"]);
|
110
|
+
|
106
111
|
const {NAME_KEY, AVATAR_KEY, DEPT_KEY,USERID_KEY } =useCustomProps()
|
107
112
|
|
108
|
-
const emits = defineEmits(["update:modelValue", "blur", "focus", "change"]);
|
109
|
-
// userSelectOptionsAll
|
110
|
-
const projUserTreeOptions = computed(
|
111
|
-
() => null
|
112
|
-
);
|
113
113
|
const innerdata = ref(null);
|
114
114
|
const options = computed(() => {
|
115
|
-
const target = props.options
|
115
|
+
const target = props.options ;
|
116
116
|
return target
|
117
117
|
?.map((item) => {
|
118
118
|
item.disabled = props.optionDisabledProp
|
@@ -124,17 +124,15 @@ const options = computed(() => {
|
|
124
124
|
return !props.hideValues?.includes(user.value);
|
125
125
|
});
|
126
126
|
});
|
127
|
+
|
127
128
|
const onNodeClick = (e) => {
|
128
|
-
const target = _find(
|
129
|
+
const target = _find(options.value, (item: any) => item.value == e);
|
129
130
|
emits("change", target);
|
130
131
|
emits("update:modelValue", e);
|
131
132
|
nextTick(() => {
|
132
133
|
innerdata.value = e;
|
133
134
|
});
|
134
135
|
};
|
135
|
-
const onFocus = () => {
|
136
|
-
// userCenter.refreshUserCenter()
|
137
|
-
};
|
138
136
|
|
139
137
|
const onFilterOption = (inputValue, option) => {
|
140
138
|
const description = option.label
|
@@ -143,13 +141,6 @@ const onFilterOption = (inputValue, option) => {
|
|
143
141
|
return option.label.toLowerCase().includes(inputValue.toLowerCase());
|
144
142
|
};
|
145
143
|
|
146
|
-
watch(
|
147
|
-
props.userSource,
|
148
|
-
(val) => {
|
149
|
-
innerdata.value = props.modelValue;
|
150
|
-
},
|
151
|
-
{ immediate: true }
|
152
|
-
);
|
153
144
|
onUpdated(() => {
|
154
145
|
innerdata.value = props.modelValue;
|
155
146
|
});
|
@@ -1,39 +1,39 @@
|
|
1
1
|
|
2
|
-
import BokeUserAvatar from './
|
3
|
-
import BokeUserAvatarGroup from './
|
4
|
-
|
2
|
+
import BokeUserAvatar from './UserAvatar/user-avatar.vue'
|
3
|
+
import BokeUserAvatarGroup from './UserAvatar/user-avatar-group.vue'
|
5
4
|
import BokeProvider from './Provider/Provider.vue'
|
6
|
-
import BokeUserSelect from './
|
7
|
-
import { Tag as BokeTag } from
|
8
|
-
import { Button as BokeButton } from
|
9
|
-
import { Segmented as BokeSegmented } from
|
10
|
-
import BokeMicroAppProvider from
|
11
|
-
|
12
|
-
|
5
|
+
import BokeUserSelect from './UserSelect/multiple-user-select.vue'
|
6
|
+
import { Tag as BokeTag } from 'ant-design-vue/es'
|
7
|
+
import { Button as BokeButton } from 'ant-design-vue/es'
|
8
|
+
import { Segmented as BokeSegmented } from 'ant-design-vue/es'
|
9
|
+
import BokeMicroAppProvider from './Microapp/MicroAppProvider.vue'
|
10
|
+
// 导入样式变量
|
11
|
+
import './style.global.less'
|
12
|
+
// STORE
|
13
|
+
export * as avatarStore from './UserAvatar/avatar.store'
|
14
|
+
// 支持ESM导出,可以直接在VUE项目中导入使用.
|
13
15
|
export {
|
14
16
|
BokeUserAvatar,
|
15
17
|
BokeProvider,
|
16
18
|
BokeUserSelect,
|
17
|
-
BokeTag,
|
18
|
-
BokeButton,
|
19
19
|
BokeUserAvatarGroup,
|
20
20
|
BokeMicroAppProvider,
|
21
|
+
BokeTag,
|
22
|
+
BokeButton,
|
23
|
+
BokeSegmented
|
21
24
|
}
|
22
|
-
|
25
|
+
// 支持到VUE的全局安装
|
23
26
|
export default {
|
24
|
-
install(app: any
|
25
|
-
}) {
|
26
|
-
|
27
|
+
install(app: any) {
|
27
28
|
app.component('boke-provider', BokeProvider);
|
28
29
|
app.component('boke-micro-app-provider', BokeMicroAppProvider);
|
29
30
|
|
30
31
|
app.component('boke-user-avatar', BokeUserAvatar);
|
31
32
|
app.component('boke-user-avatar-group', BokeUserAvatarGroup);
|
32
|
-
app.component(
|
33
|
-
|
34
|
-
app.component(
|
35
|
-
app.component(
|
36
|
-
app.component(
|
37
|
-
|
33
|
+
app.component('boke-user-select', BokeUserSelect);
|
34
|
+
|
35
|
+
app.component('boke-tag', BokeTag);
|
36
|
+
app.component('boke-button', BokeButton);
|
37
|
+
app.component('boke-segmented', BokeSegmented);
|
38
38
|
},
|
39
39
|
}
|
@@ -0,0 +1,132 @@
|
|
1
|
+
var hexcase = 0; /* 十六进制输出格式。0 -小写;1 -大写 */
|
2
|
+
var b64pad = ""; /* base- 64填充字符。“=”表示严格的RFC合规性 */
|
3
|
+
var chrsz = 8; /* 每个输入字符的位数。8 - ASCII;16 -统一码 */
|
4
|
+
export function hex_sha1(s) {
|
5
|
+
return binb2hex(core_sha1(str2binb(s), s.length * chrsz));
|
6
|
+
}
|
7
|
+
|
8
|
+
function b64_sha1(s) {
|
9
|
+
return binb2b64(core_sha1(str2binb(s), s.length * chrsz));
|
10
|
+
}
|
11
|
+
|
12
|
+
function str_sha1(s) {
|
13
|
+
return binb2str(core_sha1(str2binb(s), s.length * chrsz));
|
14
|
+
}
|
15
|
+
|
16
|
+
function hex_hmac_sha1(key, data) {
|
17
|
+
return binb2hex(core_hmac_sha1(key, data));
|
18
|
+
}
|
19
|
+
|
20
|
+
function b64_hmac_sha1(key, data) {
|
21
|
+
return binb2b64(core_hmac_sha1(key, data));
|
22
|
+
}
|
23
|
+
|
24
|
+
function str_hmac_sha1(key, data) {
|
25
|
+
return binb2str(core_hmac_sha1(key, data));
|
26
|
+
}
|
27
|
+
function sha1_vm_test() {
|
28
|
+
return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
|
29
|
+
}
|
30
|
+
function core_sha1(x, len) {
|
31
|
+
x[len >> 5] |= 0x80 << (24 - len % 32);
|
32
|
+
x[((len + 64 >> 9) << 4) + 15] = len;
|
33
|
+
|
34
|
+
var w = Array(80);
|
35
|
+
var a = 1732584193;
|
36
|
+
var b = -271733879;
|
37
|
+
var c = -1732584194;
|
38
|
+
var d = 271733878;
|
39
|
+
var e = -1009589776;
|
40
|
+
|
41
|
+
for (var i = 0; i < x.length; i += 16) {
|
42
|
+
var olda = a;
|
43
|
+
var oldb = b;
|
44
|
+
var oldc = c;
|
45
|
+
var oldd = d;
|
46
|
+
var olde = e;
|
47
|
+
|
48
|
+
for (var j = 0; j < 80; j++) {
|
49
|
+
if (j < 16) w[j] = x[i + j];
|
50
|
+
else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
|
51
|
+
var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
|
52
|
+
e = d;
|
53
|
+
d = c;
|
54
|
+
c = rol(b, 30);
|
55
|
+
b = a;
|
56
|
+
a = t;
|
57
|
+
}
|
58
|
+
|
59
|
+
a = safe_add(a, olda);
|
60
|
+
b = safe_add(b, oldb);
|
61
|
+
c = safe_add(c, oldc);
|
62
|
+
d = safe_add(d, oldd);
|
63
|
+
e = safe_add(e, olde);
|
64
|
+
}
|
65
|
+
return Array(a, b, c, d, e);
|
66
|
+
|
67
|
+
}
|
68
|
+
function sha1_ft(t, b, c, d) {
|
69
|
+
if (t < 20) return (b & c) | ((~b) & d);
|
70
|
+
if (t < 40) return b ^ c ^ d;
|
71
|
+
if (t < 60) return (b & c) | (b & d) | (c & d);
|
72
|
+
return b ^ c ^ d;
|
73
|
+
}
|
74
|
+
function sha1_kt(t) {
|
75
|
+
return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514;
|
76
|
+
}
|
77
|
+
function core_hmac_sha1(key, data) {
|
78
|
+
var bkey = str2binb(key);
|
79
|
+
if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
|
80
|
+
|
81
|
+
var ipad = Array(16),
|
82
|
+
opad = Array(16);
|
83
|
+
for (var i = 0; i < 16; i++) {
|
84
|
+
ipad[i] = bkey[i] ^ 0x36363636;
|
85
|
+
opad[i] = bkey[i] ^ 0x5C5C5C5C;
|
86
|
+
}
|
87
|
+
|
88
|
+
var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
|
89
|
+
return core_sha1(opad.concat(hash), 512 + 160);
|
90
|
+
}
|
91
|
+
function safe_add(x, y) {
|
92
|
+
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
93
|
+
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
94
|
+
return (msw << 16) | (lsw & 0xFFFF);
|
95
|
+
}
|
96
|
+
function rol(num, cnt) {
|
97
|
+
return (num << cnt) | (num >>> (32 - cnt));
|
98
|
+
}
|
99
|
+
function str2binb(str) {
|
100
|
+
var bin = Array();
|
101
|
+
var mask = (1 << chrsz) - 1;
|
102
|
+
for (var i = 0; i < str.length * chrsz; i += chrsz)
|
103
|
+
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i % 32);
|
104
|
+
return bin;
|
105
|
+
}
|
106
|
+
function binb2str(bin) {
|
107
|
+
var str = "";
|
108
|
+
var mask = (1 << chrsz) - 1;
|
109
|
+
for (var i = 0; i < bin.length * 32; i += chrsz)
|
110
|
+
str += String.fromCharCode((bin[i >> 5] >>> (24 - i % 32)) & mask);
|
111
|
+
return str;
|
112
|
+
}
|
113
|
+
function binb2hex(binarray) {
|
114
|
+
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
|
115
|
+
var str = "";
|
116
|
+
for (var i = 0; i < binarray.length * 4; i++) {
|
117
|
+
str += hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((3 - i % 4) * 8)) & 0xF);
|
118
|
+
}
|
119
|
+
return str;
|
120
|
+
}
|
121
|
+
function binb2b64(binarray) {
|
122
|
+
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
123
|
+
var str = "";
|
124
|
+
for (var i = 0; i < binarray.length * 4; i += 3) {
|
125
|
+
var triplet = (((binarray[i >> 2] >> 8 * (3 - i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4)) & 0xFF) << 8) | ((binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4)) & 0xFF);
|
126
|
+
for (var j = 0; j < 4; j++) {
|
127
|
+
if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
|
128
|
+
else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
|
129
|
+
}
|
130
|
+
}
|
131
|
+
return str;
|
132
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const useCustomProps: () => {
|
2
|
+
NAME_KEY: import("vue").Ref<any>;
|
3
|
+
AVATAR_KEY: import("vue").Ref<any>;
|
4
|
+
DEPT_KEY: import("vue").Ref<any>;
|
5
|
+
USERID_KEY: import("vue").Ref<any>;
|
6
|
+
global_always_avatar_is_hihglight: any;
|
7
|
+
global_disabled_avatar_card: boolean;
|
8
|
+
AVATAR_CARD_URL: any;
|
9
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function hex_sha1(s: any): string;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<Readonly<{
|
2
|
+
userinfo?: any;
|
3
|
+
}>, any, {
|
4
|
+
showViewer: boolean;
|
5
|
+
spacer: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
6
|
+
[key: string]: any;
|
7
|
+
}>;
|
8
|
+
isDark: boolean;
|
9
|
+
extraInfo: null;
|
10
|
+
seeAllProjects: boolean;
|
11
|
+
seeAllRoles: boolean;
|
12
|
+
}, {
|
13
|
+
projectslist(): any;
|
14
|
+
projectslistCount(): any;
|
15
|
+
extraInfogroups(): any;
|
16
|
+
extraInfogroupsCount(): any;
|
17
|
+
}, {
|
18
|
+
onChat(account: any): void;
|
19
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
20
|
+
userinfo?: any;
|
21
|
+
}>>>, {
|
22
|
+
readonly userinfo?: any;
|
23
|
+
}, {}>;
|
24
|
+
export default _default;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{}>>, {
|
3
|
+
$props: {
|
4
|
+
readonly size?: string | undefined;
|
5
|
+
readonly data?: unknown[] | undefined;
|
6
|
+
readonly placeholder?: string | undefined;
|
7
|
+
readonly tag?: boolean | undefined;
|
8
|
+
readonly is_highlight?: Function | undefined;
|
9
|
+
readonly showText?: boolean | undefined;
|
10
|
+
readonly max?: number | undefined;
|
11
|
+
};
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{}>>, {}, true, {}, {}, {
|
13
|
+
P: {};
|
14
|
+
B: {};
|
15
|
+
D: {};
|
16
|
+
C: {};
|
17
|
+
M: {};
|
18
|
+
Defaults: {};
|
19
|
+
}, Readonly<import("vue").ExtractPropTypes<{}>>, {
|
20
|
+
$props: {
|
21
|
+
readonly size?: string | undefined;
|
22
|
+
readonly data?: unknown[] | undefined;
|
23
|
+
readonly placeholder?: string | undefined;
|
24
|
+
readonly tag?: boolean | undefined;
|
25
|
+
readonly is_highlight?: Function | undefined;
|
26
|
+
readonly showText?: boolean | undefined;
|
27
|
+
readonly max?: number | undefined;
|
28
|
+
};
|
29
|
+
}, {}, {}, {}, {}>;
|
30
|
+
__isFragment?: undefined;
|
31
|
+
__isTeleport?: undefined;
|
32
|
+
__isSuspense?: undefined;
|
33
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {
|
34
|
+
$props: {
|
35
|
+
readonly size?: string | undefined;
|
36
|
+
readonly data?: unknown[] | undefined;
|
37
|
+
readonly placeholder?: string | undefined;
|
38
|
+
readonly tag?: boolean | undefined;
|
39
|
+
readonly is_highlight?: Function | undefined;
|
40
|
+
readonly showText?: boolean | undefined;
|
41
|
+
readonly max?: number | undefined;
|
42
|
+
};
|
43
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
44
|
+
export default _default;
|