@knockout-js/layout 0.1.25 → 0.1.27
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/LICENSE +21 -21
- package/README.md +15 -15
- package/es2017/components/_util/index.js +36 -36
- package/es2017/components/aggregate-menu/collects.d.ts +2 -1
- package/es2017/components/aggregate-menu/collects.js +10 -10
- package/es2017/components/aggregate-menu/index.d.ts +2 -1
- package/es2017/components/aggregate-menu/index.js +67 -19
- package/es2017/components/aggregate-menu/index.js.map +1 -1
- package/es2017/components/aggregate-menu/index.module.css +236 -219
- package/es2017/components/aggregate-menu/locale/en_US.js.map +1 -1
- package/es2017/components/aggregate-menu/locale/zh_CN.js.map +1 -1
- package/es2017/components/avatar-dropdown/index.d.ts +2 -1
- package/es2017/components/avatar-dropdown/index.module.css +23 -23
- package/es2017/components/avatar-dropdown/locale/en_US.js.map +1 -1
- package/es2017/components/avatar-dropdown/locale/zh_CN.js.map +1 -1
- package/es2017/components/collect-providers/index.d.ts +1 -1
- package/es2017/components/i18n-dropdown/index.d.ts +2 -1
- package/es2017/components/i18n-dropdown/index.module.css +13 -13
- package/es2017/components/icons/index.d.ts +3 -3
- package/es2017/components/layout/index.d.ts +1 -1
- package/es2017/components/layout/index.js +4 -4
- package/es2017/components/layout/layout.module.css +46 -46
- package/es2017/components/layout/logo.js.map +1 -1
- package/es2017/components/leave-prompt/index.d.ts +1 -1
- package/es2017/components/leave-prompt/index.js +9 -9
- package/es2017/components/leave-prompt/locale/en_US.js.map +1 -1
- package/es2017/components/leave-prompt/locale/zh_CN.js.map +1 -1
- package/es2017/components/locale/index.js +4 -4
- package/es2017/components/modal/index.d.ts +1 -1
- package/es2017/components/modal/index.js +10 -18
- package/es2017/components/modal/index.js.map +1 -1
- package/es2017/components/modal/index.module.css +46 -20
- package/es2017/components/msg-dropdown/index.js +14 -14
- package/es2017/components/msg-dropdown/index.module.css +33 -33
- package/es2017/components/msg-dropdown/locale/en_US.js.map +1 -1
- package/es2017/components/msg-dropdown/locale/zh_CN.js.map +1 -1
- package/es2017/components/provider/index.d.ts +1 -1
- package/es2017/components/provider/index.js +11 -11
- package/es2017/components/tenant-dropdown/index.d.ts +2 -1
- package/es2017/components/tenant-dropdown/index.js +4 -4
- package/es2017/components/tenant-dropdown/index.module.css +13 -13
- package/es2017/components/tenant-dropdown/locale/en_US.js.map +1 -1
- package/es2017/components/tenant-dropdown/locale/zh_CN.js.map +1 -1
- package/es2017/components/theme-switch/index.d.ts +2 -1
- package/es2017/components/theme-switch/index.module.css +14 -14
- package/es2017/components/theme-switch/locale/en_US.js.map +1 -1
- package/es2017/components/theme-switch/locale/zh_CN.js.map +1 -1
- package/es2017/components/upload-file/index.js.map +1 -1
- package/es2017/components/upload-file/index.module.css +13 -13
- package/es2017/components/upload-file/locale/en_US.js.map +1 -1
- package/es2017/components/upload-file/locale/zh_CN.js.map +1 -1
- package/es2017/components/upload-file/uploadAvatar.d.ts +2 -1
- package/es2017/components/upload-file/uploadMultiple.d.ts +2 -1
- package/es2017/components/upload-file/uploadTemp.d.ts +2 -1
- package/es2017/typings.d.ts +1 -1
- package/esm/components/_util/index.js +36 -36
- package/esm/components/aggregate-menu/collects.d.ts +2 -1
- package/esm/components/aggregate-menu/collects.js +10 -10
- package/esm/components/aggregate-menu/index.d.ts +2 -1
- package/esm/components/aggregate-menu/index.js +73 -4
- package/esm/components/aggregate-menu/index.js.map +1 -1
- package/esm/components/aggregate-menu/index.module.css +236 -219
- package/esm/components/aggregate-menu/locale/en_US.js.map +1 -1
- package/esm/components/aggregate-menu/locale/zh_CN.js.map +1 -1
- package/esm/components/avatar-dropdown/index.d.ts +2 -1
- package/esm/components/avatar-dropdown/index.module.css +23 -23
- package/esm/components/avatar-dropdown/locale/en_US.js.map +1 -1
- package/esm/components/avatar-dropdown/locale/zh_CN.js.map +1 -1
- package/esm/components/collect-providers/index.d.ts +1 -1
- package/esm/components/i18n-dropdown/index.d.ts +2 -1
- package/esm/components/i18n-dropdown/index.module.css +13 -13
- package/esm/components/icons/index.d.ts +3 -3
- package/esm/components/layout/index.d.ts +1 -1
- package/esm/components/layout/layout.module.css +46 -46
- package/esm/components/layout/logo.js.map +1 -1
- package/esm/components/leave-prompt/index.d.ts +1 -1
- package/esm/components/leave-prompt/index.js +9 -9
- package/esm/components/leave-prompt/locale/en_US.js.map +1 -1
- package/esm/components/leave-prompt/locale/zh_CN.js.map +1 -1
- package/esm/components/locale/index.js +4 -4
- package/esm/components/modal/index.d.ts +1 -1
- package/esm/components/modal/index.js +12 -20
- package/esm/components/modal/index.js.map +1 -1
- package/esm/components/modal/index.module.css +46 -20
- package/esm/components/msg-dropdown/index.module.css +33 -33
- package/esm/components/msg-dropdown/locale/en_US.js.map +1 -1
- package/esm/components/msg-dropdown/locale/zh_CN.js.map +1 -1
- package/esm/components/provider/index.d.ts +1 -1
- package/esm/components/provider/index.js +11 -11
- package/esm/components/tenant-dropdown/index.d.ts +2 -1
- package/esm/components/tenant-dropdown/index.module.css +13 -13
- package/esm/components/tenant-dropdown/locale/en_US.js.map +1 -1
- package/esm/components/tenant-dropdown/locale/zh_CN.js.map +1 -1
- package/esm/components/theme-switch/index.d.ts +2 -1
- package/esm/components/theme-switch/index.module.css +14 -14
- package/esm/components/theme-switch/locale/en_US.js.map +1 -1
- package/esm/components/theme-switch/locale/zh_CN.js.map +1 -1
- package/esm/components/upload-file/index.js.map +1 -1
- package/esm/components/upload-file/index.module.css +13 -13
- package/esm/components/upload-file/locale/en_US.js.map +1 -1
- package/esm/components/upload-file/locale/zh_CN.js.map +1 -1
- package/esm/components/upload-file/uploadAvatar.d.ts +2 -1
- package/esm/components/upload-file/uploadMultiple.d.ts +2 -1
- package/esm/components/upload-file/uploadTemp.d.ts +2 -1
- package/esm/typings.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
.action {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
height: 48px;
|
|
5
|
-
padding: 0 12px;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
transition: all 0.3s;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.action>span {
|
|
11
|
-
vertical-align: middle;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.list {
|
|
16
|
-
background-color: #ffffff;
|
|
17
|
-
width: 380px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.list :global(.ant-list-item) {
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.list :global(.ant-list-header) {
|
|
25
|
-
font-weight: bold;
|
|
26
|
-
border-radius: 8px 8px 0 0;
|
|
27
|
-
background-color: #fafafa;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.footer {
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
1
|
+
.action {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 48px;
|
|
5
|
+
padding: 0 12px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: all 0.3s;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.action>span {
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.list {
|
|
16
|
+
background-color: #ffffff;
|
|
17
|
+
width: 380px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.list :global(.ant-list-item) {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.list :global(.ant-list-header) {
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
border-radius: 8px 8px 0 0;
|
|
27
|
+
background-color: #fafafa;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
.footer {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\msg-dropdown\\locale\\en_US.ts"],"sourcesContent":["import { MsgDropdownLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\msg-dropdown\\locale\\en_US.ts"],"sourcesContent":["import { MsgDropdownLocale } from \"../index\";\n\nconst locale: MsgDropdownLocale = {\n title: \"Station message notification\",\n footer: \"See more\"\n};\n\nexport default locale\n"],"names":["locale","title","footer"],"mappings":"AAEA,MAAMA,SAA4B;IAChCC,OAAO;IACPC,QAAQ;AACV;AAEA,eAAeF,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\msg-dropdown\\locale\\zh_CN.ts"],"sourcesContent":["import { MsgDropdownLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\msg-dropdown\\locale\\zh_CN.ts"],"sourcesContent":["import { MsgDropdownLocale } from \"../index\";\n\nconst locale: MsgDropdownLocale = {\n title: \"站内消息通知\",\n footer: \"查看更多\"\n};\n\nexport default locale\n"],"names":["locale","title","footer"],"mappings":"AAEA,MAAMA,SAA4B;IAChCC,OAAO;IACPC,QAAQ;AACV;AAEA,eAAeF,OAAM"}
|
|
@@ -14,7 +14,7 @@ export declare const Context: import("react").Context<ProviderProps>;
|
|
|
14
14
|
/**
|
|
15
15
|
* 组件上使用
|
|
16
16
|
*/
|
|
17
|
-
declare const _default: (props: ProviderProps) =>
|
|
17
|
+
declare const _default: (props: ProviderProps) => JSX.Element;
|
|
18
18
|
export default _default;
|
|
19
19
|
/**
|
|
20
20
|
* hook
|
|
@@ -12,8 +12,8 @@ export const Context = /*#__PURE__*/ createContext({
|
|
|
12
12
|
locale: LocaleType.zhCN,
|
|
13
13
|
dark: false
|
|
14
14
|
});
|
|
15
|
-
/**
|
|
16
|
-
* 组件上使用
|
|
15
|
+
/**
|
|
16
|
+
* 组件上使用
|
|
17
17
|
*/ export default ((props)=>{
|
|
18
18
|
const { children } = props, resProps = _object_without_properties(props, [
|
|
19
19
|
"children"
|
|
@@ -23,23 +23,23 @@ export const Context = /*#__PURE__*/ createContext({
|
|
|
23
23
|
children: children
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
-
/**
|
|
27
|
-
* hook
|
|
28
|
-
* @returns
|
|
26
|
+
/**
|
|
27
|
+
* hook
|
|
28
|
+
* @returns
|
|
29
29
|
*/ export const useTenantId = ()=>{
|
|
30
30
|
const ctx = useContext(Context);
|
|
31
31
|
return ctx.tenantId;
|
|
32
32
|
};
|
|
33
|
-
/**
|
|
34
|
-
* hook
|
|
35
|
-
* @returns
|
|
33
|
+
/**
|
|
34
|
+
* hook
|
|
35
|
+
* @returns
|
|
36
36
|
*/ export const useAppCode = ()=>{
|
|
37
37
|
const ctx = useContext(Context);
|
|
38
38
|
return ctx.appCode;
|
|
39
39
|
};
|
|
40
|
-
/**
|
|
41
|
-
* hook
|
|
42
|
-
* @returns
|
|
40
|
+
/**
|
|
41
|
+
* hook
|
|
42
|
+
* @returns
|
|
43
43
|
*/ export const useDark = ()=>{
|
|
44
44
|
const ctx = useContext(Context);
|
|
45
45
|
var _ctx_dark;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Org } from '@knockout-js/api/ucenter';
|
|
2
3
|
export interface TenantDropdownLocale {
|
|
3
4
|
switchTipTitle: string;
|
|
@@ -18,5 +19,5 @@ export interface TenantDropdownProps {
|
|
|
18
19
|
*/
|
|
19
20
|
onChange: (value: string) => void;
|
|
20
21
|
}
|
|
21
|
-
declare const _default: (props: TenantDropdownProps) =>
|
|
22
|
+
declare const _default: (props: TenantDropdownProps) => JSX.Element;
|
|
22
23
|
export default _default;
|
|
@@ -5,10 +5,10 @@ import styles from './index.module.css';
|
|
|
5
5
|
import { useLocale } from '../locale';
|
|
6
6
|
import { gql, query } from '@knockout-js/ice-urql/request';
|
|
7
7
|
import { instanceName } from '@knockout-js/api';
|
|
8
|
-
const userRootOrgListQuery = gql(/* GraphQL */ `query userRootOrgs{
|
|
9
|
-
userRootOrgs{
|
|
10
|
-
id,parentID,kind,domain,code,name,status,path,displaySort,countryCode,timezone
|
|
11
|
-
}
|
|
8
|
+
const userRootOrgListQuery = gql(/* GraphQL */ `query userRootOrgs{
|
|
9
|
+
userRootOrgs{
|
|
10
|
+
id,parentID,kind,domain,code,name,status,path,displaySort,countryCode,timezone
|
|
11
|
+
}
|
|
12
12
|
}`);
|
|
13
13
|
export default ((props)=>{
|
|
14
14
|
var _menu_items, _menu;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.action {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
height: 48px;
|
|
5
|
-
padding: 0 12px;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
transition: all 0.3s;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.action > span {
|
|
11
|
-
vertical-align: middle;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
}
|
|
1
|
+
.action {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 48px;
|
|
5
|
+
padding: 0 12px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: all 0.3s;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.action > span {
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\tenant-dropdown\\locale\\en_US.ts"],"sourcesContent":["import { TenantDropdownLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\tenant-dropdown\\locale\\en_US.ts"],"sourcesContent":["import { TenantDropdownLocale } from \"../index\";\n\nconst locale: TenantDropdownLocale = {\n switchTipTitle: \"Your organization has been switched, please manually close or refresh the current page\",\n confirmTitle: \"Tenant switch reminder\",\n confirmContent: \"Ensure that no edit content is not saved when you switch tenants. Otherwise, the operation will be forcibly prohibited or closed on other browsing pages\"\n};\n\nexport default locale\n"],"names":["locale","switchTipTitle","confirmTitle","confirmContent"],"mappings":"AAEA,MAAMA,SAA+B;IACnCC,gBAAgB;IAChBC,cAAc;IACdC,gBAAgB;AAClB;AAEA,eAAeH,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\tenant-dropdown\\locale\\zh_CN.ts"],"sourcesContent":["import { TenantDropdownLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\tenant-dropdown\\locale\\zh_CN.ts"],"sourcesContent":["import { TenantDropdownLocale } from \"../index\";\n\nconst locale: TenantDropdownLocale = {\n switchTipTitle: \"您的组织已被切换,请手动关闭或者刷新当前页面\",\n confirmTitle: \"租户切换提醒\",\n confirmContent: \"切换租户时请确认已无编辑内容未保存,否则其他浏览页面将强制禁止操作或关闭\"\n};\n\nexport default locale\n"],"names":["locale","switchTipTitle","confirmTitle","confirmContent"],"mappings":"AAEA,MAAMA,SAA+B;IACnCC,gBAAgB;IAChBC,cAAc;IACdC,gBAAgB;AAClB;AAEA,eAAeH,OAAM"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface ThemeSwitchLocale {
|
|
2
3
|
bright: string;
|
|
3
4
|
dark: string;
|
|
@@ -16,5 +17,5 @@ export interface ThemeSwitchProps {
|
|
|
16
17
|
*/
|
|
17
18
|
onChange?: (value: boolean) => void;
|
|
18
19
|
}
|
|
19
|
-
declare const _default: (props: ThemeSwitchProps) =>
|
|
20
|
+
declare const _default: (props: ThemeSwitchProps) => JSX.Element;
|
|
20
21
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
.action {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
height: 42px;
|
|
5
|
-
padding: 0 12px;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
transition: all 0.3s;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.action svg {
|
|
11
|
-
vertical-align: middle;
|
|
12
|
-
width: 18px;
|
|
13
|
-
height: 18px;
|
|
14
|
-
}
|
|
1
|
+
.action {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 42px;
|
|
5
|
+
padding: 0 12px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: all 0.3s;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.action svg {
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
width: 18px;
|
|
13
|
+
height: 18px;
|
|
14
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\theme-switch\\locale\\en_US.ts"],"sourcesContent":["import { ThemeSwitchLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\theme-switch\\locale\\en_US.ts"],"sourcesContent":["import { ThemeSwitchLocale } from \"../index\";\n\nconst locale: ThemeSwitchLocale = {\n bright: 'bright',\n dark: 'dark'\n};\n\nexport default locale\n"],"names":["locale","bright","dark"],"mappings":"AAEA,MAAMA,SAA4B;IAChCC,QAAQ;IACRC,MAAM;AACR;AAEA,eAAeF,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\theme-switch\\locale\\zh_CN.ts"],"sourcesContent":["import { ThemeSwitchLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\theme-switch\\locale\\zh_CN.ts"],"sourcesContent":["import { ThemeSwitchLocale } from \"../index\";\n\nconst locale: ThemeSwitchLocale = {\n bright: '亮',\n dark: '暗'\n};\n\nexport default locale\n"],"names":["locale","bright","dark"],"mappings":"AAEA,MAAMA,SAA4B;IAChCC,QAAQ;IACRC,MAAM;AACR;AAEA,eAAeF,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\upload-file\\index.ts"],"sourcesContent":["export type UploadFileLocale = {\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\upload-file\\index.ts"],"sourcesContent":["export type UploadFileLocale = {\n // 文件大小必须小于:\n fileSizeTip: string;\n del: string;\n confirmDel: string;\n // 点击或拖拽文件上传\n clickOrDragUpload: string;\n // 支持扩展名\n supportExtension: string;\n errSupportExtension: string;\n errorUpload: string;\n errorDel: string;\n fileUpload: string;\n tempViewer: string;\n tempDown: string;\n}\n\nexport interface UploadFileProps<T> {\n /**\n * bucket\n */\n bucket?: string;\n /**\n * endpoint\n */\n endpoint?: string;\n /**\n * 目录格式 xxx/xx\n */\n directory: string;\n /**\n * 使用file.name当作文件名\n */\n useFileName?: boolean;\n /**\n * 使用这个值当作文件名时不包含后缀 custromFileName='fileName'\n */\n custromFileName?: string;\n /**\n * 限制文件大小 默认5M\n */\n maxSize?: number;\n /**\n * 限制弹框选择\n */\n accept?: string;\n /**\n * 使用url\n */\n value?: T;\n /**\n * 返回存储数据库的url\n * @param value\n * @returns\n */\n onChange?: (value?: T) => void;\n\n}\n"],"names":[],"mappings":"AAAA,WAyDC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.modalIframe {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 60vh;
|
|
4
|
-
border: 0 none;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.delText {
|
|
8
|
-
color: #ff4d4f;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.delText:hover {
|
|
12
|
-
color: #ff7875;
|
|
13
|
-
}
|
|
1
|
+
.modalIframe {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 60vh;
|
|
4
|
+
border: 0 none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.delText {
|
|
8
|
+
color: #ff4d4f;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.delText:hover {
|
|
12
|
+
color: #ff7875;
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\upload-file\\locale\\en_US.ts"],"sourcesContent":["import { UploadFileLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\upload-file\\locale\\en_US.ts"],"sourcesContent":["import { UploadFileLocale } from \"../index\";\n\nconst locale: UploadFileLocale = {\n fileSizeTip: \"The file size cannot be less than\",\n del: \"delete\",\n confirmDel: \"Confirm deletion\",\n clickOrDragUpload: \"Click or drag the file to upload\",\n supportExtension: \"Support extension\",\n errSupportExtension: \"Only the extension name is supported\",\n fileUpload: \"File upload\",\n tempViewer: \"Template preview\",\n tempDown: \"Template download\",\n errorUpload: 'If the upload is abnormal, contact the administrator',\n errorDel: 'If the deletion is abnormal, contact the administrator',\n};\n\nexport default locale\n"],"names":["locale","fileSizeTip","del","confirmDel","clickOrDragUpload","supportExtension","errSupportExtension","fileUpload","tempViewer","tempDown","errorUpload","errorDel"],"mappings":"AAEA,MAAMA,SAA2B;IAC/BC,aAAa;IACbC,KAAK;IACLC,YAAY;IACZC,mBAAmB;IACnBC,kBAAkB;IAClBC,qBAAqB;IACrBC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,aAAa;IACbC,UAAU;AACZ;AAEA,eAAeX,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[".\\src\\components\\upload-file\\locale\\zh_CN.ts"],"sourcesContent":["import { UploadFileLocale } from \"../index\";\
|
|
1
|
+
{"version":3,"sources":[".\\src\\components\\upload-file\\locale\\zh_CN.ts"],"sourcesContent":["import { UploadFileLocale } from \"../index\";\n\nconst locale: UploadFileLocale = {\n fileSizeTip: \"文件大小不能小于\",\n del: \"删除\",\n confirmDel: \"确认删除\",\n clickOrDragUpload: \"点击或拖拽文件上传\",\n supportExtension: \"支持扩展名\",\n errSupportExtension: \"只支持扩展名\",\n fileUpload: \"文件上传\",\n tempViewer: \"模板预览\",\n tempDown: \"模板下载\",\n errorUpload: '上传异常,请联系管理员',\n errorDel: '删除异常,请联系管理员',\n};\n\nexport default locale\n"],"names":["locale","fileSizeTip","del","confirmDel","clickOrDragUpload","supportExtension","errSupportExtension","fileUpload","tempViewer","tempDown","errorUpload","errorDel"],"mappings":"AAEA,MAAMA,SAA2B;IAC/BC,aAAa;IACbC,KAAK;IACLC,YAAY;IACZC,mBAAmB;IACnBC,kBAAkB;IAClBC,qBAAqB;IACrBC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,aAAa;IACbC,UAAU;AACZ;AAEA,eAAeX,OAAM"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { UploadFileProps } from "./index";
|
|
2
|
-
declare const _default: (props: UploadFileProps<string>) =>
|
|
3
|
+
declare const _default: (props: UploadFileProps<string>) => JSX.Element;
|
|
3
4
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { UploadFileProps } from ".";
|
|
2
|
-
declare const _default: (props: UploadFileProps<string[]>) =>
|
|
3
|
+
declare const _default: (props: UploadFileProps<string[]>) => JSX.Element;
|
|
3
4
|
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { UploadFileProps } from ".";
|
|
2
3
|
declare const _default: (props: UploadFileProps<string> & {
|
|
3
4
|
/**
|
|
4
5
|
* 显示删除按钮
|
|
5
6
|
*/
|
|
6
7
|
showDelBtn?: boolean;
|
|
7
|
-
}) =>
|
|
8
|
+
}) => JSX.Element;
|
|
8
9
|
export default _default;
|
package/es2017/typings.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="@ice/pkg/types" />
|
|
1
|
+
/// <reference types="@ice/pkg/types" />
|
|
@@ -5,13 +5,13 @@ import timezone from "dayjs/plugin/timezone";
|
|
|
5
5
|
import utc from "dayjs/plugin/utc";
|
|
6
6
|
dayjs.extend(utc);
|
|
7
7
|
dayjs.extend(timezone);
|
|
8
|
-
/**
|
|
9
|
-
* 列表数据格式化成树结构
|
|
10
|
-
* @param allList
|
|
11
|
-
* @param parentList
|
|
12
|
-
* @param defineKey
|
|
13
|
-
* @param parentId
|
|
14
|
-
* @returns
|
|
8
|
+
/**
|
|
9
|
+
* 列表数据格式化成树结构
|
|
10
|
+
* @param allList
|
|
11
|
+
* @param parentList
|
|
12
|
+
* @param defineKey
|
|
13
|
+
* @param parentId
|
|
14
|
+
* @returns
|
|
15
15
|
*/ export var listFormatTreeData = function(allList, parentList, defineKey, parentId) {
|
|
16
16
|
var dataKey = _object_spread({
|
|
17
17
|
key: "key",
|
|
@@ -32,10 +32,10 @@ dayjs.extend(timezone);
|
|
|
32
32
|
});
|
|
33
33
|
return parentList;
|
|
34
34
|
};
|
|
35
|
-
/**
|
|
36
|
-
* 解析树结构按树顺序处理成列表
|
|
37
|
-
* @param treeList
|
|
38
|
-
* @returns
|
|
35
|
+
/**
|
|
36
|
+
* 解析树结构按树顺序处理成列表
|
|
37
|
+
* @param treeList
|
|
38
|
+
* @returns
|
|
39
39
|
*/ export var treeFormatList = function(treeList) {
|
|
40
40
|
var allList = [];
|
|
41
41
|
treeList.forEach(function(item) {
|
|
@@ -50,10 +50,10 @@ dayjs.extend(timezone);
|
|
|
50
50
|
});
|
|
51
51
|
return allList;
|
|
52
52
|
};
|
|
53
|
-
/**
|
|
54
|
-
* 字节大小展示处理
|
|
55
|
-
* @param fileSize
|
|
56
|
-
* @returns
|
|
53
|
+
/**
|
|
54
|
+
* 字节大小展示处理
|
|
55
|
+
* @param fileSize
|
|
56
|
+
* @returns
|
|
57
57
|
*/ export var formatFileSize = function(fileSize) {
|
|
58
58
|
if (fileSize < 1024) {
|
|
59
59
|
return fileSize + "B";
|
|
@@ -65,19 +65,19 @@ dayjs.extend(timezone);
|
|
|
65
65
|
return (fileSize / (1024 * 1024 * 1024)).toFixed(2) + "GB";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* 随机数
|
|
70
|
-
* @param len
|
|
71
|
-
* @returns
|
|
68
|
+
/**
|
|
69
|
+
* 随机数
|
|
70
|
+
* @param len
|
|
71
|
+
* @returns
|
|
72
72
|
*/ export var randomId = function(len) {
|
|
73
73
|
var str = "";
|
|
74
74
|
for(; str.length < len; str += Math.random().toString(36).substring(2));
|
|
75
75
|
return str.substring(0, len);
|
|
76
76
|
};
|
|
77
|
-
/**
|
|
78
|
-
* 解析env配置的app地址字符串
|
|
79
|
-
* @param evnStr appCode@deploy_address;
|
|
80
|
-
* @returns
|
|
77
|
+
/**
|
|
78
|
+
* 解析env配置的app地址字符串
|
|
79
|
+
* @param evnStr appCode@deploy_address;
|
|
80
|
+
* @returns
|
|
81
81
|
*/ export var parseEnvAppAddress = function(evnStr) {
|
|
82
82
|
var address = {};
|
|
83
83
|
evnStr.split(";").forEach(function(str) {
|
|
@@ -90,19 +90,19 @@ dayjs.extend(timezone);
|
|
|
90
90
|
});
|
|
91
91
|
return address;
|
|
92
92
|
};
|
|
93
|
-
/**
|
|
94
|
-
* 格式化日期
|
|
95
|
-
* @param date
|
|
96
|
-
* @param format YYYY-MM-DD HH:mm:ss
|
|
97
|
-
* @param tz 时区
|
|
98
|
-
* @param isTzSet true将当前时间设置成这个时区,false 将当前时间根据时区转换
|
|
99
|
-
* 例子 isTzSet=true
|
|
100
|
-
* dayjs.tz("2022-07-07 16:30:00", "America/New_York").format("YYYY-MM-DDTHH:mm:ssZ")
|
|
101
|
-
* = "2022-07-07T16:30:00-04:00"
|
|
102
|
-
* 例子 isTzSet=false
|
|
103
|
-
* dayjs("2022-07-07T20:30:00Z").tz("America/New_York").format("YYYY-MM-DD HH:mm:ss")
|
|
104
|
-
* = "2022-07-07 16:30:00"
|
|
105
|
-
* @returns
|
|
93
|
+
/**
|
|
94
|
+
* 格式化日期
|
|
95
|
+
* @param date
|
|
96
|
+
* @param format YYYY-MM-DD HH:mm:ss
|
|
97
|
+
* @param tz 时区
|
|
98
|
+
* @param isTzSet true将当前时间设置成这个时区,false 将当前时间根据时区转换
|
|
99
|
+
* 例子 isTzSet=true
|
|
100
|
+
* dayjs.tz("2022-07-07 16:30:00", "America/New_York").format("YYYY-MM-DDTHH:mm:ssZ")
|
|
101
|
+
* = "2022-07-07T16:30:00-04:00"
|
|
102
|
+
* 例子 isTzSet=false
|
|
103
|
+
* dayjs("2022-07-07T20:30:00Z").tz("America/New_York").format("YYYY-MM-DD HH:mm:ss")
|
|
104
|
+
* = "2022-07-07 16:30:00"
|
|
105
|
+
* @returns
|
|
106
106
|
*/ export var getDate = function(date) {
|
|
107
107
|
var format = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "YYYY-MM-DD", tz = arguments.length > 2 ? arguments[2] : void 0, isTzSet = arguments.length > 3 ? arguments[3] : void 0;
|
|
108
108
|
if (date) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { DragEndEvent } from "@dnd-kit/core";
|
|
2
3
|
import { AppMenu } from "@knockout-js/api/ucenter";
|
|
3
4
|
import { CollectsDataSource } from ".";
|
|
@@ -7,5 +8,5 @@ type AggregateCollectsProps = {
|
|
|
7
8
|
onDel?: (menuItem: AppMenu) => void;
|
|
8
9
|
onClick?: (menuItem: AppMenu, isOpen?: boolean) => void;
|
|
9
10
|
};
|
|
10
|
-
declare const _default: (props: AggregateCollectsProps) =>
|
|
11
|
+
declare const _default: (props: AggregateCollectsProps) => JSX.Element;
|
|
11
12
|
export default _default;
|
|
@@ -8,11 +8,11 @@ import { CloseOutlined, DragOutlined } from "@ant-design/icons";
|
|
|
8
8
|
import styles from "./index.module.css";
|
|
9
9
|
import { Space } from "antd";
|
|
10
10
|
import { OpenWin } from "../icons";
|
|
11
|
-
/**
|
|
12
|
-
* 排序拖拽使用的控件
|
|
13
|
-
* https://docs.dndkit.com/
|
|
14
|
-
* @param props
|
|
15
|
-
* @returns
|
|
11
|
+
/**
|
|
12
|
+
* 排序拖拽使用的控件
|
|
13
|
+
* https://docs.dndkit.com/
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns
|
|
16
16
|
*/ var DargMenuItem = function(props) {
|
|
17
17
|
var id = "".concat(props.value.appID, "-").concat(props.value.id);
|
|
18
18
|
var _useSortable = useSortable({
|
|
@@ -64,11 +64,11 @@ import { OpenWin } from "../icons";
|
|
|
64
64
|
]
|
|
65
65
|
}), props.id);
|
|
66
66
|
};
|
|
67
|
-
/**
|
|
68
|
-
* 排序拖拽使用的控件
|
|
69
|
-
* https://docs.dndkit.com/
|
|
70
|
-
* @param props
|
|
71
|
-
* @returns
|
|
67
|
+
/**
|
|
68
|
+
* 排序拖拽使用的控件
|
|
69
|
+
* https://docs.dndkit.com/
|
|
70
|
+
* @param props
|
|
71
|
+
* @returns
|
|
72
72
|
*/ var DargAppItem = function(props) {
|
|
73
73
|
var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
74
74
|
coordinateGetter: sortableKeyboardCoordinates
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { App, AppMenu } from "@knockout-js/api/ucenter";
|
|
2
3
|
import { DrawerProps } from "antd";
|
|
3
4
|
export type AggregateMenuLocale = {
|
|
@@ -41,5 +42,5 @@ export interface AggregateMenuProps {
|
|
|
41
42
|
*/
|
|
42
43
|
onClick?: (menuItem: AppMenu, app: App, isOpen?: boolean) => void;
|
|
43
44
|
}
|
|
44
|
-
declare const _default: (props: AggregateMenuProps) =>
|
|
45
|
+
declare const _default: (props: AggregateMenuProps) => JSX.Element;
|
|
45
46
|
export default _default;
|
|
@@ -22,6 +22,38 @@ var userMenuListQuery = gql("query layoutPkgUserMenuList($appCode:String!){\n u
|
|
|
22
22
|
var userAppsQuery = gql("query layoutPkgUserAppList{\n userApps{\n id,name,code\n }\n}");
|
|
23
23
|
var userPreferenceQuery = gql("query layoutPkgUserPreference{\n orgUserPreference{\n id,menuFavorite,menuRecent,\n }\n}");
|
|
24
24
|
var userPreferenceMut = gql("mutation layoutPkgSaveUserPreference($input:OrgUserPreferenceInput!){\n saveOrgUserPreference(input: $input){ id }\n}");
|
|
25
|
+
/** 查找目录下第一个有路由的菜单项(递归查找子目录) */ var findDirFirstRoute = function(dirId, menuList) {
|
|
26
|
+
var children = menuList.filter(function(item) {
|
|
27
|
+
return item.parentID === dirId;
|
|
28
|
+
});
|
|
29
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
30
|
+
try {
|
|
31
|
+
for(var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
32
|
+
var child = _step.value;
|
|
33
|
+
if (child.kind === AppMenuKind.Menu && child.route) {
|
|
34
|
+
return child;
|
|
35
|
+
}
|
|
36
|
+
if (child.kind === AppMenuKind.Dir) {
|
|
37
|
+
var found = findDirFirstRoute(child.id, menuList);
|
|
38
|
+
if (found) return found;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
_didIteratorError = true;
|
|
43
|
+
_iteratorError = err;
|
|
44
|
+
} finally{
|
|
45
|
+
try {
|
|
46
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
47
|
+
_iterator.return();
|
|
48
|
+
}
|
|
49
|
+
} finally{
|
|
50
|
+
if (_didIteratorError) {
|
|
51
|
+
throw _iteratorError;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
};
|
|
25
57
|
export default function(props) {
|
|
26
58
|
var _useState = _sliced_to_array(useState([]), 2), all = _useState[0], setAll = _useState[1], _useState1 = _sliced_to_array(useState([]), 2), filterList = _useState1[0], setFilterList = _useState1[1], _useState2 = _sliced_to_array(useState([]), 2), collects = _useState2[0], setCollects = _useState2[1], _useState3 = _sliced_to_array(useState([]), 2), latelys = _useState3[0], setLately = _useState3[1], locale = useLocale("AggregateMenu"), isDark = useDark();
|
|
27
59
|
var request = useCallback(/*#__PURE__*/ _async_to_generator(function() {
|
|
@@ -354,6 +386,46 @@ export default function(props) {
|
|
|
354
386
|
})
|
|
355
387
|
]
|
|
356
388
|
}, "".concat(menuItem.id, "-").concat(menuItem.appID));
|
|
389
|
+
}, dirItemRender = function(dirItem, menuList) {
|
|
390
|
+
// 从原始完整数据中查找子路由,避免搜索过滤后找不到子菜单
|
|
391
|
+
var originalApp = all.find(function(a) {
|
|
392
|
+
return a.app.id === dirItem.appID;
|
|
393
|
+
});
|
|
394
|
+
var fullMenuList = originalApp ? originalApp.menu : menuList;
|
|
395
|
+
var firstRoute = findDirFirstRoute(dirItem.id, fullMenuList);
|
|
396
|
+
if (!firstRoute) {
|
|
397
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
398
|
+
className: styles.aggregateMenuDrawerAllMenuItemDir,
|
|
399
|
+
children: dirItem.name
|
|
400
|
+
}, "".concat(dirItem.appID, "-").concat(dirItem.id));
|
|
401
|
+
}
|
|
402
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
403
|
+
className: "".concat(styles.aggregateMenuDrawerAllMenuItemDir, " ").concat(styles.aggregateMenuDrawerAllMenuItemDirClickable),
|
|
404
|
+
onClick: function() {
|
|
405
|
+
onClickItem(firstRoute);
|
|
406
|
+
},
|
|
407
|
+
children: [
|
|
408
|
+
/*#__PURE__*/ _jsx("div", {
|
|
409
|
+
className: styles.aggregateMenuDrawerAllMenuItemName,
|
|
410
|
+
style: {
|
|
411
|
+
fontWeight: "bold"
|
|
412
|
+
},
|
|
413
|
+
children: dirItem.name
|
|
414
|
+
}),
|
|
415
|
+
/*#__PURE__*/ _jsx("div", {
|
|
416
|
+
className: styles.aggregateMenuDrawerAllMenuItemIcons,
|
|
417
|
+
children: /*#__PURE__*/ _jsx(Space, {
|
|
418
|
+
children: /*#__PURE__*/ _jsx(OpenWin, {
|
|
419
|
+
className: "anticon",
|
|
420
|
+
onClick: function(event) {
|
|
421
|
+
event.stopPropagation();
|
|
422
|
+
onClickItem(firstRoute, true);
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
})
|
|
426
|
+
})
|
|
427
|
+
]
|
|
428
|
+
}, "".concat(dirItem.appID, "-").concat(dirItem.id));
|
|
357
429
|
};
|
|
358
430
|
useEffect(function() {
|
|
359
431
|
if (props.dataSource) {
|
|
@@ -512,10 +584,7 @@ export default function(props) {
|
|
|
512
584
|
children: item.app.name
|
|
513
585
|
}),
|
|
514
586
|
item.menu.map(function(menuItem) {
|
|
515
|
-
return menuItem.kind === AppMenuKind.Menu ? menuItemRender(menuItem) :
|
|
516
|
-
className: styles.aggregateMenuDrawerAllMenuItemDir,
|
|
517
|
-
children: menuItem.name
|
|
518
|
-
}, "".concat(menuItem.appID, "-").concat(menuItem.id));
|
|
587
|
+
return menuItem.kind === AppMenuKind.Menu ? menuItemRender(menuItem) : dirItemRender(menuItem, item.menu);
|
|
519
588
|
})
|
|
520
589
|
]
|
|
521
590
|
}, item.app.code) : /*#__PURE__*/ _jsx("span", {
|