vap1 0.2.2 → 0.2.4
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/components/Box/Box.js +75 -42
- package/components/Box/SelectBar.js +51 -24
- package/components/Box/_register.d.ts +4 -0
- package/components/Box/_register.js +10 -8
- package/components/Box/index.js +1 -1
- package/components/Lists/SList.js +76 -48
- package/components/SearchBar/ActionButtons.js +75 -42
- package/components/SearchBar/ByField.js +80 -52
- package/components/SearchBar/ByKeyword.js +44 -17
- package/components/SearchBar/SearchField.js +8 -8
- package/components/SearchBar/SearchTags.js +4 -4
- package/components/SearchBar/_register.js +9 -8
- package/components/SearchBar/index.js +22 -11
- package/components/Tables/ApiTable.d.ts +1 -1
- package/components/Tables/ApiTable.js +19 -8
- package/components/Tables/ApiTableModal.d.ts +1 -1
- package/components/Tables/ApiTableModal.js +40 -13
- package/components/Tables/Components/ActionBar.js +53 -26
- package/components/Tables/Components/Actions.js +40 -29
- package/components/Tables/Components/Summary.js +2 -2
- package/components/Tables/Components/index.js +3 -3
- package/components/Tables/STable.js +21 -10
- package/components/Tables/TopTable.d.ts +3 -2
- package/components/Tables/TopTable.js +64 -37
- package/components/Tables/TopTableModal.js +21 -10
- package/components/Tables/Util.d.ts +2 -2
- package/components/Tables/Util.js +11 -9
- package/components/Tables/VTable.d.ts +2 -2
- package/components/Tables/VTable.js +137 -65
- package/components/Tables/index.d.ts +7 -2
- package/components/Tables/index.js +5 -5
- package/components/TreeSelect/BaseTreeSelect.js +81 -45
- package/components/TreeSelect/DTreeSelect.js +191 -66
- package/components/TreeSelect/FTreeSelect.js +67 -20
- package/components/TreeSelect/STreeSelect.js +22 -11
- package/components/Trees/ActionTree.js +562 -431
- package/components/Trees/BaseTree.js +85 -38
- package/components/Trees/COTree/COButton.js +48 -21
- package/components/Trees/COTree/COSelect.js +31 -20
- package/components/Trees/COTree/COTree.js +223 -107
- package/components/Trees/COTree/COTreeUtil.js +160 -115
- package/components/Trees/DTree.js +139 -68
- package/components/Trees/FTree.js +76 -29
- package/components/Trees/STree.js +59 -23
- package/components/UForm/FormWrapper.js +70 -53
- package/components/UForm/UDescriptions.js +38 -38
- package/components/UForm/UForm.js +240 -135
- package/components/UForm/UFormModal.js +99 -44
- package/components/UForm/UInfo.js +33 -22
- package/components/UForm/UInfoModal.js +31 -20
- package/components/UForm/UModal.js +40 -13
- package/components/UForm/_FormUtils.js +29 -18
- package/components/UForm/_input.js +75 -39
- package/components/UForm/_register.js +11 -9
- package/components/Upload/UploadFile.js +38 -11
- package/components/Upload/UploadImage.js +50 -23
- package/components/Upload/UploadModal.js +149 -84
- package/components/Upload/useUpload.js +35 -19
- package/components/_RegisterUtil.js +20 -8
- package/components/_adapt/Alert.js +20 -9
- package/components/_adapt/Breadcrumb.js +18 -7
- package/components/_adapt/Button.js +24 -13
- package/components/_adapt/Col.js +34 -23
- package/components/_adapt/Collapse.js +21 -10
- package/components/_adapt/ColorPicker.js +55 -28
- package/components/_adapt/ConfigProvider.js +14 -3
- package/components/_adapt/Drawer.js +18 -7
- package/components/_adapt/Dropdown.js +23 -12
- package/components/_adapt/FloatButton.js +21 -10
- package/components/_adapt/Icon.js +18 -7
- package/components/_adapt/Input.js +17 -6
- package/components/_adapt/InputNumber.js +16 -5
- package/components/_adapt/Layout.js +84 -28
- package/components/_adapt/Menu.js +28 -17
- package/components/_adapt/Modal.js +72 -25
- package/components/_adapt/Pagination.js +14 -3
- package/components/_adapt/Popconfirm.js +17 -6
- package/components/_adapt/Popover.js +17 -6
- package/components/_adapt/Progress.js +42 -11
- package/components/_adapt/Radio.js +21 -10
- package/components/_adapt/Row.js +18 -7
- package/components/_adapt/Select.js +54 -43
- package/components/_adapt/Slider.js +1 -1
- package/components/_adapt/Space.js +2 -2
- package/components/_adapt/Table.js +16 -5
- package/components/_adapt/Tabs.js +17 -6
- package/components/_adapt/Tag.js +19 -8
- package/components/_adapt/Tooltip.js +15 -4
- package/components/_adapt/TreeSelect.js +18 -7
- package/components/_adapt/notification.js +1 -1
- package/components/_adapt/todo/Image.js +2 -2
- package/components/_adapt/todo/NotEffectOnV15.js +1 -1
- package/components/_adapt/todo/Segmented.js +2 -2
- package/components/_adapt/utils.js +28 -8
- package/components/_common/AutoComplete.js +101 -34
- package/components/_common/CountUp.js +30 -14
- package/components/_common/DateRange.d.ts +10 -2
- package/components/_common/DateRange.js +65 -69
- package/components/_common/HighLight.js +22 -6
- package/components/_common/I18N.js +27 -2
- package/components/_common/Loading.js +25 -9
- package/components/_common/MonthRange.js +26 -26
- package/components/_common/PromiseLabel.js +68 -15
- package/components/_common/Role.js +2 -2
- package/components/_common/Upagination.js +45 -34
- package/components/_setup/Const.js +2 -2
- package/components/_setup/I18N/enUS.js +2 -2
- package/components/_setup/I18N/zhCN.js +3 -3
- package/components/_setup/I18N/zhHK.js +2 -2
- package/components/_setup/ICON/IconTypes.js +2 -2
- package/components/_setup/SearchField/SearchFieldAdvance.js +22 -11
- package/components/_setup/SearchField/SearchFieldDate.js +116 -79
- package/components/_setup/SearchField/SearchFieldInput.js +21 -10
- package/components/_setup/SearchField/SearchFieldSelect.js +55 -44
- package/components/_setup/SearchField/SearchFieldTree.js +63 -52
- package/components/_setup/SelectBar/SelectList.js +21 -10
- package/components/_setup/SelectBar/SelectTree.js +17 -6
- package/components/_setup/UForm/UFormAdvanceInput.js +105 -78
- package/components/_setup/UForm/UFormCOTree.js +21 -10
- package/components/_setup/UForm/UFormCrontab.js +51 -35
- package/components/_setup/UForm/UFormDate.js +160 -124
- package/components/_setup/UForm/UFormInput.js +113 -72
- package/components/_setup/UForm/UFormJSON.js +95 -57
- package/components/_setup/UForm/UFormJSONTable.js +79 -41
- package/components/_setup/UForm/UFormOrg.js +112 -48
- package/components/_setup/UForm/UFormRole.js +31 -20
- package/components/_setup/UForm/UFormSelect.js +116 -86
- package/components/_setup/UForm/UFormTree.js +52 -41
- package/components/_setup/UForm/UFormUpload.js +62 -34
- package/components/_setup/UForm/_utils.js +9 -9
- package/deps/JsonView.js +18 -7
- package/deps/SpringBoot.js +1 -1
- package/deps/SpringCloud.js +4 -4
- package/deps/_editor/advance/_Image.js +33 -20
- package/deps/_editor/base/Element.js +28 -17
- package/deps/_editor/base/Leaf.js +18 -7
- package/deps/_editor/base/Support.js +4 -4
- package/deps/_editor/i18n.js +1 -1
- package/deps/_editor/tools/Button.js +31 -19
- package/deps/_editor/tools/ToolBar.js +3 -3
- package/deps/_editor/tools/_BlockButton.js +49 -27
- package/deps/_editor/tools/_InsertButton.js +32 -28
- package/deps/_editor/tools/_MarkButton.js +15 -14
- package/deps/_editor/tools/_TxtButton.js +90 -58
- package/deps/api-audit.js +1 -1
- package/deps/echarts.js +65 -18
- package/deps/editor.js +52 -26
- package/deps/registerEditor.js +18 -7
- package/hooks/_list.js +1 -1
- package/hooks/useAjax.js +43 -19
- package/hooks/useAjaxAction.js +57 -20
- package/hooks/useAjaxQuery.js +121 -51
- package/hooks/useApi.js +35 -8
- package/hooks/useApiBase.js +291 -184
- package/hooks/useApiGlobal.js +40 -13
- package/hooks/useApp.js +4 -4
- package/hooks/useArray.js +114 -52
- package/hooks/useDefault.js +19 -3
- package/hooks/useDoLoad.js +25 -9
- package/hooks/useEffectFunction.js +4 -3
- package/hooks/useEffectOnce.js +5 -5
- package/hooks/useError.js +21 -5
- package/hooks/useFirstMountState.js +3 -3
- package/hooks/useGenkey.js +7 -7
- package/hooks/useGetSet.js +9 -9
- package/hooks/useGlobal.js +58 -29
- package/hooks/useHover.js +25 -9
- package/hooks/useMemoPromise.js +62 -22
- package/hooks/useModals.js +71 -36
- package/hooks/useMountedState.js +6 -6
- package/hooks/useOpenState.js +26 -10
- package/hooks/usePromise.js +15 -13
- package/hooks/useQueue.js +35 -8
- package/hooks/useSetState.js +25 -8
- package/hooks/useStateList.js +30 -18
- package/hooks/useSyncExternalStore.js +31 -15
- package/hooks/useToggle.js +6 -3
- package/hooks/useUnmountPromise.js +11 -11
- package/hooks/useUpdate.js +20 -4
- package/hooks/useUpdateEffect.js +5 -5
- package/login/Base65.js +15 -14
- package/login/Password.js +91 -38
- package/login/SM4.js +50 -49
- package/login/cems/index.js +2 -2
- package/login/jit/index.js +16 -71
- package/login/jit/pnxclient.js +6 -4
- package/login/vap/index.js +1 -1
- package/login/xrtx/index.js +2 -2
- package/package.json +1 -1
- package/screen/Comment.js +16 -5
- package/screen/Page.js +14 -14
- package/screen/render.js +2 -2
- package/uform/FormEditor.js +43 -26
- package/uform/FormViewer.js +30 -19
- package/uform/hooks/useEditor.js +83 -47
- package/uform/hooks/useForm.js +2 -2
- package/uform/index.js +10 -10
- package/uform/inputs/_advance.js +12 -12
- package/uform/inputs/_date.js +63 -52
- package/uform/inputs/_input.js +49 -38
- package/uform/inputs/_select.js +53 -42
- package/uform/inputs/_specific.js +33 -22
- package/uform/inputs/index.js +5 -5
- package/uform/inputs/register.js +14 -14
- package/uform/panel/Editor/GroupEditor.js +31 -31
- package/uform/panel/Editor/ListEditor.js +22 -22
- package/uform/panel/Editor/_FieldItems.js +16 -16
- package/uform/panel/Editor/_GroupCollapse.js +9 -9
- package/uform/panel/Editor/_GroupDefault.js +9 -9
- package/uform/panel/Editor/_GroupStep.js +18 -18
- package/uform/panel/Editor/_GroupTab.js +16 -16
- package/uform/panel/Editor/index.js +17 -17
- package/uform/panel/Items/index.js +22 -11
- package/uform/panel/Propreties/CanvasProperties.js +14 -14
- package/uform/panel/Propreties/Component/FieldPlugin.js +5 -5
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +22 -47
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +20 -43
- package/uform/panel/Propreties/Component/Links.js +40 -29
- package/uform/panel/Propreties/Component/OptionTable.js +97 -52
- package/uform/panel/Propreties/Component/RegexpModal.js +11 -11
- package/uform/panel/Propreties/Component/Validate.js +35 -24
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +13 -24
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +15 -38
- package/uform/panel/Propreties/FieldOptions.js +78 -44
- package/uform/panel/Propreties/FieldProperties.js +47 -20
- package/uform/panel/Propreties/GroupProperties.js +9 -9
- package/uform/panel/Propreties/_ItemAdvance.js +37 -26
- package/uform/panel/Propreties/_ItemBase.js +30 -19
- package/uform/panel/Propreties/_ItemLink.js +20 -9
- package/uform/panel/Propreties/_ItemValidate.js +33 -22
- package/uform/plugins/index.js +7 -7
- package/uform/utils/Convert.js +137 -94
- package/uform/utils/SchemaConvert.js +43 -68
- package/uform/utils/arr.js +103 -75
- package/utils/Ajax.d.ts +1 -11
- package/utils/Ajax.js +154 -68
- package/utils/ArrayUtil.js +14 -12
- package/utils/CacheUtil.js +19 -13
- package/utils/Const.js +13 -13
- package/utils/CustomApp.js +15 -10
- package/utils/EventUtil.js +78 -14
- package/utils/Format.js +59 -38
- package/utils/Global.js +8 -8
- package/utils/Logger.js +56 -11
- package/utils/PageUtil.d.ts +12 -6
- package/utils/PageUtil.js +105 -35
- package/utils/Renders/ApiGetRender.js +187 -100
- package/utils/Renders/ApiPostRender.js +123 -69
- package/utils/Renders/DateRender.js +9 -9
- package/utils/Renders/DictRender.js +82 -55
- package/utils/Renders/FileRender.js +34 -12
- package/utils/Renders/ListRender.js +21 -21
- package/utils/Renders/NumberRender.js +14 -13
- package/utils/Renders/StatusRender.js +20 -20
- package/utils/Renders/StringRender.js +17 -17
- package/utils/Renders/_define.d.ts +2 -2
- package/utils/Renders/_define.js +7 -7
- package/utils/StringUtil.js +98 -67
- package/utils/TreeUtil.js +71 -20
- package/utils/VAP.js +14 -14
- package/utils/XHR.js +27 -11
- package/utils/_AjaxUtil.d.ts +10 -0
- package/utils/_AjaxUtil.js +35 -12
- package/utils/_Support.js +26 -26
- package/utils/i18n.js +78 -44
- package/utils/index.d.ts +9 -1
- package/utils/index.js +34 -5
- package/utils/screenful.js +82 -29
- package/widget/index.js +4 -4
package/login/jit/index.js
CHANGED
|
@@ -19,81 +19,25 @@ var BROWSER_MODE;
|
|
|
19
19
|
BROWSER_MODE[BROWSER_MODE["CHROME"] = 1] = "CHROME";
|
|
20
20
|
BROWSER_MODE[BROWSER_MODE["CHROME_OLD"] = 2] = "CHROME_OLD";
|
|
21
21
|
})(BROWSER_MODE || (exports.BROWSER_MODE = BROWSER_MODE = {}));
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
var pnxclient_1 = require("./pnxclient");
|
|
23
|
+
var JitClient = /** @class */ (function () {
|
|
24
24
|
/**
|
|
25
25
|
* @param initParam 插件初始化参数,是一个XML字符串,在不同的项目,参数会不同,可以配置在后端返回
|
|
26
26
|
* @param enablectiveX 是否支持 旧版本 IE ActiveX 登录 , 默认支持
|
|
27
27
|
* @param enableNPPlugin 是否支持 旧版本 Chrome NppPlugin 登录 , 默认支持,部分地区不支持
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
function JitClient(initParam, enablectiveX, enableNPPlugin) {
|
|
30
|
+
if (enablectiveX === void 0) { enablectiveX = true; }
|
|
31
|
+
if (enableNPPlugin === void 0) { enableNPPlugin = true; }
|
|
30
32
|
// 内置所有已知的吉大KEY
|
|
31
|
-
this.initParam =
|
|
32
|
-
<authinfo>
|
|
33
|
-
<liblist>
|
|
34
|
-
<lib type=\"SKF\" version=\"1.1\" dllname=\"U2h1dHRsZUNzcDExXzMwMDBHTS5kbGw=\">
|
|
35
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
36
|
-
</lib>
|
|
37
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"RkVJVElBTiBlUGFzc05HIENTUCBGb3IgSklUM0sgVjEuMA==\">
|
|
38
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
39
|
-
</lib>
|
|
40
|
-
<lib type=\"SKF\" version=\"1.0\" dllname=\"RW50ZXJTYWZlIGVQYXNzMzAwMyBDU1AgdjEuMA==\">
|
|
41
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
42
|
-
</lib>
|
|
43
|
-
<lib type=\"PM\" version=\"1.0\" dllname=\"Q3J5cHRPY3guZGxs\">
|
|
44
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
45
|
-
</lib>
|
|
46
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"RUlUSUFOIGVQYXNzTkcgUlNBIENyeXB0b2dyYXBoaWMgU2VydmljZSBQcm92aWRlcg==\">
|
|
47
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
48
|
-
</lib>
|
|
49
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"SklUIFVTQiBLZXkgQ1NQIHYxLjA=\">
|
|
50
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
51
|
-
</lib>
|
|
52
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"RW50ZXJTYWZlIGVQYXNzMjAwMSBDU1AgdjEuMA==\">
|
|
53
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
54
|
-
</lib>
|
|
55
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"SklUIFVTQiBLZXkzMDAzIENTUCB2MS4w\">
|
|
56
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
57
|
-
</lib>
|
|
58
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"RkVJVElBTiBlUGFzc05HIFJTQSBDcnlwdG9ncmFwaGljIFNlcnZpY2UgUHJvdmlkZXI=\">
|
|
59
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
60
|
-
</lib>
|
|
61
|
-
<lib type=\"SKF\" version=\"1.1\" dllname=\"ZXNhZmlucy5kbGw=\">
|
|
62
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
63
|
-
</lib>
|
|
64
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IEVuaGFuY2VkIENyeXB0b2dyYXBoaWMgUHJvdmlkZXIgdjEuMA==\">
|
|
65
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
66
|
-
</lib>
|
|
67
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IFN0cm9uZyBDcnlwdG9ncmFwaGljIFByb3ZpZGVy\">
|
|
68
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
69
|
-
</lib>
|
|
70
|
-
<lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IEJhc2UgQ3J5cHRvZ3JhcGhpYyBQcm92aWRlciB2MS4w\">
|
|
71
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
72
|
-
</lib>
|
|
73
|
-
<lib type=\"SKF\" version=\"1.0\" dllname=\"R0FLRVlfU0tGLmRsbA==\">
|
|
74
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
75
|
-
</lib>
|
|
76
|
-
<lib type=\"SKF\" version=\"1.0\" dllname=\"L3Vzci9sb2NhbC9saWI2NC9saWJTS0ZfR0FfYXBpLnNv\">
|
|
77
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
78
|
-
</lib>
|
|
79
|
-
<lib type=\"SKF\" version=\"1.0\" dllname=\"b3B0L0dBU1MvbGliU0tGL2xpYlNLRl9HQV9hcGkuc28=\">
|
|
80
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
81
|
-
</lib>
|
|
82
|
-
<lib type=\"SKF\" version=\"1.0\" dllname=\"SklUR01LRVlfU0pLMTQyNC5kbGw=\">
|
|
83
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SM3\" />
|
|
84
|
-
</lib>
|
|
85
|
-
<lib type=\"CSP\" version=\"1.1\" dllname=\"ZVNhZmUgQ3J5cHRvZ3JhcGhpYyBTZXJ2aWNlIFByb3ZpZGVyIHYxLjA=\">
|
|
86
|
-
<algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />
|
|
87
|
-
</lib>
|
|
88
|
-
</liblist>
|
|
89
|
-
</authinfo>`;
|
|
33
|
+
this.initParam = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<authinfo>\n <liblist>\n <lib type=\"SKF\" version=\"1.1\" dllname=\"U2h1dHRsZUNzcDExXzMwMDBHTS5kbGw=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"RkVJVElBTiBlUGFzc05HIENTUCBGb3IgSklUM0sgVjEuMA==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"SKF\" version=\"1.0\" dllname=\"RW50ZXJTYWZlIGVQYXNzMzAwMyBDU1AgdjEuMA==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"PM\" version=\"1.0\" dllname=\"Q3J5cHRPY3guZGxs\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"RUlUSUFOIGVQYXNzTkcgUlNBIENyeXB0b2dyYXBoaWMgU2VydmljZSBQcm92aWRlcg==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"SklUIFVTQiBLZXkgQ1NQIHYxLjA=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"RW50ZXJTYWZlIGVQYXNzMjAwMSBDU1AgdjEuMA==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"SklUIFVTQiBLZXkzMDAzIENTUCB2MS4w\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"RkVJVElBTiBlUGFzc05HIFJTQSBDcnlwdG9ncmFwaGljIFNlcnZpY2UgUHJvdmlkZXI=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"SKF\" version=\"1.1\" dllname=\"ZXNhZmlucy5kbGw=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IEVuaGFuY2VkIENyeXB0b2dyYXBoaWMgUHJvdmlkZXIgdjEuMA==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IFN0cm9uZyBDcnlwdG9ncmFwaGljIFByb3ZpZGVy\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"CSP\" version=\"1.0\" dllname=\"TWljcm9zb2Z0IEJhc2UgQ3J5cHRvZ3JhcGhpYyBQcm92aWRlciB2MS4w\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n <lib type=\"SKF\" version=\"1.0\" dllname=\"R0FLRVlfU0tGLmRsbA==\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"SKF\" version=\"1.0\" dllname=\"L3Vzci9sb2NhbC9saWI2NC9saWJTS0ZfR0FfYXBpLnNv\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"SKF\" version=\"1.0\" dllname=\"b3B0L0dBU1MvbGliU0tGL2xpYlNLRl9HQV9hcGkuc28=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"SKF\" version=\"1.0\" dllname=\"SklUR01LRVlfU0pLMTQyNC5kbGw=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SM3\" />\n </lib>\n <lib type=\"CSP\" version=\"1.1\" dllname=\"ZVNhZmUgQ3J5cHRvZ3JhcGhpYyBTZXJ2aWNlIFByb3ZpZGVyIHYxLjA=\">\n <algid val=\"SHA1\" sm2_hashalg=\"SHA1\" />\n </lib>\n </liblist>\n</authinfo>";
|
|
90
34
|
pnxclient_1.JIT_GW_ExtInterface.Init(enablectiveX, enableNPPlugin);
|
|
91
35
|
if (initParam) {
|
|
92
36
|
this.initParam = initParam;
|
|
93
37
|
}
|
|
94
38
|
}
|
|
95
|
-
getBrowserInfo() {
|
|
96
|
-
|
|
39
|
+
JitClient.prototype.getBrowserInfo = function () {
|
|
40
|
+
var userAgent = navigator.userAgent.toLowerCase();
|
|
97
41
|
if (userAgent.indexOf("chrome") < 0) {
|
|
98
42
|
// 非 Chrome : 使用 IE ActiveX 组件
|
|
99
43
|
// let obj = document.createElement('object');
|
|
@@ -102,8 +46,8 @@ class JitClient {
|
|
|
102
46
|
// document.body.append(obj);
|
|
103
47
|
return BROWSER_MODE.IE;
|
|
104
48
|
}
|
|
105
|
-
|
|
106
|
-
userAgent.split(" ").map(ptn
|
|
49
|
+
var version = 0;
|
|
50
|
+
userAgent.split(" ").map(function (ptn) {
|
|
107
51
|
if (ptn.indexOf("chrome") > -1) {
|
|
108
52
|
version = parseInt(ptn.split("/")[1]);
|
|
109
53
|
}
|
|
@@ -120,20 +64,21 @@ class JitClient {
|
|
|
120
64
|
}
|
|
121
65
|
// 新版 Chrome ,使用 Chrome 插件
|
|
122
66
|
return BROWSER_MODE.CHROME;
|
|
123
|
-
}
|
|
124
|
-
getLoginParam(randNum, initParam) {
|
|
67
|
+
};
|
|
68
|
+
JitClient.prototype.getLoginParam = function (randNum, initParam) {
|
|
125
69
|
var signSubject = ""; //document.getElementById("rootCADN").value;
|
|
126
70
|
// 验证认证原文是否为空
|
|
127
71
|
// VCTK初始化参数,数据可从网关系统:认证管理->Key类型管理中导出
|
|
128
72
|
// 调用网关工具脚本中的detachSignStr方法进行签名,返回签名结果
|
|
129
73
|
// 参数说明:initParam:vctk控件初始化参数,authContent:认证原文,signSubject:证书版本者主题
|
|
130
|
-
|
|
74
|
+
var signResult = detachSignStr(initParam || this.initParam, randNum, signSubject);
|
|
131
75
|
if (signResult === false) {
|
|
132
76
|
return false;
|
|
133
77
|
}
|
|
134
78
|
return { original: randNum, signed_data: signResult, authMode: "cert" };
|
|
135
|
-
}
|
|
136
|
-
|
|
79
|
+
};
|
|
80
|
+
return JitClient;
|
|
81
|
+
}());
|
|
137
82
|
exports.JitClient = JitClient;
|
|
138
83
|
// 根据原文和证书产生认证数据包
|
|
139
84
|
// 参数说明:initParam:vctk控件初始化参数
|
package/login/jit/pnxclient.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JIT_GW_ExtInterface = void 0;
|
|
4
|
-
|
|
4
|
+
var has = function (object, key) { return object != null && Object.prototype.hasOwnProperty.call(object, key); };
|
|
5
5
|
exports.JIT_GW_ExtInterface = function () {
|
|
6
6
|
var currentSessionWSURL = "";
|
|
7
7
|
var usePNXClient = false;
|
|
@@ -11,7 +11,7 @@ exports.JIT_GW_ExtInterface = function () {
|
|
|
11
11
|
* @param {Object} target - target options
|
|
12
12
|
* @param {Object} options - new options
|
|
13
13
|
*/
|
|
14
|
-
var extendOptions = (target, options)
|
|
14
|
+
var extendOptions = function (target, options) {
|
|
15
15
|
if (typeof Object.assign === 'function') {
|
|
16
16
|
Object.assign(target, options);
|
|
17
17
|
}
|
|
@@ -65,7 +65,9 @@ exports.JIT_GW_ExtInterface = function () {
|
|
|
65
65
|
extendOptions(options, extendOption);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
Init: function (enablectiveX
|
|
68
|
+
Init: function (enablectiveX, enableNPPlugin) {
|
|
69
|
+
if (enablectiveX === void 0) { enablectiveX = true; }
|
|
70
|
+
if (enableNPPlugin === void 0) { enableNPPlugin = false; }
|
|
69
71
|
if (enablectiveX && (!!window.ActiveXObject || "ActiveXObject" in window)) {
|
|
70
72
|
usePNXClient = true;
|
|
71
73
|
// let obj = document.createElement('object');
|
|
@@ -511,7 +513,7 @@ exports.JIT_GW_ExtInterface = function () {
|
|
|
511
513
|
}
|
|
512
514
|
else {
|
|
513
515
|
var jsonstr = "";
|
|
514
|
-
|
|
516
|
+
var waitTxt = SendAndWaitMessageEx("GetVersion", jsonstr);
|
|
515
517
|
var result = JSON.parse(waitTxt);
|
|
516
518
|
return result.value;
|
|
517
519
|
}
|
package/login/vap/index.js
CHANGED
package/login/xrtx/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
var Login = function (text) {
|
|
2
2
|
};
|
|
3
|
-
|
|
3
|
+
var WebSocketTest = function () {
|
|
4
4
|
if ("WebSocket" in window) {
|
|
5
5
|
//alert("WebSocket is supported by your Browser!");
|
|
6
6
|
var ws = new WebSocket("ws://127.0.0.1:30318/");
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"vap1","version":"0.2.
|
|
1
|
+
{"name":"vap1","version":"0.2.4","description":"vap1, Both support MicroService and SAP FrameWork, Support IE>9","main":"index.js","author":"Xiang da","license":"ISC"}
|
package/screen/Comment.js
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
17
|
exports.Comment = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
20
|
+
var Comment = function (props) {
|
|
21
|
+
var param = {
|
|
11
22
|
className: 'comment',
|
|
12
23
|
style: {}
|
|
13
24
|
};
|
|
@@ -24,6 +35,6 @@ const Comment = props => {
|
|
|
24
35
|
top: props.top,
|
|
25
36
|
position: 'absolute'
|
|
26
37
|
});
|
|
27
|
-
return react_1.default.createElement("div",
|
|
38
|
+
return react_1.default.createElement("div", __assign({}, param), props.children);
|
|
28
39
|
};
|
|
29
40
|
exports.Comment = Comment;
|
package/screen/Page.js
CHANGED
|
@@ -24,19 +24,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Page = void 0;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
var react_1 = __importStar(require("react"));
|
|
28
|
+
var antd_1 = require("antd");
|
|
29
29
|
// @ts-ignore
|
|
30
|
-
|
|
30
|
+
var zh_CN = antd.locales.zh_CN;
|
|
31
31
|
antd_1.Empty.defaultProps = { image: '/images/empty-insight.png' };
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var resize = function () {
|
|
33
|
+
var diff = 0.1;
|
|
34
34
|
// const min: number = 0.1, max: number = 0.1;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var min = 0.5625 - diff;
|
|
36
|
+
var max = 0.5625 + diff;
|
|
37
|
+
var tW = window.innerWidth;
|
|
38
|
+
var tH = window.innerHeight;
|
|
39
|
+
var scale = tH / tW;
|
|
40
40
|
if (scale >= min && scale <= max) {
|
|
41
41
|
document.body.style.transform = 'scale(' + tW / 1920 + ',' + tH / 1080 + ')';
|
|
42
42
|
document.body.style.marginLeft = '0px';
|
|
@@ -53,8 +53,8 @@ const resize = () => {
|
|
|
53
53
|
document.body.style.marginTop = '0px';
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
(0, react_1.useLayoutEffect)(()
|
|
56
|
+
var Page = function (props) {
|
|
57
|
+
(0, react_1.useLayoutEffect)(function () {
|
|
58
58
|
document.body.style.width = '1920px';
|
|
59
59
|
document.body.style.height = '1080px';
|
|
60
60
|
document.body.style.transformOrigin = 'top left';
|
|
@@ -63,12 +63,12 @@ const Page = props => {
|
|
|
63
63
|
}
|
|
64
64
|
window.addEventListener('resize', resize, false);
|
|
65
65
|
resize();
|
|
66
|
-
return ()
|
|
66
|
+
return function () {
|
|
67
67
|
window.removeEventListener('resize', resize);
|
|
68
68
|
};
|
|
69
69
|
}, []);
|
|
70
70
|
return react_1.default.createElement(antd_1.ConfigProvider, { locale: zh_CN,
|
|
71
71
|
// autoInsertSpaceInButton={false}
|
|
72
|
-
renderEmpty: ()
|
|
72
|
+
renderEmpty: function () { return react_1.default.createElement(antd_1.Empty, null); } }, props.children);
|
|
73
73
|
};
|
|
74
74
|
exports.Page = Page;
|
package/screen/render.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.render = void 0;
|
|
4
|
-
|
|
4
|
+
var react_dom_1 = require("react-dom");
|
|
5
5
|
/**
|
|
6
6
|
* 大屏 render 方法根节点请用 Page
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
var render = function (children) { return (0, react_dom_1.render)(children, document.getElementById('root')); };
|
|
9
9
|
exports.render = render;
|
package/uform/FormEditor.js
CHANGED
|
@@ -22,32 +22,49 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
26
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
|
+
if (!m) return o;
|
|
28
|
+
var i = m.call(o), r, ar = [], e;
|
|
29
|
+
try {
|
|
30
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
31
|
+
}
|
|
32
|
+
catch (error) { e = { error: error }; }
|
|
33
|
+
finally {
|
|
34
|
+
try {
|
|
35
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
36
|
+
}
|
|
37
|
+
finally { if (e) throw e.error; }
|
|
38
|
+
}
|
|
39
|
+
return ar;
|
|
40
|
+
};
|
|
25
41
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
42
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
43
|
};
|
|
28
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
45
|
exports.FormEditor = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
var react_1 = __importStar(require("react"));
|
|
47
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
48
|
+
var index_1 = require("../index");
|
|
49
|
+
var index_2 = __importDefault(require("./panel/Items/index"));
|
|
50
|
+
var index_3 = __importDefault(require("./panel/Editor/index"));
|
|
51
|
+
var useForm_1 = require("./hooks/useForm");
|
|
52
|
+
var FormViewer_1 = require("./FormViewer");
|
|
53
|
+
var CanvasProperties_1 = __importDefault(require("./panel/Propreties/CanvasProperties"));
|
|
54
|
+
var FieldProperties_1 = __importDefault(require("./panel/Propreties/FieldProperties"));
|
|
55
|
+
var GroupProperties_1 = __importDefault(require("./panel/Propreties/GroupProperties"));
|
|
56
|
+
var useEditor_1 = require("./hooks/useEditor");
|
|
57
|
+
var FormViewer_2 = require("./FormViewer");
|
|
58
|
+
var FormEditor = function (props) {
|
|
59
|
+
var schema = (0, react_1.useMemo)(function () { return (0, FormViewer_2.initSchama)(props.data); }, [props.data]);
|
|
60
|
+
var editor = (0, useEditor_1.useFormEditor)(schema);
|
|
61
|
+
var _a = __read((0, react_1.useState)(false), 2), open = _a[0], setOpen = _a[1];
|
|
62
|
+
var save = function (isCtrlS) {
|
|
63
|
+
if (isCtrlS === void 0) { isCtrlS = false; }
|
|
47
64
|
props.onSave(JSON.stringify(editor.getForm()), isCtrlS);
|
|
48
65
|
};
|
|
49
|
-
(0, react_1.useLayoutEffect)(()
|
|
50
|
-
|
|
66
|
+
(0, react_1.useLayoutEffect)(function () {
|
|
67
|
+
var onKeyDown = function (evt) {
|
|
51
68
|
if (evt.ctrlKey && (evt.key == 's' || evt.key == 'S')) {
|
|
52
69
|
evt.preventDefault();
|
|
53
70
|
evt.stopPropagation();
|
|
@@ -55,7 +72,7 @@ const FormEditor = (props) => {
|
|
|
55
72
|
}
|
|
56
73
|
};
|
|
57
74
|
document.addEventListener('keydown', onKeyDown, false);
|
|
58
|
-
return ()
|
|
75
|
+
return function () { return document.removeEventListener('keydown', onKeyDown); };
|
|
59
76
|
}, []);
|
|
60
77
|
return react_1.default.createElement(useForm_1.UFORM.Provider, { value: editor.form },
|
|
61
78
|
react_1.default.createElement(useEditor_1.FORM_EDITOR.Provider, { value: editor },
|
|
@@ -68,8 +85,8 @@ const FormEditor = (props) => {
|
|
|
68
85
|
props.name && react_1.default.createElement("small", null,
|
|
69
86
|
react_1.default.createElement("b", null, props.name)),
|
|
70
87
|
react_1.default.createElement(index_1.Button.Group, { style: { float: 'right', marginRight: 6, display: 'block' } },
|
|
71
|
-
editor.form.isGroup && react_1.default.createElement(index_1.Button, { icon: "plus", onClick: ()
|
|
72
|
-
react_1.default.createElement(index_1.Button, { icon: 'eye', type: "primary", onClick: ()
|
|
88
|
+
editor.form.isGroup && react_1.default.createElement(index_1.Button, { icon: "plus", onClick: function () { return editor.addGroup(); } }, "\u6DFB\u52A0\u5206\u7EC4"),
|
|
89
|
+
react_1.default.createElement(index_1.Button, { icon: 'eye', type: "primary", onClick: function () {
|
|
73
90
|
if (schema.fields && schema.fields.length > 1) {
|
|
74
91
|
setOpen(true);
|
|
75
92
|
}
|
|
@@ -82,10 +99,10 @@ const FormEditor = (props) => {
|
|
|
82
99
|
react_1.default.createElement("div", { className: 'panel-title' },
|
|
83
100
|
"\u5C5E\u6027",
|
|
84
101
|
react_1.default.createElement(index_1.Button.Group, { style: { float: 'right', marginRight: 6, display: 'block' } },
|
|
85
|
-
lodash_1.default.isFunction(props.onBack) && react_1.default.createElement(index_1.Button, { icon: 'rollback', onClick: ()
|
|
86
|
-
react_1.default.createElement(index_1.Button, { onClick: ()
|
|
102
|
+
lodash_1.default.isFunction(props.onBack) && react_1.default.createElement(index_1.Button, { icon: 'rollback', onClick: function () { return props.onBack(); } }, "\u8FD4\u56DE"),
|
|
103
|
+
react_1.default.createElement(index_1.Button, { onClick: function () { return save(); }, icon: 'save', type: 'primary' }, "\u4FDD\u5B58"))),
|
|
87
104
|
react_1.default.createElement(index_1.Form, { className: 'panel-content', labelCol: { sm: 6 }, wrapperCol: { sm: 17 } }, editor.selected == null ? react_1.default.createElement(CanvasProperties_1.default, null) : (editor.selected.field ? react_1.default.createElement(FieldProperties_1.default, null) : react_1.default.createElement(GroupProperties_1.default, null))))),
|
|
88
|
-
react_1.default.createElement(FormViewer_1.FormModal, { title: editor.form.title || '表单预览', schema: editor.form, open: open, onOk: (data)
|
|
105
|
+
react_1.default.createElement(FormViewer_1.FormModal, { title: editor.form.title || '表单预览', schema: editor.form, open: open, onOk: function (data) {
|
|
89
106
|
setOpen(false);
|
|
90
107
|
index_1.notification.info({
|
|
91
108
|
role: 'alert',
|
|
@@ -96,6 +113,6 @@ const FormEditor = (props) => {
|
|
|
96
113
|
react_1.default.createElement("h4", null, "JSON \u9884\u89C8"),
|
|
97
114
|
react_1.default.createElement("pre", null, JSON.stringify(data, null, 1)))
|
|
98
115
|
});
|
|
99
|
-
}, onCancel: ()
|
|
116
|
+
}, onCancel: function () { return setOpen(false); } })));
|
|
100
117
|
};
|
|
101
118
|
exports.FormEditor = FormEditor;
|
package/uform/FormViewer.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -27,15 +38,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
38
|
};
|
|
28
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
40
|
exports.FormModal = exports.FormViewer = exports.initSchama = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
var index_1 = require("../index");
|
|
44
|
+
var Convert_1 = require("./utils/Convert");
|
|
45
|
+
var DEFAULT = { fields: [] };
|
|
46
|
+
var initSchama = function (data) {
|
|
36
47
|
if (lodash_1.default.isString(data)) {
|
|
37
48
|
try {
|
|
38
|
-
|
|
49
|
+
var schema = JSON.parse(data);
|
|
39
50
|
if (lodash_1.default.isPlainObject(schema) && lodash_1.default.isArray(schema.fields)) {
|
|
40
51
|
return schema;
|
|
41
52
|
}
|
|
@@ -49,22 +60,22 @@ const initSchama = (data) => {
|
|
|
49
60
|
return DEFAULT;
|
|
50
61
|
};
|
|
51
62
|
exports.initSchama = initSchama;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return react_1.default.createElement(index_1.UForm,
|
|
63
|
+
var _FormRender = (0, react_1.forwardRef)(function (props, ref) {
|
|
64
|
+
var uformProps = (0, react_1.useMemo)(function () { return (0, Convert_1.schemaToForm)(props.schema); }, [props]);
|
|
65
|
+
return react_1.default.createElement(index_1.UForm, __assign({}, uformProps, { data: props.data, ref: ref }));
|
|
55
66
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
var _ModalRender = function (props) {
|
|
68
|
+
var uformProps = (0, react_1.useMemo)(function () { return (0, Convert_1.schemaToForm)(props.schema); }, [props]);
|
|
69
|
+
var modalProps = {};
|
|
59
70
|
modalProps.title = props.title || props.schema.title || '';
|
|
60
|
-
return react_1.default.createElement(index_1.UFormModal,
|
|
71
|
+
return react_1.default.createElement(index_1.UFormModal, __assign({}, uformProps, modalProps, { data: props.data, open: props.open, onOk: props.onOk, onCancel: props.onCancel }));
|
|
61
72
|
};
|
|
62
|
-
exports.FormViewer = (0, react_1.forwardRef)((props, ref)
|
|
63
|
-
|
|
73
|
+
exports.FormViewer = (0, react_1.forwardRef)(function (props, ref) {
|
|
74
|
+
var schema = (0, react_1.useMemo)(function () { return (0, exports.initSchama)(props.schema); }, [props.schema]);
|
|
64
75
|
return react_1.default.createElement(_FormRender, { schema: schema, data: props.data, ref: ref });
|
|
65
76
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return react_1.default.createElement(_ModalRender,
|
|
77
|
+
var FormModal = function (props) {
|
|
78
|
+
var schema = (0, react_1.useMemo)(function () { return (0, exports.initSchama)(props.schema); }, [props.schema]);
|
|
79
|
+
return react_1.default.createElement(_ModalRender, __assign({}, props, { schema: schema }));
|
|
69
80
|
};
|
|
70
81
|
exports.FormModal = FormModal;
|