clickgo 3.15.10 → 3.15.11
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/README.md +1 -1
- package/dist/app/demo/form/control/tip/tip.xml +6 -0
- package/dist/clickgo.js +7 -7
- package/dist/clickgo.ts +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/lib/form.js +51 -50
- package/dist/lib/form.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Load the module loader first, and then load it using the module loader.
|
|
|
25
25
|
**index.html**
|
|
26
26
|
|
|
27
27
|
```html
|
|
28
|
-
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.15.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.15.11'}"></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
**index.js**
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
<tip label="This is so long long long long long long long long long long">
|
|
13
13
|
<label>So long</label>
|
|
14
14
|
</tip>
|
|
15
|
+
<layout gutter="5" align-v="center">
|
|
16
|
+
<label>Right</label>
|
|
17
|
+
<tip label="This is right">
|
|
18
|
+
<svg src="../../../res/icon.svg" style="width: 16px; height: 16px;" />
|
|
19
|
+
</tip>
|
|
20
|
+
</layout>
|
|
15
21
|
<tip>
|
|
16
22
|
<template v-slot:content>
|
|
17
23
|
<layout direction="v" gutter="5">
|
package/dist/clickgo.js
CHANGED
|
@@ -23,20 +23,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = void 0;
|
|
27
|
-
|
|
28
|
-
exports.isNative = isNative;
|
|
29
|
-
exports.getPlatform = getPlatform;
|
|
30
|
-
exports.isImmersion = isImmersion;
|
|
31
|
-
exports.hasFrame = hasFrame;
|
|
32
|
-
const version = '3.15.10';
|
|
26
|
+
exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
|
|
27
|
+
const version = '3.15.11';
|
|
33
28
|
function getVersion() {
|
|
34
29
|
return version;
|
|
35
30
|
}
|
|
31
|
+
exports.getVersion = getVersion;
|
|
36
32
|
const native = navigator.userAgent.includes('electron') ? true : false;
|
|
37
33
|
function isNative() {
|
|
38
34
|
return native;
|
|
39
35
|
}
|
|
36
|
+
exports.isNative = isNative;
|
|
40
37
|
let platform = 'web';
|
|
41
38
|
let immersion = false;
|
|
42
39
|
let frame = false;
|
|
@@ -51,12 +48,15 @@ if (native) {
|
|
|
51
48
|
function getPlatform() {
|
|
52
49
|
return platform;
|
|
53
50
|
}
|
|
51
|
+
exports.getPlatform = getPlatform;
|
|
54
52
|
function isImmersion() {
|
|
55
53
|
return immersion;
|
|
56
54
|
}
|
|
55
|
+
exports.isImmersion = isImmersion;
|
|
57
56
|
function hasFrame() {
|
|
58
57
|
return frame;
|
|
59
58
|
}
|
|
59
|
+
exports.hasFrame = hasFrame;
|
|
60
60
|
exports.vue = window.Vue;
|
|
61
61
|
exports.control = __importStar(require("./lib/control"));
|
|
62
62
|
exports.core = __importStar(require("./lib/core"));
|
package/dist/clickgo.ts
CHANGED
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/global.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#cg-wrap{position:fixed;left:0;top:0;--g-padding-s:4px;--g-padding:7px;--g-padding-h:4px var(--g-padding);--g-padding-l:14px;--g-padding-l-h:8px var(--g-padding-l);--g-padding-xl:22px;--g-padding-xl-h:12px var(--g-padding-xl);--g-bpadding:18px;--g-margin:2px;--g-radius:0;--g-radius-l:4px;--g-radius-xl:8px;--g-size:12px;--g-size-m:16px;--g-size-l:20px;--g-size-xl: 28px;--g-family:"Lucida Sans Unicode","Helvetica Neue","Helvetica","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans CJK","Source Han Sans","WenQuanYi Micro Hei","Microsoft YaHei","sans-serif";--g-line:1;--g-cubic:cubic-bezier(0.39, 0.575, 0.565, 1);--g-transition:none;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--success-bg:hsl(150, 100%, 98%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--info-bg:hsl(210, 100%, 98%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--warning-bg:hsl(20, 100%, 98%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--danger-bg:hsl(350, 100%, 98%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--face-child:hsl(0, 0%, 90%);--face-hover:hsl(0, 0%, 88%);--face-selected:hsl(0, 0%, 85%);--g-pop-background:#FFF;--g-pop-backdrop:none;--g-pop-border:solid .5px var(--g-border-color);--g-shadow:none;--g-outline-shadow:none;--g-color:hsl(0, 0%, 20%);--g-color-hover:hsl(0, 0%, 30%);--g-color-active:hsl(0, 0%, 10%);--g-color-focus:hsl(0, 0%, 15%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-background-selected:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%);--g-plain-border-color-plain:hsl(0, 0%, 85%);--g-block-background:hsl(0, 0%, 85%);--g-block-background-hover:hsl(0, 0%, 75%);--g-block-dark-background:hsl(0, 0%, 15%);--g-block-dark-background-hover:hsl(0, 0%, 25%)}[data-cg-disabled]{cursor:not-allowed}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0px 15px 30px rgba(0,0,0,.07);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .3s var(--g-cubic);transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:rgba(255,255,255,.1);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);box-shadow:0 3px 5px rgba(0,0,0,.1);opacity:0;display:flex;justify-content:center;align-items:center;border:solid 1px #fff;transition:all .3s var(--g-cubic);transition-property:transform,border;transform:initial}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .3s var(--g-cubic);transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .3s var(--g-cubic)}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .3s var(--g-cubic);transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .3s var(--g-cubic);transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .3s var(--g-cubic)}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 15px 30px rgba(0,0,0,.07);transition:.3s var(--g-cubic);transition-property:transform,opacity;transform:translateY(-10px);opacity:0;overflow:hidden}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-pop-none]{display:none !important}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.3s var(--g-cubic);transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0px 15px 30px rgba(0,0,0,.07);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);pointer-events:none}.cg-notify-wrap.cg-notify-only{align-items:center}.cg-notify-wrap.cg-notify-full .cg-notify-title{padding-bottom:10px}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .3s var(--g-cubic);overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(150px) saturate(1.5);backdrop-filter:blur(150px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0px 15px 30px rgba(0,0,0,.07);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
|
|
1
|
+
#cg-wrap{position:fixed;left:0;top:0;--g-padding-s:4px;--g-padding:7px;--g-padding-h:4px var(--g-padding);--g-padding-l:14px;--g-padding-l-h:8px var(--g-padding-l);--g-padding-xl:22px;--g-padding-xl-h:12px var(--g-padding-xl);--g-bpadding:18px;--g-margin:2px;--g-radius:0;--g-radius-l:4px;--g-radius-xl:8px;--g-size:12px;--g-size-m:16px;--g-size-l:20px;--g-size-xl: 28px;--g-family:"Lucida Sans Unicode","Helvetica Neue","Helvetica","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans CJK","Source Han Sans","WenQuanYi Micro Hei","Microsoft YaHei","sans-serif";--g-line:1;--g-cubic:cubic-bezier(0.39, 0.575, 0.565, 1);--g-transition:none;--cg:hsl(20, 100%, 65%);--success:hsl(150, 100%, 40%);--success-hover:hsl(150, 100%, 45%);--success-active:hsl(150, 100%, 30%);--success-focus:hsl(150, 100%, 35%);--success-disabled:hsl(150, 0%, 40%);--success-bg:hsl(150, 100%, 98%);--info:hsl(210, 100%, 50%);--info-hover:hsl(210, 100%, 60%);--info-active:hsl(210, 100%, 40%);--info-focus:hsl(210, 100%, 45%);--info-disabled:hsl(210, 0%, 50%);--info-bg:hsl(210, 100%, 98%);--warning:hsl(20, 100%, 70%);--warning-hover:hsl(20, 100%, 80%);--warning-active:hsl(20, 100%, 60%);--warning-focus:hsl(20, 100%, 65%);--warning-disabled:hsl(20, 0%, 70%);--warning-bg:hsl(20, 100%, 98%);--danger:hsl(350, 100%, 50%);--danger-hover:hsl(350, 100%, 70%);--danger-active:hsl(350, 100%, 40%);--danger-focus:hsl(350, 100%, 45%);--danger-disabled:hsl(350, 0%, 50%);--danger-bg:hsl(350, 100%, 98%);--system-color:hsl(0, 0%, 95%);--system-background:hsla(0, 0%, 0%, .35);--system-control-background:hsla(0, 0%, 100%, .03);--system-background-hover:hsla(0, 0%, 100%, .06);--system-background-active:hsla(0, 0%, 100%, .1);--system-border-color:hsla(0, 0%, 100%, .03);--system-border-color-hover:hsla(0, 0%, 100%, .06);--system-placeholder-color: hsla(0, 0%, 100%, .2);--face:hsl(0, 0%, 95%);--face-child:hsl(0, 0%, 90%);--face-hover:hsl(0, 0%, 88%);--face-selected:hsl(0, 0%, 85%);--g-pop-background:#FFF;--g-pop-backdrop:none;--g-pop-border:solid .5px var(--g-border-color);--g-shadow:none;--g-outline-shadow:none;--g-color:hsl(0, 0%, 30%);--g-color-hover:hsl(0, 0%, 40%);--g-color-active:hsl(0, 0%, 20%);--g-color-focus:hsl(0, 0%, 25%);--g-color-disabled:hsl(0, 0%, 60%);--g-background:hsl(0, 0%, 95%);--g-background-hover:hsl(0, 0%, 100%);--g-background-active:hsl(0, 0%, 85%);--g-background-opacity:hsl(0, 0%, 50%, .2);--g-background-focus:hsl(0, 0%, 97.5%);--g-background-disabled:hsl(0, 0%, 75%);--g-border-color:hsl(0, 0%, 40%);--g-border-color-hover:hsl(0, 0%, 50%);--g-border-color-active:hsl(0, 0%, 30%);--g-border-color-focus:hsl(0, 0%, 35%);--g-border-color-disabled:hsl(0, 0%, 60%);--g-focusbox-border-color:var(--g-plain-border-color);--g-plain-color:var(--g-color);--g-plain-color-hover:var(--g-color-hover);--g-plain-color-active:var(--g-color-active);--g-plain-color-focus:var(--g-color-focus);--g-plain-color-disabled:var(--g-color-disabled);--g-plain-background:hsl(0, 0%, 100%);--g-plain-background-hover:hsl(0, 0%, 98%);--g-plain-background-active:hsl(0, 0%, 95%);--g-plain-background-focus:var(--g-plain-background);--g-plain-background-disabled:hsl(0, 0%, 95%);--g-plain-background-selected:hsl(0, 0%, 95%);--g-plain-border-color:hsl(0, 0%, 70%);--g-plain-border-color-hover:hsl(0, 0%, 80%);--g-plain-border-color-active:hsl(0, 0%, 60%);--g-plain-border-color-focus:hsl(0, 0%, 65%);--g-plain-border-color-disabled:hsl(0, 0%, 60%);--g-plain-border-color-plain:hsl(0, 0%, 85%);--g-block-background:hsl(0, 0%, 85%);--g-block-background-hover:hsl(0, 0%, 75%);--g-block-dark-background:hsl(0, 0%, 15%);--g-block-dark-background-hover:hsl(0, 0%, 25%)}[data-cg-disabled]{cursor:not-allowed}#cg-form-list{z-index:20020000}#cg-pop-list{z-index:20020001}#cg-simpletask{z-index:20020002}#cg-rectangle{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;box-shadow:0 0 10px rgba(0,0,0,.25);background:rgba(255,255,255,.05);pointer-events:none;opacity:0}#cg-circular{z-index:20020003;box-sizing:border-box;position:absolute;border:solid 3px var(--cg);border-radius:50%;filter:drop-shadow(0 0 3px var(--cg));pointer-events:none;opacity:0}#cg-gesture{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:50%;pointer-events:none;opacity:0;background:var(--system-background);box-shadow:0px 15px 30px rgba(0,0,0,.07);transform:scale(0);width:20px;height:20px}#cg-gesture.done{background:rgba(255,255,255,.3);border:solid 3px rgba(0,0,0,.3)}#cg-gesture.ani{transition:all .3s var(--g-cubic);transition-property:left,top,transform}#cg-drag{z-index:20020003;box-sizing:border-box;position:absolute;border-radius:3px;pointer-events:none;background:rgba(255,255,255,.1);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);box-shadow:0 3px 5px rgba(0,0,0,.1);opacity:0;display:flex;justify-content:center;align-items:center;border:solid 1px #fff;transition:all .3s var(--g-cubic);transition-property:transform,border;transform:initial}#cg-launcher{z-index:20020004;box-sizing:border-box;position:fixed;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);width:100%;height:100%;left:0;top:0;color:var(--system-color);display:none;flex-direction:column;transition:all .3s var(--g-cubic);transform:scale(1.2);opacity:0}#cg-launcher:not(.cg-show){pointer-events:none}#cg-launcher.cg-show{transform:scale(1);opacity:1}.cg-launcher-search{text-align:center;padding:50px}.cg-launcher-sinput{-webkit-appearance:none;appearance:none;padding:15px;border:solid 1px rgba(0,0,0,0);background:var(--system-control-background);width:60%;border-radius:5px;color:var(--system-color);transition:all .3s var(--g-cubic)}.cg-launcher-sinput::placeholder{color:var(--system-placeholder-color)}.cg-launcher-sinput::selection{background-color:var(--system-background-hover)}.cg-launcher-sinput:focus{outline:none;border-color:var(--system-border-color-hover)}.cg-launcher-foldername{-webkit-appearance:none;appearance:none;height:50px;font-size:28px !important;border:none;background:rgba(0,0,0,0);width:50%;color:var(--system-color);text-align:center}.cg-launcher-foldername::selection{background-color:var(--system-background-hover)}.cg-launcher-foldername:focus{outline:none}.cg-launcher-item{width:190px;display:inline-flex;vertical-align:middle;margin-bottom:50px}.cg-launcher-inner{flex:1;width:0}.cg-launcher-icon{background-position:center;background-size:80px;height:80px;background-repeat:no-repeat}.cg-launcher-icon:active{filter:brightness(0.6)}.cg-launcher-name{font-size:13px;font-weight:bold;text-shadow:0 0 3px rgba(0,0,0,.6);text-align:center;margin-top:20px}.cg-launcher-icon,.cg-launcher-name{transition:all .3s var(--g-cubic);transition-property:opacity}.cg-launcher-space{width:50px}.cg-launcher-folder{display:flex;justify-content:center;height:80px}.cg-launcher-folder>div{height:80px;width:80px;background:rgba(255,255,255,.3);border-radius:20px;padding:10px 4px 4px 10px;transition:all .3s var(--g-cubic);transition-property:left,top,width,height,opacity;overflow-y:auto}.cg-launcher-folder>div::-webkit-scrollbar{display:none}.cg-launcher-folder>div .cg-launcher-item,.cg-launcher-folder>div .cg-launcher-space{transition:all .3s var(--g-cubic)}.cg-launcher-folder>div.cg-show{padding:50px 0 0 50px}.cg-launcher-folder>div:not(.cg-show):active{filter:brightness(0.6)}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-item{width:22px;margin-bottom:6px}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-icon{background-size:16px;height:16px;pointer-events:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-name{display:none}.cg-launcher-folder>div:not(.cg-show) .cg-launcher-space{width:6px}.cg-launcher-list{flex:1;height:0;overflow-y:auto;padding:0 0 0 50px}.cg-launcher-list::-webkit-scrollbar{display:none}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-icon,.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-name{opacity:0}.cg-launcher-list.cg-folder-open>.cg-launcher-item>.cg-launcher-inner>.cg-launcher-folder>div:not(.cg-show){opacity:0}[data-cg-pop]{position:absolute;box-shadow:0px 15px 30px rgba(0,0,0,.07);transition:.3s var(--g-cubic);transition-property:transform,opacity;transform:translateY(-10px);opacity:0;overflow:hidden}[data-cg-pop]:not([data-cg-open]){pointer-events:none}[data-cg-pop][data-cg-pop-none]{display:none !important}[data-cg-pop][data-cg-open]{transform:translateY(0px);opacity:1}#cg-notify{z-index:20020005}.cg-notify-wrap{background:var(--system-background);position:fixed;padding:15px;border-radius:5px;right:0;top:0;width:280px;font-size:14px;display:flex;transition:.3s var(--g-cubic);transition-property:transform,opacity;overflow:hidden;color:var(--system-color);box-shadow:0px 15px 30px rgba(0,0,0,.07);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);pointer-events:none}.cg-notify-wrap.cg-notify-only{align-items:center}.cg-notify-wrap.cg-notify-full .cg-notify-title{padding-bottom:10px}.cg-notify-icon{margin-right:10px;width:16px;height:16px;border-radius:50%}.cg-notify-icon.cg-primary{background:var(--success)}.cg-notify-icon.cg-info{background:var(--info)}.cg-notify-icon.cg-warning{background:var(--warning)}.cg-notify-icon.cg-danger{background:var(--danger)}.cg-notify-icon.cg-progress{background:var(--cg)}.cg-notify-title{font-size:16px;font-weight:bold}.cg-notify-content{line-height:1.5;word-break:break-word}.cg-notify-progress{position:absolute;bottom:0;left:0;border-radius:1px;background:var(--cg);transition:width 1s ease-out;width:0%;height:2px}#cg-simpletask{left:0;bottom:-46px;width:100%;height:46px;top:initial;background:var(--system-background);-webkit-backdrop-filter:blur(30px) saturate(1.5);backdrop-filter:blur(30px) saturate(1.5);padding:5px 0 5px 5px;display:flex;color:var(--system-color);transition:bottom .3s var(--g-cubic);overflow-x:auto;position:fixed}#cg-simpletask::-webkit-scrollbar{display:none}.cg-simpletask-item{background:rgba(0,0,0,.05);border-radius:3px;padding:10px;display:flex;align-items:center;margin-right:5px}.cg-simpletask-item:hover{background:rgba(0,0,0,.1)}.cg-simpletask-item:active{background:rgba(0,0,0,.2)}.cg-simpletask-icon{margin-right:5px;background-size:cover;width:16px;height:16px}#cg-confirm{z-index:20020006;position:fixed;left:0;top:0;width:100%;height:100%;background:var(--system-background);-webkit-backdrop-filter:blur(150px) saturate(1.5);backdrop-filter:blur(150px) saturate(1.5);justify-content:center;align-items:center}#cg-confirm .cg-confirm-box{background:var(--system-background);width:60%;box-shadow:0px 15px 30px rgba(0,0,0,.07);font-size:14px;border-radius:3px;overflow:hidden;color:var(--system-color)}#cg-confirm .cg-confirm-box #cg-confirm-content{padding:25px;line-height:1.5}#cg-confirm .cg-confirm-box .cg-confirm-controls{border-top:solid .5px var(--system-border-color);display:flex}#cg-confirm .cg-confirm-box .cg-confirm-controls>div{padding:20px;flex:1;text-align:center}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:last-child{border-left:solid .5px var(--system-border-color)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:hover{background:var(--system-background-hover)}#cg-confirm .cg-confirm-box .cg-confirm-controls>div:active{background:var(--system-background-active)}
|
package/dist/lib/form.js
CHANGED
|
@@ -32,54 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.activePanels = exports.elements = exports.launcherRoot = exports.simpleSystemTaskRoot = exports.AbstractForm = exports.AbstractPanel = void 0;
|
|
36
|
-
exports.
|
|
37
|
-
exports.min = min;
|
|
38
|
-
exports.max = max;
|
|
39
|
-
exports.close = close;
|
|
40
|
-
exports.bindResize = bindResize;
|
|
41
|
-
exports.bindDrag = bindDrag;
|
|
42
|
-
exports.refreshMaxPosition = refreshMaxPosition;
|
|
43
|
-
exports.getTaskId = getTaskId;
|
|
44
|
-
exports.get = get;
|
|
45
|
-
exports.send = send;
|
|
46
|
-
exports.getList = getList;
|
|
47
|
-
exports.getFocus = getFocus;
|
|
48
|
-
exports.getActivePanel = getActivePanel;
|
|
49
|
-
exports.removeActivePanel = removeActivePanel;
|
|
50
|
-
exports.setActivePanel = setActivePanel;
|
|
51
|
-
exports.hash = hash;
|
|
52
|
-
exports.getHash = getHash;
|
|
53
|
-
exports.hashBack = hashBack;
|
|
54
|
-
exports.changeFocus = changeFocus;
|
|
55
|
-
exports.getMaxZIndexID = getMaxZIndexID;
|
|
56
|
-
exports.getRectByBorder = getRectByBorder;
|
|
57
|
-
exports.showCircular = showCircular;
|
|
58
|
-
exports.moveRectangle = moveRectangle;
|
|
59
|
-
exports.showRectangle = showRectangle;
|
|
60
|
-
exports.hideRectangle = hideRectangle;
|
|
61
|
-
exports.showDrag = showDrag;
|
|
62
|
-
exports.moveDrag = moveDrag;
|
|
63
|
-
exports.hideDrag = hideDrag;
|
|
64
|
-
exports.notify = notify;
|
|
65
|
-
exports.notifyProgress = notifyProgress;
|
|
66
|
-
exports.hideNotify = hideNotify;
|
|
67
|
-
exports.appendToPop = appendToPop;
|
|
68
|
-
exports.removeFromPop = removeFromPop;
|
|
69
|
-
exports.showPop = showPop;
|
|
70
|
-
exports.hidePop = hidePop;
|
|
71
|
-
exports.isJustPop = isJustPop;
|
|
72
|
-
exports.doFocusAndPopEvent = doFocusAndPopEvent;
|
|
73
|
-
exports.remove = remove;
|
|
74
|
-
exports.removePanel = removePanel;
|
|
75
|
-
exports.createPanel = createPanel;
|
|
76
|
-
exports.create = create;
|
|
77
|
-
exports.dialog = dialog;
|
|
78
|
-
exports.confirm = confirm;
|
|
79
|
-
exports.prompt = prompt;
|
|
80
|
-
exports.flash = flash;
|
|
81
|
-
exports.showLauncher = showLauncher;
|
|
82
|
-
exports.hideLauncher = hideLauncher;
|
|
35
|
+
exports.prompt = exports.confirm = exports.dialog = exports.create = exports.createPanel = exports.removePanel = exports.remove = exports.doFocusAndPopEvent = exports.isJustPop = exports.hidePop = exports.showPop = exports.removeFromPop = exports.appendToPop = exports.hideNotify = exports.notifyProgress = exports.notify = exports.hideDrag = exports.moveDrag = exports.showDrag = exports.hideRectangle = exports.showRectangle = exports.moveRectangle = exports.showCircular = exports.getRectByBorder = exports.getMaxZIndexID = exports.changeFocus = exports.hashBack = exports.getHash = exports.hash = exports.setActivePanel = exports.removeActivePanel = exports.getActivePanel = exports.activePanels = exports.getFocus = exports.getList = exports.send = exports.get = exports.getTaskId = exports.refreshMaxPosition = exports.bindDrag = exports.bindResize = exports.close = exports.max = exports.min = exports.superConfirm = exports.elements = exports.launcherRoot = exports.simpleSystemTaskRoot = exports.AbstractForm = exports.AbstractPanel = void 0;
|
|
36
|
+
exports.hideLauncher = exports.showLauncher = exports.flash = void 0;
|
|
83
37
|
const clickgo = __importStar(require("../clickgo"));
|
|
84
38
|
const core = __importStar(require("./core"));
|
|
85
39
|
const task = __importStar(require("./task"));
|
|
@@ -946,6 +900,7 @@ function superConfirm(html) {
|
|
|
946
900
|
};
|
|
947
901
|
});
|
|
948
902
|
}
|
|
903
|
+
exports.superConfirm = superConfirm;
|
|
949
904
|
function changeState(state, formId) {
|
|
950
905
|
const tid = getTaskId(formId);
|
|
951
906
|
const t = task.list[tid];
|
|
@@ -970,12 +925,15 @@ function changeState(state, formId) {
|
|
|
970
925
|
function min(formId) {
|
|
971
926
|
return changeState('min', formId);
|
|
972
927
|
}
|
|
928
|
+
exports.min = min;
|
|
973
929
|
function max(formId) {
|
|
974
930
|
return changeState('max', formId);
|
|
975
931
|
}
|
|
932
|
+
exports.max = max;
|
|
976
933
|
function close(formId) {
|
|
977
934
|
return changeState('close', formId);
|
|
978
935
|
}
|
|
936
|
+
exports.close = close;
|
|
979
937
|
function bindResize(e, border) {
|
|
980
938
|
const formWrap = dom.findParentByClass(e.target, 'cg-form-wrap');
|
|
981
939
|
if (!formWrap) {
|
|
@@ -993,6 +951,7 @@ function bindResize(e, border) {
|
|
|
993
951
|
}
|
|
994
952
|
t.forms[fid].vroot.$refs.form.resizeMethod(e, border);
|
|
995
953
|
}
|
|
954
|
+
exports.bindResize = bindResize;
|
|
996
955
|
function bindDrag(e) {
|
|
997
956
|
const formWrap = dom.findParentByClass(e.target, 'cg-form-wrap');
|
|
998
957
|
if (!formWrap) {
|
|
@@ -1010,6 +969,7 @@ function bindDrag(e) {
|
|
|
1010
969
|
}
|
|
1011
970
|
t.forms[fid].vroot.$refs.form.moveMethod(e, true);
|
|
1012
971
|
}
|
|
972
|
+
exports.bindDrag = bindDrag;
|
|
1013
973
|
function refreshMaxPosition() {
|
|
1014
974
|
const area = core.getAvailArea();
|
|
1015
975
|
for (let i = 0; i < exports.elements.list.children.length; ++i) {
|
|
@@ -1036,6 +996,7 @@ function refreshMaxPosition() {
|
|
|
1036
996
|
}
|
|
1037
997
|
}
|
|
1038
998
|
}
|
|
999
|
+
exports.refreshMaxPosition = refreshMaxPosition;
|
|
1039
1000
|
function getTaskId(formId) {
|
|
1040
1001
|
const formElement = exports.elements.list.querySelector(`[data-form-id='${formId}']`);
|
|
1041
1002
|
if (!formElement) {
|
|
@@ -1047,6 +1008,7 @@ function getTaskId(formId) {
|
|
|
1047
1008
|
}
|
|
1048
1009
|
return parseInt(taskIdAttr);
|
|
1049
1010
|
}
|
|
1011
|
+
exports.getTaskId = getTaskId;
|
|
1050
1012
|
function get(formId) {
|
|
1051
1013
|
const taskId = getTaskId(formId);
|
|
1052
1014
|
if (taskId === 0) {
|
|
@@ -1067,6 +1029,7 @@ function get(formId) {
|
|
|
1067
1029
|
'showInSystemTask': item.vroot.showInSystemTask
|
|
1068
1030
|
};
|
|
1069
1031
|
}
|
|
1032
|
+
exports.get = get;
|
|
1070
1033
|
function send(formId, obj) {
|
|
1071
1034
|
const taskId = getTaskId(formId);
|
|
1072
1035
|
if (taskId === 0) {
|
|
@@ -1075,6 +1038,7 @@ function send(formId, obj) {
|
|
|
1075
1038
|
const item = task.list[taskId].forms[formId];
|
|
1076
1039
|
item.vroot.onReceive(obj);
|
|
1077
1040
|
}
|
|
1041
|
+
exports.send = send;
|
|
1078
1042
|
function getList(taskId) {
|
|
1079
1043
|
if (!task.list[taskId]) {
|
|
1080
1044
|
return {};
|
|
@@ -1095,14 +1059,17 @@ function getList(taskId) {
|
|
|
1095
1059
|
}
|
|
1096
1060
|
return list;
|
|
1097
1061
|
}
|
|
1062
|
+
exports.getList = getList;
|
|
1098
1063
|
function getFocus() {
|
|
1099
1064
|
return focusId;
|
|
1100
1065
|
}
|
|
1066
|
+
exports.getFocus = getFocus;
|
|
1101
1067
|
exports.activePanels = {};
|
|
1102
1068
|
function getActivePanel(formId) {
|
|
1103
1069
|
var _a;
|
|
1104
1070
|
return (_a = exports.activePanels[formId]) !== null && _a !== void 0 ? _a : [];
|
|
1105
1071
|
}
|
|
1072
|
+
exports.getActivePanel = getActivePanel;
|
|
1106
1073
|
function removeActivePanel(panelId, formId, taskId) {
|
|
1107
1074
|
if (!taskId) {
|
|
1108
1075
|
return false;
|
|
@@ -1126,6 +1093,7 @@ function removeActivePanel(panelId, formId, taskId) {
|
|
|
1126
1093
|
}
|
|
1127
1094
|
return true;
|
|
1128
1095
|
}
|
|
1096
|
+
exports.removeActivePanel = removeActivePanel;
|
|
1129
1097
|
function setActivePanel(panelId, formId, taskId) {
|
|
1130
1098
|
if (!taskId) {
|
|
1131
1099
|
return false;
|
|
@@ -1146,6 +1114,7 @@ function setActivePanel(panelId, formId, taskId) {
|
|
|
1146
1114
|
exports.activePanels[formId].push(panelId);
|
|
1147
1115
|
return true;
|
|
1148
1116
|
}
|
|
1117
|
+
exports.setActivePanel = setActivePanel;
|
|
1149
1118
|
function hash(hash, formId) {
|
|
1150
1119
|
const taskId = getTaskId(formId);
|
|
1151
1120
|
if (taskId === 0) {
|
|
@@ -1162,6 +1131,7 @@ function hash(hash, formId) {
|
|
|
1162
1131
|
item.vroot.formHash = hash;
|
|
1163
1132
|
return true;
|
|
1164
1133
|
}
|
|
1134
|
+
exports.hash = hash;
|
|
1165
1135
|
function getHash(formId) {
|
|
1166
1136
|
const taskId = getTaskId(formId);
|
|
1167
1137
|
if (taskId === 0) {
|
|
@@ -1177,6 +1147,7 @@ function getHash(formId) {
|
|
|
1177
1147
|
}
|
|
1178
1148
|
return item.vroot.$data._formHash;
|
|
1179
1149
|
}
|
|
1150
|
+
exports.getHash = getHash;
|
|
1180
1151
|
function hashBack(formId) {
|
|
1181
1152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1182
1153
|
const taskId = getTaskId(formId);
|
|
@@ -1195,6 +1166,7 @@ function hashBack(formId) {
|
|
|
1195
1166
|
return true;
|
|
1196
1167
|
});
|
|
1197
1168
|
}
|
|
1169
|
+
exports.hashBack = hashBack;
|
|
1198
1170
|
function changeFocus(formId = 0) {
|
|
1199
1171
|
var _a;
|
|
1200
1172
|
if (typeof formId === 'string') {
|
|
@@ -1266,6 +1238,7 @@ function changeFocus(formId = 0) {
|
|
|
1266
1238
|
core.trigger('formFocused', taskId, formId);
|
|
1267
1239
|
}
|
|
1268
1240
|
}
|
|
1241
|
+
exports.changeFocus = changeFocus;
|
|
1269
1242
|
function getMaxZIndexID(out = {}) {
|
|
1270
1243
|
var _a, _b;
|
|
1271
1244
|
let zIndex = 0;
|
|
@@ -1301,6 +1274,7 @@ function getMaxZIndexID(out = {}) {
|
|
|
1301
1274
|
}
|
|
1302
1275
|
return formId;
|
|
1303
1276
|
}
|
|
1277
|
+
exports.getMaxZIndexID = getMaxZIndexID;
|
|
1304
1278
|
function getRectByBorder(border) {
|
|
1305
1279
|
var _a, _b, _c, _d;
|
|
1306
1280
|
const area = core.getAvailArea();
|
|
@@ -1381,6 +1355,7 @@ function getRectByBorder(border) {
|
|
|
1381
1355
|
'top': top
|
|
1382
1356
|
};
|
|
1383
1357
|
}
|
|
1358
|
+
exports.getRectByBorder = getRectByBorder;
|
|
1384
1359
|
function showCircular(x, y) {
|
|
1385
1360
|
exports.elements.circular.style.transition = 'none';
|
|
1386
1361
|
requestAnimationFrame(function () {
|
|
@@ -1401,6 +1376,7 @@ function showCircular(x, y) {
|
|
|
1401
1376
|
});
|
|
1402
1377
|
});
|
|
1403
1378
|
}
|
|
1379
|
+
exports.showCircular = showCircular;
|
|
1404
1380
|
function moveRectangle(border) {
|
|
1405
1381
|
var _a, _b, _c, _d;
|
|
1406
1382
|
const dataReady = (_a = exports.elements.rectangle.getAttribute('data-ready')) !== null && _a !== void 0 ? _a : '0';
|
|
@@ -1425,6 +1401,7 @@ function moveRectangle(border) {
|
|
|
1425
1401
|
exports.elements.rectangle.style.top = top.toString() + 'px';
|
|
1426
1402
|
}
|
|
1427
1403
|
}
|
|
1404
|
+
exports.moveRectangle = moveRectangle;
|
|
1428
1405
|
function showRectangle(x, y, border) {
|
|
1429
1406
|
exports.elements.rectangle.style.transition = 'none';
|
|
1430
1407
|
requestAnimationFrame(function () {
|
|
@@ -1444,9 +1421,11 @@ function showRectangle(x, y, border) {
|
|
|
1444
1421
|
});
|
|
1445
1422
|
});
|
|
1446
1423
|
}
|
|
1424
|
+
exports.showRectangle = showRectangle;
|
|
1447
1425
|
function hideRectangle() {
|
|
1448
1426
|
exports.elements.rectangle.style.opacity = '0';
|
|
1449
1427
|
}
|
|
1428
|
+
exports.hideRectangle = hideRectangle;
|
|
1450
1429
|
let dragTimeOut = 0;
|
|
1451
1430
|
function showDrag() {
|
|
1452
1431
|
if (dragTimeOut) {
|
|
@@ -1457,6 +1436,7 @@ function showDrag() {
|
|
|
1457
1436
|
exports.elements.drag.style.transform = 'perspective(100px) rotateX(15deg) translateZ(15px)';
|
|
1458
1437
|
exports.elements.drag.style.borderBottomWidth = '2px';
|
|
1459
1438
|
}
|
|
1439
|
+
exports.showDrag = showDrag;
|
|
1460
1440
|
function moveDrag(opt) {
|
|
1461
1441
|
if (opt.top) {
|
|
1462
1442
|
exports.elements.drag.style.top = opt.top.toString() + 'px';
|
|
@@ -1487,6 +1467,7 @@ function moveDrag(opt) {
|
|
|
1487
1467
|
exports.elements.drag.childNodes[0].style.display = 'none';
|
|
1488
1468
|
}
|
|
1489
1469
|
}
|
|
1470
|
+
exports.moveDrag = moveDrag;
|
|
1490
1471
|
function hideDrag() {
|
|
1491
1472
|
exports.elements.drag.style.transform = 'initial';
|
|
1492
1473
|
exports.elements.drag.style.borderBottomWidth = '1px';
|
|
@@ -1495,6 +1476,7 @@ function hideDrag() {
|
|
|
1495
1476
|
exports.elements.drag.style.opacity = '0';
|
|
1496
1477
|
}, 300);
|
|
1497
1478
|
}
|
|
1479
|
+
exports.hideDrag = hideDrag;
|
|
1498
1480
|
let notifyTop = 10;
|
|
1499
1481
|
let notifyId = 0;
|
|
1500
1482
|
function notify(opt) {
|
|
@@ -1540,6 +1522,7 @@ function notify(opt) {
|
|
|
1540
1522
|
});
|
|
1541
1523
|
return nid;
|
|
1542
1524
|
}
|
|
1525
|
+
exports.notify = notify;
|
|
1543
1526
|
function notifyProgress(notifyId, per) {
|
|
1544
1527
|
const el = exports.elements.notify.querySelector(`[data-notifyid="${notifyId}"]`);
|
|
1545
1528
|
if (!el) {
|
|
@@ -1563,6 +1546,7 @@ function notifyProgress(notifyId, per) {
|
|
|
1563
1546
|
}
|
|
1564
1547
|
progress.style.width = (per < 1 ? per * 100 : per).toString() + '%';
|
|
1565
1548
|
}
|
|
1549
|
+
exports.notifyProgress = notifyProgress;
|
|
1566
1550
|
function hideNotify(notifyId) {
|
|
1567
1551
|
const el = exports.elements.notify.querySelector(`[data-notifyid="${notifyId}"]`);
|
|
1568
1552
|
if (!el) {
|
|
@@ -1589,12 +1573,15 @@ function hideNotify(notifyId) {
|
|
|
1589
1573
|
el.remove();
|
|
1590
1574
|
}, 100);
|
|
1591
1575
|
}
|
|
1576
|
+
exports.hideNotify = hideNotify;
|
|
1592
1577
|
function appendToPop(el) {
|
|
1593
1578
|
exports.elements.popList.appendChild(el);
|
|
1594
1579
|
}
|
|
1580
|
+
exports.appendToPop = appendToPop;
|
|
1595
1581
|
function removeFromPop(el) {
|
|
1596
1582
|
exports.elements.popList.removeChild(el);
|
|
1597
1583
|
}
|
|
1584
|
+
exports.removeFromPop = removeFromPop;
|
|
1598
1585
|
function refreshPopPosition(el, pop, direction, size = {}) {
|
|
1599
1586
|
var _a, _b;
|
|
1600
1587
|
const width = (_a = size.width) !== null && _a !== void 0 ? _a : pop.offsetWidth;
|
|
@@ -1683,13 +1670,13 @@ function refreshPopPosition(el, pop, direction, size = {}) {
|
|
|
1683
1670
|
let lastShowPopTime = 0;
|
|
1684
1671
|
function showPop(el, pop, direction, opt = {}) {
|
|
1685
1672
|
var _a;
|
|
1686
|
-
if (!(el instanceof
|
|
1673
|
+
if (!(el instanceof Element)) {
|
|
1687
1674
|
if (!el.$el) {
|
|
1688
1675
|
return;
|
|
1689
1676
|
}
|
|
1690
1677
|
el = el.$el;
|
|
1691
1678
|
}
|
|
1692
|
-
if (pop && !(pop instanceof
|
|
1679
|
+
if (pop && !(pop instanceof Element)) {
|
|
1693
1680
|
if (!pop.$el) {
|
|
1694
1681
|
return;
|
|
1695
1682
|
}
|
|
@@ -1777,6 +1764,7 @@ function showPop(el, pop, direction, opt = {}) {
|
|
|
1777
1764
|
}).catch(() => {
|
|
1778
1765
|
});
|
|
1779
1766
|
}
|
|
1767
|
+
exports.showPop = showPop;
|
|
1780
1768
|
function hidePop(pop) {
|
|
1781
1769
|
if (pop && !(pop instanceof HTMLElement)) {
|
|
1782
1770
|
if (!pop.$el) {
|
|
@@ -1853,6 +1841,7 @@ function hidePop(pop) {
|
|
|
1853
1841
|
popInfo.wayList.splice(level);
|
|
1854
1842
|
popInfo.time.splice(level);
|
|
1855
1843
|
}
|
|
1844
|
+
exports.hidePop = hidePop;
|
|
1856
1845
|
function isJustPop(el) {
|
|
1857
1846
|
if (el instanceof HTMLElement) {
|
|
1858
1847
|
const level = el.dataset.cgLevel;
|
|
@@ -1867,6 +1856,7 @@ function isJustPop(el) {
|
|
|
1867
1856
|
}
|
|
1868
1857
|
return true;
|
|
1869
1858
|
}
|
|
1859
|
+
exports.isJustPop = isJustPop;
|
|
1870
1860
|
function doFocusAndPopEvent(e) {
|
|
1871
1861
|
var _a, _b;
|
|
1872
1862
|
if (dom.hasTouchButMouse(e)) {
|
|
@@ -1923,6 +1913,7 @@ function doFocusAndPopEvent(e) {
|
|
|
1923
1913
|
hidePop();
|
|
1924
1914
|
changeFocus();
|
|
1925
1915
|
}
|
|
1916
|
+
exports.doFocusAndPopEvent = doFocusAndPopEvent;
|
|
1926
1917
|
window.addEventListener('touchstart', doFocusAndPopEvent, {
|
|
1927
1918
|
'passive': true
|
|
1928
1919
|
});
|
|
@@ -1977,6 +1968,7 @@ function remove(formId) {
|
|
|
1977
1968
|
}, 300);
|
|
1978
1969
|
return true;
|
|
1979
1970
|
}
|
|
1971
|
+
exports.remove = remove;
|
|
1980
1972
|
function removePanel(id, vapp, el) {
|
|
1981
1973
|
var _a;
|
|
1982
1974
|
const formWrap = dom.findParentByClass(el, 'cg-form-wrap');
|
|
@@ -2010,6 +2002,7 @@ function removePanel(id, vapp, el) {
|
|
|
2010
2002
|
}
|
|
2011
2003
|
return true;
|
|
2012
2004
|
}
|
|
2005
|
+
exports.removePanel = removePanel;
|
|
2013
2006
|
function getForm(taskId, formId) {
|
|
2014
2007
|
const t = task.list[taskId];
|
|
2015
2008
|
if (!t) {
|
|
@@ -2327,6 +2320,7 @@ function createPanel(rootPanel_1, cls_1) {
|
|
|
2327
2320
|
};
|
|
2328
2321
|
});
|
|
2329
2322
|
}
|
|
2323
|
+
exports.createPanel = createPanel;
|
|
2330
2324
|
function create(cls_1, data_1) {
|
|
2331
2325
|
return __awaiter(this, arguments, void 0, function* (cls, data, opt = {}, taskId) {
|
|
2332
2326
|
var _a, _b;
|
|
@@ -2724,6 +2718,7 @@ function create(cls_1, data_1) {
|
|
|
2724
2718
|
return rtn.vroot;
|
|
2725
2719
|
});
|
|
2726
2720
|
}
|
|
2721
|
+
exports.create = create;
|
|
2727
2722
|
function dialog(opt) {
|
|
2728
2723
|
return new Promise(function (resolve) {
|
|
2729
2724
|
var _a, _b, _c, _d;
|
|
@@ -2798,6 +2793,7 @@ function dialog(opt) {
|
|
|
2798
2793
|
});
|
|
2799
2794
|
});
|
|
2800
2795
|
}
|
|
2796
|
+
exports.dialog = dialog;
|
|
2801
2797
|
function confirm(opt) {
|
|
2802
2798
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2803
2799
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
@@ -2834,6 +2830,7 @@ function confirm(opt) {
|
|
|
2834
2830
|
return false;
|
|
2835
2831
|
});
|
|
2836
2832
|
}
|
|
2833
|
+
exports.confirm = confirm;
|
|
2837
2834
|
function prompt(opt) {
|
|
2838
2835
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2839
2836
|
var _a, _b, _c;
|
|
@@ -2869,6 +2866,7 @@ function prompt(opt) {
|
|
|
2869
2866
|
return res;
|
|
2870
2867
|
});
|
|
2871
2868
|
}
|
|
2869
|
+
exports.prompt = prompt;
|
|
2872
2870
|
function flash(formId, taskId) {
|
|
2873
2871
|
if (!taskId) {
|
|
2874
2872
|
return;
|
|
@@ -2891,12 +2889,14 @@ function flash(formId, taskId) {
|
|
|
2891
2889
|
}, 1000);
|
|
2892
2890
|
core.trigger('formFlash', taskId, formId);
|
|
2893
2891
|
}
|
|
2892
|
+
exports.flash = flash;
|
|
2894
2893
|
function showLauncher() {
|
|
2895
2894
|
exports.elements.launcher.style.display = 'flex';
|
|
2896
2895
|
requestAnimationFrame(function () {
|
|
2897
2896
|
exports.elements.launcher.classList.add('cg-show');
|
|
2898
2897
|
});
|
|
2899
2898
|
}
|
|
2899
|
+
exports.showLauncher = showLauncher;
|
|
2900
2900
|
function hideLauncher() {
|
|
2901
2901
|
exports.elements.launcher.classList.remove('cg-show');
|
|
2902
2902
|
setTimeout(function () {
|
|
@@ -2907,6 +2907,7 @@ function hideLauncher() {
|
|
|
2907
2907
|
exports.elements.launcher.style.display = 'none';
|
|
2908
2908
|
}, 300);
|
|
2909
2909
|
}
|
|
2910
|
+
exports.hideLauncher = hideLauncher;
|
|
2910
2911
|
window.addEventListener('resize', function () {
|
|
2911
2912
|
task.refreshSystemPosition();
|
|
2912
2913
|
});
|
package/dist/lib/form.ts
CHANGED
|
@@ -2213,13 +2213,13 @@ export function showPop(el: HTMLElement | types.IVue, pop: HTMLElement | types.I
|
|
|
2213
2213
|
/** --- 展示托管方式 --- */
|
|
2214
2214
|
'way'?: 'normal' | 'click' | 'hover';
|
|
2215
2215
|
} = {}): void {
|
|
2216
|
-
if (!(el instanceof
|
|
2216
|
+
if (!(el instanceof Element)) {
|
|
2217
2217
|
if (!el.$el) {
|
|
2218
2218
|
return;
|
|
2219
2219
|
}
|
|
2220
2220
|
el = el.$el;
|
|
2221
2221
|
}
|
|
2222
|
-
if (pop && !(pop instanceof
|
|
2222
|
+
if (pop && !(pop instanceof Element)) {
|
|
2223
2223
|
if (!pop.$el) {
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|