@dao-style/biz 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/access-type/src/AccessType.vue.d.ts +4 -0
- package/dist/components/iframe/src/Iframe.vue.d.ts +1 -1
- package/dist/components/instance-cluster/src/InstanceCluster.vue.d.ts +9 -9
- package/dist/components/instance-namespace/src/InstanceNamespace.vue.d.ts +9 -9
- package/dist/components/instance-storage-class/src/InstanceStorageClass.vue.d.ts +9 -9
- package/dist/components/parameter-list/src/ParameterList.vue.d.ts +1 -1
- package/dist/components/parameter-template-list/src/ParameterTemplateList.vue.d.ts +2 -2
- package/dist/components/port-config/props.d.ts +4 -0
- package/dist/components/port-config/props.js +4 -0
- package/dist/components/port-config/props.mjs +4 -0
- package/dist/components/port-config/src/PortConfig.vue.d.ts +9 -0
- package/dist/components/port-config/src/PortConfig.vue.js +4 -2
- package/dist/components/port-config/src/PortConfig.vue.mjs +4 -2
- package/dist/components/remote-component/src/RemoteComponent.vue.d.ts +2 -1
- package/dist/components/remote-component/src/RemoteComponent.vue.js +4 -3
- package/dist/components/remote-component/src/RemoteComponent.vue.mjs +5 -4
- package/dist/components/remote-component/src/RemoteComponent.vue2.js +3 -2
- package/dist/components/remote-component/src/RemoteComponent.vue2.mjs +3 -2
- package/dist/components/time-picker/src/TimePicker.vue.d.ts +1 -1
- package/dist/forms/import-parameter-template/props.d.ts +11 -11
- package/dist/forms/import-parameter-template/src/ImportParameterTemplate.vue.d.ts +33 -33
- package/dist/group-mapping.json +1 -1
- package/dist/index.js +27 -24
- package/dist/index.mjs +4 -2
- package/dist/locales/en-US/workloads/ContainerImage.json.js +2 -1
- package/dist/locales/en-US/workloads/ContainerImage.json.mjs +2 -1
- package/dist/locales/en-US/workloads/WorkloadLogs.json.js +4 -1
- package/dist/locales/en-US/workloads/WorkloadLogs.json.mjs +4 -1
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/ja/common.json.js +39 -0
- package/dist/locales/ja/common.json.mjs +39 -0
- package/dist/locales/ja/components/AccessType.json.js +29 -0
- package/dist/locales/ja/components/AccessType.json.mjs +29 -0
- package/dist/locales/ja/components/ArrayEditor.json.js +11 -0
- package/dist/locales/ja/components/ArrayEditor.json.mjs +11 -0
- package/dist/locales/ja/components/CloudShellGroup.json.js +20 -0
- package/dist/locales/ja/components/CloudShellGroup.json.mjs +20 -0
- package/dist/locales/ja/components/ClusterUnknownMessage.json.js +11 -0
- package/dist/locales/ja/components/ClusterUnknownMessage.json.mjs +11 -0
- package/dist/locales/ja/components/FormBlock.json.js +8 -0
- package/dist/locales/ja/components/FormBlock.json.mjs +8 -0
- package/dist/locales/ja/components/Gpu.json.js +109 -0
- package/dist/locales/ja/components/Gpu.json.mjs +109 -0
- package/dist/locales/ja/components/InstanceCluster.json.js +8 -0
- package/dist/locales/ja/components/InstanceCluster.json.mjs +8 -0
- package/dist/locales/ja/components/InstanceDescription.json.js +14 -0
- package/dist/locales/ja/components/InstanceDescription.json.mjs +14 -0
- package/dist/locales/ja/components/InstanceInstallationEnv.json.js +38 -0
- package/dist/locales/ja/components/InstanceInstallationEnv.json.mjs +38 -0
- package/dist/locales/ja/components/InstanceLoadBalancer.json.js +32 -0
- package/dist/locales/ja/components/InstanceLoadBalancer.json.mjs +32 -0
- package/dist/locales/ja/components/InstanceMonitorInterval.json.js +14 -0
- package/dist/locales/ja/components/InstanceMonitorInterval.json.mjs +14 -0
- package/dist/locales/ja/components/InstanceName.json.js +11 -0
- package/dist/locales/ja/components/InstanceName.json.mjs +11 -0
- package/dist/locales/ja/components/InstanceNamespace.json.js +11 -0
- package/dist/locales/ja/components/InstanceNamespace.json.mjs +11 -0
- package/dist/locales/ja/components/InstancePassword.json.js +17 -0
- package/dist/locales/ja/components/InstancePassword.json.mjs +17 -0
- package/dist/locales/ja/components/InstanceStorageCapacity.json.js +8 -0
- package/dist/locales/ja/components/InstanceStorageCapacity.json.mjs +8 -0
- package/dist/locales/ja/components/InstanceStorageClass.json.js +11 -0
- package/dist/locales/ja/components/InstanceStorageClass.json.mjs +11 -0
- package/dist/locales/ja/components/InstanceUsername.json.js +14 -0
- package/dist/locales/ja/components/InstanceUsername.json.mjs +14 -0
- package/dist/locales/ja/components/MatchExpressionsEditor.json.js +24 -0
- package/dist/locales/ja/components/MatchExpressionsEditor.json.mjs +24 -0
- package/dist/locales/ja/components/NetworkConfig.json.js +14 -0
- package/dist/locales/ja/components/NetworkConfig.json.mjs +14 -0
- package/dist/locales/ja/components/NodeAffinity.json.js +35 -0
- package/dist/locales/ja/components/NodeAffinity.json.mjs +35 -0
- package/dist/locales/ja/components/NodeSelector.json.js +17 -0
- package/dist/locales/ja/components/NodeSelector.json.mjs +17 -0
- package/dist/locales/ja/components/ObjectEditor.json.js +17 -0
- package/dist/locales/ja/components/ObjectEditor.json.mjs +17 -0
- package/dist/locales/ja/components/ParameterConfiguration.json.js +28 -0
- package/dist/locales/ja/components/ParameterConfiguration.json.mjs +28 -0
- package/dist/locales/ja/components/ParameterList.json.js +27 -0
- package/dist/locales/ja/components/ParameterList.json.mjs +27 -0
- package/dist/locales/ja/components/ParameterTemplateList.json.js +29 -0
- package/dist/locales/ja/components/ParameterTemplateList.json.mjs +29 -0
- package/dist/locales/ja/components/PodAffinity.json.js +53 -0
- package/dist/locales/ja/components/PodAffinity.json.mjs +53 -0
- package/dist/locales/ja/components/PortConfig.json.js +32 -0
- package/dist/locales/ja/components/PortConfig.json.mjs +32 -0
- package/dist/locales/ja/components/PreviewNodeAffinity.json.js +35 -0
- package/dist/locales/ja/components/PreviewNodeAffinity.json.mjs +35 -0
- package/dist/locales/ja/components/PreviewPodAffinity.json.js +38 -0
- package/dist/locales/ja/components/PreviewPodAffinity.json.mjs +38 -0
- package/dist/locales/ja/components/PreviewPorts.json.js +17 -0
- package/dist/locales/ja/components/PreviewPorts.json.mjs +17 -0
- package/dist/locales/ja/components/PreviewTolerations.json.js +20 -0
- package/dist/locales/ja/components/PreviewTolerations.json.mjs +20 -0
- package/dist/locales/ja/components/ResourceConfig.json.js +32 -0
- package/dist/locales/ja/components/ResourceConfig.json.mjs +32 -0
- package/dist/locales/ja/components/TimePicker.json.js +43 -0
- package/dist/locales/ja/components/TimePicker.json.mjs +43 -0
- package/dist/locales/ja/components/Tolerations.json.js +20 -0
- package/dist/locales/ja/components/Tolerations.json.mjs +20 -0
- package/dist/locales/ja/dialogs/ClusterUnknownDialog.json.js +11 -0
- package/dist/locales/ja/dialogs/ClusterUnknownDialog.json.mjs +11 -0
- package/dist/locales/ja/dialogs/CreateNetworkConfigDialog.json.js +8 -0
- package/dist/locales/ja/dialogs/CreateNetworkConfigDialog.json.mjs +8 -0
- package/dist/locales/ja/dialogs/DeleteBackupDialog.json.js +22 -0
- package/dist/locales/ja/dialogs/DeleteBackupDialog.json.mjs +22 -0
- package/dist/locales/ja/dialogs/SelectLabelsDialog.json.js +11 -0
- package/dist/locales/ja/dialogs/SelectLabelsDialog.json.mjs +11 -0
- package/dist/locales/ja/dialogs/SelectTaintsDialog.json.js +20 -0
- package/dist/locales/ja/dialogs/SelectTaintsDialog.json.mjs +20 -0
- package/dist/locales/ja/dialogs/SwitchMasterNodeDialog.json.js +35 -0
- package/dist/locales/ja/dialogs/SwitchMasterNodeDialog.json.mjs +35 -0
- package/dist/locales/ja/dialogs/SwitchWorkspaceDialog.json.js +15 -0
- package/dist/locales/ja/dialogs/SwitchWorkspaceDialog.json.mjs +15 -0
- package/dist/locales/ja/dialogs/UpdateNetworkConfigDialog.json.js +8 -0
- package/dist/locales/ja/dialogs/UpdateNetworkConfigDialog.json.mjs +8 -0
- package/dist/locales/ja/forms/BackupRestore.json.js +55 -0
- package/dist/locales/ja/forms/BackupRestore.json.mjs +55 -0
- package/dist/locales/ja/forms/BackupSetting.json.js +56 -0
- package/dist/locales/ja/forms/BackupSetting.json.mjs +56 -0
- package/dist/locales/ja/forms/ImportParameterTemplate.json.js +29 -0
- package/dist/locales/ja/forms/ImportParameterTemplate.json.mjs +29 -0
- package/dist/locales/ja/index.d.ts +4 -0
- package/dist/locales/ja/index.js +150 -0
- package/dist/locales/ja/index.mjs +149 -0
- package/dist/locales/ja/utils/multiRowEditorValidate.json.js +8 -0
- package/dist/locales/ja/utils/multiRowEditorValidate.json.mjs +8 -0
- package/dist/locales/ja/validate.json.js +32 -0
- package/dist/locales/ja/validate.json.mjs +32 -0
- package/dist/locales/ja/workloads/ContainerBasicInfo.json.js +35 -0
- package/dist/locales/ja/workloads/ContainerBasicInfo.json.mjs +35 -0
- package/dist/locales/ja/workloads/ContainerCustomResource.json.js +17 -0
- package/dist/locales/ja/workloads/ContainerCustomResource.json.mjs +17 -0
- package/dist/locales/ja/workloads/ContainerEnv.json.js +56 -0
- package/dist/locales/ja/workloads/ContainerEnv.json.mjs +56 -0
- package/dist/locales/ja/workloads/ContainerImage.json.js +44 -0
- package/dist/locales/ja/workloads/ContainerImage.json.mjs +44 -0
- package/dist/locales/ja/workloads/ContainerNetwork.json.js +52 -0
- package/dist/locales/ja/workloads/ContainerNetwork.json.mjs +52 -0
- package/dist/locales/ja/workloads/ContainerSecurity.json.js +14 -0
- package/dist/locales/ja/workloads/ContainerSecurity.json.mjs +14 -0
- package/dist/locales/ja/workloads/ContainerStorage.json.js +154 -0
- package/dist/locales/ja/workloads/ContainerStorage.json.mjs +154 -0
- package/dist/locales/ja/workloads/Containers.json.js +27 -0
- package/dist/locales/ja/workloads/Containers.json.mjs +27 -0
- package/dist/locales/ja/workloads/DnsConfig.json.js +50 -0
- package/dist/locales/ja/workloads/DnsConfig.json.mjs +50 -0
- package/dist/locales/ja/workloads/HealthCheck.json.js +49 -0
- package/dist/locales/ja/workloads/HealthCheck.json.mjs +49 -0
- package/dist/locales/ja/workloads/HttpGetAction.json.js +20 -0
- package/dist/locales/ja/workloads/HttpGetAction.json.mjs +20 -0
- package/dist/locales/ja/workloads/JobConfig.json.js +36 -0
- package/dist/locales/ja/workloads/JobConfig.json.mjs +36 -0
- package/dist/locales/ja/workloads/LifeCycle.json.js +44 -0
- package/dist/locales/ja/workloads/LifeCycle.json.mjs +44 -0
- package/dist/locales/ja/workloads/ScheduleConfig.json.js +23 -0
- package/dist/locales/ja/workloads/ScheduleConfig.json.mjs +23 -0
- package/dist/locales/ja/workloads/UpgradeStrategy.json.js +62 -0
- package/dist/locales/ja/workloads/UpgradeStrategy.json.mjs +62 -0
- package/dist/locales/ja/workloads/WorkloadAdvanced.json.js +23 -0
- package/dist/locales/ja/workloads/WorkloadAdvanced.json.mjs +23 -0
- package/dist/locales/ja/workloads/WorkloadAnnotationInput.json.js +8 -0
- package/dist/locales/ja/workloads/WorkloadAnnotationInput.json.mjs +8 -0
- package/dist/locales/ja/workloads/WorkloadAnnotations.json.js +14 -0
- package/dist/locales/ja/workloads/WorkloadAnnotations.json.mjs +14 -0
- package/dist/locales/ja/workloads/WorkloadLabels.json.js +14 -0
- package/dist/locales/ja/workloads/WorkloadLabels.json.mjs +14 -0
- package/dist/locales/ja/workloads/WorkloadLogs.json.js +41 -0
- package/dist/locales/ja/workloads/WorkloadLogs.json.mjs +41 -0
- package/dist/locales/ja/workloads/workload-advanced/JobConfig.json.js +3 -0
- package/dist/locales/ja/workloads/workload-advanced/JobConfig.json.mjs +4 -0
- package/dist/locales/ja/workloads/workload-advanced/NetworkConfig.json.js +20 -0
- package/dist/locales/ja/workloads/workload-advanced/NetworkConfig.json.mjs +20 -0
- package/dist/locales/ja/workloads/workload-advanced/PodManagement.json.js +20 -0
- package/dist/locales/ja/workloads/workload-advanced/PodManagement.json.mjs +20 -0
- package/dist/locales/zh-CN/workloads/ContainerImage.json.js +2 -1
- package/dist/locales/zh-CN/workloads/ContainerImage.json.mjs +2 -1
- package/dist/node_modules/@vueuse/core/index.js +90 -56
- package/dist/node_modules/@vueuse/core/index.mjs +92 -58
- package/dist/node_modules/@vueuse/shared/index.js +82 -1
- package/dist/node_modules/@vueuse/shared/index.mjs +83 -2
- package/dist/style.css +608 -592
- package/dist/styles/dialogs/switch-workspace-dialog/switch-workspace-dialog.css +3 -0
- package/dist/styles/workloads/container-image/select-image-dialog.css +13 -0
- package/dist/utils/loadRemoteComponent.d.ts +1 -0
- package/dist/utils/loadRemoteComponent.js +80 -15
- package/dist/utils/loadRemoteComponent.mjs +80 -16
- package/dist/utils/useSubForm.js +1 -1
- package/dist/utils/useSubForm.mjs +1 -1
- package/dist/workloads/container-custom-resource/src/ContainerCustomResource.vue2.js +1 -1
- package/dist/workloads/container-custom-resource/src/ContainerCustomResource.vue2.mjs +1 -1
- package/dist/workloads/container-image/props.d.ts +8 -0
- package/dist/workloads/container-image/props.js +4 -0
- package/dist/workloads/container-image/props.mjs +4 -0
- package/dist/workloads/container-image/src/ContainerImage.vue.d.ts +9 -0
- package/dist/workloads/container-image/src/ContainerImage.vue2.js +112 -26
- package/dist/workloads/container-image/src/ContainerImage.vue2.mjs +114 -28
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue.d.ts +4 -4
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue.js +25 -5
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue.mjs +26 -6
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue2.js +12 -5
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue2.mjs +13 -6
- package/dist/workloads/container-storage/src/components/PvcNodePath.vue.d.ts +5 -22
- package/dist/workloads/container-storage/src/components/PvcNodePath.vue2.js +123 -60
- package/dist/workloads/container-storage/src/components/PvcNodePath.vue2.mjs +124 -61
- package/dist/workloads/container-storage/src/components/PvcNodePathItem.vue.d.ts +1 -2
- package/dist/workloads/container-storage/src/components/PvcNodePathItem.vue.js +4 -5
- package/dist/workloads/container-storage/src/components/PvcNodePathItem.vue.mjs +4 -5
- package/dist/workloads/container-storage/src/components/PvcNodePathItem.vue2.js +12 -7
- package/dist/workloads/container-storage/src/components/PvcNodePathItem.vue2.mjs +12 -7
- package/dist/workloads/containers/demo/data.d.ts +10 -2
- package/dist/workloads/containers/src/ContainerItem.vue.d.ts +1 -0
- package/dist/workloads/containers/src/ContainerItem.vue2.js +1 -1
- package/dist/workloads/containers/src/ContainerItem.vue2.mjs +1 -1
- package/dist/workloads/containers/src/Containers.vue.d.ts +1 -0
- package/dist/workloads/containers/src/Containers.vue2.js +3 -1
- package/dist/workloads/containers/src/Containers.vue2.mjs +3 -1
- package/dist/workloads/containers/src/dialogs/ConfirmDialog.vue.d.ts +3 -3
- package/dist/workloads/containers/src/patch-form-item-validate/form-item-validate.d.ts +30 -30
- package/dist/workloads/containers/src/patch-form-item-validate/form-item-validate.vue.d.ts +13 -13
- package/dist/workloads/containers/src/patch-form-item-validate/props.d.ts +5 -5
- package/dist/workloads/health-check/src/AdvancedContainer.vue.d.ts +3 -3
- package/package.json +3 -3
- package/dist/node_modules/@vueuse/core/node_modules/@vueuse/shared/index.js +0 -136
- package/dist/node_modules/@vueuse/core/node_modules/@vueuse/shared/index.mjs +0 -136
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
.dao-switch-workspace-dialog__ws-item-alias {
|
|
47
47
|
max-width: calc(100% - 28px);
|
|
48
48
|
}
|
|
49
|
+
.dao-switch-workspace-dialog__ws-item:hover:not(.dao-switch-workspace-dialog__ws-item--selected) {
|
|
50
|
+
border: 1px solid var(--dao-gray-blue-030);
|
|
51
|
+
}
|
|
49
52
|
.dao-switch-workspace-dialog__cancel-btn {
|
|
50
53
|
margin-right: 10px;
|
|
51
54
|
}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
.private-not-allow-tip {
|
|
2
2
|
margin-bottom: 20px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dao-select-image-dialog__table .dao-table__empty-block {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
min-height: 200px;
|
|
10
|
+
}
|
|
11
|
+
.dao-select-image-dialog__table .dao-table-loading--range {
|
|
12
|
+
min-height: 230px;
|
|
13
|
+
}
|
|
14
|
+
.dao-select-image-dialog__table .search-image-empty .dao-state-icon__label {
|
|
15
|
+
margin-left: 4px;
|
|
3
16
|
}
|
|
@@ -1,7 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
2
3
|
const vue = require("vue");
|
|
3
4
|
const extend = require("@dao-style/extend");
|
|
5
|
+
const prefixSymbol = "Symbol(add-remote-style-prefix)";
|
|
6
|
+
const remoteStylePrefixClass = "dao-remote-component__container";
|
|
7
|
+
const observeStyleNodes = (entryContent) => {
|
|
8
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
9
|
+
mutations.forEach((mutation) => {
|
|
10
|
+
mutation.addedNodes.forEach((addedNode) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const node = addedNode;
|
|
13
|
+
if ((node == null ? void 0 : node.tagName) !== "STYLE") {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const dataQiankunHref = node.getAttribute("data-qiankun-href");
|
|
17
|
+
const hashCode = (_a = dataQiankunHref == null ? void 0 : dataQiankunHref.match(/\.([^.?#]+)\.css(?:[?#].*)?$/)) == null ? void 0 : _a[1];
|
|
18
|
+
if (hashCode && entryContent.includes(hashCode)) {
|
|
19
|
+
node.onload = () => {
|
|
20
|
+
var _a2;
|
|
21
|
+
if (node[prefixSymbol] || !node.textContent) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const cssFilePath = (_a2 = dataQiankunHref == null ? void 0 : dataQiankunHref.match(/css\/.*?\.css$/)) == null ? void 0 : _a2[0];
|
|
25
|
+
if (cssFilePath) {
|
|
26
|
+
node.setAttribute("data-href", cssFilePath);
|
|
27
|
+
}
|
|
28
|
+
node.textContent = node.textContent.replace(
|
|
29
|
+
/(\[data-qiankun=".*?"\])/g,
|
|
30
|
+
`$1 .${remoteStylePrefixClass}`
|
|
31
|
+
);
|
|
32
|
+
node[prefixSymbol] = true;
|
|
33
|
+
console.log("Add Remote Style Prefix Success");
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const qiankunHead = document.querySelector("qiankun-head");
|
|
40
|
+
if (qiankunHead) {
|
|
41
|
+
mutationObserver.observe(qiankunHead, { childList: true });
|
|
42
|
+
}
|
|
43
|
+
return mutationObserver;
|
|
44
|
+
};
|
|
4
45
|
function loadScript(config) {
|
|
46
|
+
let mutationObserver;
|
|
47
|
+
vue.onBeforeUnmount(() => {
|
|
48
|
+
if (mutationObserver) {
|
|
49
|
+
mutationObserver.disconnect();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
5
52
|
return new Promise((resolve, reject) => {
|
|
6
53
|
var _a;
|
|
7
54
|
let { url } = config;
|
|
@@ -20,22 +67,39 @@ function loadScript(config) {
|
|
|
20
67
|
}
|
|
21
68
|
url = `${(_a = appInfo.value) == null ? void 0 : _a.uiAssetsUrl}remoteEntry.js`;
|
|
22
69
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
70
|
+
if (!url) {
|
|
71
|
+
reject(new Error("Resolve Remote Entry Url Error"));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
27
74
|
console.log(`Start Loading ${url}!`);
|
|
28
|
-
element
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
75
|
+
const element = document.createElement("script");
|
|
76
|
+
const fetch = window.originFetch || window.fetch;
|
|
77
|
+
fetch(url).then((res) => {
|
|
78
|
+
if (!res.ok) {
|
|
79
|
+
throw new Error(`HTTP error! status: ${res.status}`);
|
|
80
|
+
}
|
|
81
|
+
return res.text();
|
|
82
|
+
}).then((textContent) => {
|
|
83
|
+
try {
|
|
84
|
+
new Function(textContent);
|
|
85
|
+
element.type = "text/javascript";
|
|
86
|
+
element.textContent = textContent;
|
|
87
|
+
document.head.appendChild(element);
|
|
88
|
+
console.log(`${url} Loaded Success!`);
|
|
89
|
+
mutationObserver = observeStyleNodes(textContent);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
if (e instanceof SyntaxError) {
|
|
92
|
+
throw new Error(`Script syntax error in ${url}: ${e.message}`);
|
|
93
|
+
}
|
|
94
|
+
throw new Error(e);
|
|
95
|
+
} finally {
|
|
96
|
+
document.head.removeChild(element);
|
|
97
|
+
resolve(true);
|
|
98
|
+
}
|
|
99
|
+
}).catch((e) => {
|
|
34
100
|
console.error(`${url} Load Remote Entry Error!`);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
document.head.appendChild(element);
|
|
101
|
+
reject(e);
|
|
102
|
+
});
|
|
39
103
|
});
|
|
40
104
|
}
|
|
41
105
|
async function loadComponentByWebpack({ scope, module: module2 }) {
|
|
@@ -52,4 +116,5 @@ function loadRemoteComponent(config) {
|
|
|
52
116
|
() => vue.defineAsyncComponent(async () => loadComponentByWebpack(config))
|
|
53
117
|
);
|
|
54
118
|
}
|
|
55
|
-
|
|
119
|
+
exports.default = loadRemoteComponent;
|
|
120
|
+
exports.remoteStylePrefixClass = remoteStylePrefixClass;
|
|
@@ -1,6 +1,52 @@
|
|
|
1
|
-
import { defineAsyncComponent, computed } from "vue";
|
|
1
|
+
import { defineAsyncComponent, onBeforeUnmount, computed } from "vue";
|
|
2
2
|
import { useGlobalStore } from "@dao-style/extend";
|
|
3
|
+
const prefixSymbol = "Symbol(add-remote-style-prefix)";
|
|
4
|
+
const remoteStylePrefixClass = "dao-remote-component__container";
|
|
5
|
+
const observeStyleNodes = (entryContent) => {
|
|
6
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
7
|
+
mutations.forEach((mutation) => {
|
|
8
|
+
mutation.addedNodes.forEach((addedNode) => {
|
|
9
|
+
var _a;
|
|
10
|
+
const node = addedNode;
|
|
11
|
+
if ((node == null ? void 0 : node.tagName) !== "STYLE") {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const dataQiankunHref = node.getAttribute("data-qiankun-href");
|
|
15
|
+
const hashCode = (_a = dataQiankunHref == null ? void 0 : dataQiankunHref.match(/\.([^.?#]+)\.css(?:[?#].*)?$/)) == null ? void 0 : _a[1];
|
|
16
|
+
if (hashCode && entryContent.includes(hashCode)) {
|
|
17
|
+
node.onload = () => {
|
|
18
|
+
var _a2;
|
|
19
|
+
if (node[prefixSymbol] || !node.textContent) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const cssFilePath = (_a2 = dataQiankunHref == null ? void 0 : dataQiankunHref.match(/css\/.*?\.css$/)) == null ? void 0 : _a2[0];
|
|
23
|
+
if (cssFilePath) {
|
|
24
|
+
node.setAttribute("data-href", cssFilePath);
|
|
25
|
+
}
|
|
26
|
+
node.textContent = node.textContent.replace(
|
|
27
|
+
/(\[data-qiankun=".*?"\])/g,
|
|
28
|
+
`$1 .${remoteStylePrefixClass}`
|
|
29
|
+
);
|
|
30
|
+
node[prefixSymbol] = true;
|
|
31
|
+
console.log("Add Remote Style Prefix Success");
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const qiankunHead = document.querySelector("qiankun-head");
|
|
38
|
+
if (qiankunHead) {
|
|
39
|
+
mutationObserver.observe(qiankunHead, { childList: true });
|
|
40
|
+
}
|
|
41
|
+
return mutationObserver;
|
|
42
|
+
};
|
|
3
43
|
function loadScript(config) {
|
|
44
|
+
let mutationObserver;
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
if (mutationObserver) {
|
|
47
|
+
mutationObserver.disconnect();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
4
50
|
return new Promise((resolve, reject) => {
|
|
5
51
|
var _a;
|
|
6
52
|
let { url } = config;
|
|
@@ -19,22 +65,39 @@ function loadScript(config) {
|
|
|
19
65
|
}
|
|
20
66
|
url = `${(_a = appInfo.value) == null ? void 0 : _a.uiAssetsUrl}remoteEntry.js`;
|
|
21
67
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
68
|
+
if (!url) {
|
|
69
|
+
reject(new Error("Resolve Remote Entry Url Error"));
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
26
72
|
console.log(`Start Loading ${url}!`);
|
|
27
|
-
element
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
73
|
+
const element = document.createElement("script");
|
|
74
|
+
const fetch = window.originFetch || window.fetch;
|
|
75
|
+
fetch(url).then((res) => {
|
|
76
|
+
if (!res.ok) {
|
|
77
|
+
throw new Error(`HTTP error! status: ${res.status}`);
|
|
78
|
+
}
|
|
79
|
+
return res.text();
|
|
80
|
+
}).then((textContent) => {
|
|
81
|
+
try {
|
|
82
|
+
new Function(textContent);
|
|
83
|
+
element.type = "text/javascript";
|
|
84
|
+
element.textContent = textContent;
|
|
85
|
+
document.head.appendChild(element);
|
|
86
|
+
console.log(`${url} Loaded Success!`);
|
|
87
|
+
mutationObserver = observeStyleNodes(textContent);
|
|
88
|
+
} catch (e) {
|
|
89
|
+
if (e instanceof SyntaxError) {
|
|
90
|
+
throw new Error(`Script syntax error in ${url}: ${e.message}`);
|
|
91
|
+
}
|
|
92
|
+
throw new Error(e);
|
|
93
|
+
} finally {
|
|
94
|
+
document.head.removeChild(element);
|
|
95
|
+
resolve(true);
|
|
96
|
+
}
|
|
97
|
+
}).catch((e) => {
|
|
33
98
|
console.error(`${url} Load Remote Entry Error!`);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
document.head.appendChild(element);
|
|
99
|
+
reject(e);
|
|
100
|
+
});
|
|
38
101
|
});
|
|
39
102
|
}
|
|
40
103
|
async function loadComponentByWebpack({ scope, module }) {
|
|
@@ -52,5 +115,6 @@ function loadRemoteComponent(config) {
|
|
|
52
115
|
);
|
|
53
116
|
}
|
|
54
117
|
export {
|
|
55
|
-
loadRemoteComponent as default
|
|
118
|
+
loadRemoteComponent as default,
|
|
119
|
+
remoteStylePrefixClass
|
|
56
120
|
};
|
package/dist/utils/useSubForm.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const veeValidate = require("vee-validate");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const lodashEs = require("lodash-es");
|
|
6
|
-
const index = require("../node_modules/@vueuse/
|
|
6
|
+
const index = require("../node_modules/@vueuse/shared/index.js");
|
|
7
7
|
const EXTRA_KEY_IN_FORM = "EXTRA_KEY_IN_FORM";
|
|
8
8
|
function useSubForm(name) {
|
|
9
9
|
let isInit = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormContextKey, useField, useForm } from "vee-validate";
|
|
2
2
|
import { inject, nextTick } from "vue";
|
|
3
3
|
import { debounce, cloneDeep } from "lodash-es";
|
|
4
|
-
import { pausableWatch as watchPausable } from "../node_modules/@vueuse/
|
|
4
|
+
import { pausableWatch as watchPausable } from "../node_modules/@vueuse/shared/index.mjs";
|
|
5
5
|
const EXTRA_KEY_IN_FORM = "EXTRA_KEY_IN_FORM";
|
|
6
6
|
function useSubForm(name) {
|
|
7
7
|
let isInit = true;
|
|
@@ -7,7 +7,7 @@ require("@dao-style/extend/dist/es/components/multi-row-editor/style/multi-row-e
|
|
|
7
7
|
const lodashEs = require("lodash-es");
|
|
8
8
|
const useSubForm = require("../../../utils/useSubForm.js");
|
|
9
9
|
const props = require("../props.js");
|
|
10
|
-
const index = require("../../../node_modules/@vueuse/
|
|
10
|
+
const index = require("../../../node_modules/@vueuse/shared/index.js");
|
|
11
11
|
const _sfc_main = vue.defineComponent({
|
|
12
12
|
name: "DaoContainerCustomResource",
|
|
13
13
|
components: {
|
|
@@ -6,7 +6,7 @@ import "@dao-style/extend/dist/es/components/multi-row-editor/style/multi-row-ed
|
|
|
6
6
|
import { isEqual } from "lodash-es";
|
|
7
7
|
import { EXTRA_KEY_IN_FORM } from "../../../utils/useSubForm.mjs";
|
|
8
8
|
import { containerCustomResourceProps, containerCustomResourceEmits } from "../props.mjs";
|
|
9
|
-
import { pausableWatch as watchPausable } from "../../../node_modules/@vueuse/
|
|
9
|
+
import { pausableWatch as watchPausable } from "../../../node_modules/@vueuse/shared/index.mjs";
|
|
10
10
|
const _sfc_main = defineComponent({
|
|
11
11
|
name: "DaoContainerCustomResource",
|
|
12
12
|
components: {
|
|
@@ -111,6 +111,10 @@ export declare const selectImageDialogProps: {
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
export type SelectImageDialogProps = ExtractPropTypes<typeof selectImageDialogProps>;
|
|
114
|
+
export type FetchParsedImageInfo = (image: string) => Promise<{
|
|
115
|
+
info?: ImageInfo;
|
|
116
|
+
origin?: string;
|
|
117
|
+
}>;
|
|
114
118
|
export declare const containerImageProps: {
|
|
115
119
|
fields: {
|
|
116
120
|
type: PropType<Partial<Record<ImageFieldKey, string>>>;
|
|
@@ -167,6 +171,10 @@ export declare const containerImageProps: {
|
|
|
167
171
|
type: BooleanConstructor;
|
|
168
172
|
default: boolean;
|
|
169
173
|
};
|
|
174
|
+
parsedImage: {
|
|
175
|
+
type: PropType<FetchParsedImageInfo>;
|
|
176
|
+
default: undefined;
|
|
177
|
+
};
|
|
170
178
|
selectImage: {
|
|
171
179
|
type: PropType<SelectImage>;
|
|
172
180
|
required: boolean;
|
|
@@ -56,6 +56,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
type: BooleanConstructor;
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
|
+
parsedImage: {
|
|
60
|
+
type: import("vue").PropType<import("../props").FetchParsedImageInfo>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
59
63
|
selectImage: {
|
|
60
64
|
type: import("vue").PropType<import("../props").SelectImage>;
|
|
61
65
|
required: boolean;
|
|
@@ -245,6 +249,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
245
249
|
type: BooleanConstructor;
|
|
246
250
|
default: boolean;
|
|
247
251
|
};
|
|
252
|
+
parsedImage: {
|
|
253
|
+
type: import("vue").PropType<import("../props").FetchParsedImageInfo>;
|
|
254
|
+
default: undefined;
|
|
255
|
+
};
|
|
248
256
|
selectImage: {
|
|
249
257
|
type: import("vue").PropType<import("../props").SelectImage>;
|
|
250
258
|
required: boolean;
|
|
@@ -319,5 +327,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
319
327
|
enableSecretSelectSingle: boolean;
|
|
320
328
|
hideImagePullPolicy: boolean;
|
|
321
329
|
hideSecretSelect: boolean;
|
|
330
|
+
parsedImage: import("../props").FetchParsedImageInfo;
|
|
322
331
|
}>;
|
|
323
332
|
export default _default;
|
|
@@ -11,7 +11,9 @@ const props = require("../props.js");
|
|
|
11
11
|
require("../../../styles/common.scss.js");
|
|
12
12
|
require("../style/container-image.scss.js");
|
|
13
13
|
require("../style/select-image-dialog.scss.js");
|
|
14
|
+
const index$1 = require("../../../node_modules/@vueuse/shared/index.js");
|
|
14
15
|
const index = require("../../../uses/useLazyLoadList/index.js");
|
|
16
|
+
const abortableFetchWrapper = require("../../../utils/abortableFetchWrapper.js");
|
|
15
17
|
const _sfc_main = vue.defineComponent({
|
|
16
18
|
name: "ContainerImage",
|
|
17
19
|
components: {
|
|
@@ -45,6 +47,14 @@ const _sfc_main = vue.defineComponent({
|
|
|
45
47
|
}, props$1.version || {}));
|
|
46
48
|
const selectImageText = vue.computed(() => t("biz.workloads.ContainerImage.selectImage"));
|
|
47
49
|
const currentImageInfo = vue.ref();
|
|
50
|
+
const currentFullImage = vue.computed(() => {
|
|
51
|
+
const { image, tag } = currentImageInfo.value ?? {};
|
|
52
|
+
if (!tag) {
|
|
53
|
+
return image;
|
|
54
|
+
}
|
|
55
|
+
const sep = tag.startsWith("sha256:") ? "@" : ":";
|
|
56
|
+
return `${image}${sep}${tag}`;
|
|
57
|
+
});
|
|
48
58
|
const setTag = (tag) => {
|
|
49
59
|
if (!currentImageInfo.value) {
|
|
50
60
|
return;
|
|
@@ -54,6 +64,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
54
64
|
tag
|
|
55
65
|
};
|
|
56
66
|
};
|
|
67
|
+
const imageInfoCompareKeys = ["image", "registry", "project", "repository", "isPublic"];
|
|
68
|
+
const isSameImageInfo = (imageInfo, target) => lodashEs.isEqual(
|
|
69
|
+
imageInfo ? lodashEs.pick(imageInfo, imageInfoCompareKeys) : void 0,
|
|
70
|
+
target
|
|
71
|
+
);
|
|
57
72
|
const lazyLoadTag = index.useLazyLoadList(props$1.version.fetchList, {
|
|
58
73
|
image: currentImage.value,
|
|
59
74
|
registry: (_a = currentImageInfo.value) == null ? void 0 : _a.registry,
|
|
@@ -66,6 +81,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
66
81
|
searchKey: "fuzzyName"
|
|
67
82
|
});
|
|
68
83
|
const fetchVersionList = async () => {
|
|
84
|
+
var _a2;
|
|
69
85
|
if (!currentImageInfo.value) {
|
|
70
86
|
return;
|
|
71
87
|
}
|
|
@@ -76,6 +92,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
76
92
|
repository,
|
|
77
93
|
isPublic
|
|
78
94
|
} = currentImageInfo.value;
|
|
95
|
+
const requestImageInfo = {
|
|
96
|
+
image,
|
|
97
|
+
registry,
|
|
98
|
+
project,
|
|
99
|
+
repository,
|
|
100
|
+
isPublic
|
|
101
|
+
};
|
|
79
102
|
try {
|
|
80
103
|
lazyLoadTag.filterData.image = image;
|
|
81
104
|
lazyLoadTag.filterData.registry = registry;
|
|
@@ -83,10 +106,16 @@ const _sfc_main = vue.defineComponent({
|
|
|
83
106
|
lazyLoadTag.filterData.public = isPublic;
|
|
84
107
|
lazyLoadTag.filterData.repository = encodeURIComponent(encodeURIComponent(repository));
|
|
85
108
|
await lazyLoadTag.resetFetchList();
|
|
86
|
-
if (!currentImageInfo.value
|
|
109
|
+
if (!isSameImageInfo(currentImageInfo.value, requestImageInfo)) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (!((_a2 = currentImageInfo.value) == null ? void 0 : _a2.tag) && lazyLoadTag.list.value.length) {
|
|
87
113
|
setTag(lazyLoadTag.list.value[0]);
|
|
88
114
|
}
|
|
89
115
|
} catch (e) {
|
|
116
|
+
if (abortableFetchWrapper.isManualAbort(e) || !isSameImageInfo(currentImageInfo.value, requestImageInfo)) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
90
119
|
console.error("tag fetched error: ", e);
|
|
91
120
|
if (currentImageInfo.value) {
|
|
92
121
|
setTag();
|
|
@@ -95,34 +124,32 @@ const _sfc_main = vue.defineComponent({
|
|
|
95
124
|
};
|
|
96
125
|
const selectImageDialog = extend.createDialog(SelectImageDialog);
|
|
97
126
|
const onSelectImage = async () => {
|
|
98
|
-
const
|
|
127
|
+
const selectedImageInfo = await selectImageDialog.show({
|
|
99
128
|
selectImage: props$1.selectImage,
|
|
100
129
|
project: props$1.project,
|
|
101
130
|
registry: props$1.registry,
|
|
102
131
|
imageInfo: currentImageInfo.value
|
|
103
132
|
});
|
|
104
|
-
if (lodashEs.isEqual(
|
|
133
|
+
if (lodashEs.isEqual(selectedImageInfo, lodashEs.omit(currentImageInfo.value, "tag"))) {
|
|
105
134
|
return;
|
|
106
135
|
}
|
|
107
|
-
currentImageInfo.value =
|
|
108
|
-
currentImage.value =
|
|
109
|
-
|
|
110
|
-
const handleImageInput = (val) => {
|
|
111
|
-
if (props$1.enableImageSelect) {
|
|
112
|
-
currentImageInfo.value = void 0;
|
|
113
|
-
}
|
|
114
|
-
formContext == null ? void 0 : formContext.setFieldValue(actualFields.value.image ?? "", val);
|
|
136
|
+
currentImageInfo.value = selectedImageInfo;
|
|
137
|
+
currentImage.value = selectedImageInfo.image;
|
|
138
|
+
await fetchVersionList();
|
|
115
139
|
};
|
|
116
140
|
const initData = () => {
|
|
117
|
-
if (!props$1.enableImageSelect) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (!props$1.imageInfo) {
|
|
141
|
+
if (!props$1.enableImageSelect || !props$1.imageInfo) {
|
|
121
142
|
return;
|
|
122
143
|
}
|
|
144
|
+
const alreadyCurrent = lodashEs.isEqual(
|
|
145
|
+
lodashEs.omit(currentImageInfo.value, "tag"),
|
|
146
|
+
lodashEs.omit(props$1.imageInfo, "tag")
|
|
147
|
+
);
|
|
123
148
|
currentImageInfo.value = props$1.imageInfo;
|
|
124
149
|
currentImage.value = props$1.imageInfo.image;
|
|
125
|
-
|
|
150
|
+
if (!alreadyCurrent) {
|
|
151
|
+
fetchVersionList();
|
|
152
|
+
}
|
|
126
153
|
};
|
|
127
154
|
const handleVersionChange = (value) => {
|
|
128
155
|
if (!currentImageInfo.value) {
|
|
@@ -137,12 +164,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
137
164
|
if (!currentImageInfo.value) {
|
|
138
165
|
return;
|
|
139
166
|
}
|
|
140
|
-
|
|
141
|
-
formContext == null ? void 0 : formContext.setFieldValue(actualFields.value.image ?? "", fullImage);
|
|
167
|
+
formContext == null ? void 0 : formContext.setFieldValue(actualFields.value.image ?? "", currentFullImage.value);
|
|
142
168
|
}, {
|
|
143
169
|
deep: true
|
|
144
170
|
});
|
|
145
|
-
const formImageValue = vue.computed(() => lodashEs.get(formContext == null ? void 0 : formContext.values, actualFields.value.image ?? ""));
|
|
146
171
|
vue.watch(
|
|
147
172
|
[() => props$1.enableImageSelect, () => props$1.imageInfo],
|
|
148
173
|
([newEnable, newImage], [, oldImage]) => {
|
|
@@ -154,18 +179,79 @@ const _sfc_main = vue.defineComponent({
|
|
|
154
179
|
immediate: true
|
|
155
180
|
}
|
|
156
181
|
);
|
|
157
|
-
|
|
158
|
-
|
|
182
|
+
const abortableParsedImage = props$1.parsedImage ? abortableFetchWrapper.abortableWrapper(props$1.parsedImage, {
|
|
183
|
+
autoAbortWhenNewRequest: true
|
|
184
|
+
}) : void 0;
|
|
185
|
+
const formImageValue = vue.computed(() => lodashEs.get(formContext == null ? void 0 : formContext.values, actualFields.value.image ?? ""));
|
|
186
|
+
const setParsedImage = async (newImage) => {
|
|
187
|
+
var _a2;
|
|
188
|
+
if (!abortableParsedImage) {
|
|
159
189
|
return;
|
|
160
190
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
191
|
+
const snapshot = newImage;
|
|
192
|
+
try {
|
|
193
|
+
const rst = await abortableParsedImage(snapshot);
|
|
194
|
+
if (formImageValue.value !== snapshot) {
|
|
164
195
|
return;
|
|
165
196
|
}
|
|
197
|
+
if ((_a2 = rst.info) == null ? void 0 : _a2.registry) {
|
|
198
|
+
currentImageInfo.value = rst.info;
|
|
199
|
+
currentImage.value = rst.info.image;
|
|
200
|
+
await fetchVersionList();
|
|
201
|
+
} else {
|
|
202
|
+
currentImageInfo.value = void 0;
|
|
203
|
+
currentImage.value = snapshot;
|
|
204
|
+
}
|
|
205
|
+
} catch (e) {
|
|
206
|
+
if (formImageValue.value !== snapshot) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (abortableFetchWrapper.isManualAbort(e)) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
currentImage.value = snapshot;
|
|
213
|
+
currentImageInfo.value = void 0;
|
|
166
214
|
}
|
|
167
|
-
|
|
168
|
-
|
|
215
|
+
};
|
|
216
|
+
const tagPattern = /[:@][^/]*$/;
|
|
217
|
+
const handleImageInput = (val) => {
|
|
218
|
+
var _a2;
|
|
219
|
+
if (currentImage.value === val) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
formContext == null ? void 0 : formContext.setFieldValue(actualFields.value.image ?? "", val);
|
|
223
|
+
if (!val || tagPattern.test(val)) {
|
|
224
|
+
(_a2 = abortableParsedImage == null ? void 0 : abortableParsedImage.abort) == null ? void 0 : _a2.call(abortableParsedImage);
|
|
225
|
+
currentImage.value = val;
|
|
226
|
+
currentImageInfo.value = void 0;
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
const shaTagPattern = /@sha256:/;
|
|
230
|
+
vue.onMounted(() => {
|
|
231
|
+
if (formImageValue.value && !shaTagPattern.test(formImageValue.value)) {
|
|
232
|
+
setParsedImage(formImageValue.value);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
const debouncedHandleImageValue = index$1.useDebounceFn((val) => {
|
|
236
|
+
var _a2;
|
|
237
|
+
if (!val) {
|
|
238
|
+
(_a2 = abortableParsedImage == null ? void 0 : abortableParsedImage.abort) == null ? void 0 : _a2.call(abortableParsedImage);
|
|
239
|
+
currentImage.value = val;
|
|
240
|
+
currentImageInfo.value = void 0;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (val === currentImage.value || currentImageInfo.value && val === currentFullImage.value) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (abortableParsedImage) {
|
|
247
|
+
setParsedImage(val);
|
|
248
|
+
} else {
|
|
249
|
+
currentImage.value = val;
|
|
250
|
+
currentImageInfo.value = void 0;
|
|
251
|
+
}
|
|
252
|
+
}, 300);
|
|
253
|
+
vue.watch(formImageValue, (val) => {
|
|
254
|
+
debouncedHandleImageValue(val);
|
|
169
255
|
});
|
|
170
256
|
return {
|
|
171
257
|
actualSecret,
|