@nocobase/plugin-file-manager 2.2.0-alpha.1 → 2.2.0-alpha.10
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/build.config.ts +31 -0
- package/dist/client/UseOriginalUrlRadio.d.ts +12 -0
- package/dist/client/index.js +1 -1
- package/dist/client/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/client/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/client/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/dist/client/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/LICENSE +36 -0
- package/dist/client/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/client/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/client/pdfjs/pdf.min.mjs +28 -0
- package/dist/client/pdfjs/pdf.worker.min.mjs +28 -0
- package/dist/client/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/client/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/client/pdfjs/standard_fonts/LICENSE_LIBERATION +102 -0
- package/dist/client/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/client/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/client/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/client/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/client/schemas/storageTypes/ali-oss.d.ts +12 -0
- package/dist/client/schemas/storageTypes/common.d.ts +12 -0
- package/dist/client/schemas/storageTypes/index.d.ts +48 -0
- package/dist/client/schemas/storageTypes/local.d.ts +12 -0
- package/dist/client/schemas/storageTypes/s3.d.ts +12 -0
- package/dist/client/schemas/storageTypes/tx-cos.d.ts +12 -0
- package/dist/client-v2/125.9cdb7cf3ef4712ef.js +10 -0
- package/dist/client-v2/{229.bd72c2d7aa088310.js → 229.297c431f63a29cb2.js} +1 -1
- package/dist/client-v2/{336.1dd1b32466d0c778.js → 336.04d06f2cdcc3d0b5.js} +1 -1
- package/dist/client-v2/{43.eb45d53ba3e9828b.js → 43.1ec3e5bf1118d239.js} +1 -1
- package/dist/client-v2/450.d49b00f3c0388c74.js +10 -0
- package/dist/client-v2/{929.d7e783304cc1f236.js → 929.3744119eff70b3a3.js} +1 -1
- package/dist/client-v2/components/PublicAccessField.d.ts +19 -0
- package/dist/client-v2/components/UseOriginalUrlField.d.ts +25 -0
- package/dist/client-v2/components/index.d.ts +2 -0
- package/dist/client-v2/index.d.ts +4 -2
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/interfaces/attachment.d.ts +76 -0
- package/dist/client-v2/models/DisplayPreviewFieldModel.d.ts +22 -0
- package/dist/client-v2/models/UploadActionModel.d.ts +26 -0
- package/dist/client-v2/previewer/filePreviewTypes.d.ts +20 -1
- package/dist/externalVersion.js +13 -10
- package/dist/locale/de-DE.json +8 -1
- package/dist/locale/en-US.json +8 -1
- package/dist/locale/es-ES.json +8 -1
- package/dist/locale/fr-FR.json +8 -1
- package/dist/locale/hu-HU.json +8 -1
- package/dist/locale/id-ID.json +8 -1
- package/dist/locale/it-IT.json +8 -1
- package/dist/locale/ja-JP.json +8 -1
- package/dist/locale/ko-KR.json +8 -1
- package/dist/locale/nl-NL.json +8 -1
- package/dist/locale/pt-BR.json +8 -1
- package/dist/locale/ru-RU.json +8 -1
- package/dist/locale/tr-TR.json +8 -1
- package/dist/locale/uk-UA.json +8 -1
- package/dist/locale/vi-VN.json +8 -1
- package/dist/locale/zh-CN.json +8 -1
- package/dist/locale/zh-TW.json +8 -1
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +59 -116
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/@aws-sdk/lib-storage/dist-cjs/index.js +59 -116
- package/dist/node_modules/@aws-sdk/lib-storage/package.json +1 -1
- package/dist/node_modules/@aws-sdk/s3-request-presigner/LICENSE +201 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-cjs/index.js +11113 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-es/constants.js +9 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-es/getSignedUrl.js +66 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-es/index.js +2 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-es/presigner.js +58 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/constants.d.ts +9 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/getSignedUrl.d.ts +6 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/presigner.d.ts +15 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/ts3.4/constants.d.ts +9 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/ts3.4/getSignedUrl.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/ts3.4/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/dist-types/ts3.4/presigner.d.ts +40 -0
- package/dist/node_modules/@aws-sdk/s3-request-presigner/package.json +1 -0
- package/dist/node_modules/ali-oss/package.json +1 -1
- package/dist/node_modules/cos-nodejs-sdk-v5/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/url-join/package.json +1 -1
- package/dist/server/actions/attachments.js +21 -1
- package/dist/server/actions/get-file.d.ts +13 -0
- package/dist/server/actions/get-file.js +142 -0
- package/dist/server/actions/index.d.ts +1 -3
- package/dist/server/actions/index.js +8 -1
- package/dist/server/commands/repair-filenames.js +34 -14
- package/dist/server/file-access.d.ts +11 -0
- package/dist/server/file-access.js +134 -0
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +7 -1
- package/dist/server/resolve-file-access-filter.d.ts +11 -0
- package/dist/server/resolve-file-access-filter.js +63 -0
- package/dist/server/server.d.ts +23 -2
- package/dist/server/server.js +116 -15
- package/dist/server/storages/ali-oss.d.ts +2 -1
- package/dist/server/storages/ali-oss.js +12 -0
- package/dist/server/storages/index.d.ts +15 -2
- package/dist/server/storages/index.js +28 -5
- package/dist/server/storages/local.d.ts +2 -2
- package/dist/server/storages/local.js +9 -3
- package/dist/server/storages/s3.d.ts +2 -1
- package/dist/server/storages/s3.js +14 -0
- package/dist/server/storages/tx-cos.d.ts +2 -1
- package/dist/server/storages/tx-cos.js +27 -0
- package/dist/server/temporary-access.d.ts +31 -0
- package/dist/server/temporary-access.js +169 -0
- package/dist/server/utils.d.ts +27 -0
- package/dist/server/utils.js +83 -2
- package/package.json +6 -4
- package/dist/client/867ada653cd02a3e.mjs +0 -6
- package/dist/client/876.ca16d7a6e6387862.js +0 -11
- package/dist/client-v2/125.0b8eef1f19b87042.js +0 -10
- package/dist/client-v2/450.30cc3ed6973d8c4d.js +0 -10
- package/dist/client-v2/867ada653cd02a3e.mjs +0 -6
- package/dist/client-v2/876.22cd8e41ac8631ed.js +0 -11
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2014 PDFium Authors. All rights reserved.
|
|
2
|
+
//
|
|
3
|
+
// Redistribution and use in source and binary forms, with or without
|
|
4
|
+
// modification, are permitted provided that the following conditions are
|
|
5
|
+
// met:
|
|
6
|
+
//
|
|
7
|
+
// * Redistributions of source code must retain the above copyright
|
|
8
|
+
// notice, this list of conditions and the following disclaimer.
|
|
9
|
+
// * Redistributions in binary form must reproduce the above
|
|
10
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
11
|
+
// in the documentation and/or other materials provided with the
|
|
12
|
+
// distribution.
|
|
13
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
14
|
+
// contributors may be used to endorse or promote products derived from
|
|
15
|
+
// this software without specific prior written permission.
|
|
16
|
+
//
|
|
17
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
18
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
19
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
20
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
21
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
22
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
23
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
24
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
25
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Digitized data copyright (c) 2010 Google Corporation
|
|
2
|
+
with Reserved Font Arimo, Tinos and Cousine.
|
|
3
|
+
Copyright (c) 2012 Red Hat, Inc.
|
|
4
|
+
with Reserved Font Name Liberation.
|
|
5
|
+
|
|
6
|
+
This Font Software is licensed under the SIL Open Font License,
|
|
7
|
+
Version 1.1.
|
|
8
|
+
|
|
9
|
+
This license is copied below, and is also available with a FAQ at:
|
|
10
|
+
http://scripts.sil.org/OFL
|
|
11
|
+
|
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
13
|
+
|
|
14
|
+
PREAMBLE The goals of the Open Font License (OFL) are to stimulate
|
|
15
|
+
worldwide development of collaborative font projects, to support the font
|
|
16
|
+
creation efforts of academic and linguistic communities, and to provide
|
|
17
|
+
a free and open framework in which fonts may be shared and improved in
|
|
18
|
+
partnership with others.
|
|
19
|
+
|
|
20
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
21
|
+
redistributed freely as long as they are not sold by themselves.
|
|
22
|
+
The fonts, including any derivative works, can be bundled, embedded,
|
|
23
|
+
redistributed and/or sold with any software provided that any reserved
|
|
24
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
25
|
+
however, cannot be released under any other type of license. The
|
|
26
|
+
requirement for fonts to remain under this license does not apply to
|
|
27
|
+
any document created using the fonts or their derivatives.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DEFINITIONS
|
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
33
|
+
Holder(s) under this license and clearly marked as such.
|
|
34
|
+
This may include source files, build scripts and documentation.
|
|
35
|
+
|
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
37
|
+
copyright statement(s).
|
|
38
|
+
|
|
39
|
+
"Original Version" refers to the collection of Font Software components
|
|
40
|
+
as distributed by the Copyright Holder(s).
|
|
41
|
+
|
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
43
|
+
or substituting ? in part or in whole ?
|
|
44
|
+
any of the components of the Original Version, by changing formats or
|
|
45
|
+
by porting the Font Software to a new environment.
|
|
46
|
+
|
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical writer
|
|
48
|
+
or other person who contributed to the Font Software.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
PERMISSION & CONDITIONS
|
|
52
|
+
|
|
53
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
54
|
+
copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
55
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
56
|
+
Software, subject to the following conditions:
|
|
57
|
+
|
|
58
|
+
1) Neither the Font Software nor any of its individual components,in
|
|
59
|
+
Original or Modified Versions, may be sold by itself.
|
|
60
|
+
|
|
61
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
62
|
+
redistributed and/or sold with any software, provided that each copy
|
|
63
|
+
contains the above copyright notice and this license. These can be
|
|
64
|
+
included either as stand-alone text files, human-readable headers or
|
|
65
|
+
in the appropriate machine-readable metadata fields within text or
|
|
66
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
67
|
+
|
|
68
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
69
|
+
Name(s) unless explicit written permission is granted by the
|
|
70
|
+
corresponding Copyright Holder. This restriction only applies to the
|
|
71
|
+
primary font name as presented to the users.
|
|
72
|
+
|
|
73
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
74
|
+
Software shall not be used to promote, endorse or advertise any
|
|
75
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
76
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
77
|
+
permission.
|
|
78
|
+
|
|
79
|
+
5) The Font Software, modified or unmodified, in part or in whole, must
|
|
80
|
+
be distributed entirely under this license, and must not be distributed
|
|
81
|
+
under any other license. The requirement for fonts to remain under
|
|
82
|
+
this license does not apply to any document created using the Font
|
|
83
|
+
Software.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
TERMINATION
|
|
88
|
+
This license becomes null and void if any of the above conditions are not met.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
DISCLAIMER
|
|
93
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
94
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
95
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
96
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
97
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
98
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
99
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
100
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
|
101
|
+
DEALINGS IN THE FONT SOFTWARE.
|
|
102
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -100,6 +100,18 @@ declare const _default: {
|
|
|
100
100
|
}[];
|
|
101
101
|
default: string;
|
|
102
102
|
};
|
|
103
|
+
'options.useOriginalUrl': {
|
|
104
|
+
type: string;
|
|
105
|
+
title: string;
|
|
106
|
+
'x-decorator': string;
|
|
107
|
+
'x-component': string;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
'options.public': {
|
|
111
|
+
type: string;
|
|
112
|
+
'x-display': string;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
103
115
|
rules: {
|
|
104
116
|
type: string;
|
|
105
117
|
'x-component': string;
|
|
@@ -65,6 +65,18 @@ declare const _default: {
|
|
|
65
65
|
'x-content': string;
|
|
66
66
|
description: string;
|
|
67
67
|
};
|
|
68
|
+
useOriginalUrl: {
|
|
69
|
+
type: string;
|
|
70
|
+
title: string;
|
|
71
|
+
'x-decorator': string;
|
|
72
|
+
'x-component': string;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
public: {
|
|
76
|
+
type: string;
|
|
77
|
+
'x-display': string;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
68
80
|
renameMode: {
|
|
69
81
|
title: string;
|
|
70
82
|
description: string;
|
|
@@ -62,6 +62,18 @@ export declare const storageTypes: {
|
|
|
62
62
|
}[];
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
|
+
'options.useOriginalUrl': {
|
|
66
|
+
type: string;
|
|
67
|
+
title: string;
|
|
68
|
+
'x-decorator': string;
|
|
69
|
+
'x-component': string;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
'options.public': {
|
|
73
|
+
type: string;
|
|
74
|
+
'x-display': string;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
65
77
|
rules: {
|
|
66
78
|
type: string;
|
|
67
79
|
'x-component': string;
|
|
@@ -194,6 +206,18 @@ export declare const storageTypes: {
|
|
|
194
206
|
}[];
|
|
195
207
|
default: string;
|
|
196
208
|
};
|
|
209
|
+
'options.useOriginalUrl': {
|
|
210
|
+
type: string;
|
|
211
|
+
title: string;
|
|
212
|
+
'x-decorator': string;
|
|
213
|
+
'x-component': string;
|
|
214
|
+
default: boolean;
|
|
215
|
+
};
|
|
216
|
+
'options.public': {
|
|
217
|
+
type: string;
|
|
218
|
+
'x-display': string;
|
|
219
|
+
default: boolean;
|
|
220
|
+
};
|
|
197
221
|
rules: {
|
|
198
222
|
type: string;
|
|
199
223
|
'x-component': string;
|
|
@@ -333,6 +357,18 @@ export declare const storageTypes: {
|
|
|
333
357
|
}[];
|
|
334
358
|
default: string;
|
|
335
359
|
};
|
|
360
|
+
'options.useOriginalUrl': {
|
|
361
|
+
type: string;
|
|
362
|
+
title: string;
|
|
363
|
+
'x-decorator': string;
|
|
364
|
+
'x-component': string;
|
|
365
|
+
default: boolean;
|
|
366
|
+
};
|
|
367
|
+
'options.public': {
|
|
368
|
+
type: string;
|
|
369
|
+
'x-display': string;
|
|
370
|
+
default: boolean;
|
|
371
|
+
};
|
|
336
372
|
rules: {
|
|
337
373
|
type: string;
|
|
338
374
|
'x-component': string;
|
|
@@ -456,6 +492,18 @@ export declare const storageTypes: {
|
|
|
456
492
|
}[];
|
|
457
493
|
default: string;
|
|
458
494
|
};
|
|
495
|
+
'options.useOriginalUrl': {
|
|
496
|
+
type: string;
|
|
497
|
+
title: string;
|
|
498
|
+
'x-decorator': string;
|
|
499
|
+
'x-component': string;
|
|
500
|
+
default: boolean;
|
|
501
|
+
};
|
|
502
|
+
'options.public': {
|
|
503
|
+
type: string;
|
|
504
|
+
'x-display': string;
|
|
505
|
+
default: boolean;
|
|
506
|
+
};
|
|
459
507
|
rules: {
|
|
460
508
|
type: string;
|
|
461
509
|
'x-component': string;
|
|
@@ -61,6 +61,18 @@ declare const _default: {
|
|
|
61
61
|
}[];
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
|
+
'options.useOriginalUrl': {
|
|
65
|
+
type: string;
|
|
66
|
+
title: string;
|
|
67
|
+
'x-decorator': string;
|
|
68
|
+
'x-component': string;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
'options.public': {
|
|
72
|
+
type: string;
|
|
73
|
+
'x-display': string;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
64
76
|
rules: {
|
|
65
77
|
type: string;
|
|
66
78
|
'x-component': string;
|
|
@@ -87,6 +87,18 @@ declare const _default: {
|
|
|
87
87
|
}[];
|
|
88
88
|
default: string;
|
|
89
89
|
};
|
|
90
|
+
'options.useOriginalUrl': {
|
|
91
|
+
type: string;
|
|
92
|
+
title: string;
|
|
93
|
+
'x-decorator': string;
|
|
94
|
+
'x-component': string;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
'options.public': {
|
|
98
|
+
type: string;
|
|
99
|
+
'x-display': string;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
90
102
|
rules: {
|
|
91
103
|
type: string;
|
|
92
104
|
'x-component': string;
|
|
@@ -91,6 +91,18 @@ declare const _default: {
|
|
|
91
91
|
}[];
|
|
92
92
|
default: string;
|
|
93
93
|
};
|
|
94
|
+
'options.useOriginalUrl': {
|
|
95
|
+
type: string;
|
|
96
|
+
title: string;
|
|
97
|
+
'x-decorator': string;
|
|
98
|
+
'x-component': string;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
'options.public': {
|
|
102
|
+
type: string;
|
|
103
|
+
'x-display': string;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
94
106
|
rules: {
|
|
95
107
|
type: string;
|
|
96
108
|
'x-component': string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["125"],{212:function(e,t,n){n.r(t),n.d(t,{DisplayPreviewFieldModel:function(){return _},FilePreview:function(){return E},getFileCollectionReference:function(){return j}});var r=n(477),o=n(485),l=n(694),i=n(59),a=n(773),c=n(155),u=n.n(c),f=n(23);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){p(e,t,n[t])})}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],i=!0,a=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(l.push(n.value),!t||l.length!==t);i=!0);}catch(e){a=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(a)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}function O(){var e,t,n=(e=["\n .ant-image-img {\n border: 1px solid #d9d9d9;\n padding: 2px;\n }\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return O=function(){return n},n}var S=function(e){return"string"==typeof e&&e.length>0},j=function(e,t){if((null==e?void 0:e.interface)==="attachmentURL"&&e.target)return{dataSourceKey:(null==t?void 0:t.dataSourceKey)||"main",collectionName:e.target};var n=(null==e?void 0:e.targetCollection)||((null==t?void 0:t.template)==="file"?t:null);return n?{dataSourceKey:n.dataSourceKey||"main",collectionName:n.name}:void 0},P=function(e,t){if(!S(e)||!(t&&(void 0===t?"undefined":g(t))==="object"&&!Array.isArray(t)))return e;var n=t.url,r=t.preview;return n!==e&&r!==e?e:b(y({},t),{url:S(n)?n:e,preview:S(r)?r:e})},E=function(e){var t=e.file,n=e.size,o=e.showFileName,l=e.onClick,a=(0,f._H)(t),c=(0,f.q)(a);if(!c)return null;var s=(0,f.WP)(a,c),p=(0,f._Y)(a,c),d=(0,f.qk)(a)||p,m={border:"1px solid #d9d9d9",padding:2,borderRadius:4,objectFit:"cover",boxShadow:"0 0 0 2px #fff"},y=(0,f._b)(a,"image/*"),b=u().createElement("div",{className:(0,r.css)(O())},y?u().createElement("img",{src:d,alt:s,width:n,height:n,style:m}):u().createElement(i.Image,{src:d,fallback:p,width:n,height:n,preview:!1,style:m}));return u().createElement("div",{onClick:l,style:{textAlign:"center",width:n,wordBreak:"break-all",cursor:l?"pointer":"default"}},b,o&&u().createElement(i.Tooltip,{title:s},u().createElement("div",{style:{fontSize:12,marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"}},s)))},k=function(e){var t=e.value,n=void 0===t?[]:t,r=e.size,o=void 0===r?28:r,l=e.showFileName,c=e.record,s=e.fileCollection,p=v(u().useState(0),2),d=p[0],m=p[1],y=v(u().useState(!1),2),b=y[0],h=y[1],g=u().useMemo(function(){return(0,a.castArray)(n).filter(Boolean).map(function(e){return P(e,c)}).map(f._H).filter(function(e){return(0,f.q)(e)})},[c,n]);u().useEffect(function(){d>=g.length&&g.length&&m(0)},[d,g.length]),u().useEffect(function(){!g.length&&b&&h(!1)},[g.length,b]);var w=u().useCallback(function(e){var t=e||g[d];if(t){var n=t.url||t.preview;n&&(0,f.Ns)(n,(0,f.ub)(t,n))}},[d,g]),O=u().useCallback(function(e){m(e),h(!0)},[]),S=u().useCallback(function(e){e<0||e>=g.length||m(e)},[g.length]);return u().createElement(u().Fragment,null,u().createElement(i.Space,{wrap:!0},g.map(function(e,t){return u().createElement(E,{file:e,size:o,key:t,showFileName:l,onClick:function(){return O(t)}})})),g[d]?u().createElement(f.Mo,{open:b,file:g[d],index:d,list:g,fileCollection:s,onOpenChange:h,onClose:function(){return h(!1)},onSwitchIndex:S,onDownload:w}):null)},_=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=d(t),p(e=function(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,w()?Reflect.construct(t,r||[],d(this).constructor):t.apply(this,r)),"disableTitleField",!0),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&h(n,e),t=[{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.titleField,o=t.template,l=t.target,i=this.context.record,c=j(this.context.collectionField,this.context.collection);return r&&"file"!==o&&"attachments"!==l?(0,a.castArray)(n).flatMap(function(t,n){var o=null==t?void 0:t[r],l=o?u().createElement(k,b(y({key:n},e.props),{fileCollection:c,record:t,value:(0,a.castArray)(o).filter(Boolean)})):u().createElement("span",{key:n},"N/A");return 0===n?[l]:[u().createElement("span",{key:"sep-".concat(n)},", "),l]}):u().createElement(k,b(y({},this.props),{fileCollection:c,record:i,value:(0,a.castArray)(n).filter(Boolean)}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(o.FieldModel);_.registerFlow({key:"previewReadPrettySetting",sort:500,title:(0,l.tExpr)("Preview Settings"),steps:{size:{title:(0,l.tExpr)("Size"),uiMode:function(e){var t=e.t;return{type:"select",key:"size",props:{options:[{value:300,label:t("Large")},{value:100,label:t("Middle")},{value:28,label:t("Small")}]}}},hideInSettings:function(e){return m(e.model.parent,o.TableColumnModel)},defaultParams:function(e){return{size:m(e.model.parent,o.DetailsItemModel)?100:28}},handler:function(e,t){e.model.setProps("size",t.size)}},showFileName:{title:(0,l.tExpr)("Show file name"),uiMode:{type:"switch",key:"showFileName"},hideInSettings:function(e){return m(e.model.parent,o.TableColumnModel)},defaultParams:{showFileName:!1},handler:function(e,t){e.model.setProps("showFileName",t.showFileName)}}}}),_.define({label:(0,l.tExpr)("Preview")}),l.DisplayItemModel.bindModelToInterface("DisplayPreviewFieldModel",["url","attachment","attachmentURL","m2m","m2o","o2o","o2m","oho","obo","mbm"],{isDefault:!0,when:function(e,t){return!t.targetCollection||"file"===t.targetCollection.template}})}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["229"],{316:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(485),a=n(59),r=n(155),c=n.n(r),m=n(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["229"],{316:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(485),a=n(59),r=n(155),c=n.n(r),m=n(592),u=n(488);function o(){var e=(0,u.k)(),l=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(m.Lg,null),c().createElement(m.om,null),c().createElement(m.BL,null),c().createElement(a.Form.Item,{name:["options","Region"],label:"".concat(e("Region")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","SecretId"],label:"".concat(e("SecretId")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","SecretKey"],label:"".concat(e("SecretKey")," :"),rules:l},c().createElement(t.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","Bucket"],label:"".concat(e("Bucket")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","thumbnailRule"],label:"".concat(e("Thumbnail rule")," :")},c().createElement(t.EnvVariableInput,{placeholder:"?imageMogr2/thumbnail/!50p"})),c().createElement(m.Sx,null),c().createElement(m.OC,null),c().createElement(m.C6,null),c().createElement(m.KT,null),c().createElement(m.Lq,null),c().createElement(m.mt,null),c().createElement(m.tp,null))}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["336"],{595:function(e,n,
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["336"],{595:function(e,n,l){l.r(n),l.d(n,{default:function(){return o}});var t=l(485),a=l(59),r=l(155),c=l.n(r),m=l(592),u=l(488);function o(){var e=(0,u.k)(),n=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(m.Lg,null),c().createElement(m.om,null),c().createElement(m.BL,null),c().createElement(a.Form.Item,{name:["options","region"],label:"".concat(e("Region")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeyId"],label:"".concat(e("AccessKey ID")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","secretAccessKey"],label:"".concat(e("AccessKey Secret")," :"),rules:n},c().createElement(t.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","bucket"],label:"".concat(e("Bucket")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","endpoint"],label:"".concat(e("Endpoint")," :")},c().createElement(t.EnvVariableInput,null)),c().createElement(m.Sx,null),c().createElement(m.OC,null),c().createElement(m.C6,null),c().createElement(m.KT,null),c().createElement(m.Lq,null),c().createElement(m.mt,null),c().createElement(m.tp,null))}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["43"],{574:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var l=n(485),a=n(59),r=n(155),c=n.n(r),o=n(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["43"],{574:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var l=n(485),a=n(59),r=n(155),c=n.n(r),o=n(592),m=n(488);function s(){var e=(0,m.k)(),t=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(o.Lg,null),c().createElement(o.om,null),c().createElement(o.BL,null),c().createElement(a.Form.Item,{name:["options","region"],label:"".concat(e("Region")," :"),rules:t,extra:e('Aliyun OSS region part of the bucket. For example: "oss-cn-beijing".')},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeyId"],label:"".concat(e("AccessKey ID")," :"),rules:t},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeySecret"],label:"".concat(e("AccessKey Secret")," :"),rules:t},c().createElement(l.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","bucket"],label:"".concat(e("Bucket")," :"),rules:t},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","timeout"],label:"".concat(e("Timeout")," :"),extra:e("Upload timeout for a single file in milliseconds. Default is 600000.")},c().createElement(a.InputNumber,{style:{width:"100%"}})),c().createElement(a.Form.Item,{name:["options","thumbnailRule"],label:"".concat(e("File pre-process parameters")," :")},c().createElement(l.EnvVariableInput,{placeholder:"?x-oss-process=image/auto-orient,1/resize,m_fill,w_94,h_94/quality,q_90"})),c().createElement(o.Sx,null),c().createElement(o.OC,null),c().createElement(o.C6,null),c().createElement(o.KT,null),c().createElement(o.Lq,null),c().createElement(o.mt,null),c().createElement(o.tp,null),c().createElement(a.Form.Item,{name:["settings","requestOptions"],label:"".concat(e("Request options")," :"),extra:e("Additional options for HTTP requests when fetching files from remote storage on server side, such as headers.")},c().createElement(l.JsonTextArea,{autoSize:{minRows:5}})))}}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["450"],{177:function(e,t,n){n.r(t),n.d(t,{UploadActionModel:function(){return N},useBeforeUpload:function(){return F},useStorageCfg:function(){return I},useStorageUploadProps:function(){return A},getModelDataSourceKey:function(){return T},useStorage:function(){return U},getUploadAction:function(){return M},getUploadDataSourceHeaders:function(){return C},validate:function(){return z},appendUploadDataSourceKey:function(){return B}});var o=n(375),r=n(485),i=n(694),l=n(625),a=n(59);let u="bits",c="bytes",s="jedec",p={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},f={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};var d=n(484),b=n.n(d),y=n(155),v=n.n(y),g=n(953);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function h(e,t,n,o,r,i,l){try{var a=e[i](l),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(o,r)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t,n){return(S="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(o){var r=Object.getOwnPropertyDescriptor(o,t);return r.get?r.get.call(n||e):r.value}})(e,t,n||e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){w(e,t,n[t])})}return e}function x(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,o,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==r.return||r.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}function T(e){var t,n,o,r,i,l;return(null==(o=e.context.blockModel)||null==(n=o.resource)||null==(t=n.getDataSourceKey)?void 0:t.call(n))||(null==(i=e.context.blockModel)||null==(r=i.collection)?void 0:r.dataSourceKey)||(null==(l=e.context.collection)?void 0:l.dataSourceKey)}function B(e,t){if(!t||"main"===t)return e;var n=j(e.split("?"),2),o=n[0],r=new URLSearchParams(n[1]);return r.set("uploadDataSourceKey",t),"".concat(o,"?").concat(r.toString())}function M(e,t,n){return B("string"==typeof t?t:e,n)}function C(e){return e&&"main"!==e?{"X-Data-Source":e}:{}}var _=function(e){var t,n,o,r,l=(0,i.useFlowContext)(),a=(0,y.useMemo)(function(){var t=(null==(r=e.context.blockModel.collection)?void 0:r.name)||e.context.collection.name,n="".concat(t,":create"),o=null==(i=e.context.blockModel.association)?void 0:i.resourceName;if((null==(u=l.view)||null==(a=u.inputArgs)?void 0:a.sourceId)&&o){var r,i,a,u,c,s=j(o.split("."),2),p=s[0],f=s[1];n="".concat(p,"/").concat(null==(c=l.view)?void 0:c.inputArgs.sourceId,"/").concat(f,":create")}return n},[null==(t=e.context.blockModel.association)?void 0:t.resourceName,null==(n=e.context.blockModel.collection)?void 0:n.name,e.context.collection.name,null==(r=l.view)||null==(o=r.inputArgs)?void 0:o.sourceId]),u={},c=0,s={action:a,onChange:function(t){var n=t.fileList;n.forEach(function(t){if("uploading"!==t.status||u[t.uid]||(c++,u[t.uid]=!0),"uploading"!==t.status&&u[t.uid]&&(delete u[t.uid],0==--c)){var n,o;null==(n=(o=e.context.blockModel.resource).refresh)||n.call(o)}}),n.every(function(e){return"done"===e.status})&&l.view.close()}},p=A(s,e);return k({},s,p)};function U(e,t){var n=null!=e?e:"",o=B("storages:getBasicInfo/".concat(n),t),r=(0,i.useFlowContext)(),a=(0,l.useRequest)(function(){var e;return(e=function(){var e;return function(e,t){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(l,"next",{value:u(0)}),a(l,"throw",{value:u(1)}),a(l,"return",{value:u(2)}),"function"==typeof Symbol&&a(l,Symbol.iterator,{value:function(){return this}}),l;function u(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,o=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(r=(r=i.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return[4,r.api.request({url:o,skipNotify:!0})];case 1:return[2,null==(e=t.sent())?void 0:e.data]}})},function(){var t=this,n=arguments;return new Promise(function(o,r){var i=e.apply(t,n);function l(e){h(i,o,r,l,a,"next",e)}function a(e){h(i,o,r,l,a,"throw",e)}l(void 0)})})()},{manual:!0,refreshDeps:[n,t],cacheKey:"".concat(t||"main",":").concat(o)}),u=a.loading,c=a.data,s=a.run;return(0,y.useEffect)(function(){s()},[s]),!u&&(null==c?void 0:c.data)||null}function I(e){var t,n,o=(0,i.useFlowContext)(),r=o.collectionField,l=null==(t=o.collectionField)?void 0:t.targetCollection,a=o.app.pm.get("@nocobase/plugin-file-manager"),u=e.context.blockModel.collection,c=T(e)||(null==(n=o.collection)?void 0:n.dataSourceKey),s=U((null==r?void 0:r.storage)||u.storage||l.storage,c),p=a.getStorageType(null==s?void 0:s.type);return{storage:s,storageType:p,dataSourceKey:c}}function A(e,t){var n=I(t),o=n.storage,r=n.storageType,i=n.dataSourceKey,l=null==r?void 0:r.useUploadProps,a=B(e.action,i),u=C(i),c=(null==l?void 0:l(x(k({storage:o,rules:o.rules},e),{action:a,dataSourceKey:i,headers:k({},e.headers,u)})))||{},s=k({},c.headers,u);return x(k({rules:null==o?void 0:o.rules},c),{action:M(a,c.action,i),headers:s})}var D={size:function(e,t){var n=null!=t?t:0x1400000;return 0===n||e.size<=n?null:"File size exceeds the limit"},mimetype:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",n=t.toString().trim();return n&&"*"!==n?n.split(",").filter(Boolean).some(b()(e.type))?null:"File type is not allowed":null}};function z(e,t){if(!t)return null;var n=Object.keys(t);if(!n.length)return null;var o=!0,r=!1,i=void 0;try{for(var l,a=n[Symbol.iterator]();!(o=(l=a.next()).done);o=!0){var u=l.value,c=D[u](e,t[u]);if(c)return c}}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return null}function F(e){var t=(0,g.useTranslation)().t;return(0,y.useCallback)(function(n,o){var r=z(n,e);return r?(n.status="error",n.response=t(r)):"error"===n.status&&(delete n.status,delete n.response),!r&&Promise.resolve(n)},[e,t])}function K(e){var t,n,r,l,d,b,m=e.model,h=(0,i.useFlowContext)(),w=_(m),S=w.rules,O=null!=S?S:{},E=O.size;O.mimetype;var P=(t=null!=E?E:0x1400000,r=(n=(0,g.useTranslation)()).t,l=function(e,{bits:t=!1,pad:n=!1,base:o=-1,round:r=2,locale:i="",localeOptions:l={},separator:a="",spacer:d=" ",symbols:b={},standard:y="",output:v="string",fullform:g=!1,fullforms:m=[],exponent:h=-1,roundingMethod:w="round",precision:S=0}={}){let O=h,k=Number(e),x=[],E=0,j="";"si"===y?(o=10,y=s):"iec"===y||y===s?o=2:2===o?y="iec":(o=10,y=s);let P=10===o?1e3:1024,T=k<0,B=Math[w];if("bigint"!=typeof e&&isNaN(e))throw TypeError("Invalid number");if("function"!=typeof B)throw TypeError("Invalid rounding method");if(T&&(k=-k),(-1===O||isNaN(O))&&(O=Math.floor(Math.log(k)/Math.log(P)))<0&&(O=0),O>8&&(S>0&&(S+=8-O),O=8),"exponent"===v)return O;if(0===k)x[0]=0,j=x[1]=p[y][t?u:c][O];else{E=k/(2===o?Math.pow(2,10*O):Math.pow(1e3,O)),t&&(E*=8)>=P&&O<8&&(E/=P,O++);let e=Math.pow(10,O>0?r:0);x[0]=B(E*e)/e,x[0]===P&&O<8&&-1===h&&(x[0]=1,O++),j=x[1]=10===o&&1===O?t?"kbit":"kB":p[y][t?u:c][O]}if(T&&(x[0]=-x[0]),S>0&&(x[0]=x[0].toPrecision(S)),x[1]=b[x[1]]||x[1],!0===i?x[0]=x[0].toLocaleString():i.length>0?x[0]=x[0].toLocaleString(i,l):a.length>0&&(x[0]=x[0].toString().replace(".",a)),n&&r>0){let e=x[0].toString(),t=a||(e.match(/(\D)/g)||[]).pop()||".",n=e.toString().split(t),o=n[1]||"",i=o.length;x[0]=`${n[0]}${t}${o.padEnd(i+(r-i),"0")}`}return!0===g&&(x[1]=m[O]?m[O]:f[y][O]+(t?"bit":"byte")+(1===x[0]?"":"s")),"array"===v?x:"object"===v?{value:x[0],symbol:x[1],exponent:O,unit:j}:x.join(d)}(t,{base:2,standard:"jedec",locale:n.i18n.language}),0!==t?r("File size should not exceed {{size}}.",{size:l}):""),T=j((0,y.useState)(!1),2),B=T[0],M=T[1],C=(0,y.useCallback)(function(e){e.fileList.some(function(e){return"uploading"===e.status})?M(!0):M(!1)},[]),U=h.view.Header,I=F(S);return v().createElement("div",null,v().createElement(U,{title:h.t("Upload file")}),v().createElement("div",{style:{height:"50vh"},onClick:function(e){return e.stopPropagation()}},v().createElement(a.Upload.Dragger,k({multiple:!0,listType:"picture"},(d=x(k({},w),{handleChange:C,beforeUpload:I}),b=(0,i.useFlowContext)(),k({customRequest:function(e){var t=e.action,n=e.data,o=e.file,r=e.filename,i=e.headers,l=e.onError,a=e.onProgress,u=e.onSuccess,c=new FormData;return n&&Object.keys(n).forEach(function(e){c.append(e,n[e])}),c.append(r,o),b.api.axios.post(t,c,{headers:i,onUploadProgress:function(e){var t=e.total;a({percent:Math.round(e.loaded/t*100).toFixed(2)},o)}}).then(function(e){u(e.data,o)}).catch(l).finally(function(){}),{abort:function(){console.log("upload progress is aborted.")}}}},d))),v().createElement("p",{className:"ant-upload-drag-icon"},B?v().createElement(o.LoadingOutlined,{style:{fontSize:36},spin:!0}):v().createElement(o.InboxOutlined,null)),v().createElement("p",{className:"ant-upload-text"},h.t("Click or drag file to this area to upload")),v().createElement("ul",{style:{listStyleType:"none"}},v().createElement("li",{className:"ant-upload-hint"},h.t("Support for a single or bulk upload.")),v().createElement("li",{className:"ant-upload-hint"},P)))))}var N=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,o;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,o=arguments,t=O(t),w(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,P()?Reflect.construct(t,o||[],O(this).constructor):t.apply(this,o)),"defaultProps",{type:"primary",title:(0,i.escapeT)("Upload"),icon:"UploadOutlined"}),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&E(n,e),t=[{key:"getAclActionName",value:function(){return"create"}},{key:"onInit",value:function(e){var t=this;S(O(n.prototype),"onInit",this).call(this,e),this.onUploadClick=function(e){t.dispatchEvent("openView",{event:e})}}},{key:"onUploadClick",set:function(e){this.setProps({onUploadClick:e})}},{key:"render",value:function(){var e=this.props,t=e.icon?v().createElement(r.Icon,{type:e.icon}):void 0;return v().createElement(a.Button,x(k({},e),{onClick:this.props.onUploadClick,icon:t}),e.children||e.title)}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(n.prototype,t),n}(r.ActionModel);w(N,"scene",r.ActionSceneEnum.collection),N.define({label:(0,i.escapeT)("Upload"),hide:function(e){var t;return(null==(t=e.collection)?void 0:t.template)!=="file"}}),N.registerFlow({key:"selectExitRecordSettings",title:(0,i.escapeT)("Selector setting"),on:{eventName:"openView"},steps:{openView:{title:(0,i.escapeT)("Edit popup"),uiSchema:function(e){return{mode:{type:"string",title:(0,i.escapeT)("Open mode"),enum:[{label:(0,i.escapeT)("Drawer"),value:"drawer"},{label:(0,i.escapeT)("Dialog"),value:"dialog"}],"x-decorator":"FormItem","x-component":"Radio.Group"},size:{type:"string",title:(0,i.escapeT)("Popup size"),enum:[{label:(0,i.escapeT)("Small"),value:"small"},{label:(0,i.escapeT)("Medium"),value:"medium"},{label:(0,i.escapeT)("Large"),value:"large"}],"x-decorator":"FormItem","x-component":"Radio.Group"}}},defaultParams:{mode:"drawer",size:"medium"},handler:function(e,t){var n,o=e.inputArgs.mode||t.mode||"drawer",r=e.inputArgs.size||t.size||"medium";e.viewer.open({type:o,width:{drawer:{small:"30%",medium:"50%",large:"70%"},dialog:{small:"40%",medium:"50%",large:"80%"},embed:{}}[o][r],inheritContext:!1,target:e.layoutContentElement,inputArgs:{sourceId:null==(n=e.resource)?void 0:n.getSourceId()},content:function(){return v().createElement(K,{model:e.model})},styles:{content:k({padding:0,backgroundColor:e.model.flowEngine.context.themeToken.colorBgLayout},"embed"===o?{position:"absolute",top:0,left:0,right:0,bottom:0}:{})}})}}}})}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["929"],{864:function(e,n,t){t.r(n),t.d(n,{default:function(){return m}});var l=t(59),a=t(155),r=t.n(a),u=t(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["929"],{864:function(e,n,t){t.r(n),t.d(n,{default:function(){return m}});var l=t(59),a=t(155),r=t.n(a),u=t(592);function m(){return r().createElement(r().Fragment,null,r().createElement(u.Lg,null),r().createElement(u.om,null),r().createElement(l.Form.Item,{name:"baseUrl",hidden:!0},r().createElement(l.Input,null)),r().createElement(l.Form.Item,{name:["options","documentRoot"],hidden:!0},r().createElement(l.Input,null)),r().createElement(u.Sx,{addonBefore:"storage/uploads/"}),r().createElement(u.OC,null),r().createElement(u.C6,null),r().createElement(u.KT,null),r().createElement(u.Lq,null),r().createElement(u.mt,null),r().createElement(u.tp,null))}}}]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
type Translate = (key: string) => string;
|
|
11
|
+
export interface PublicAccessCheckboxProps {
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
onChange?: (checked: boolean) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
t: Translate;
|
|
16
|
+
}
|
|
17
|
+
export declare function PublicAccessCheckbox({ checked, onChange, disabled, t }: PublicAccessCheckboxProps): React.JSX.Element;
|
|
18
|
+
export declare function PublicAccessField(): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
type Translate = (key: string) => string;
|
|
11
|
+
export interface UseOriginalUrlRadioProps {
|
|
12
|
+
id?: string;
|
|
13
|
+
value?: boolean;
|
|
14
|
+
onChange?: (value: boolean) => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
originalUrlExample?: string;
|
|
17
|
+
publicAccessControl?: React.ReactNode;
|
|
18
|
+
t: Translate;
|
|
19
|
+
}
|
|
20
|
+
export interface UseOriginalUrlFieldProps {
|
|
21
|
+
originalUrlExample?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function UseOriginalUrlRadio({ id, value, onChange, disabled, originalUrlExample, publicAccessControl, t, }: UseOriginalUrlRadioProps): React.JSX.Element;
|
|
24
|
+
export declare function UseOriginalUrlField(props: UseOriginalUrlFieldProps): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -13,5 +13,7 @@ export * from './MimetypeField';
|
|
|
13
13
|
export * from './NameField';
|
|
14
14
|
export * from './ParanoidField';
|
|
15
15
|
export * from './PathField';
|
|
16
|
+
export * from './PublicAccessField';
|
|
16
17
|
export * from './RenameModeField';
|
|
17
18
|
export * from './TitleField';
|
|
19
|
+
export * from './UseOriginalUrlField';
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
export { default } from './plugin';
|
|
10
10
|
export { default as PluginFileManagerClientV2 } from './plugin';
|
|
11
11
|
export type { StorageType } from './plugin';
|
|
12
|
-
export { BaseUrlField, DefaultField, FileSizeField, MimetypeField, NameField, ParanoidField, PathField, RenameModeField, TitleField, } from './components';
|
|
12
|
+
export { BaseUrlField, DefaultField, FileSizeField, MimetypeField, NameField, ParanoidField, PathField, PublicAccessField, RenameModeField, TitleField, UseOriginalUrlField, UseOriginalUrlRadio, } from './components';
|
|
13
|
+
export type { UseOriginalUrlFieldProps, UseOriginalUrlRadioProps } from './components/UseOriginalUrlField';
|
|
13
14
|
export type { DefaultFieldProps } from './components/DefaultField';
|
|
14
15
|
export type { PathFieldProps } from './components/PathField';
|
|
15
16
|
export { CardUpload, UploadFieldModel } from './models/UploadFieldModel';
|
|
16
|
-
export {
|
|
17
|
+
export { AttachmentFieldInterface } from './interfaces/attachment';
|
|
18
|
+
export { filePreviewTypes, getPermanentFilePreviewUrl, getPreviewThumbnailUrl, isPermanentFileUrl, matchMimetype, wrapWithModalPreviewer, } from './previewer/filePreviewTypes';
|
|
17
19
|
export type { FilePreviewType, FilePreviewerProps } from './previewer/filePreviewTypes';
|