mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
UBERF-7605 Uppy integration (#6085)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Generated
+433
-25
@@ -464,6 +464,9 @@ dependencies:
|
||||
'@rush-temp/model-training':
|
||||
specifier: file:./projects/model-training.tgz
|
||||
version: file:projects/model-training.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2)
|
||||
'@rush-temp/model-uploader':
|
||||
specifier: file:./projects/model-uploader.tgz
|
||||
version: file:projects/model-uploader.tgz
|
||||
'@rush-temp/model-view':
|
||||
specifier: file:./projects/model-view.tgz
|
||||
version: file:projects/model-view.tgz
|
||||
@@ -887,6 +890,15 @@ dependencies:
|
||||
'@rush-temp/ui':
|
||||
specifier: file:./projects/ui.tgz
|
||||
version: file:projects/ui.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2)
|
||||
'@rush-temp/uploader':
|
||||
specifier: file:./projects/uploader.tgz
|
||||
version: file:projects/uploader.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2)
|
||||
'@rush-temp/uploader-assets':
|
||||
specifier: file:./projects/uploader-assets.tgz
|
||||
version: file:projects/uploader-assets.tgz(esbuild@0.20.1)(ts-node@10.9.2)
|
||||
'@rush-temp/uploader-resources':
|
||||
specifier: file:./projects/uploader-resources.tgz
|
||||
version: file:projects/uploader-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2)
|
||||
'@rush-temp/uws':
|
||||
specifier: file:./projects/uws.tgz
|
||||
version: file:projects/uws.tgz
|
||||
@@ -1112,6 +1124,33 @@ dependencies:
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^6.11.0
|
||||
version: 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@uppy/core':
|
||||
specifier: ^3.13.1
|
||||
version: 3.13.1
|
||||
'@uppy/dashboard':
|
||||
specifier: ^3.9.1
|
||||
version: 3.9.1(@uppy/core@3.13.1)
|
||||
'@uppy/drag-drop':
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/locales':
|
||||
specifier: ^4.0.3
|
||||
version: 4.0.3
|
||||
'@uppy/progress-bar':
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/screen-capture':
|
||||
specifier: ^3.2.0
|
||||
version: 3.2.0(@uppy/core@3.13.1)
|
||||
'@uppy/status-bar':
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3(@uppy/core@3.13.1)
|
||||
'@uppy/webcam':
|
||||
specifier: ^3.4.2
|
||||
version: 3.4.2(@uppy/core@3.13.1)
|
||||
'@uppy/xhr-upload':
|
||||
specifier: ^3.6.8
|
||||
version: 3.6.8(@uppy/core@3.13.1)
|
||||
allure-playwright:
|
||||
specifier: ^2.9.2
|
||||
version: 2.12.2
|
||||
@@ -7338,6 +7377,10 @@ packages:
|
||||
engines: {node: '>= 10'}
|
||||
dev: false
|
||||
|
||||
/@transloadit/prettier-bytes@0.3.4:
|
||||
resolution: {integrity: sha512-8/SnIF9Q2k52mbjRVAYLranwkaDTLb+O9r4Z/uo8uNw//SjygKvvbF4BHSOuReufaAyum1q13602VcNud25Dfg==}
|
||||
dev: false
|
||||
|
||||
/@trysound/sax@0.2.0:
|
||||
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@@ -7861,6 +7904,10 @@ packages:
|
||||
resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==}
|
||||
dev: false
|
||||
|
||||
/@types/retry@0.12.2:
|
||||
resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==}
|
||||
dev: false
|
||||
|
||||
/@types/scheduler@0.16.8:
|
||||
resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==}
|
||||
dev: false
|
||||
@@ -8115,6 +8162,170 @@ packages:
|
||||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||
dev: false
|
||||
|
||||
/@uppy/companion-client@3.8.2(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-WLjZ0Y6Fe7lzwU1YPvvQ/YqooejcgIZkT2TC39xr+QQ7Y1FwJECsyUdlKwgi1ee8TNpjoCrj3Q1Hjel/+p0VhA==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.13.1
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
namespace-emitter: 2.0.1
|
||||
p-retry: 6.2.0
|
||||
dev: false
|
||||
|
||||
/@uppy/core@3.13.1:
|
||||
resolution: {integrity: sha512-iQGAUO4ziQRpfv7kix6tO6JOWqjI0K4vt8AynvHWzDPZxYSba3zd6RojGNPsYWSR7Xv+dRXYx+GU8oTiK1FRUA==}
|
||||
dependencies:
|
||||
'@transloadit/prettier-bytes': 0.3.4
|
||||
'@uppy/store-default': 3.2.2
|
||||
'@uppy/utils': 5.9.0
|
||||
lodash: 4.17.21
|
||||
mime-match: 1.0.2
|
||||
namespace-emitter: 2.0.1
|
||||
nanoid: 4.0.2
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/dashboard@3.9.1(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-zZp+5Dwqu1jUdAZEu0Os2kC/8bF3cdrkve8CYEwqP/12yjNe8PF+XUQKF1RCYITjDE4hPSXcTh0MWw6t2LONuw==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.13.0
|
||||
dependencies:
|
||||
'@transloadit/prettier-bytes': 0.3.4
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/informer': 3.1.0(@uppy/core@3.13.1)
|
||||
'@uppy/provider-views': 3.13.0(@uppy/core@3.13.1)
|
||||
'@uppy/status-bar': 3.3.3(@uppy/core@3.13.1)
|
||||
'@uppy/thumbnail-generator': 3.1.0(@uppy/core@3.13.1)
|
||||
'@uppy/utils': 5.9.0
|
||||
classnames: 2.5.1
|
||||
is-shallow-equal: 1.0.1
|
||||
lodash: 4.17.21
|
||||
memoize-one: 6.0.0
|
||||
nanoid: 4.0.2
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/drag-drop@3.1.1(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-ujUBswJ/Acvg1UQUPtfWO6PekPzFgQAEtDW7yxsi81wy1/WNIYjY36bxKVpM/cz5PjmWOTWoqdjBQa4LIJCdyw==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.13.1
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/informer@3.1.0(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-vmpTLqzSLmZSuIVDZV0o19yXVqyTh5/uCbKUEiyfBhR726kQiuYQLP/ZHaKcvW3c1ESQGbNg53iNHbFBqF681w==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.9.3
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/locales@4.0.3:
|
||||
resolution: {integrity: sha512-nr/zJV1MsU4VSB3sXhFj+8kh7Rlnq/4G2MmXrNQfb5aEEAxHMpAFKQo0DAQuIyt2oJTKQyL07Ukdpyjm0Ox43Q==}
|
||||
dependencies:
|
||||
'@uppy/utils': 6.0.0
|
||||
dev: false
|
||||
|
||||
/@uppy/progress-bar@3.1.1(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-c7Wcv6/gvrdxICnZUaU/cZG6wUtS0V/GYGssGFQ6OW84h0smuzGGA+KOh9zKqr6HBHxgKRxmCDtrlTlSSvAuQQ==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.10.0
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/provider-views@3.13.0(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-Z2oI88A+GC2zIPk8beoeFN/miHKkhtF58mYjvb5miGCMMZM7p7LRj98sgb5OOdKsGrfeiuTavtgL424BvcVd8w==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.13.0
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
classnames: 2.5.1
|
||||
nanoid: 4.0.2
|
||||
p-queue: 7.3.4
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/screen-capture@3.2.0(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-bwrIpp9nlymjMVD3DpULurAUfvVUVkOfZfGWH2xtaVGZbXU1Q7rwNM1jwn4ilqSLCRWbDNi8VSy81WOruKv/9g==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.10.0
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/status-bar@3.3.3(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-TCcnBjTDbq/AmnGOcWbCpQNsv05Z6Y36zdmTCt/xNe2/gTVAYAzGRoGOrkeb6jf/E4AAi25VyOolSqL2ibB8Kw==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.11.2
|
||||
dependencies:
|
||||
'@transloadit/prettier-bytes': 0.3.4
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
classnames: 2.5.1
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/store-default@3.2.2:
|
||||
resolution: {integrity: sha512-OiSgT++Jj4nLK0N9WTeod3UNjCH81OXE5BcMJCd9oWzl2d0xPNq2T/E9Y6O72XVd+6Y7+tf5vZlPElutfMB3KQ==}
|
||||
dev: false
|
||||
|
||||
/@uppy/thumbnail-generator@3.1.0(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-tDKK/cukC0CrM0F/OlHFmvpGGUq+Db4YfakhIGPKtT7ZO8aWOiIu5JIvaYUnKRxGq3RGsk4zhkxYXuoxVzzsGA==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.10.0
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
exifr: 7.1.3
|
||||
dev: false
|
||||
|
||||
/@uppy/utils@5.9.0:
|
||||
resolution: {integrity: sha512-9Ubddd3orCOLYjf0KobwgJ+aTrABSxk9t4X/QdM4qJHVZuMIftkaMplrViRUO+kvIBCXEZDIP2AmS060siDNGw==}
|
||||
dependencies:
|
||||
lodash: 4.17.21
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/utils@6.0.0:
|
||||
resolution: {integrity: sha512-24mvEYlt189setvd0z8l3LJRxiq+W8UAZ3lCHRP1Qzq6rSdd/cVaTiIgV+0ZvNnZMmiEKeKdEcfFG3VeGvE3dg==}
|
||||
dependencies:
|
||||
lodash: 4.17.21
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/webcam@3.4.2(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-exp6YZN8eu8hJjJ48/O84htMwwGKLwMzuLTEWrXmu710Z3kU7Zu3+jN1PiajnRcGykXl9iwj3iXR2z1uEu+dbw==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.12.0
|
||||
dependencies:
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
is-mobile: 3.1.1
|
||||
preact: 10.22.1
|
||||
dev: false
|
||||
|
||||
/@uppy/xhr-upload@3.6.8(@uppy/core@3.13.1):
|
||||
resolution: {integrity: sha512-zr3OHrIdo08jmCqTYKS0C7o3E0XQpjtZI40wmB6VvXYzu4x/aZankG9QqKxLiY0n8KbZ9aCIvO8loxBGoL7Kaw==}
|
||||
peerDependencies:
|
||||
'@uppy/core': ^3.13.0
|
||||
dependencies:
|
||||
'@uppy/companion-client': 3.8.2(@uppy/core@3.13.1)
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/utils': 5.9.0
|
||||
dev: false
|
||||
|
||||
/@vitest/utils@0.34.7:
|
||||
resolution: {integrity: sha512-ziAavQLpCYS9sLOorGrFFKmy2gnfiNU0ZJ15TsMz/K92NAPS/rp9K4z6AJQQk5Y8adCy4Iwpxy7pQumQ/psnRg==}
|
||||
dependencies:
|
||||
@@ -9311,6 +9522,10 @@ packages:
|
||||
resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==}
|
||||
dev: false
|
||||
|
||||
/classnames@2.5.1:
|
||||
resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==}
|
||||
dev: false
|
||||
|
||||
/clean-css@5.3.3:
|
||||
resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==}
|
||||
engines: {node: '>= 10.0'}
|
||||
@@ -11158,6 +11373,10 @@ packages:
|
||||
strip-final-newline: 3.0.0
|
||||
dev: false
|
||||
|
||||
/exifr@7.1.3:
|
||||
resolution: {integrity: sha512-g/aje2noHivrRSLbAUtBPWFbxKdKhgj/xr1vATDdUXPOFYJlQ62Ft0oy+72V6XLIpDJfHs6gXLbBLAolqOXYRw==}
|
||||
dev: false
|
||||
|
||||
/exit@0.1.2:
|
||||
resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -12522,6 +12741,10 @@ packages:
|
||||
resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==}
|
||||
dev: false
|
||||
|
||||
/is-mobile@3.1.1:
|
||||
resolution: {integrity: sha512-RRoXXR2HNFxNkUnxtaBdGBXtFlUMFa06S0NUKf/LCF+MuGLu13gi9iBCkoEmc6+rpXuwi5Mso5V8Zf7mNynMBQ==}
|
||||
dev: false
|
||||
|
||||
/is-nan@1.3.2:
|
||||
resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -12542,6 +12765,11 @@ packages:
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/is-network-error@1.1.0:
|
||||
resolution: {integrity: sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==}
|
||||
engines: {node: '>=16'}
|
||||
dev: false
|
||||
|
||||
/is-nil@1.0.1:
|
||||
resolution: {integrity: sha512-m2Rm8PhUFDNNhgvwZJjJG74a9h5CHU0fkA8WT+WGlCjyEbZ2jPwgb+ZxHu4np284EqNVyOsgppReK4qy/TwEwg==}
|
||||
dev: false
|
||||
@@ -12607,6 +12835,10 @@ packages:
|
||||
resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==}
|
||||
dev: false
|
||||
|
||||
/is-shallow-equal@1.0.1:
|
||||
resolution: {integrity: sha512-lq5RvK+85Hs5J3p4oA4256M1FEffzmI533ikeDHvJd42nouRRx5wBzt36JuviiGe5dIPyHON/d0/Up+PBo6XkQ==}
|
||||
dev: false
|
||||
|
||||
/is-shared-array-buffer@1.0.3:
|
||||
resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -13892,6 +14124,10 @@ packages:
|
||||
fs-monkey: 1.0.5
|
||||
dev: false
|
||||
|
||||
/memoize-one@6.0.0:
|
||||
resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
|
||||
dev: false
|
||||
|
||||
/memoizerific@1.11.3:
|
||||
resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==}
|
||||
dependencies:
|
||||
@@ -13933,6 +14169,12 @@ packages:
|
||||
engines: {node: '>= 0.6'}
|
||||
dev: false
|
||||
|
||||
/mime-match@1.0.2:
|
||||
resolution: {integrity: sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==}
|
||||
dependencies:
|
||||
wildcard: 1.1.2
|
||||
dev: false
|
||||
|
||||
/mime-types@2.1.35:
|
||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
||||
engines: {node: '>= 0.6'}
|
||||
@@ -14226,12 +14468,22 @@ packages:
|
||||
thunky: 1.1.0
|
||||
dev: false
|
||||
|
||||
/namespace-emitter@2.0.1:
|
||||
resolution: {integrity: sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==}
|
||||
dev: false
|
||||
|
||||
/nanoid@3.3.7:
|
||||
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/nanoid@4.0.2:
|
||||
resolution: {integrity: sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==}
|
||||
engines: {node: ^14 || ^16 || >=18}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/napi-build-utils@1.0.2:
|
||||
resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
|
||||
dev: false
|
||||
@@ -14662,6 +14914,15 @@ packages:
|
||||
retry: 0.13.1
|
||||
dev: false
|
||||
|
||||
/p-retry@6.2.0:
|
||||
resolution: {integrity: sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==}
|
||||
engines: {node: '>=16.17'}
|
||||
dependencies:
|
||||
'@types/retry': 0.12.2
|
||||
is-network-error: 1.1.0
|
||||
retry: 0.13.1
|
||||
dev: false
|
||||
|
||||
/p-timeout@5.1.0:
|
||||
resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -15085,6 +15346,10 @@ packages:
|
||||
source-map-js: 1.0.2
|
||||
dev: false
|
||||
|
||||
/preact@10.22.1:
|
||||
resolution: {integrity: sha512-jRYbDDgMpIb5LHq3hkI0bbl+l/TQ9UnkdQ0ww+lp+4MMOdqaUYdFc5qeyP+IV8FAd/2Em7drVPeKdQxsiWCf/A==}
|
||||
dev: false
|
||||
|
||||
/prebuild-install@7.1.1:
|
||||
resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -18131,6 +18396,10 @@ packages:
|
||||
isexe: 2.0.0
|
||||
dev: false
|
||||
|
||||
/wildcard@1.1.2:
|
||||
resolution: {integrity: sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng==}
|
||||
dev: false
|
||||
|
||||
/wildcard@2.0.1:
|
||||
resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==}
|
||||
dev: false
|
||||
@@ -19177,7 +19446,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/chunter-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-exqE0lZdIDuK5lMtVBJqftuOAy+oOT7Jq2EcIzU23p2tZNM9ku9ACfA0yGxRu+y8FMcQ9W4Pve1yCivD45i5Aw==, tarball: file:projects/chunter-resources.tgz}
|
||||
resolution: {integrity: sha512-RWD09VQ42IkJmhjvrQ6cqQ3etpChxFKhZICAQ6cuSbjetHSz0LKXSzrsE5xjpnsZE6Wr22dSDiglk9+82SVC8w==, tarball: file:projects/chunter-resources.tgz}
|
||||
id: file:projects/chunter-resources.tgz
|
||||
name: '@rush-temp/chunter-resources'
|
||||
version: 0.0.0
|
||||
@@ -19588,7 +19857,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/controlled-documents-resources.tgz(@tiptap/pm@2.2.4)(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-0FCU3SCGUuP+6gCexcmP//a/oGxnmLvHft3MwwxXdey/RDAMASAQL8/B/ZMta/OsAWCdB4VmiTqT3ptKxK6KLQ==, tarball: file:projects/controlled-documents-resources.tgz}
|
||||
resolution: {integrity: sha512-uR8x3pM6PDfvc7sLNMiTexm6oy8hTfrw31r6SwScjGxvzFzc5xhJimPOjJFTAQstWWUPnxwci2uYbsQ7V2oTeA==, tarball: file:projects/controlled-documents-resources.tgz}
|
||||
id: file:projects/controlled-documents-resources.tgz
|
||||
name: '@rush-temp/controlled-documents-resources'
|
||||
version: 0.0.0
|
||||
@@ -19923,7 +20192,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/drive-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-CdbbPkzipIK0KNE7RNom6VyybWFcc8ovkB2Fzz/wJh39yhBF2P/imIOmOuPbV/7mdSZuu9pvjW21bMfY6XKXDw==, tarball: file:projects/drive-resources.tgz}
|
||||
resolution: {integrity: sha512-1saL40JzcAtJ3+B+oqfEjKbAjQk07/2aosafiSMPav5k2h42odFfk0le2HQDufXLyviMVGdUJOyP0HJeaaqyXQ==, tarball: file:projects/drive-resources.tgz}
|
||||
id: file:projects/drive-resources.tgz
|
||||
name: '@rush-temp/drive-resources'
|
||||
version: 0.0.0
|
||||
@@ -19938,7 +20207,6 @@ packages:
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.12)(ts-node@10.9.2)
|
||||
fast-equals: 5.0.1
|
||||
filesize: 8.0.7
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
prettier: 3.2.5
|
||||
prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.12)
|
||||
@@ -21054,7 +21322,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-all.tgz:
|
||||
resolution: {integrity: sha512-yD4aU7WgdpsjVlAgRig4MUB61OznGSS0Bzm8ZLgMkJ73WlS9rg41T/n3bJG4+U1rY32MTd7QJKBzT7wxjsOsMQ==, tarball: file:projects/model-all.tgz}
|
||||
resolution: {integrity: sha512-UJzQ4TlmbHmPJfDhn7VNn01VuXSeWITV8e1pq3mssAshd1F0ElQiDJYMtCtJcUVQnGWwx7r4sRCqDL3P3Qdayg==, tarball: file:projects/model-all.tgz}
|
||||
name: '@rush-temp/model-all'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -21077,7 +21345,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-attachment.tgz:
|
||||
resolution: {integrity: sha512-dSxJIFYO3uwjwHixeH8SNTpNIoQOVFs1e4K/yl2eX+AAotKYTsYTkMjasp4pas0FY1cesNOmUL0YhOkrw9sTeg==, tarball: file:projects/model-attachment.tgz}
|
||||
resolution: {integrity: sha512-l6ido0KZWoQdDjZCYPzyauy2JZk04kXh48IpVSb4t4UwPfRXQKdKNZFecJxEyIkXW5T2uFYsWSpg+w7jYx85hw==, tarball: file:projects/model-attachment.tgz}
|
||||
name: '@rush-temp/model-attachment'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -21268,7 +21536,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-gmail.tgz:
|
||||
resolution: {integrity: sha512-8JyqHtGJn1NhRsHGjVIBpnryxyZN4Ffyc21INZqIM9aYGQhDff5y1oMC7ru7HwbMqd1FUb481beSwD+17Jxosg==, tarball: file:projects/model-gmail.tgz}
|
||||
resolution: {integrity: sha512-FoDVnyY59pxmZGAethkhK1+8i3yA/HAtbB1dfRUB2VBSRrqtj44pUsBGFEMqvseVyj9F1DGGJEIMmr6XSRM6Ug==, tarball: file:projects/model-gmail.tgz}
|
||||
name: '@rush-temp/model-gmail'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -21381,7 +21649,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-notification.tgz:
|
||||
resolution: {integrity: sha512-1Qlen9LiHHthj28I0KPZsq3xYgaSQNHfICyULa+8BKtMoRnzkkAcbjd5hHiNV698JtWQ9LwQIwSLCTTVqX6Z/g==, tarball: file:projects/model-notification.tgz}
|
||||
resolution: {integrity: sha512-cz+OQrGb1FXp0P2DrgPLtwpwFx3gamnrO71yB3KC429Juu+HrO5oakAI34vsXZyLKC5vddp0WigK4VObJFPv7A==, tarball: file:projects/model-notification.tgz}
|
||||
name: '@rush-temp/model-notification'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -22269,7 +22537,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-time.tgz:
|
||||
resolution: {integrity: sha512-dvKZYIWV25e8TZa/RLBzR7LCgNRkRiQKocvF+GuBTml+7+Yap230DO1uX60Bcl0sS2Tf6WLIUvWsdBGzQHG4FA==, tarball: file:projects/model-time.tgz}
|
||||
resolution: {integrity: sha512-k54c7qp0aXu055aUPzLvNQre968ZjLpO4AX6jk77b5B8EHFy3jDQvN2phgWLnJ4Ek5+e3xSavmDLQHZrMgO4Vg==, tarball: file:projects/model-time.tgz}
|
||||
name: '@rush-temp/model-time'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -22288,7 +22556,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/model-tracker.tgz:
|
||||
resolution: {integrity: sha512-JuhmJMAx2hf86brpUJYQCh1OuRxfm1XC36LY07bD4nTIMgqQxvtZdoyIlz4KL2k9bN+jWDVkZ2PMslWb/PlEKA==, tarball: file:projects/model-tracker.tgz}
|
||||
resolution: {integrity: sha512-u9m53Xf1czr2mPQRN62kUs6umFh0ThtAahFquvZSdqY3bDjd1rYpG31SUOHphnGBTa4um183/pxGdJLtD599YQ==, tarball: file:projects/model-tracker.tgz}
|
||||
name: '@rush-temp/model-tracker'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -22336,6 +22604,24 @@ packages:
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/model-uploader.tgz:
|
||||
resolution: {integrity: sha512-9GI5n1FQ613lVwdeRGO42BLsWQl/BHvsXBc/5VoDT++FctRsVB6jRWl0fOr6P1MsZYS2XGkAh1sG+Tgb80kl0Q==, tarball: file:projects/model-uploader.tgz}
|
||||
name: '@rush-temp/model-uploader'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
prettier: 3.2.5
|
||||
typescript: 5.3.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
file:projects/model-view.tgz:
|
||||
resolution: {integrity: sha512-t4Gx5CGfjDins406cm6pf6/BP46c5rDVJ7XssOyqyS2Kdz1KoGLFVtkFtObQJgMF7F+c7mIma6midjo7Gmqi2Q==, tarball: file:projects/model-view.tgz}
|
||||
name: '@rush-temp/model-view'
|
||||
@@ -22741,7 +23027,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/pod-backup.tgz:
|
||||
resolution: {integrity: sha512-xtmbY2aBIrRFlU6kpDKoybhO5S8sJaIV47040JD7qgl7Qc7dCgDFXNdgtwBcEcmLdXmalvp22zHLzj879D3t9w==, tarball: file:projects/pod-backup.tgz}
|
||||
resolution: {integrity: sha512-s9kcgWCYc8P3K8PwE+faNd1ZMgf5B8WYobO8YnPxUlfzOIOdAWoZwzSzWK7brEh8NGeYsfCGn8zxRj+EijOv2Q==, tarball: file:projects/pod-backup.tgz}
|
||||
name: '@rush-temp/pod-backup'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
@@ -22954,7 +23240,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/presentation.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-IcgDU/RkN2T0Ff8el0yFtkHqmBgJGGAuGwfEccopfRc8BgmVfvLHijPFSLpI6gxWEKPhhSN9hLGXTeOj4iHqkg==, tarball: file:projects/presentation.tgz}
|
||||
resolution: {integrity: sha512-PcNk328Y0w6TESBRrSlt0ARPyyFaygF6vO3aIi27DcqbF6SQJi50QFk3PShNb/OVhGkFTyXx8mn++2WpI4QPKA==, tarball: file:projects/presentation.tgz}
|
||||
id: file:projects/presentation.tgz
|
||||
name: '@rush-temp/presentation'
|
||||
version: 0.0.0
|
||||
@@ -23111,7 +23397,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/prod.tgz(bufferutil@4.0.8)(sass@1.71.1)(ts-node@10.9.2)(utf-8-validate@6.0.3):
|
||||
resolution: {integrity: sha512-000EecAzA83jE6Vv147F5OuGLkV2y1lOJWP5xfp02lXPhK53xXfVLAbsqsC28VkyCmnILxAJE3aNkaYQKO/bdg==, tarball: file:projects/prod.tgz}
|
||||
resolution: {integrity: sha512-ALcGhikSF7a0YF6j81P1X3YX9B7x+Pu+wCS5mNa4YgcJEod+A7uGhAMcqBXHUsYsBvbJ1aymocOD88ACDDWEUQ==, tarball: file:projects/prod.tgz}
|
||||
id: file:projects/prod.tgz
|
||||
name: '@rush-temp/prod'
|
||||
version: 0.0.0
|
||||
@@ -23643,7 +23929,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/request-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-Y5O5y7ixGCEn+Bot2ABstSsghN7G0MFtFKaU6GwBeTk63JrfJfkQda4GmLXq9dE/ekMsiUCck+ohqFjw58QCHg==, tarball: file:projects/request-resources.tgz}
|
||||
resolution: {integrity: sha512-DtnQ69tnJs0ZP8pCoM07cGnaAT4YyBq7W/iOR+k5YCs3viRRRczee6NTmgzsx5OJYkDMYdHYVoYfTdNgiIHgyQ==, tarball: file:projects/request-resources.tgz}
|
||||
id: file:projects/request-resources.tgz
|
||||
name: '@rush-temp/request-resources'
|
||||
version: 0.0.0
|
||||
@@ -24414,7 +24700,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/server-gmail-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-TqiqBX1KOGuwSg52BnZ+3kDeZn4f+aWrIx7yklvWz5IO2MnS2vXqowDowL+5DWRiNzEOQnqxesnGi+gNRTOYuw==, tarball: file:projects/server-gmail-resources.tgz}
|
||||
resolution: {integrity: sha512-jc5tLhz7YJs4Nw0dwPgOpZnZA+wMstl6Vt3BuL5BOE8iMTeUTZP1fKJXf6pGVeZAGEaYzayHM9Jmw+S45/l9MQ==, tarball: file:projects/server-gmail-resources.tgz}
|
||||
id: file:projects/server-gmail-resources.tgz
|
||||
name: '@rush-temp/server-gmail-resources'
|
||||
version: 0.0.0
|
||||
@@ -24538,7 +24824,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/server-hr-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-FbB+RgmTVIYTHDJIrWVStMZeCjUl9yWs1Fg1WKu4i93BP4D350CtOhYRWUgfMGEeS7CU1XEW47mJXVQ0fGE12Q==, tarball: file:projects/server-hr-resources.tgz}
|
||||
resolution: {integrity: sha512-dRJrMwYzzZFaZ64iHkfaKQjP4EAnbFTn9HonG2w59T0KBGSk1cQlldj1G0DObovPhgl3bTcTJyiFTZo8sEKqVQ==, tarball: file:projects/server-hr-resources.tgz}
|
||||
id: file:projects/server-hr-resources.tgz
|
||||
name: '@rush-temp/server-hr-resources'
|
||||
version: 0.0.0
|
||||
@@ -25356,7 +25642,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/server-time-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-0Z4E3QY09Zh53Qr7b9+0jFr0wx7oLP28Vo81Di8EBcq/hgvSdbQsU5SngFIKp/TG4MfXuoh7hnZWIgRO7Xb5+g==, tarball: file:projects/server-time-resources.tgz}
|
||||
resolution: {integrity: sha512-WePYLAz/QHfFL+jMa/ZE6JQIvNYK4tGBs4ur6UBG3inJigtt9p7AR4PO+nr7dtGZqG8RT0T0TrGREcdV7pX5Gw==, tarball: file:projects/server-time-resources.tgz}
|
||||
id: file:projects/server-time-resources.tgz
|
||||
name: '@rush-temp/server-time-resources'
|
||||
version: 0.0.0
|
||||
@@ -26577,7 +26863,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/text-editor-resources.tgz(@types/node@20.11.19)(bufferutil@4.0.8)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(prosemirror-model@1.19.4)(ts-node@10.9.2)(utf-8-validate@6.0.3):
|
||||
resolution: {integrity: sha512-1Px5KTszIJSV4SoZXJGyJt026vBf4mvVW9Nbf8dfIIP5KhquF3bfaZiLdQ9yMls1P6M1g1Lh44z9wZUaaVvX4Q==, tarball: file:projects/text-editor-resources.tgz}
|
||||
resolution: {integrity: sha512-piHhMfwGIkFR7VYjYWS1lGTwg5zIQaKJmKSSAY7gpRGM4BA88RagpPmx8eT/hXvFv83a+4CzkMUK/atGHWRZcQ==, tarball: file:projects/text-editor-resources.tgz}
|
||||
id: file:projects/text-editor-resources.tgz
|
||||
name: '@rush-temp/text-editor-resources'
|
||||
version: 0.0.0
|
||||
@@ -26617,7 +26903,6 @@ packages:
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.12)(ts-node@10.9.2)
|
||||
fast-equals: 5.0.1
|
||||
filesize: 8.0.7
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
lib0: 0.2.89
|
||||
prettier: 3.2.5
|
||||
@@ -26662,7 +26947,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/text-editor.tgz(@types/node@20.11.19)(esbuild@0.20.1)(svelte@4.2.12)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-PAi3SowjX1BVR2OJFz80YabahPeG+jpRbhNWoOB9mjbVtswR81eVf662kChkZ6xZgLNpwfYt1euhUxBC4esryg==, tarball: file:projects/text-editor.tgz}
|
||||
resolution: {integrity: sha512-nOuNj+6fkpq/ivYOfCpmxG6u3sfkfKE3UqymxbVOVF2WWRAFOn2kBUOorEBt1v8dpSWeZIwvEI0aOnluJG3uqg==, tarball: file:projects/text-editor.tgz}
|
||||
id: file:projects/text-editor.tgz
|
||||
name: '@rush-temp/text-editor'
|
||||
version: 0.0.0
|
||||
@@ -26678,7 +26963,6 @@ packages:
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
filesize: 8.0.7
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
prettier: 3.2.5
|
||||
sass: 1.71.1
|
||||
@@ -26840,7 +27124,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/time-resources.tgz(@tiptap/core@2.2.4)(@tiptap/pm@2.2.4)(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-QX5HLp1opauujFHKBxwPKzGRTLIFUyfqHI+ry2gUtuPX7wRGMqqFGdMAMnsQNDiuthwia9mRqUVZIrux6Rrtpg==, tarball: file:projects/time-resources.tgz}
|
||||
resolution: {integrity: sha512-YHDZu9vfplV3yHTWsp3czuSbb59RRHGIYpYvMZKVG7mnk52y121rzcxiu1W6j8vh69xFXgxMowO6TQEwTEFfKQ==, tarball: file:projects/time-resources.tgz}
|
||||
id: file:projects/time-resources.tgz
|
||||
name: '@rush-temp/time-resources'
|
||||
version: 0.0.0
|
||||
@@ -26921,7 +27205,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/tool.tgz(bufferutil@4.0.8)(utf-8-validate@6.0.3):
|
||||
resolution: {integrity: sha512-F0XCwnJslL0DElYI9UUk1wMDaby1XQWa4pP7g8OjdAawPHI7VfhpyIO+IKMUuZiKn58pYFtWW4sNMAJwAEOlBg==, tarball: file:projects/tool.tgz}
|
||||
resolution: {integrity: sha512-azLyJg979njyDjMIjjb/48UDVkrmgZnP8xOzH4Xov1JHAKw7ioNGNmq3wdpG4csgdghhrnmhMMXkae1ur2stlA==, tarball: file:projects/tool.tgz}
|
||||
id: file:projects/tool.tgz
|
||||
name: '@rush-temp/tool'
|
||||
version: 0.0.0
|
||||
@@ -27008,7 +27292,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/tracker-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-+EMPmOEZVK78zmDekNE3qkdqMx50z5ijo3A7JdbliP3Tp6zWpsrGurZ/tvjjGCY5DZIxewnfkO2USoNjNPySpQ==, tarball: file:projects/tracker-resources.tgz}
|
||||
resolution: {integrity: sha512-03/dyGA23fGY5J9Nhe6v73eCnzBxr7C3a2j2pModjh/Q/QYGGzVoIbVU9dpIUMmo6q/Wf8j/6DN/X1i9N0wZJw==, tarball: file:projects/tracker-resources.tgz}
|
||||
id: file:projects/tracker-resources.tgz
|
||||
name: '@rush-temp/tracker-resources'
|
||||
version: 0.0.0
|
||||
@@ -27054,7 +27338,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/tracker.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-BBS0k29meMhzZGOZQCCay3enVbDJEwHIgmgn/SiC/N8iAcxfVnIeOkwpyy7HsHOIeiQQvX9Mjg+okZqriFfBoQ==, tarball: file:projects/tracker.tgz}
|
||||
resolution: {integrity: sha512-PUwJgEtnf+i/P+ArGeCzHOrIjqJJ23nWHsE54zV1xWEg8p/bIzXQKySVJxJm99wsKJtxal0ueuqlG6ljKYjzwQ==, tarball: file:projects/tracker.tgz}
|
||||
id: file:projects/tracker.tgz
|
||||
name: '@rush-temp/tracker'
|
||||
version: 0.0.0
|
||||
@@ -27275,6 +27559,130 @@ packages:
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/uploader-assets.tgz(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-Z9x8nSHQlTKpuDySS7fArDhxIPhV/PmDbtBaaaQyo5LI34XC9alSYsVZx7tUXaJLPXuL4oBgSWk9+qkIikB3dg==, tarball: file:projects/uploader-assets.tgz}
|
||||
id: file:projects/uploader-assets.tgz
|
||||
name: '@rush-temp/uploader-assets'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@types/node': 20.11.19
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
prettier: 3.2.5
|
||||
ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.3.3)
|
||||
typescript: 5.3.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/uploader-resources.tgz(@types/node@20.11.19)(esbuild@0.20.1)(postcss-load-config@4.0.2)(postcss@8.4.35)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-f8lz0mU3oNornVvzvDMJooPjlaV8thYdgnLVuhkCHBGfAk7vfuo22K39R37lgbSnxxNFm2OtHYe5k5XfQXLXlg==, tarball: file:projects/uploader-resources.tgz}
|
||||
id: file:projects/uploader-resources.tgz
|
||||
name: '@rush-temp/uploader-resources'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/dashboard': 3.9.1(@uppy/core@3.13.1)
|
||||
'@uppy/drag-drop': 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/locales': 4.0.3
|
||||
'@uppy/progress-bar': 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/screen-capture': 3.2.0(@uppy/core@3.13.1)
|
||||
'@uppy/status-bar': 3.3.3(@uppy/core@3.13.1)
|
||||
'@uppy/webcam': 3.4.2(@uppy/core@3.13.1)
|
||||
'@uppy/xhr-upload': 3.6.8(@uppy/core@3.13.1)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.12)(ts-node@10.9.2)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
prettier: 3.2.5
|
||||
prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.12)
|
||||
sass: 1.71.1
|
||||
svelte: 4.2.12
|
||||
svelte-check: 3.6.9(postcss-load-config@4.0.2)(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.12)
|
||||
svelte-eslint-parser: 0.33.1(svelte@4.2.12)
|
||||
svelte-loader: 3.2.0(svelte@4.2.12)
|
||||
svelte-preprocess: 5.1.3(postcss-load-config@4.0.2)(postcss@8.4.35)(sass@1.71.1)(svelte@4.2.12)(typescript@5.3.3)
|
||||
ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.3.3)
|
||||
typescript: 5.3.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- coffeescript
|
||||
- esbuild
|
||||
- less
|
||||
- node-notifier
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/uploader.tgz(@types/node@20.11.19)(esbuild@0.20.1)(ts-node@10.9.2):
|
||||
resolution: {integrity: sha512-I9YdHj2BjihbcZe7/8XXUpXbTr08ck0ucDmczr1skY48uEorai9Amw0MB3o1UL9eyUsOFyssgglX8DLr2JTVNg==, tarball: file:projects/uploader.tgz}
|
||||
id: file:projects/uploader.tgz
|
||||
name: '@rush-temp/uploader'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/jest': 29.5.12
|
||||
'@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@uppy/core': 3.13.1
|
||||
'@uppy/dashboard': 3.9.1(@uppy/core@3.13.1)
|
||||
'@uppy/drag-drop': 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/progress-bar': 3.1.1(@uppy/core@3.13.1)
|
||||
'@uppy/screen-capture': 3.2.0(@uppy/core@3.13.1)
|
||||
'@uppy/status-bar': 3.3.3(@uppy/core@3.13.1)
|
||||
'@uppy/webcam': 3.4.2(@uppy/core@3.13.1)
|
||||
'@uppy/xhr-upload': 3.6.8(@uppy/core@3.13.1)
|
||||
eslint: 8.56.0
|
||||
eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@15.7.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint-plugin-import: 2.29.1(eslint@8.56.0)
|
||||
eslint-plugin-n: 15.7.0(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
jest: 29.7.0(@types/node@20.11.19)(ts-node@10.9.2)
|
||||
prettier: 3.2.5
|
||||
prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.12)
|
||||
svelte: 4.2.12
|
||||
ts-jest: 29.1.2(esbuild@0.20.1)(jest@29.7.0)(typescript@5.3.3)
|
||||
typescript: 5.3.3
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@jest/types'
|
||||
- '@types/node'
|
||||
- babel-jest
|
||||
- babel-plugin-macros
|
||||
- esbuild
|
||||
- node-notifier
|
||||
- supports-color
|
||||
- ts-node
|
||||
dev: false
|
||||
|
||||
file:projects/uws.tgz:
|
||||
resolution: {integrity: sha512-cJKrvv/9a935gnsLADANzT1ZcSe9j47NxbDaYX93htNBgTZRhke5VQ9zJ+hViufzd4u0aZNHRkdtnES7cPEHGw==, tarball: file:projects/uws.tgz}
|
||||
name: '@rush-temp/uws'
|
||||
|
||||
@@ -196,6 +196,9 @@
|
||||
"@hcengineering/love": "^0.6.0",
|
||||
"@hcengineering/love-assets": "^0.6.0",
|
||||
"@hcengineering/love-resources": "^0.6.0",
|
||||
"@hcengineering/uploader": "^0.6.0",
|
||||
"@hcengineering/uploader-assets": "^0.6.0",
|
||||
"@hcengineering/uploader-resources": "^0.6.0",
|
||||
"@hcengineering/sign": "^0.6.0",
|
||||
"@hcengineering/print": "^0.6.0",
|
||||
"@hcengineering/print-assets": "^0.6.0",
|
||||
|
||||
@@ -44,6 +44,7 @@ import { templatesId } from '@hcengineering/templates'
|
||||
import { timeId } from '@hcengineering/time'
|
||||
import tracker, { trackerId } from '@hcengineering/tracker'
|
||||
import uiPlugin from '@hcengineering/ui'
|
||||
import { uploaderId } from '@hcengineering/uploader'
|
||||
import view, { viewId } from '@hcengineering/view'
|
||||
import workbench, { workbenchId } from '@hcengineering/workbench'
|
||||
|
||||
@@ -92,6 +93,7 @@ import '@hcengineering/training-assets'
|
||||
import '@hcengineering/products-assets'
|
||||
import '@hcengineering/controlled-documents-assets'
|
||||
import '@hcengineering/text-editor-assets'
|
||||
import '@hcengineering/uploader-assets'
|
||||
|
||||
import { coreId } from '@hcengineering/core'
|
||||
import presentation, { parsePreviewConfig, presentationId } from '@hcengineering/presentation'
|
||||
@@ -151,6 +153,7 @@ function configureI18n(): void {
|
||||
addStringsLoader(presentationId, async (lang: string) => await import(`@hcengineering/presentation/lang/${lang}.json`))
|
||||
addStringsLoader(textEditorId, async (lang: string) => await import(`@hcengineering/text-editor-assets/lang/${lang}.json`))
|
||||
addStringsLoader(uiId, async (lang: string) => await import(`@hcengineering/ui/lang/${lang}.json`))
|
||||
addStringsLoader(uploaderId, async (lang: string) => await import(`@hcengineering/uploader-assets/lang/${lang}.json`))
|
||||
addStringsLoader(activityId, async (lang: string) => await import(`@hcengineering/activity-assets/lang/${lang}.json`))
|
||||
addStringsLoader(attachmentId, async (lang: string) => await import(`@hcengineering/attachment-assets/lang/${lang}.json`))
|
||||
addStringsLoader(bitrixId, async (lang: string) => await import(`@hcengineering/bitrix-assets/lang/${lang}.json`))
|
||||
@@ -321,6 +324,7 @@ export async function configurePlatform() {
|
||||
addLocation(loveId, () => import(/* webpackChunkName: "love" */ '@hcengineering/love-resources'))
|
||||
addLocation(printId, () => import(/* webpackChunkName: "print" */ '@hcengineering/print-resources'))
|
||||
addLocation(textEditorId, () => import(/* webpackChunkName: "text-editor" */ '@hcengineering/text-editor-resources'))
|
||||
addLocation(uploaderId, () => import(/* webpackChunkName: "uploader" */ '@hcengineering/uploader-resources'))
|
||||
|
||||
setMetadata(client.metadata.FilterModel, true)
|
||||
setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin])
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
"@hcengineering/model-templates": "^0.6.0",
|
||||
"@hcengineering/model-notification": "^0.6.0",
|
||||
"@hcengineering/model-text-editor": "^0.6.0",
|
||||
"@hcengineering/model-uploader": "^0.6.0",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/model-tags": "^0.6.0",
|
||||
|
||||
@@ -73,6 +73,7 @@ import { templatesId, createModel as templatesModel } from '@hcengineering/model
|
||||
import { textEditorId, createModel as textEditorModel } from '@hcengineering/model-text-editor'
|
||||
import { timeId, createModel as timeModel } from '@hcengineering/model-time'
|
||||
import tracker, { trackerId, createModel as trackerModel } from '@hcengineering/model-tracker'
|
||||
import { uploaderId, createModel as uploaderModel } from '@hcengineering/model-uploader'
|
||||
import view, { viewId, createModel as viewModel } from '@hcengineering/model-view'
|
||||
import workbench, { workbenchId, createModel as workbenchModel } from '@hcengineering/model-workbench'
|
||||
|
||||
@@ -239,6 +240,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
[presentationModel, presentationId],
|
||||
[templatesModel, templatesId],
|
||||
[textEditorModel, textEditorId],
|
||||
[uploaderModel, uploaderId],
|
||||
[notificationModel, notificationId],
|
||||
[preferenceModel, preferenceId],
|
||||
[
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/model-presentation": "^0.6.0"
|
||||
"@hcengineering/model-presentation": "^0.6.0",
|
||||
"@hcengineering/model-uploader": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
type DocCreateExtension,
|
||||
type DocCreateFunction,
|
||||
type DocRules,
|
||||
type FileOrBlob,
|
||||
type FilePreviewExtension,
|
||||
type ObjectSearchCategory,
|
||||
type ObjectSearchContext,
|
||||
@@ -91,7 +92,7 @@ export class TFilePreviewExtension extends TComponentPointExtension implements F
|
||||
contentType!: string | string[]
|
||||
|
||||
alignment?: string
|
||||
metadataProvider?: Resource<(file: File, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>
|
||||
metadataProvider?: Resource<(file: FileOrBlob, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>
|
||||
availabilityChecker?: Resource<() => Promise<boolean>>
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "model"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "@hcengineering/model-uploader",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"template": "@hcengineering/model-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint": "^8.54.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/model": "^0.6.11",
|
||||
"@hcengineering/model-core": "^0.6.0",
|
||||
"@hcengineering/model-presentation": "^0.6.0",
|
||||
"@hcengineering/model-workbench": "^0.6.1",
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/uploader": "^0.6.0",
|
||||
"@hcengineering/uploader-resources": "^0.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Builder } from '@hcengineering/model'
|
||||
import core from '@hcengineering/model-core'
|
||||
import presentation from '@hcengineering/model-presentation'
|
||||
import workbench from '@hcengineering/model-workbench'
|
||||
|
||||
import uploader from './plugin'
|
||||
|
||||
export { uploaderId } from '@hcengineering/uploader'
|
||||
export { uploader as default }
|
||||
|
||||
export function createModel (builder: Builder): void {
|
||||
builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, {
|
||||
extension: workbench.extensions.WorkbenchExtensions,
|
||||
component: uploader.component.WorkbenchExtension
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { mergeIds } from '@hcengineering/platform'
|
||||
import { type AnyComponent } from '@hcengineering/ui'
|
||||
import { uploaderId } from '@hcengineering/uploader'
|
||||
import uploader from '@hcengineering/uploader-resources/src/plugin'
|
||||
|
||||
export default mergeIds(uploaderId, uploader, {
|
||||
component: {
|
||||
WorkbenchExtension: '' as AnyComponent
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import { type Blob, type Doc, type Ref } from '@hcengineering/core'
|
||||
import { type IntlString, mergeIds, type Resource } from '@hcengineering/platform'
|
||||
import { type AnyComponent } from '@hcengineering/ui/src/types'
|
||||
import { type FilterFunction, type ViewAction, type ViewCategoryAction, viewId } from '@hcengineering/view'
|
||||
import { type BlobMetadata, type FilePreviewExtension } from '@hcengineering/presentation'
|
||||
import { type BlobMetadata, type FileOrBlob, type FilePreviewExtension } from '@hcengineering/presentation'
|
||||
import { type PresentationMiddlewareFactory } from '@hcengineering/presentation/src/pipeline'
|
||||
import view from '@hcengineering/view-resources/src/plugin'
|
||||
|
||||
@@ -139,8 +139,8 @@ export default mergeIds(viewId, view, {
|
||||
CanDeleteSpace: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
||||
CanJoinSpace: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
||||
CanLeaveSpace: '' as Resource<(doc?: Doc | Doc[]) => Promise<boolean>>,
|
||||
BlobImageMetadata: '' as Resource<(file: File, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>,
|
||||
BlobVideoMetadata: '' as Resource<(file: File, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>
|
||||
BlobImageMetadata: '' as Resource<(file: FileOrBlob, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>,
|
||||
BlobVideoMetadata: '' as Resource<(file: FileOrBlob, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>
|
||||
},
|
||||
pipeline: {
|
||||
PresentationMiddleware: '' as Ref<PresentationMiddlewareFactory>,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { type PopupAlignment } from '@hcengineering/ui'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
import plugin from './plugin'
|
||||
import type { BlobMetadata, FilePreviewExtension } from './types'
|
||||
import type { BlobMetadata, FileOrBlob, FilePreviewExtension } from './types'
|
||||
import { createQuery } from './utils'
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,7 @@ export async function deleteFile (id: string): Promise<void> {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export async function getFileMetadata (file: File, uuid: Ref<Blob>): Promise<BlobMetadata | undefined> {
|
||||
export async function getFileMetadata (file: FileOrBlob, uuid: Ref<Blob>): Promise<BlobMetadata | undefined> {
|
||||
const previewType = await getPreviewType(file.type, $previewTypes)
|
||||
if (previewType?.metadataProvider === undefined) {
|
||||
return undefined
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
type Tx,
|
||||
type Blob,
|
||||
type Blob as PlatformBlob,
|
||||
type Class,
|
||||
type Client,
|
||||
type Doc,
|
||||
@@ -169,6 +169,11 @@ export interface DocRules extends Doc {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type FileOrBlob = File | Blob
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
@@ -180,7 +185,7 @@ export type BlobMetadata = Record<string, any>
|
||||
export interface FilePreviewExtension extends ComponentPointExtension {
|
||||
contentType: string | string[]
|
||||
alignment?: string
|
||||
metadataProvider?: Resource<(file: File, blob: Ref<Blob>) => Promise<BlobMetadata | undefined>>
|
||||
metadataProvider?: Resource<(file: FileOrBlob, blob: Ref<PlatformBlob>) => Promise<BlobMetadata | undefined>>
|
||||
// Extension is only available if this checker returns true
|
||||
availabilityChecker?: Resource<() => Promise<boolean>>
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
"@hcengineering/panel": "^0.6.23",
|
||||
"@hcengineering/presentation": "^0.6.3",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/uploader": "^0.6.0",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/view-resources": "^0.6.0",
|
||||
"svelte": "^4.2.12",
|
||||
"fast-equals": "^5.0.1",
|
||||
"filesize": "^8.0.3"
|
||||
"fast-equals": "^5.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,20 +13,23 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { AccountRole, Ref, getCurrentAccount, hasAccountRole } from '@hcengineering/core'
|
||||
import { type Drive } from '@hcengineering/drive'
|
||||
import { createQuery } from '@hcengineering/presentation'
|
||||
import { AccountRole, Blob, Ref, getCurrentAccount, hasAccountRole } from '@hcengineering/core'
|
||||
import { createFile, type Drive } from '@hcengineering/drive'
|
||||
import { setPlatformStatus, unknownError } from '@hcengineering/platform'
|
||||
import { createQuery, FileOrBlob, getClient, getFileMetadata } from '@hcengineering/presentation'
|
||||
import { Button, ButtonWithDropdown, IconAdd, IconDropdown, Loading, SelectPopupValueType } from '@hcengineering/ui'
|
||||
import { showFilesUploadPopup } from '@hcengineering/uploader'
|
||||
|
||||
import drive from '../plugin'
|
||||
import { getFolderIdFromFragment } from '../navigation'
|
||||
import { createDrive, createFolder, uploadFiles } from '../utils'
|
||||
import { createDrive, createFolder } from '../utils'
|
||||
|
||||
export let currentSpace: Ref<Drive> | undefined
|
||||
export let currentFragment: string | undefined
|
||||
|
||||
const me = getCurrentAccount()
|
||||
|
||||
const client = getClient()
|
||||
const query = createQuery()
|
||||
|
||||
let loading = true
|
||||
@@ -63,7 +66,28 @@
|
||||
|
||||
async function handleUploadFile (): Promise<void> {
|
||||
if (currentSpace !== undefined) {
|
||||
inputFile.click()
|
||||
const space = currentSpace
|
||||
const target =
|
||||
parent !== drive.ids.Root
|
||||
? { objectId: parent, objectClass: drive.class.Folder }
|
||||
: { objectId: space, objectClass: drive.class.Drive }
|
||||
await showFilesUploadPopup(target, {}, async (uuid: string, name: string, file: FileOrBlob) => {
|
||||
try {
|
||||
const metadata = await getFileMetadata(file, uuid as Ref<Blob>)
|
||||
const data = {
|
||||
file: uuid as Ref<Blob>,
|
||||
size: file.size,
|
||||
type: file.type,
|
||||
lastModified: file instanceof File ? file.lastModified : Date.now(),
|
||||
name,
|
||||
metadata
|
||||
}
|
||||
|
||||
await createFile(client, space, parent, data)
|
||||
} catch (err) {
|
||||
void setPlatformStatus(unknownError(err))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,43 +103,11 @@
|
||||
{ id: drive.string.UploadFile, label: drive.string.UploadFile, icon: drive.icon.File }
|
||||
// { id: drive.string.UploadFolder, label: drive.string.UploadFolder }
|
||||
]
|
||||
|
||||
let progress = false
|
||||
let inputFile: HTMLInputElement
|
||||
|
||||
async function fileSelected (): Promise<void> {
|
||||
if (currentSpace === undefined) {
|
||||
return
|
||||
}
|
||||
|
||||
const list = inputFile.files
|
||||
if (list === null || list.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
progress = true
|
||||
|
||||
await uploadFiles(list, currentSpace, parent)
|
||||
|
||||
inputFile.value = ''
|
||||
progress = false
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if loading}
|
||||
<Loading shrink />
|
||||
{:else}
|
||||
<input
|
||||
bind:this={inputFile}
|
||||
disabled={inputFile == null}
|
||||
multiple
|
||||
type="file"
|
||||
name="file"
|
||||
id="file"
|
||||
style="display: none"
|
||||
on:change={fileSelected}
|
||||
/>
|
||||
|
||||
<div class="antiNav-subheader">
|
||||
{#if hasDrive}
|
||||
<ButtonWithDropdown
|
||||
@@ -126,7 +118,7 @@
|
||||
mainButtonId={'new-document'}
|
||||
dropdownIcon={IconDropdown}
|
||||
{dropdownItems}
|
||||
disabled={currentSpace === undefined || progress}
|
||||
disabled={currentSpace === undefined}
|
||||
on:click={handleUploadFile}
|
||||
on:dropdown-selected={(ev) => {
|
||||
void handleDropdownItemSelected(ev.detail)
|
||||
@@ -140,7 +132,6 @@
|
||||
width={'100%'}
|
||||
kind={'primary'}
|
||||
gap={'large'}
|
||||
disabled={progress}
|
||||
on:click={handleCreateDrive}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -13,15 +13,18 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { type Ref } from '@hcengineering/core'
|
||||
import { type Drive, type Folder } from '@hcengineering/drive'
|
||||
|
||||
import { uploadFiles } from '../utils'
|
||||
import { type Blob, type Ref } from '@hcengineering/core'
|
||||
import drive, { createFile, type Drive, type Folder } from '@hcengineering/drive'
|
||||
import { setPlatformStatus, unknownError } from '@hcengineering/platform'
|
||||
import { FileOrBlob, getClient, getFileMetadata } from '@hcengineering/presentation'
|
||||
import { uploadFiles } from '@hcengineering/uploader'
|
||||
|
||||
export let space: Ref<Drive>
|
||||
export let parent: Ref<Folder>
|
||||
export let canDrop: ((e: DragEvent) => boolean) | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
|
||||
let dragover = false
|
||||
let counter = 0
|
||||
|
||||
@@ -63,12 +66,30 @@
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
// progress = true
|
||||
const list = e.dataTransfer?.files
|
||||
if (list !== undefined && list.length !== 0) {
|
||||
await uploadFiles(list, space, parent)
|
||||
const target =
|
||||
parent !== drive.ids.Root
|
||||
? { objectId: parent, objectClass: drive.class.Folder }
|
||||
: { objectId: space, objectClass: drive.class.Drive }
|
||||
await uploadFiles(list, target, {}, async (uuid: string, name: string, file: FileOrBlob) => {
|
||||
try {
|
||||
const metadata = await getFileMetadata(file, uuid as Ref<Blob>)
|
||||
const data = {
|
||||
file: uuid as Ref<Blob>,
|
||||
size: file.size,
|
||||
type: file.type,
|
||||
lastModified: file instanceof File ? file.lastModified : Date.now(),
|
||||
name,
|
||||
metadata
|
||||
}
|
||||
|
||||
await createFile(client, space, parent, data)
|
||||
} catch (err) {
|
||||
void setPlatformStatus(unknownError(err))
|
||||
}
|
||||
})
|
||||
}
|
||||
// progress = false
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import { type IntlString, mergeIds } from '@hcengineering/platform'
|
||||
import drive, { driveId } from '@hcengineering/drive'
|
||||
|
||||
export default mergeIds(driveId, drive, {
|
||||
component: {},
|
||||
string: {
|
||||
CreateDrive: '' as IntlString,
|
||||
CreateFolder: '' as IntlString,
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
"y-protocols": "^1.0.6",
|
||||
"y-prosemirror": "^1.2.1",
|
||||
"yjs": "^13.5.52",
|
||||
"filesize": "^8.0.3",
|
||||
"fast-equals": "^5.0.1",
|
||||
"rfc6902": "^5.0.1",
|
||||
"diff": "^5.1.0",
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
//
|
||||
import { FilePreviewPopup, getFileUrl } from '@hcengineering/presentation'
|
||||
import { FileNode, type FileOptions as FileNodeOptions } from '@hcengineering/text'
|
||||
import { showPopup } from '@hcengineering/ui'
|
||||
import { humanReadableFileSize, showPopup } from '@hcengineering/ui'
|
||||
import { nodeInputRule } from '@tiptap/core'
|
||||
import { Plugin, PluginKey } from '@tiptap/pm/state'
|
||||
import filesize from 'filesize'
|
||||
import { type FileAttachFunction } from './types'
|
||||
|
||||
const attachIcon =
|
||||
@@ -96,7 +95,7 @@ export const FileExtension = FileNode.extend<FileOptions>({
|
||||
'div',
|
||||
nodeAttributes,
|
||||
['div', { class: 'file-name-container' }, icon, ['a', linkAttributes, `${fileName}`]],
|
||||
['div', { class: 'file-size' }, `${filesize(size)}`]
|
||||
['div', { class: 'file-size' }, `${humanReadableFileSize(size)}`]
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"filesize": "^8.0.3",
|
||||
"yjs": "^13.5.52"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/assets/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "assets"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "Cancel",
|
||||
"Retry": "Retry",
|
||||
"UploadingTo": "Uploading {files, plural, =1 {# file} other {# files}} to"
|
||||
},
|
||||
"status": {
|
||||
"Error": "Error",
|
||||
"Waiting": "Waiting",
|
||||
"Uploading": "Uploading",
|
||||
"Completed": "Completed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "Cancelar",
|
||||
"Retry": "Reintentar",
|
||||
"UploadingTo": "Cargando {files, plural, =1 {# archivo} other {# archivos}} a"
|
||||
},
|
||||
"status": {
|
||||
"Error": "Error",
|
||||
"Waiting": "Esperando",
|
||||
"Uploading": "Cargando",
|
||||
"Completed": "Completado"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "Annuler",
|
||||
"Retry": "Réessayer",
|
||||
"UploadingTo": "Téléchargement de {files, plural, =1 {# fichier} other {# fichiers}} vers"
|
||||
},
|
||||
"status": {
|
||||
"Error": "Erreur",
|
||||
"Waiting": "En attente",
|
||||
"Uploading": "Téléchargement",
|
||||
"Completed": "Terminé"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "Cancelar",
|
||||
"Retry": "Reintentar",
|
||||
"UploadingTo": "Enviando {files, plural, =1 {# archivo} other {# archivos}} a"
|
||||
},
|
||||
"status": {
|
||||
"Error": "Error",
|
||||
"Waiting": "Esperando",
|
||||
"Uploading": "Enviando",
|
||||
"Completed": "Completado"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "Отмена",
|
||||
"Retry": "Повторить",
|
||||
"UploadingTo": "Загрузка {files, plural, one {# файл} few {# файла} other {# файлов}} в"
|
||||
},
|
||||
"status": {
|
||||
"Error": "Ошибка",
|
||||
"Waiting": "Ожидание",
|
||||
"Uploading": "Загрузка",
|
||||
"Completed": "Завершено"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"string": {
|
||||
"Cancel": "取消",
|
||||
"Retry": "重试",
|
||||
"UploadingTo": "上传 {files, plural, =1 {# 文件} other {# 文件}} 至"
|
||||
},
|
||||
"status": {
|
||||
"Error": "错误",
|
||||
"Waiting": "等待中",
|
||||
"Uploading": "上传中",
|
||||
"Completed": "已完成"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@hcengineering/uploader-assets",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"template": "@hcengineering/assets-package",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"build:docs": "",
|
||||
"format": "format src",
|
||||
"build:watch": "compile",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"@types/node": "~20.11.16",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/uploader": "^0.6.0"
|
||||
},
|
||||
"repository": "https://github.com/hcenginneing/anticrm",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { makeLocalesTest } from '@hcengineering/platform'
|
||||
|
||||
it(
|
||||
'Locales are equale',
|
||||
makeLocalesTest((lang) => import(`../../lang/${lang}.json`))
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/assets/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"types": ["node", "jest"],
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'],
|
||||
parserOptions: { tsconfigRootDir: __dirname }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"trailingComma": "none",
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"printWidth": 120,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"proseWrap": "preserve",
|
||||
"plugins": [
|
||||
"prettier-plugin-svelte"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.svelte",
|
||||
"options": {
|
||||
"parser": "svelte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig",
|
||||
"rigProfile": "ui"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)']
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "@hcengineering/uploader-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile ui",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"format": "format src",
|
||||
"svelte-check": "do-svelte-check",
|
||||
"_phase:svelte-check": "do-svelte-check",
|
||||
"build:watch": "compile ui",
|
||||
"_phase:build": "compile ui",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.2.0",
|
||||
"sass": "^1.53.0",
|
||||
"svelte-preprocess": "^5.1.3",
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"prettier-plugin-svelte": "^3.2.2",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"svelte-check": "^3.6.9",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5",
|
||||
"svelte-eslint-parser": "^0.33.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/presentation": "^0.6.3",
|
||||
"@hcengineering/theme": "^0.6.5",
|
||||
"@hcengineering/ui": "^0.6.15",
|
||||
"@hcengineering/view": "^0.6.13",
|
||||
"@hcengineering/view-resources": "^0.6.0",
|
||||
"@hcengineering/uploader": "^0.6.0",
|
||||
"svelte": "^4.2.12",
|
||||
"@uppy/core": "^3.13.1",
|
||||
"@uppy/drag-drop": "^3.1.1",
|
||||
"@uppy/dashboard": "^3.9.1",
|
||||
"@uppy/status-bar": "^3.3.3",
|
||||
"@uppy/progress-bar": "^3.1.1",
|
||||
"@uppy/screen-capture": "^3.2.0",
|
||||
"@uppy/webcam": "^3.4.2",
|
||||
"@uppy/xhr-upload": "^3.6.8",
|
||||
"@uppy/locales": "^4.0.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import FileUploadStatusBar from './FileUploadStatusBar.svelte'
|
||||
import { uploads } from '../store'
|
||||
</script>
|
||||
|
||||
<div class="flex-row-center flex-gap-2">
|
||||
{#each $uploads as upload}
|
||||
<FileUploadStatusBar {upload} />
|
||||
{/each}
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { themeStore } from '@hcengineering/ui'
|
||||
|
||||
import { type Uppy } from '@uppy/core'
|
||||
import Dashboard from '@uppy/dashboard'
|
||||
import { onMount, onDestroy, createEventDispatcher } from 'svelte'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let uppy: Uppy<any, any>
|
||||
|
||||
let container: HTMLElement
|
||||
|
||||
$: dark = $themeStore.dark
|
||||
|
||||
function handleUpload (): void {
|
||||
dispatch('close', true)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
uppy.on('upload', handleUpload)
|
||||
|
||||
uppy.use(Dashboard, {
|
||||
id: 'huly:Dashboard',
|
||||
target: container,
|
||||
inline: true,
|
||||
width: 750,
|
||||
disableInformer: true,
|
||||
proudlyDisplayPoweredByUppy: false,
|
||||
theme: dark ? 'dark' : 'light'
|
||||
})
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
uppy.off('upload', handleUpload)
|
||||
const dashboard = uppy.getPlugin('huly:Dashboard')
|
||||
if (dashboard !== undefined) {
|
||||
uppy.removePlugin(dashboard)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="uppy-Container" bind:this={container} />
|
||||
|
||||
<style lang="scss">
|
||||
@import '@uppy/core/dist/style.min.css';
|
||||
@import '@uppy/dashboard/dist/style.min.css';
|
||||
@import '@uppy/drag-drop/dist/style.min.css';
|
||||
@import '@uppy/progress-bar/dist/style.min.css';
|
||||
@import '@uppy/screen-capture/dist/style.min.css';
|
||||
@import '@uppy/webcam/dist/style.min.css';
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
import { ProgressCircle, showPopup, tooltip } from '@hcengineering/ui'
|
||||
import { type State as UppyState } from '@uppy/core'
|
||||
import { onDestroy, onMount } from 'svelte'
|
||||
|
||||
import { type FileUpload } from '../store'
|
||||
|
||||
import IconError from './icons/Error.svelte'
|
||||
import FileUploadStatusPopup from './FileUploadStatusPopup.svelte'
|
||||
|
||||
export let upload: FileUpload
|
||||
|
||||
let state: UppyState<any, any> = upload.uppy.getState()
|
||||
let progress: number = state.totalProgress
|
||||
|
||||
$: files = Object.values(state.files)
|
||||
$: filesTotal = files.length
|
||||
$: filesComplete = files.filter((p) => p.progress?.uploadComplete).length
|
||||
|
||||
function handleProgress (totalProgress: number): void {
|
||||
progress = totalProgress
|
||||
}
|
||||
|
||||
function handleUploadProgress (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleUploadSuccess (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleFileRemoved (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleError (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
upload.uppy.on('error', handleError)
|
||||
upload.uppy.on('progress', handleProgress)
|
||||
upload.uppy.on('upload-progress', handleUploadProgress)
|
||||
upload.uppy.on('upload-success', handleUploadSuccess)
|
||||
upload.uppy.on('file-removed', handleFileRemoved)
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
upload.uppy.off('error', handleError)
|
||||
upload.uppy.off('progress', handleProgress)
|
||||
upload.uppy.off('upload-progress', handleUploadProgress)
|
||||
upload.uppy.off('upload-success', handleUploadSuccess)
|
||||
upload.uppy.off('file-removed', handleFileRemoved)
|
||||
})
|
||||
|
||||
function handleClick (ev: MouseEvent): void {
|
||||
showPopup(FileUploadStatusPopup, { upload }, ev.currentTarget as HTMLElement)
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="container flex-row-center flex-gap-2 active"
|
||||
class:error={state.error}
|
||||
on:click={handleClick}
|
||||
use:tooltip={state.error != null ? { label: getEmbeddedLabel(state.error) } : undefined}
|
||||
>
|
||||
{#if state.error}
|
||||
<IconError size={'small'} fill={'var(--negative-button-default)'} />
|
||||
{:else}
|
||||
<ProgressCircle value={progress} size={'small'} primary />
|
||||
{/if}
|
||||
<span>{progress}%</span>
|
||||
{#if filesTotal > 0}
|
||||
<span>{filesComplete}/{filesTotal}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
padding: 0.125rem 0.5rem;
|
||||
height: 1.625rem;
|
||||
font-weight: 500;
|
||||
background-color: var(--theme-button-pressed);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 0.25rem;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--theme-button-hovered);
|
||||
border-color: var(--theme-navpanel-divider);
|
||||
}
|
||||
|
||||
&.active {
|
||||
order: -1;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.125rem 0.5rem;
|
||||
background-color: var(--highlight-select);
|
||||
border-color: var(--highlight-select-border);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--highlight-select-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&.error {
|
||||
background-color: var(--system-error-60-color);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--system-error-60-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,216 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
import {
|
||||
Button,
|
||||
IconClose,
|
||||
ProgressCircle,
|
||||
Label,
|
||||
humanReadableFileSize as filesize,
|
||||
tooltip
|
||||
} from '@hcengineering/ui'
|
||||
import { ObjectPresenter } from '@hcengineering/view-resources'
|
||||
import type { UppyFile, State as UppyState } from '@uppy/core'
|
||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte'
|
||||
|
||||
import IconCompleted from './icons/Completed.svelte'
|
||||
import IconError from './icons/Error.svelte'
|
||||
import IconRetry from './icons/Retry.svelte'
|
||||
|
||||
import uploader from '../plugin'
|
||||
import { type FileUpload } from '../store'
|
||||
|
||||
export let upload: FileUpload
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let state: UppyState<any, any> = upload.uppy.getState()
|
||||
|
||||
$: files = Object.values(state.files)
|
||||
$: capabilities = state.capabilities ?? {}
|
||||
$: individualCancellation = 'individualCancellation' in capabilities && capabilities.individualCancellation
|
||||
|
||||
function handleComplete (): void {
|
||||
if (upload.uppy.getState().error === undefined) {
|
||||
dispatch('close')
|
||||
}
|
||||
}
|
||||
|
||||
function handleUploadError (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleUploadProgress (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleUploadSuccess (): void {
|
||||
state = upload.uppy.getState()
|
||||
}
|
||||
|
||||
function handleFileRemoved (): void {
|
||||
state = upload.uppy.getState()
|
||||
const files = upload.uppy.getFiles()
|
||||
if (files.length === 0) {
|
||||
dispatch('close')
|
||||
}
|
||||
}
|
||||
|
||||
function handleCancelFile (file: UppyFile<any, any>): void {
|
||||
upload.uppy.removeFile(file.id)
|
||||
}
|
||||
|
||||
function handleRetryFile (file: UppyFile<any, any>): void {
|
||||
void upload.uppy.retryUpload(file.id)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
upload.uppy.on('complete', handleComplete)
|
||||
upload.uppy.on('upload-error', handleUploadError)
|
||||
upload.uppy.on('upload-progress', handleUploadProgress)
|
||||
upload.uppy.on('upload-success', handleUploadSuccess)
|
||||
upload.uppy.on('file-removed', handleFileRemoved)
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
upload.uppy.off('complete', handleComplete)
|
||||
upload.uppy.off('upload-error', handleUploadError)
|
||||
upload.uppy.off('upload-progress', handleUploadProgress)
|
||||
upload.uppy.off('upload-success', handleUploadSuccess)
|
||||
upload.uppy.off('file-removed', handleFileRemoved)
|
||||
})
|
||||
|
||||
function getFileError (file: UppyFile<any, any>): string | undefined {
|
||||
return 'error' in file ? (file.error as string) : undefined
|
||||
}
|
||||
|
||||
function getFilePercentage (file: UppyFile<any, any>): number {
|
||||
return file.progress != null
|
||||
? file.progress.uploadComplete
|
||||
? 100
|
||||
: file.progress.uploadStarted != null
|
||||
? file.progress.percentage ?? 50
|
||||
: 0
|
||||
: 0
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="antiPopup upload-popup">
|
||||
<div class="upload-popup__header flex-row-center flex-gap-1">
|
||||
<Label label={uploader.string.UploadingTo} params={{ files: files.length }} />
|
||||
<ObjectPresenter
|
||||
objectId={upload.target.objectId}
|
||||
_class={upload.target.objectClass}
|
||||
shouldShowAvatar={false}
|
||||
accent
|
||||
noUnderline
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-col flex-gap-4">
|
||||
{#each files as file}
|
||||
{#if file.progress}
|
||||
{@const error = getFileError(file)}
|
||||
{@const percentage = getFilePercentage(file)}
|
||||
|
||||
<div class="upload-file-row flex-row-center justify-start flex-gap-4">
|
||||
<div class="upload-file-row__status w-4">
|
||||
{#if error}
|
||||
<IconError size={'small'} fill={'var(--negative-button-default)'} />
|
||||
{:else if file.progress.uploadComplete}
|
||||
<IconCompleted size={'small'} fill={'var(--positive-button-default)'} />
|
||||
{:else}
|
||||
<ProgressCircle value={percentage} size={'small'} primary />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="upload-file-row__content flex-col flex-gap-1">
|
||||
<div class="label overflow-label" use:tooltip={{ label: getEmbeddedLabel(file.name) }}>{file.name}</div>
|
||||
<div class="flex-row-center flex-gap-2 text-sm">
|
||||
{#if error}
|
||||
<Label label={uploader.status.Error} />
|
||||
<span class="label overflow-label" use:tooltip={{ label: getEmbeddedLabel(error) }}>{error}</span>
|
||||
{:else if file.progress.uploadStarted != null}
|
||||
{#if file.progress.uploadComplete}
|
||||
<Label label={uploader.status.Completed} />
|
||||
{#if file.progress.bytesTotal}
|
||||
<span>{filesize(file.progress.bytesTotal)}</span>
|
||||
{/if}
|
||||
{:else}
|
||||
<Label label={uploader.status.Uploading} />
|
||||
{#if file.progress.bytesTotal}
|
||||
<span>{filesize(file.progress.bytesUploaded)} / {filesize(file.progress.bytesTotal)}</span>
|
||||
{:else}
|
||||
<span>{filesize(file.progress.bytesUploaded)}}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
<Label label={uploader.status.Waiting} />
|
||||
{#if file.progress.bytesTotal}
|
||||
<span>{filesize(file.progress.bytesTotal)}</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="upload-file-row__tools flex-row-center">
|
||||
{#if error}
|
||||
<Button
|
||||
kind={'icon'}
|
||||
icon={IconRetry}
|
||||
iconProps={{ size: 'small' }}
|
||||
showTooltip={{ label: uploader.string.Retry }}
|
||||
on:click={() => {
|
||||
handleRetryFile(file)
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
{#if !file.progress.uploadComplete && individualCancellation}
|
||||
<Button
|
||||
kind={'icon'}
|
||||
icon={IconClose}
|
||||
iconProps={{ size: 'small' }}
|
||||
showTooltip={{ label: uploader.string.Cancel }}
|
||||
on:click={() => {
|
||||
handleCancelFile(file)
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-popup {
|
||||
padding: var(--spacing-2);
|
||||
|
||||
.upload-popup__header {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-file-row {
|
||||
.upload-file-row__content {
|
||||
flex-grow: 2;
|
||||
}
|
||||
|
||||
.upload-file-row__tools {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { rootBarExtensions } from '@hcengineering/ui'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
import uploader from '../plugin'
|
||||
|
||||
let parentElement: HTMLDivElement
|
||||
|
||||
onMount(() => {
|
||||
rootBarExtensions.update((cur) => {
|
||||
if (cur.find((p) => p[1] === uploader.component.FileUploadExt) === undefined) {
|
||||
cur.push(['right', uploader.component.FileUploadExt])
|
||||
}
|
||||
return cur
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<div bind:this={parentElement}></div>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
export let fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M16 2C13.2311 2 10.5243 2.82109 8.22202 4.35943C5.91973 5.89777 4.12532 8.08427 3.06569 10.6424C2.00607 13.2006 1.72882 16.0155 2.26901 18.7313C2.80921 21.447 4.14258 23.9416 6.10051 25.8995C8.05845 27.8574 10.553 29.1908 13.2687 29.731C15.9845 30.2712 18.7994 29.9939 21.3576 28.9343C23.9157 27.8747 26.1022 26.0803 27.6406 23.778C29.1789 21.4757 30 18.7689 30 16C30 12.287 28.525 8.72601 25.8995 6.1005C23.274 3.475 19.713 2 16 2ZM16 28C13.6266 28 11.3066 27.2962 9.33316 25.9776C7.35977 24.6591 5.8217 22.7849 4.91345 20.5922C4.0052 18.3995 3.76756 15.9867 4.23058 13.6589C4.69361 11.3311 5.83649 9.19295 7.51472 7.51472C9.19296 5.83649 11.3312 4.6936 13.6589 4.23058C15.9867 3.76755 18.3995 4.00519 20.5922 4.91345C22.7849 5.8217 24.6591 7.35977 25.9776 9.33316C27.2962 11.3065 28 13.6266 28 16C28 19.1826 26.7357 22.2348 24.4853 24.4853C22.2348 26.7357 19.1826 28 16 28Z"
|
||||
/>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M22.7071 11.2931C23.0976 11.6837 23.0976 12.3168 22.7071 12.7074L14.7071 20.7074C14.3166 21.0979 13.6834 21.0979 13.2929 20.7074L9.29289 16.7074C8.90237 16.3168 8.90237 15.6837 9.29289 15.2931C9.68342 14.9026 10.3166 14.9026 10.7071 15.2931L14 18.586L21.2929 11.2931C21.6834 10.9026 22.3166 10.9026 22.7071 11.2931Z"
|
||||
/>
|
||||
</svg>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
export let fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M16 2C8.2 2 2 8.2 2 16C2 23.8 8.2 30 16 30C23.8 30 30 23.8 30 16C30 8.2 23.8 2 16 2ZM16 28C9.4 28 4 22.6 4 16C4 9.4 9.4 4 16 4C22.6 4 28 9.4 28 16C28 22.6 22.6 28 16 28Z"
|
||||
/>
|
||||
<path
|
||||
d="M9.29289 9.29314C8.90237 9.68366 8.90237 10.3168 9.29289 10.7074L14.5858 16.0002L9.29289 21.2931C8.90237 21.6837 8.90237 22.3168 9.29289 22.7074C9.68342 23.0979 10.3166 23.0979 10.7071 22.7074L16 17.4145L21.2929 22.7074C21.6834 23.0979 22.3166 23.0979 22.7071 22.7074C23.0976 22.3168 23.0976 21.6837 22.7071 21.2931L17.4142 16.0002L22.7071 10.7074C23.0976 10.3168 23.0976 9.68366 22.7071 9.29314C22.3166 8.90261 21.6834 8.90261 21.2929 9.29314L16 14.586L10.7071 9.29314C10.3166 8.90261 9.68342 8.90261 9.29289 9.29314Z"
|
||||
/>
|
||||
</svg>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
export let size: 'small' | 'medium' | 'large'
|
||||
export let fill: string = 'currentColor'
|
||||
</script>
|
||||
|
||||
<svg class="svg-{size}" {fill} viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M27 18C26.4477 18 26.0052 18.4488 25.9501 18.9984C25.787 20.6234 25.2277 22.1893 24.3147 23.5557C23.2159 25.2002 21.6541 26.4819 19.8268 27.2388C17.9996 27.9957 15.9889 28.1937 14.0491 27.8079C12.1093 27.422 10.3275 26.4696 8.92894 25.0711C7.53041 23.6725 6.578 21.8907 6.19215 19.9509C5.8063 18.0111 6.00433 16.0004 6.76121 14.1732C7.51809 12.3459 8.79981 10.7841 10.4443 9.6853C12.0888 8.58649 14.0222 8 16 8H22.1821L18.5977 11.5854L20 13L26 7L20 1L18.5977 2.414L22.1851 6H16C13.6266 6 11.3066 6.70379 9.33316 8.02236C7.35977 9.34094 5.8217 11.2151 4.91345 13.4078C4.0052 15.6005 3.76756 18.0133 4.23058 20.3411C4.6936 22.6689 5.83649 24.8071 7.51472 26.4853C9.19295 28.1635 11.3312 29.3064 13.6589 29.7694C15.9867 30.2324 18.3995 29.9948 20.5922 29.0866C22.7849 28.1783 24.6591 26.6402 25.9776 24.6668C27.1105 22.9714 27.7895 21.0201 27.9584 18.9989C28.0043 18.4485 27.5523 18 27 18Z"
|
||||
/>
|
||||
</svg>
|
||||
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type Resources } from '@hcengineering/platform'
|
||||
|
||||
import FileUploadExt from './components/FileUploadExt.svelte'
|
||||
import WorkbenchExtension from './components/WorkbenchExtension.svelte'
|
||||
|
||||
import { showFilesUploadPopup, uploadFiles } from './utils'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {
|
||||
FileUploadExt,
|
||||
WorkbenchExtension
|
||||
},
|
||||
function: {
|
||||
ShowFilesUploadPopup: showFilesUploadPopup,
|
||||
UploadFiles: uploadFiles
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type IntlString, mergeIds } from '@hcengineering/platform'
|
||||
import { type AnyComponent } from '@hcengineering/ui'
|
||||
import uploader, { uploaderId } from '@hcengineering/uploader'
|
||||
|
||||
export default mergeIds(uploaderId, uploader, {
|
||||
component: {
|
||||
FileUploadExt: '' as AnyComponent
|
||||
},
|
||||
string: {
|
||||
UploadingTo: '' as IntlString
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { type FileUploadTarget } from '@hcengineering/uploader'
|
||||
|
||||
import { type Uppy } from '@uppy/core'
|
||||
import { type Writable, writable } from 'svelte/store'
|
||||
|
||||
/** @public */
|
||||
export interface FileUpload {
|
||||
target: FileUploadTarget
|
||||
uppy: Uppy
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export const uploads: Writable<FileUpload[]> = writable([])
|
||||
|
||||
/** @public */
|
||||
export function dockFileUpload (target: FileUploadTarget, uppy: Uppy): void {
|
||||
uploads.update((instances) => {
|
||||
instances.push({ target, uppy })
|
||||
return instances
|
||||
})
|
||||
|
||||
uppy.on('complete', () => {
|
||||
undockFileUploadIfCompleted(target, uppy)
|
||||
})
|
||||
|
||||
uppy.on('file-removed', () => {
|
||||
undockFileUploadIfCompleted(target, uppy)
|
||||
})
|
||||
}
|
||||
|
||||
function undockFileUploadIfCompleted (target: FileUploadTarget, uppy: Uppy): void {
|
||||
const files = uppy.getFiles()
|
||||
const incompleted = files.filter((p) => p.progress?.uploadComplete !== true)
|
||||
if (incompleted.length === 0) {
|
||||
undockFileUpload(target, uppy)
|
||||
}
|
||||
}
|
||||
|
||||
function undockFileUpload (target: FileUploadTarget, uppy: Uppy): void {
|
||||
uppy.cancelAll()
|
||||
uppy.close()
|
||||
|
||||
uploads.update((instances) => {
|
||||
return instances.filter((instance) => instance.uppy !== uppy)
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { generateId } from '@hcengineering/core'
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import presentation from '@hcengineering/presentation'
|
||||
import { getCurrentLanguage } from '@hcengineering/theme'
|
||||
import type { FileUploadCallback, FileUploadOptions } from '@hcengineering/uploader'
|
||||
|
||||
import Uppy, { type IndexedObject, type UppyOptions } from '@uppy/core'
|
||||
import ScreenCapture from '@uppy/screen-capture'
|
||||
import Webcam from '@uppy/webcam'
|
||||
import XHR from '@uppy/xhr-upload'
|
||||
|
||||
import En from '@uppy/locales/lib/en_US'
|
||||
import Fr from '@uppy/locales/lib/fr_FR'
|
||||
import Es from '@uppy/locales/lib/es_ES'
|
||||
import Pt from '@uppy/locales/lib/pt_PT'
|
||||
import Ru from '@uppy/locales/lib/ru_RU'
|
||||
import Zh from '@uppy/locales/lib/zh_CN'
|
||||
|
||||
type Locale = UppyOptions['locale']
|
||||
|
||||
const locales: Record<string, Locale> = {
|
||||
en: En,
|
||||
fr: Fr,
|
||||
pt: Pt,
|
||||
es: Es,
|
||||
ru: Ru,
|
||||
zh: Zh
|
||||
}
|
||||
|
||||
function getUppyLocale (lang: string): Locale {
|
||||
return locales[lang] ?? En
|
||||
}
|
||||
|
||||
// For Uppy 4.0 compatibility
|
||||
type Meta = IndexedObject<any>
|
||||
type Body = IndexedObject<any>
|
||||
|
||||
/** @public */
|
||||
export type UppyMeta = Meta
|
||||
|
||||
/** @public */
|
||||
export type UppyBody = Body & {
|
||||
uuid: string
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export function getUppy (options: FileUploadOptions, onFileUploaded?: FileUploadCallback): Uppy<UppyMeta, UppyBody> {
|
||||
const id = generateId()
|
||||
const locale = getUppyLocale(getCurrentLanguage())
|
||||
const uppy = new Uppy<UppyMeta, UppyBody>({ id, locale, ...options })
|
||||
.use(ScreenCapture)
|
||||
.use(Webcam)
|
||||
.use(XHR, {
|
||||
endpoint: getMetadata(presentation.metadata.UploadURL) ?? '',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: 'Bearer ' + (getMetadata(presentation.metadata.Token) as string)
|
||||
},
|
||||
getResponseData: (body: string): UppyBody => {
|
||||
return {
|
||||
uuid: body
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (onFileUploaded != null) {
|
||||
uppy.addPostProcessor(async (fileIds: string[]) => {
|
||||
for (const fileId of fileIds) {
|
||||
const file = uppy.getFile(fileId)
|
||||
const uuid = file?.response?.body?.uuid
|
||||
if (uuid !== undefined) {
|
||||
await onFileUploaded(uuid, file.name, file.data)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return uppy
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { showPopup } from '@hcengineering/ui'
|
||||
import type { FileUploadCallback, FileUploadOptions, FileUploadTarget } from '@hcengineering/uploader'
|
||||
|
||||
import FileUploadPopup from './components/FileUploadPopup.svelte'
|
||||
|
||||
import { dockFileUpload } from './store'
|
||||
import { getUppy } from './uppy'
|
||||
|
||||
/** @public */
|
||||
export async function showFilesUploadPopup (
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
): Promise<void> {
|
||||
const uppy = getUppy(options, onFileUploaded)
|
||||
|
||||
showPopup(FileUploadPopup, { uppy, target }, undefined, (res) => {
|
||||
if (res === true && options.hideProgress !== true) {
|
||||
dockFileUpload(target, uppy)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export async function uploadFiles (
|
||||
files: File[] | FileList,
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
): Promise<void> {
|
||||
if (files.length === 0) return
|
||||
|
||||
const uppy = getUppy(options, onFileUploaded)
|
||||
|
||||
for (let index = 0; index < files.length; index++) {
|
||||
const data = files[index]
|
||||
const { name, type } = data
|
||||
uppy.addFile({ name, type, data })
|
||||
}
|
||||
|
||||
if (options.hideProgress !== true) {
|
||||
dockFileUpload(target, uppy)
|
||||
}
|
||||
|
||||
await uppy.upload()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
"rigPackageName": "@hcengineering/platform-rig"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
roots: ["./src"],
|
||||
coverageReporters: ["text-summary", "html"]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@hcengineering/uploader",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"svelte": "src/index.ts",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"lib/**/*",
|
||||
"types/**/*",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"author": "Hardcore Engineering Inc.",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "compile",
|
||||
"build:watch": "compile",
|
||||
"format": "format src",
|
||||
"test": "jest --passWithNoTests --silent",
|
||||
"_phase:build": "compile transpile src",
|
||||
"_phase:test": "jest --passWithNoTests --silent",
|
||||
"_phase:format": "format src",
|
||||
"_phase:validate": "compile validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hcengineering/platform-rig": "^0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
"@typescript-eslint/parser": "^6.11.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-n": "^15.4.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint": "^8.54.0",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.3.3",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.1",
|
||||
"@types/jest": "^29.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/platform": "^0.6.11",
|
||||
"@hcengineering/core": "^0.6.32",
|
||||
"@hcengineering/ui": "^0.6.15"
|
||||
},
|
||||
"repository": "https://github.com/hcengineering/platform",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { uploaderId, uploaderPlugin } from './plugin'
|
||||
|
||||
export * from './types'
|
||||
export * from './utils'
|
||||
|
||||
export { uploaderId }
|
||||
export default uploaderPlugin
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { IntlString, Plugin, Resource } from '@hcengineering/platform'
|
||||
import { plugin } from '@hcengineering/platform'
|
||||
import type { AnyComponent } from '@hcengineering/ui'
|
||||
|
||||
import type { UploadFilesFn, UploadFilesPopupFn } from './types'
|
||||
|
||||
/** @public */
|
||||
export const uploaderId = 'uploader' as Plugin
|
||||
|
||||
export const uploaderPlugin = plugin(uploaderId, {
|
||||
component: {
|
||||
FileUploadPopup: '' as AnyComponent
|
||||
},
|
||||
status: {
|
||||
Waiting: '' as IntlString,
|
||||
Uploading: '' as IntlString,
|
||||
Completed: '' as IntlString,
|
||||
Error: '' as IntlString
|
||||
},
|
||||
string: {
|
||||
Cancel: '' as IntlString,
|
||||
Retry: '' as IntlString
|
||||
},
|
||||
function: {
|
||||
ShowFilesUploadPopup: '' as Resource<UploadFilesPopupFn>,
|
||||
UploadFiles: '' as Resource<UploadFilesFn>
|
||||
}
|
||||
})
|
||||
|
||||
export default uploaderPlugin
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Class, Doc, Ref } from '@hcengineering/core'
|
||||
|
||||
/** @public */
|
||||
export type UploadFilesPopupFn = (
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
) => Promise<void>
|
||||
|
||||
/** @public */
|
||||
export type UploadFilesFn = (
|
||||
files: File[] | FileList,
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
) => Promise<void>
|
||||
|
||||
/** @public */
|
||||
export interface FileUploadTarget {
|
||||
objectId: Ref<Doc>
|
||||
objectClass: Ref<Class<Doc>>
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface FileUploadOptions {
|
||||
maxFileSize?: number
|
||||
maxNumberOfFiles?: number
|
||||
allowedFileTypes?: string
|
||||
hideProgress?: boolean
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export type FileUploadCallback = (uuid: string, name: string, file: File | Blob) => Promise<void>
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Copyright © 2024 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { getResource } from '@hcengineering/platform'
|
||||
|
||||
import uploader from './plugin'
|
||||
import type { FileUploadCallback, FileUploadOptions, FileUploadTarget } from './types'
|
||||
|
||||
/** @public */
|
||||
export async function showFilesUploadPopup (
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
): Promise<void> {
|
||||
const fn = await getResource(uploader.function.ShowFilesUploadPopup)
|
||||
await fn(target, options, onFileUploaded)
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export async function uploadFiles (
|
||||
files: File[] | FileList,
|
||||
target: FileUploadTarget,
|
||||
options: FileUploadOptions,
|
||||
onFileUploaded: FileUploadCallback
|
||||
): Promise<void> {
|
||||
const fn = await getResource(uploader.function.UploadFiles)
|
||||
await fn(files, target, options, onFileUploaded)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"declarationDir": "./types",
|
||||
"tsBuildInfoFile": ".build/build.tsbuildinfo"
|
||||
}
|
||||
}
|
||||
@@ -501,6 +501,26 @@
|
||||
"projectFolder": "packages/ui",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/uploader",
|
||||
"projectFolder": "plugins/uploader",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/uploader-assets",
|
||||
"projectFolder": "plugins/uploader-assets",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/uploader-resources",
|
||||
"projectFolder": "plugins/uploader-resources",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/model-uploader",
|
||||
"projectFolder": "models/uploader",
|
||||
"shouldPublish": false
|
||||
},
|
||||
{
|
||||
"packageName": "@hcengineering/collaborator-client",
|
||||
"projectFolder": "packages/collaborator-client",
|
||||
|
||||
Reference in New Issue
Block a user