@nokecy/qc-ui 0.6.5 → 0.6.7
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 +23 -23
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.d.ts +4 -4
- package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +29 -12
- package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +7 -6
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +166 -98
- package/dist/cjs/ag-grid-plus/context/gridContext.d.ts +12 -12
- package/dist/cjs/ag-grid-plus/context/gridContext.js +7 -2
- package/dist/cjs/ag-grid-plus/global.scss +31 -0
- package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +8 -7
- package/dist/cjs/ag-grid-plus/gridManager/index.js +32 -21
- package/dist/cjs/ag-grid-plus/index.d.ts +9 -11
- package/dist/cjs/ag-grid-plus/index.js +11 -3
- package/dist/cjs/ag-grid-plus/index.less +6 -6
- package/dist/cjs/ag-grid-plus/interface.d.ts +39 -39
- package/dist/cjs/ag-grid-plus/interface.js +2 -1
- package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +11 -11
- package/dist/cjs/ag-grid-plus/queryForm/index.js +72 -29
- package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +3 -3
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +27 -8
- package/dist/cjs/ag-grid-plus/setting/index.d.ts +9 -8
- package/dist/cjs/ag-grid-plus/setting/index.js +141 -116
- package/dist/cjs/ag-grid-plus/settingItem/index.d.ts +3 -3
- package/dist/cjs/ag-grid-plus/settingItem/index.js +7 -2
- package/dist/cjs/ag-grid-plus/toolBar/index.d.ts +20 -20
- package/dist/cjs/ag-grid-plus/toolBar/index.js +57 -35
- package/dist/cjs/ag-grid-plus/toolBar/style.d.ts +5 -9
- package/dist/cjs/ag-grid-plus/toolBar/style.js +83 -81
- package/dist/cjs/ag-grid-plus/utils.d.ts +9 -9
- package/dist/cjs/ag-grid-plus/utils.js +67 -21
- package/dist/cjs/array-table/arrayAddBtn.d.ts +3 -3
- package/dist/cjs/array-table/arrayAddBtn.js +25 -6
- package/dist/cjs/array-table/arrayBase.d.ts +62 -62
- package/dist/cjs/array-table/arrayBase.js +69 -47
- package/dist/cjs/array-table/index.d.ts +6 -6
- package/dist/cjs/array-table/index.js +54 -28
- package/dist/cjs/array-table/interface.d.ts +16 -16
- package/dist/cjs/array-table/preview.d.ts +3 -3
- package/dist/cjs/array-table/preview.js +16 -8
- package/dist/cjs/array-table/utils.d.ts +10 -10
- package/dist/cjs/array-table/utils.js +59 -28
- package/dist/cjs/array-table-index/index.d.ts +3 -3
- package/dist/cjs/array-table-index/index.js +15 -5
- package/dist/cjs/dashboard/dashboard/components/index.d.ts +2 -2
- package/dist/cjs/dashboard/dashboard/components/index.js +2 -0
- package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +3 -3
- package/dist/cjs/dashboard/dashboard/components/modal/index.js +9 -4
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +11 -11
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +13 -5
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -1
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/cjs/dashboard/dashboard/index.d.ts +62 -62
- package/dist/cjs/dashboard/dashboard/index.js +234 -161
- package/dist/cjs/dashboard/dashboard/index.less +173 -173
- package/dist/cjs/dashboard/dashboard/service.d.ts +8 -8
- package/dist/cjs/dashboard/dashboard/service.js +65 -41
- package/dist/cjs/dashboard/dashboard/utils.d.ts +9 -9
- package/dist/cjs/dashboard/dashboard/utils.js +70 -43
- package/dist/cjs/dashboard/index.d.ts +3 -3
- package/dist/cjs/dashboard/index.js +11 -4
- package/dist/cjs/dashboard/utils.d.ts +24 -24
- package/dist/cjs/dashboard/utils.js +59 -32
- package/dist/cjs/dashboard/widget/index.d.ts +13 -13
- package/dist/cjs/dashboard/widget/index.js +41 -20
- package/dist/cjs/dashboard/widget/index.less +7 -7
- package/dist/cjs/dashboard/widget/selector/index.d.ts +4 -4
- package/dist/cjs/dashboard/widget/selector/index.js +74 -44
- package/dist/cjs/dashboard/widget/selector/index.less +172 -172
- package/dist/cjs/dashboard/widget/utils.d.ts +4 -4
- package/dist/cjs/dashboard/widget/utils.js +36 -20
- package/dist/cjs/dialogSelect/index.d.ts +4 -4
- package/dist/cjs/dialogSelect/index.js +44 -19
- package/dist/cjs/dialogSelect/interface.d.ts +11 -11
- package/dist/cjs/dialogSelect/selectModal.d.ts +6 -6
- package/dist/cjs/dialogSelect/selectModal.js +79 -42
- package/dist/cjs/editable/index.d.ts +8 -8
- package/dist/cjs/editable/index.js +146 -75
- package/dist/cjs/editable/style.d.ts +2 -2
- package/dist/cjs/editable/style.js +21 -17
- package/dist/cjs/extensible-grid/index.d.ts +4 -4
- package/dist/cjs/extensible-grid/index.js +14 -4
- package/dist/cjs/extensible-grid/interface.d.ts +14 -14
- package/dist/cjs/formDesigner/FormDesigner.d.ts +3 -4
- package/dist/cjs/formDesigner/FormDesigner.js +35 -13
- package/dist/cjs/formDesigner/ProCard/index.d.ts +2 -3
- package/dist/cjs/formDesigner/ProCard/index.js +14 -7
- package/dist/cjs/formDesigner/arrayTable/arrayTableSchema.d.ts +5 -5
- package/dist/cjs/formDesigner/arrayTable/arrayTableSchema.js +2 -1
- package/dist/cjs/formDesigner/arrayTable/index.d.ts +1 -1
- package/dist/cjs/formDesigner/arrayTable/index.js +2 -0
- package/dist/cjs/formDesigner/arrayTable/preview.d.ts +3 -3
- package/dist/cjs/formDesigner/arrayTable/preview.js +50 -12
- package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
- package/dist/cjs/formDesigner/index.d.ts +2 -2
- package/dist/cjs/formDesigner/index.js +2 -0
- package/dist/cjs/formDesigner/index.less +2 -2
- package/dist/cjs/formDesigner/preWidgets/arrayTableIndex/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/arrayTableIndex/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/arrayTableIndex/preview.d.ts +4 -4
- package/dist/cjs/formDesigner/preWidgets/arrayTableIndex/preview.js +14 -7
- package/dist/cjs/formDesigner/preWidgets/card/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/card/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/card/preview.d.ts +4 -4
- package/dist/cjs/formDesigner/preWidgets/card/preview.js +11 -1
- package/dist/cjs/formDesigner/preWidgets/index.d.ts +12 -12
- package/dist/cjs/formDesigner/preWidgets/index.js +24 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty1/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty1/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty1/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty1/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty10/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty10/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty10/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty10/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty2/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty2/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty2/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty2/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty3/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty3/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty3/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty3/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty4/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty4/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty4/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty4/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty5/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty5/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty5/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty5/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty6/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty6/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty6/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty6/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty7/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty7/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty7/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty7/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty8/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty8/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty8/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty8/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty9/index.d.ts +1 -1
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty9/index.js +2 -0
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty9/preview.d.ts +5 -5
- package/dist/cjs/formDesigner/preWidgets/preDefineProperty9/preview.js +16 -7
- package/dist/cjs/formDesigner/preWidgets/utils.d.ts +294 -294
- package/dist/cjs/formDesigner/preWidgets/utils.js +21 -10
- package/dist/cjs/formDesigner/widgets/ActionsWidget.d.ts +2 -2
- package/dist/cjs/formDesigner/widgets/ActionsWidget.js +15 -5
- package/dist/cjs/formDesigner/widgets/LogoWidget.d.ts +2 -2
- package/dist/cjs/formDesigner/widgets/LogoWidget.js +9 -3
- package/dist/cjs/formDesigner/widgets/PreviewWidget.d.ts +7 -7
- package/dist/cjs/formDesigner/widgets/PreviewWidget.js +27 -12
- package/dist/cjs/formDesigner/widgets/SchemaEditorWidget.d.ts +7 -7
- package/dist/cjs/formDesigner/widgets/SchemaEditorWidget.js +11 -4
- package/dist/cjs/formDesigner/widgets/index.d.ts +4 -4
- package/dist/cjs/formDesigner/widgets/index.js +8 -0
- package/dist/cjs/formPro/context/formProContext.d.ts +13 -13
- package/dist/cjs/formPro/context/formProContext.js +7 -2
- package/dist/cjs/formPro/formLayoutPro.d.ts +9 -9
- package/dist/cjs/formPro/formLayoutPro.js +15 -4
- package/dist/cjs/formPro/index.d.ts +2 -2
- package/dist/cjs/formPro/index.js +2 -0
- package/dist/cjs/index.d.ts +12 -12
- package/dist/cjs/index.js +11 -0
- package/dist/esm/ag-grid-plus/_utils/boolSelect.d.ts +4 -4
- package/dist/esm/ag-grid-plus/_utils/boolSelect.js +36 -37
- package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +7 -6
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +143 -95
- package/dist/esm/ag-grid-plus/context/gridContext.d.ts +12 -12
- package/dist/esm/ag-grid-plus/global.scss +31 -0
- package/dist/esm/ag-grid-plus/gridManager/index.d.ts +8 -7
- package/dist/esm/ag-grid-plus/gridManager/index.js +28 -19
- package/dist/esm/ag-grid-plus/index.d.ts +9 -11
- package/dist/esm/ag-grid-plus/index.js +0 -1
- package/dist/esm/ag-grid-plus/index.less +6 -6
- package/dist/esm/ag-grid-plus/interface.d.ts +39 -39
- package/dist/esm/ag-grid-plus/interface.js +1 -2
- package/dist/esm/ag-grid-plus/queryForm/index.d.ts +11 -11
- package/dist/esm/ag-grid-plus/queryForm/index.js +54 -26
- package/dist/esm/ag-grid-plus/queryForm/index.less +48 -48
- package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +3 -3
- package/dist/esm/ag-grid-plus/queryForm/queryForm.js +14 -4
- package/dist/esm/ag-grid-plus/setting/index.d.ts +9 -8
- package/dist/esm/ag-grid-plus/setting/index.js +128 -129
- package/dist/esm/ag-grid-plus/settingItem/index.d.ts +3 -3
- package/dist/esm/ag-grid-plus/settingItem/index.js +3 -1
- package/dist/esm/ag-grid-plus/toolBar/index.d.ts +20 -20
- package/dist/esm/ag-grid-plus/toolBar/index.js +43 -32
- package/dist/esm/ag-grid-plus/toolBar/style.d.ts +5 -9
- package/dist/esm/ag-grid-plus/toolBar/style.js +83 -82
- package/dist/esm/ag-grid-plus/utils.d.ts +9 -9
- package/dist/esm/ag-grid-plus/utils.js +45 -13
- package/dist/esm/array-table/arrayAddBtn.d.ts +3 -3
- package/dist/esm/array-table/arrayAddBtn.js +15 -5
- package/dist/esm/array-table/arrayBase.d.ts +62 -62
- package/dist/esm/array-table/arrayBase.js +48 -43
- package/dist/esm/array-table/index.d.ts +6 -6
- package/dist/esm/array-table/index.js +33 -26
- package/dist/esm/array-table/interface.d.ts +16 -16
- package/dist/esm/array-table/preview.d.ts +3 -3
- package/dist/esm/array-table/preview.js +4 -6
- package/dist/esm/array-table/utils.d.ts +10 -10
- package/dist/esm/array-table/utils.js +35 -21
- package/dist/esm/array-table-index/index.d.ts +3 -3
- package/dist/esm/dashboard/dashboard/components/index.d.ts +2 -2
- package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +3 -3
- package/dist/esm/dashboard/dashboard/components/modal/index.js +4 -2
- package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +11 -11
- package/dist/esm/dashboard/dashboard/components/toolbar/index.js +6 -4
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -1
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
- package/dist/esm/dashboard/dashboard/index.d.ts +62 -62
- package/dist/esm/dashboard/dashboard/index.js +207 -158
- package/dist/esm/dashboard/dashboard/index.less +173 -173
- package/dist/esm/dashboard/dashboard/service.d.ts +8 -8
- package/dist/esm/dashboard/dashboard/service.js +61 -45
- package/dist/esm/dashboard/dashboard/utils.d.ts +9 -9
- package/dist/esm/dashboard/dashboard/utils.js +55 -38
- package/dist/esm/dashboard/index.d.ts +3 -3
- package/dist/esm/dashboard/utils.d.ts +24 -24
- package/dist/esm/dashboard/utils.js +47 -30
- package/dist/esm/dashboard/widget/index.d.ts +13 -13
- package/dist/esm/dashboard/widget/index.js +30 -17
- package/dist/esm/dashboard/widget/index.less +7 -7
- package/dist/esm/dashboard/widget/selector/index.d.ts +4 -4
- package/dist/esm/dashboard/widget/selector/index.js +58 -40
- package/dist/esm/dashboard/widget/selector/index.less +172 -172
- package/dist/esm/dashboard/widget/utils.d.ts +4 -4
- package/dist/esm/dashboard/widget/utils.js +14 -16
- package/dist/esm/dialogSelect/index.d.ts +4 -4
- package/dist/esm/dialogSelect/index.js +35 -18
- package/dist/esm/dialogSelect/interface.d.ts +11 -11
- package/dist/esm/dialogSelect/selectModal.d.ts +6 -6
- package/dist/esm/dialogSelect/selectModal.js +67 -39
- package/dist/esm/editable/index.d.ts +8 -8
- package/dist/esm/editable/index.js +125 -71
- package/dist/esm/editable/style.d.ts +2 -2
- package/dist/esm/editable/style.js +15 -15
- package/dist/esm/extensible-grid/index.d.ts +4 -4
- package/dist/esm/extensible-grid/index.js +9 -3
- package/dist/esm/extensible-grid/interface.d.ts +14 -14
- package/dist/esm/formDesigner/FormDesigner.d.ts +3 -4
- package/dist/esm/formDesigner/FormDesigner.js +16 -10
- package/dist/esm/formDesigner/ProCard/index.d.ts +2 -3
- package/dist/esm/formDesigner/ProCard/index.js +9 -6
- package/dist/esm/formDesigner/arrayTable/arrayTableSchema.d.ts +5 -5
- package/dist/esm/formDesigner/arrayTable/index.d.ts +1 -1
- package/dist/esm/formDesigner/arrayTable/preview.d.ts +3 -3
- package/dist/esm/formDesigner/arrayTable/preview.js +25 -9
- package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
- package/dist/esm/formDesigner/index.d.ts +2 -2
- package/dist/esm/formDesigner/index.less +2 -2
- package/dist/esm/formDesigner/preWidgets/arrayTableIndex/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/arrayTableIndex/preview.d.ts +4 -4
- package/dist/esm/formDesigner/preWidgets/arrayTableIndex/preview.js +6 -6
- package/dist/esm/formDesigner/preWidgets/card/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/card/preview.d.ts +4 -4
- package/dist/esm/formDesigner/preWidgets/card/preview.js +1 -0
- package/dist/esm/formDesigner/preWidgets/index.d.ts +12 -12
- package/dist/esm/formDesigner/preWidgets/preDefineProperty1/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty1/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty1/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty10/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty10/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty10/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty2/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty2/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty2/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty3/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty3/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty3/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty4/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty4/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty4/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty5/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty5/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty5/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty6/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty6/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty6/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty7/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty7/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty7/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty8/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty8/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty8/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/preDefineProperty9/index.d.ts +1 -1
- package/dist/esm/formDesigner/preWidgets/preDefineProperty9/preview.d.ts +5 -5
- package/dist/esm/formDesigner/preWidgets/preDefineProperty9/preview.js +8 -6
- package/dist/esm/formDesigner/preWidgets/utils.d.ts +294 -294
- package/dist/esm/formDesigner/preWidgets/utils.js +6 -6
- package/dist/esm/formDesigner/widgets/ActionsWidget.d.ts +2 -2
- package/dist/esm/formDesigner/widgets/LogoWidget.d.ts +2 -2
- package/dist/esm/formDesigner/widgets/LogoWidget.js +0 -1
- package/dist/esm/formDesigner/widgets/PreviewWidget.d.ts +7 -7
- package/dist/esm/formDesigner/widgets/PreviewWidget.js +11 -8
- package/dist/esm/formDesigner/widgets/SchemaEditorWidget.d.ts +7 -7
- package/dist/esm/formDesigner/widgets/SchemaEditorWidget.js +4 -3
- package/dist/esm/formDesigner/widgets/index.d.ts +4 -4
- package/dist/esm/formPro/context/formProContext.d.ts +13 -13
- package/dist/esm/formPro/formLayoutPro.d.ts +9 -9
- package/dist/esm/formPro/formLayoutPro.js +9 -3
- package/dist/esm/formPro/index.d.ts +2 -2
- package/dist/esm/index.d.ts +12 -12
- package/dist/umd/qc-ui.min.css +1 -1
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +64 -64
- package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +0 -401
- package/dist/cjs/type.d.ts +0 -1
- package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +0 -401
- package/dist/esm/type.d.ts +0 -1
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
|
|
2
3
|
import _debounce from "lodash/debounce";
|
|
3
4
|
import _isArray from "lodash/isArray";
|
|
4
5
|
import _isEmpty from "lodash/isEmpty";
|
|
5
6
|
import _cloneDeep from "lodash/cloneDeep";
|
|
6
7
|
var _excluded = ["storageKey", "editMode", "widgets", "defaultLayout", "widgetWrapClassName", "widgetWrapStyle", "layout", "minHeight", "maxWidgetLength", "toolbar", "onLayoutChange", "onReset", "onReload", "onRemoveWidget", "onAddWidget", "onCancelEdit", "onEdit", "onRevert", "onSave"];
|
|
8
|
+
|
|
7
9
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
|
+
|
|
8
11
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
+
|
|
9
13
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
|
|
10
15
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16
|
+
|
|
11
17
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
-
|
|
18
|
+
|
|
19
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
20
|
+
|
|
13
21
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
22
|
+
|
|
14
23
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
24
|
+
|
|
15
25
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
|
+
|
|
16
27
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
+
|
|
17
29
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
|
|
19
|
-
function
|
|
30
|
+
|
|
31
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
32
|
+
|
|
33
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
34
|
+
|
|
20
35
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
|
+
|
|
21
37
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
38
|
+
|
|
22
39
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40
|
+
|
|
23
41
|
import { CheckOutlined, CloseOutlined, DashboardOutlined, DeleteOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined } from '@ant-design/icons';
|
|
24
42
|
import { Button, Empty, message, Spin, Tooltip } from 'antd';
|
|
25
43
|
import classnames from 'classnames';
|
|
@@ -37,168 +55,195 @@ import { calcMinAndMax, copy, formatLayout } from "./utils";
|
|
|
37
55
|
var ResponsiveReactGridLayout = WidthProvider(Responsive);
|
|
38
56
|
var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
39
57
|
var _props$storageKey = props.storageKey,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
storageKey = _props$storageKey === void 0 ? 'default' : _props$storageKey,
|
|
59
|
+
_props$editMode = props.editMode,
|
|
60
|
+
editMode = _props$editMode === void 0 ? false : _props$editMode,
|
|
61
|
+
widgets = props.widgets,
|
|
62
|
+
_props$defaultLayout = props.defaultLayout,
|
|
63
|
+
defaultLayout = _props$defaultLayout === void 0 ? [] : _props$defaultLayout,
|
|
64
|
+
widgetWrapClassName = props.widgetWrapClassName,
|
|
65
|
+
widgetWrapStyle = props.widgetWrapStyle,
|
|
66
|
+
_props$layout = props.layout,
|
|
67
|
+
customLayout = _props$layout === void 0 ? null : _props$layout,
|
|
68
|
+
_props$minHeight = props.minHeight,
|
|
69
|
+
minHeight = _props$minHeight === void 0 ? 300 : _props$minHeight,
|
|
70
|
+
_props$maxWidgetLengt = props.maxWidgetLength,
|
|
71
|
+
maxWidgetLength = _props$maxWidgetLengt === void 0 ? 20 : _props$maxWidgetLengt,
|
|
72
|
+
_props$toolbar = props.toolbar,
|
|
73
|
+
toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
|
|
74
|
+
_onLayoutChange = props.onLayoutChange,
|
|
75
|
+
onReset = props.onReset,
|
|
76
|
+
onReload = props.onReload,
|
|
77
|
+
onRemoveWidget = props.onRemoveWidget,
|
|
78
|
+
onAddWidget = props.onAddWidget,
|
|
79
|
+
onCancelEdit = props.onCancelEdit,
|
|
80
|
+
onEdit = props.onEdit,
|
|
81
|
+
onRevert = props.onRevert,
|
|
82
|
+
onSave = props.onSave,
|
|
83
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
84
|
+
|
|
66
85
|
var _useState = useState(editMode),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
87
|
+
stateEditMode = _useState2[0],
|
|
88
|
+
setStateEditMode = _useState2[1];
|
|
89
|
+
|
|
70
90
|
var _useState3 = useState(editMode),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
91
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
92
|
+
loading = _useState4[0],
|
|
93
|
+
setLoading = _useState4[1];
|
|
94
|
+
|
|
74
95
|
var _useReducer = useReducer(reducer, {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
96
|
+
currentLayout: [],
|
|
97
|
+
dirtyCurrentLayout: []
|
|
98
|
+
}),
|
|
99
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
100
|
+
state = _useReducer2[0],
|
|
101
|
+
dispatch = _useReducer2[1];
|
|
102
|
+
|
|
81
103
|
var _state$currentLayout = state.currentLayout,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
var dom = useRef(null);
|
|
104
|
+
currentLayout = _state$currentLayout === void 0 ? [] : _state$currentLayout,
|
|
105
|
+
_state$dirtyCurrentLa = state.dirtyCurrentLayout,
|
|
106
|
+
dirtyCurrentLayout = _state$dirtyCurrentLa === void 0 ? [] : _state$dirtyCurrentLa;
|
|
107
|
+
var dom = useRef(null); //获取操作
|
|
86
108
|
|
|
87
|
-
//获取操作
|
|
88
109
|
var fetch = useCallback(_debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
89
110
|
var response, _layout, resArr, data;
|
|
111
|
+
|
|
90
112
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
91
|
-
while (1)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
case 3:
|
|
99
|
-
response = _context.sent;
|
|
100
|
-
_layout = _isArray(defaultLayout) ? defaultLayout : [];
|
|
101
|
-
if (response) {
|
|
102
|
-
resArr = JSON.parse(response).currentLayout;
|
|
103
|
-
if (!_isEmpty(resArr)) {
|
|
104
|
-
_layout = resArr;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (_layout) {
|
|
108
|
-
data = calcMinAndMax(_layout, widgets);
|
|
109
|
-
dispatch({
|
|
110
|
-
type: 'save',
|
|
111
|
-
payload: {
|
|
112
|
-
currentLayout: data,
|
|
113
|
-
dirtyCurrentLayout: data
|
|
114
|
-
}
|
|
113
|
+
while (1) {
|
|
114
|
+
switch (_context.prev = _context.next) {
|
|
115
|
+
case 0:
|
|
116
|
+
_context.prev = 0;
|
|
117
|
+
_context.next = 3;
|
|
118
|
+
return fetchApi({
|
|
119
|
+
id: storageKey
|
|
115
120
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
|
|
122
|
+
case 3:
|
|
123
|
+
response = _context.sent;
|
|
124
|
+
_layout = _isArray(defaultLayout) ? defaultLayout : [];
|
|
125
|
+
|
|
126
|
+
if (response) {
|
|
127
|
+
resArr = JSON.parse(response).currentLayout;
|
|
128
|
+
|
|
129
|
+
if (!_isEmpty(resArr)) {
|
|
130
|
+
_layout = resArr;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (_layout) {
|
|
135
|
+
data = calcMinAndMax(_layout, widgets);
|
|
136
|
+
dispatch({
|
|
137
|
+
type: 'save',
|
|
138
|
+
payload: {
|
|
139
|
+
currentLayout: data,
|
|
140
|
+
dirtyCurrentLayout: data
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
setLoading(false);
|
|
146
|
+
_context.next = 12;
|
|
147
|
+
break;
|
|
148
|
+
|
|
149
|
+
case 10:
|
|
150
|
+
_context.prev = 10;
|
|
151
|
+
_context.t0 = _context["catch"](0);
|
|
152
|
+
|
|
153
|
+
case 12:
|
|
154
|
+
case "end":
|
|
155
|
+
return _context.stop();
|
|
156
|
+
}
|
|
126
157
|
}
|
|
127
158
|
}, _callee, null, [[0, 10]]);
|
|
128
|
-
})), 200), [storageKey, widgets]);
|
|
159
|
+
})), 200), [storageKey, widgets]); //刷新
|
|
129
160
|
|
|
130
|
-
//刷新
|
|
131
161
|
var reload = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
132
162
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
133
|
-
while (1)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
while (1) {
|
|
164
|
+
switch (_context2.prev = _context2.next) {
|
|
165
|
+
case 0:
|
|
166
|
+
setLoading(true);
|
|
167
|
+
onReload && onReload(formatLayout(currentLayout));
|
|
168
|
+
|
|
169
|
+
if (!customLayout) {
|
|
170
|
+
_context2.next = 4;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return _context2.abrupt("return");
|
|
175
|
+
|
|
176
|
+
case 4:
|
|
177
|
+
fetch();
|
|
178
|
+
|
|
179
|
+
case 5:
|
|
180
|
+
case "end":
|
|
181
|
+
return _context2.stop();
|
|
182
|
+
}
|
|
147
183
|
}
|
|
148
184
|
}, _callee2);
|
|
149
|
-
})), [fetch, customLayout]);
|
|
185
|
+
})), [fetch, customLayout]); //设置布局信息
|
|
150
186
|
|
|
151
|
-
//设置布局信息
|
|
152
187
|
var update = useCallback( /*#__PURE__*/function () {
|
|
153
188
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(payload) {
|
|
154
189
|
var callback,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
190
|
+
layout,
|
|
191
|
+
response,
|
|
192
|
+
_args3 = arguments;
|
|
158
193
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
159
|
-
while (1)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
194
|
+
while (1) {
|
|
195
|
+
switch (_context3.prev = _context3.next) {
|
|
196
|
+
case 0:
|
|
197
|
+
callback = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : function () {};
|
|
198
|
+
layout = payload['layout'];
|
|
199
|
+
_context3.prev = 2;
|
|
200
|
+
_context3.next = 5;
|
|
201
|
+
return updateApi({
|
|
202
|
+
id: storageKey,
|
|
203
|
+
data: {
|
|
204
|
+
currentLayout: layout
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
case 5:
|
|
209
|
+
response = _context3.sent;
|
|
210
|
+
|
|
211
|
+
if (response) {
|
|
212
|
+
_context3.next = 8;
|
|
213
|
+
break;
|
|
169
214
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
215
|
+
|
|
216
|
+
return _context3.abrupt("return");
|
|
217
|
+
|
|
218
|
+
case 8:
|
|
219
|
+
callback();
|
|
220
|
+
_context3.next = 13;
|
|
175
221
|
break;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
case 13:
|
|
186
|
-
case "end":
|
|
187
|
-
return _context3.stop();
|
|
222
|
+
|
|
223
|
+
case 11:
|
|
224
|
+
_context3.prev = 11;
|
|
225
|
+
_context3.t0 = _context3["catch"](2);
|
|
226
|
+
|
|
227
|
+
case 13:
|
|
228
|
+
case "end":
|
|
229
|
+
return _context3.stop();
|
|
230
|
+
}
|
|
188
231
|
}
|
|
189
232
|
}, _callee3, null, [[2, 11]]);
|
|
190
233
|
}));
|
|
234
|
+
|
|
191
235
|
return function (_x) {
|
|
192
236
|
return _ref3.apply(this, arguments);
|
|
193
237
|
};
|
|
194
|
-
}(), [storageKey, widgets]);
|
|
238
|
+
}(), [storageKey, widgets]); //改变布局触发
|
|
195
239
|
|
|
196
|
-
//改变布局触发
|
|
197
240
|
var onLayoutChange = useCallback(_debounce(function (layout, layouts, callback) {
|
|
198
241
|
window.dispatchEvent(new Event('resize'));
|
|
242
|
+
|
|
199
243
|
if (!stateEditMode) {
|
|
200
244
|
return;
|
|
201
245
|
}
|
|
246
|
+
|
|
202
247
|
dispatch({
|
|
203
248
|
type: 'save',
|
|
204
249
|
payload: {
|
|
@@ -207,13 +252,13 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
207
252
|
});
|
|
208
253
|
_onLayoutChange && _onLayoutChange(formatLayout(layout));
|
|
209
254
|
callback && callback();
|
|
210
|
-
}, 300), [stateEditMode]);
|
|
255
|
+
}, 300), [stateEditMode]); //添加小程序
|
|
211
256
|
|
|
212
|
-
//添加小程序
|
|
213
257
|
var addWidget = useCallback(function (widget) {
|
|
214
258
|
if (dirtyCurrentLayout.length >= maxWidgetLength) {
|
|
215
259
|
message.warning("\u8D85\u8FC7\u4E86\u6700\u5927\u9650\u5236\u6570\u91CF".concat(maxWidgetLength) + ',' + '不能再添加了');
|
|
216
260
|
}
|
|
261
|
+
|
|
217
262
|
var lastItem = dirtyCurrentLayout[dirtyCurrentLayout.length - 1];
|
|
218
263
|
var newLayout = [].concat(_toConsumableArray(dirtyCurrentLayout), [{
|
|
219
264
|
w: widget.size.defaultWidth,
|
|
@@ -229,12 +274,13 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
229
274
|
onAddWidget && onAddWidget(widget, formatLayout(dirtyCurrentLayout), formatLayout(newLayout));
|
|
230
275
|
onLayoutChange(newLayout);
|
|
231
276
|
message.success('添加成功');
|
|
232
|
-
}, [dirtyCurrentLayout, onLayoutChange, maxWidgetLength]);
|
|
277
|
+
}, [dirtyCurrentLayout, onLayoutChange, maxWidgetLength]); //删除小程序
|
|
233
278
|
|
|
234
|
-
//删除小程序
|
|
235
279
|
var removeWidget = useCallback(function (widgetKey) {
|
|
236
280
|
var removedWidget;
|
|
281
|
+
|
|
237
282
|
var newLayout = _cloneDeep(dirtyCurrentLayout);
|
|
283
|
+
|
|
238
284
|
newLayout.map(function (item, index) {
|
|
239
285
|
if (item['i'] === widgetKey) {
|
|
240
286
|
removedWidget = item;
|
|
@@ -248,28 +294,28 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
248
294
|
dirtyCurrentLayout: newLayout
|
|
249
295
|
}
|
|
250
296
|
});
|
|
251
|
-
}, [dirtyCurrentLayout, onLayoutChange]);
|
|
297
|
+
}, [dirtyCurrentLayout, onLayoutChange]); //重置
|
|
252
298
|
|
|
253
|
-
//重置
|
|
254
299
|
var reset = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
255
300
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
256
|
-
while (1)
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
301
|
+
while (1) {
|
|
302
|
+
switch (_context4.prev = _context4.next) {
|
|
303
|
+
case 0:
|
|
304
|
+
onReset && onReset([], formatLayout(currentLayout));
|
|
305
|
+
onLayoutChange([]);
|
|
306
|
+
|
|
307
|
+
case 2:
|
|
308
|
+
case "end":
|
|
309
|
+
return _context4.stop();
|
|
310
|
+
}
|
|
263
311
|
}
|
|
264
312
|
}, _callee4);
|
|
265
|
-
})), [onLayoutChange]);
|
|
313
|
+
})), [onLayoutChange]); //最终的布局数据
|
|
266
314
|
|
|
267
|
-
//最终的布局数据
|
|
268
315
|
var finLayout = useMemo(function () {
|
|
269
316
|
return stateEditMode ? dirtyCurrentLayout : currentLayout;
|
|
270
|
-
}, [stateEditMode, dirtyCurrentLayout, currentLayout]);
|
|
317
|
+
}, [stateEditMode, dirtyCurrentLayout, currentLayout]); //取消编辑
|
|
271
318
|
|
|
272
|
-
//取消编辑
|
|
273
319
|
var cancelEdit = useCallback(function () {
|
|
274
320
|
setStateEditMode(false);
|
|
275
321
|
onCancelEdit && onCancelEdit(formatLayout(dirtyCurrentLayout), formatLayout(currentLayout));
|
|
@@ -289,9 +335,11 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
289
335
|
}
|
|
290
336
|
});
|
|
291
337
|
}, [dirtyCurrentLayout, currentLayout]);
|
|
338
|
+
|
|
292
339
|
var edit = function edit() {
|
|
293
340
|
return setStateEditMode(true);
|
|
294
341
|
};
|
|
342
|
+
|
|
295
343
|
var save = useCallback(function () {
|
|
296
344
|
dispatch({
|
|
297
345
|
type: 'save',
|
|
@@ -302,9 +350,11 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
302
350
|
});
|
|
303
351
|
onSave && onSave(formatLayout(dirtyCurrentLayout));
|
|
304
352
|
setStateEditMode(false);
|
|
353
|
+
|
|
305
354
|
if (customLayout) {
|
|
306
355
|
return;
|
|
307
356
|
}
|
|
357
|
+
|
|
308
358
|
update({
|
|
309
359
|
layout: dirtyCurrentLayout
|
|
310
360
|
});
|
|
@@ -327,35 +377,34 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
327
377
|
revert: revert,
|
|
328
378
|
//重置
|
|
329
379
|
save: save //保存
|
|
380
|
+
|
|
330
381
|
};
|
|
331
|
-
});
|
|
382
|
+
}); //打印布局数据
|
|
332
383
|
|
|
333
|
-
//打印布局数据
|
|
334
384
|
var onCtrlShiftC = useCallback(function () {
|
|
335
385
|
var res = formatLayout(currentLayout);
|
|
336
386
|
copy(JSON.stringify(res));
|
|
337
387
|
message.success('已复制布局数据到剪切板');
|
|
338
388
|
console.log('currentLayout', res);
|
|
339
|
-
}, [currentLayout]);
|
|
389
|
+
}, [currentLayout]); //默认存储
|
|
340
390
|
|
|
341
|
-
//默认存储
|
|
342
391
|
useEffect(function () {
|
|
343
392
|
if (customLayout) {
|
|
344
393
|
return;
|
|
345
394
|
}
|
|
395
|
+
|
|
346
396
|
fetch();
|
|
347
|
-
}, [customLayout]);
|
|
397
|
+
}, [customLayout]); //编辑状态改变副作用
|
|
348
398
|
|
|
349
|
-
//编辑状态改变副作用
|
|
350
399
|
useEffect(function () {
|
|
351
400
|
setStateEditMode(editMode);
|
|
352
|
-
}, [editMode]);
|
|
401
|
+
}, [editMode]); //响应外部数据
|
|
353
402
|
|
|
354
|
-
//响应外部数据
|
|
355
403
|
useEffect(function () {
|
|
356
404
|
if (!_isArray(customLayout)) {
|
|
357
405
|
return;
|
|
358
406
|
}
|
|
407
|
+
|
|
359
408
|
var data = calcMinAndMax(customLayout, widgets);
|
|
360
409
|
dispatch({
|
|
361
410
|
type: 'save',
|
|
@@ -403,8 +452,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
403
452
|
sm: 2,
|
|
404
453
|
xs: 2,
|
|
405
454
|
xxs: 2
|
|
406
|
-
}
|
|
407
|
-
// onBreakpointChange={onBreakpointChange} //断点回调
|
|
455
|
+
} // onBreakpointChange={onBreakpointChange} //断点回调
|
|
408
456
|
,
|
|
409
457
|
onLayoutChange: onLayoutChange //布局改变回调
|
|
410
458
|
,
|
|
@@ -412,6 +460,7 @@ var Dashboard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
412
460
|
// onWidthChange={()=>onWidthChange()} //宽度改变回调
|
|
413
461
|
,
|
|
414
462
|
measureBeforeMount: true //动画相关
|
|
463
|
+
|
|
415
464
|
}, finLayout.map(function (item) {
|
|
416
465
|
return /*#__PURE__*/React.createElement("div", {
|
|
417
466
|
key: item.i,
|