@scaleflex/widget-preupload-processors 4.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7693 -7681
- package/LICENSE +0 -0
- package/README.md +155 -155
- package/package.json +6 -6
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
# `@scaleflex/widget-preupload-processors`
|
|
2
|
-
|
|
3
|
-
[![Plugins][plugins-image]](#plugins)
|
|
4
|
-
[![Website][filerobot-image]][sfx-url]
|
|
5
|
-
[![Version][filerobot-version]][version-url]
|
|
6
|
-
[![Scaleflex team][made-by-image]][sfx-url]
|
|
7
|
-
[![License][license-image]][license-url]
|
|
8
|
-
[![CodeSandbox][codeSandbox-image]][codeSandbox-url]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<div align='center'>
|
|
12
|
-
<img title="Scaleflex Widget logo" alt="Scaleflex Widget logo" src="https://assets.scaleflex.com/Corporate+Branding/%5B2025%5D+ALL+LOGOS+%2B+ICONS/SCALEFLEX/VXP+logo/Horizontal+White/VXP+logo+WHITE.png?vh=663932" width="140"/>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
A processor which applies some functionalities for the images before uploading process in [Scaleflex Media Asset Widget](https://www.npmjs.com/package/@scaleflex/widget-core).
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
### NPM
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install --save @scaleflex/widget-preupload-processors
|
|
23
|
-
```
|
|
24
|
-
### YARN
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
yarn add @scaleflex/widget-preupload-processors
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
then
|
|
31
|
-
|
|
32
|
-
```js
|
|
33
|
-
import PreUploadProcessors from '@scaleflex/widget-preupload-processors'
|
|
34
|
-
...
|
|
35
|
-
...
|
|
36
|
-
...
|
|
37
|
-
scaleflexWidget.use(PreUploadProcessors, propertiesObject)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### CDN
|
|
41
|
-
|
|
42
|
-
The plugin from CDN is found inside `Scaleflex` global object `Scaleflex.PreUploadProcessors`
|
|
43
|
-
|
|
44
|
-
```js
|
|
45
|
-
const PreUploadProcessors = window.ScaleflexWidget.PreUploadProcessors
|
|
46
|
-
...
|
|
47
|
-
...
|
|
48
|
-
...
|
|
49
|
-
scaleflexWidget.use(PreUploadProcessors, propertiesObject)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Plugin's styles
|
|
53
|
-
|
|
54
|
-
```js
|
|
55
|
-
import '@scaleflex/widget-core/dist/style.css'
|
|
56
|
-
import '@scaleflex/widget-preupload-processors/dist/style.css'
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
or if you prefer the minified version
|
|
60
|
-
|
|
61
|
-
```js
|
|
62
|
-
import '@scaleflex/widget-core/dist/style.min.css'
|
|
63
|
-
import '@scaleflex/widget-preupload-processors/dist/style.min.css'
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
> The plugin's css file should be imported after the [Core's css file](../@scaleflex/widget-core/#modules-styles) for having the styles shown correctly.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Properties
|
|
70
|
-
|
|
71
|
-
### `imageProcessorByDefault`
|
|
72
|
-
|
|
73
|
-
<u>Type:</u> `boolean`
|
|
74
|
-
|
|
75
|
-
<u>Default:</u> `false`
|
|
76
|
-
|
|
77
|
-
If `true` the processing of image before upload checkbox would be default checked in the upload settings of uploading panel if there are any images selected, otherwise the checkbox will be default un-checked.
|
|
78
|
-
|
|
79
|
-
### `isUserAllowedToOptimize`
|
|
80
|
-
|
|
81
|
-
<u>Type:</u> `boolean`
|
|
82
|
-
|
|
83
|
-
<u>Default:</u> `true`
|
|
84
|
-
|
|
85
|
-
If `false` the processing of image before upload will be disabled if there are any images selected, otherwise the processing will be enabled.
|
|
86
|
-
|
|
87
|
-
### `videoProcessorByDefault`
|
|
88
|
-
|
|
89
|
-
<u>Type:</u> `boolean`
|
|
90
|
-
|
|
91
|
-
<u>Default:</u> `false`
|
|
92
|
-
|
|
93
|
-
If `true` the processing of video before upload checkbox would be default checked in the upload settings of uploading panel if there are any videos selected, otherwise the checkbox will be default un-checked.
|
|
94
|
-
|
|
95
|
-
### `imageOperations`
|
|
96
|
-
|
|
97
|
-
<u>Type:</u> `object`
|
|
98
|
-
|
|
99
|
-
<u>Default:</u> `null`
|
|
100
|
-
|
|
101
|
-
The operations to be available to the user as options to choose from which to apply on the images before uploading, till now the supported operations:
|
|
102
|
-
- #### `resize` - (*object* - required): Show user inputs for the user to choose the width & height of resizing, with respecting the passed values in `width, height` properties which refers to the max. width & max. height respectively, *show following example*.
|
|
103
|
-
|
|
104
|
-
example,
|
|
105
|
-
|
|
106
|
-
```js
|
|
107
|
-
{
|
|
108
|
-
resize: {
|
|
109
|
-
width: 2000, // max width the user could reach
|
|
110
|
-
height: 2000 // max height the user could reach
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### `videoTranscodingOptions`
|
|
116
|
-
|
|
117
|
-
<u>Type:</u> `object`
|
|
118
|
-
|
|
119
|
-
<u>Default:</u>
|
|
120
|
-
|
|
121
|
-
```js
|
|
122
|
-
{
|
|
123
|
-
resolutions: ['auto', 'hq', 'desktop', 'tablet', 'mobile', 'sample'],
|
|
124
|
-
protocols: ['HLS', 'DASH'],
|
|
125
|
-
defaultResolution: 'auto',
|
|
126
|
-
defaultProtocol: 'HLS'
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
The options available for video transcoding shown in the UI controls with its default options.
|
|
131
|
-
|
|
132
|
-
### `locale`
|
|
133
|
-
|
|
134
|
-
<u>Type:</u> `object`
|
|
135
|
-
|
|
136
|
-
<u>Default:</u> default locales inside `lib/defaultLocale.js`.
|
|
137
|
-
|
|
138
|
-
Customizing some of the translations or the language's strings and replace the default locale.
|
|
139
|
-
|
|
140
|
-
<!-- Variables -->
|
|
141
|
-
|
|
142
|
-
[npm-url]: https://www.npmjs.com/package/@scaleflex/widget-preupload-processors
|
|
143
|
-
[license-url]: https://opensource.org/licenses/MIT
|
|
144
|
-
[sfx-url]: https://www.scaleflex.com/
|
|
145
|
-
[version-url]: https://www.npmjs.com/package/@scaleflex/widget-preupload-processors
|
|
146
|
-
[codeSandbox-url]: https://codesandbox.io/p/sandbox/scalelfex-widget-v4-sandbox-dtp6l3?file=%2Fsrc%2Findex.js
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
[npm-image]: https://img.shields.io/npm/v/@telus/remark-config.svg?style=for-the-badge&logo=npm
|
|
150
|
-
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
|
|
151
|
-
[made-by-image]: https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg?style=for-the-badge
|
|
152
|
-
[plugins-image]: https://img.shields.io/static/v1?label=Scaleflex&message=Plugins&color=yellow&style=for-the-badge
|
|
153
|
-
[filerobot-image]: https://img.shields.io/static/v1?label=Scaleflex&message=website&color=orange&style=for-the-badge
|
|
154
|
-
[filerobot-version]: https://img.shields.io/npm/v/@scaleflex/widget-preupload-processors?label=Version&style=for-the-badge&logo=npm
|
|
155
|
-
[codeSandbox-image]: https://img.shields.io/badge/CodeSandbox-black?style=for-the-badge&logo=CodeSandbox
|
|
1
|
+
# `@scaleflex/widget-preupload-processors`
|
|
2
|
+
|
|
3
|
+
[![Plugins][plugins-image]](#plugins)
|
|
4
|
+
[![Website][filerobot-image]][sfx-url]
|
|
5
|
+
[![Version][filerobot-version]][version-url]
|
|
6
|
+
[![Scaleflex team][made-by-image]][sfx-url]
|
|
7
|
+
[![License][license-image]][license-url]
|
|
8
|
+
[![CodeSandbox][codeSandbox-image]][codeSandbox-url]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<div align='center'>
|
|
12
|
+
<img title="Scaleflex Widget logo" alt="Scaleflex Widget logo" src="https://assets.scaleflex.com/Corporate+Branding/%5B2025%5D+ALL+LOGOS+%2B+ICONS/SCALEFLEX/VXP+logo/Horizontal+White/VXP+logo+WHITE.png?vh=663932" width="140"/>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
A processor which applies some functionalities for the images before uploading process in [Scaleflex Media Asset Widget](https://www.npmjs.com/package/@scaleflex/widget-core).
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### NPM
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install --save @scaleflex/widget-preupload-processors
|
|
23
|
+
```
|
|
24
|
+
### YARN
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
yarn add @scaleflex/widget-preupload-processors
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
then
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import PreUploadProcessors from '@scaleflex/widget-preupload-processors'
|
|
34
|
+
...
|
|
35
|
+
...
|
|
36
|
+
...
|
|
37
|
+
scaleflexWidget.use(PreUploadProcessors, propertiesObject)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### CDN
|
|
41
|
+
|
|
42
|
+
The plugin from CDN is found inside `Scaleflex` global object `Scaleflex.PreUploadProcessors`
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
const PreUploadProcessors = window.ScaleflexWidget.PreUploadProcessors
|
|
46
|
+
...
|
|
47
|
+
...
|
|
48
|
+
...
|
|
49
|
+
scaleflexWidget.use(PreUploadProcessors, propertiesObject)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Plugin's styles
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
import '@scaleflex/widget-core/dist/style.css'
|
|
56
|
+
import '@scaleflex/widget-preupload-processors/dist/style.css'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
or if you prefer the minified version
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
import '@scaleflex/widget-core/dist/style.min.css'
|
|
63
|
+
import '@scaleflex/widget-preupload-processors/dist/style.min.css'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> The plugin's css file should be imported after the [Core's css file](../@scaleflex/widget-core/#modules-styles) for having the styles shown correctly.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Properties
|
|
70
|
+
|
|
71
|
+
### `imageProcessorByDefault`
|
|
72
|
+
|
|
73
|
+
<u>Type:</u> `boolean`
|
|
74
|
+
|
|
75
|
+
<u>Default:</u> `false`
|
|
76
|
+
|
|
77
|
+
If `true` the processing of image before upload checkbox would be default checked in the upload settings of uploading panel if there are any images selected, otherwise the checkbox will be default un-checked.
|
|
78
|
+
|
|
79
|
+
### `isUserAllowedToOptimize`
|
|
80
|
+
|
|
81
|
+
<u>Type:</u> `boolean`
|
|
82
|
+
|
|
83
|
+
<u>Default:</u> `true`
|
|
84
|
+
|
|
85
|
+
If `false` the processing of image before upload will be disabled if there are any images selected, otherwise the processing will be enabled.
|
|
86
|
+
|
|
87
|
+
### `videoProcessorByDefault`
|
|
88
|
+
|
|
89
|
+
<u>Type:</u> `boolean`
|
|
90
|
+
|
|
91
|
+
<u>Default:</u> `false`
|
|
92
|
+
|
|
93
|
+
If `true` the processing of video before upload checkbox would be default checked in the upload settings of uploading panel if there are any videos selected, otherwise the checkbox will be default un-checked.
|
|
94
|
+
|
|
95
|
+
### `imageOperations`
|
|
96
|
+
|
|
97
|
+
<u>Type:</u> `object`
|
|
98
|
+
|
|
99
|
+
<u>Default:</u> `null`
|
|
100
|
+
|
|
101
|
+
The operations to be available to the user as options to choose from which to apply on the images before uploading, till now the supported operations:
|
|
102
|
+
- #### `resize` - (*object* - required): Show user inputs for the user to choose the width & height of resizing, with respecting the passed values in `width, height` properties which refers to the max. width & max. height respectively, *show following example*.
|
|
103
|
+
|
|
104
|
+
example,
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
{
|
|
108
|
+
resize: {
|
|
109
|
+
width: 2000, // max width the user could reach
|
|
110
|
+
height: 2000 // max height the user could reach
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### `videoTranscodingOptions`
|
|
116
|
+
|
|
117
|
+
<u>Type:</u> `object`
|
|
118
|
+
|
|
119
|
+
<u>Default:</u>
|
|
120
|
+
|
|
121
|
+
```js
|
|
122
|
+
{
|
|
123
|
+
resolutions: ['auto', 'hq', 'desktop', 'tablet', 'mobile', 'sample'],
|
|
124
|
+
protocols: ['HLS', 'DASH'],
|
|
125
|
+
defaultResolution: 'auto',
|
|
126
|
+
defaultProtocol: 'HLS'
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The options available for video transcoding shown in the UI controls with its default options.
|
|
131
|
+
|
|
132
|
+
### `locale`
|
|
133
|
+
|
|
134
|
+
<u>Type:</u> `object`
|
|
135
|
+
|
|
136
|
+
<u>Default:</u> default locales inside `lib/defaultLocale.js`.
|
|
137
|
+
|
|
138
|
+
Customizing some of the translations or the language's strings and replace the default locale.
|
|
139
|
+
|
|
140
|
+
<!-- Variables -->
|
|
141
|
+
|
|
142
|
+
[npm-url]: https://www.npmjs.com/package/@scaleflex/widget-preupload-processors
|
|
143
|
+
[license-url]: https://opensource.org/licenses/MIT
|
|
144
|
+
[sfx-url]: https://www.scaleflex.com/
|
|
145
|
+
[version-url]: https://www.npmjs.com/package/@scaleflex/widget-preupload-processors
|
|
146
|
+
[codeSandbox-url]: https://codesandbox.io/p/sandbox/scalelfex-widget-v4-sandbox-dtp6l3?file=%2Fsrc%2Findex.js
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
[npm-image]: https://img.shields.io/npm/v/@telus/remark-config.svg?style=for-the-badge&logo=npm
|
|
150
|
+
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
|
|
151
|
+
[made-by-image]: https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg?style=for-the-badge
|
|
152
|
+
[plugins-image]: https://img.shields.io/static/v1?label=Scaleflex&message=Plugins&color=yellow&style=for-the-badge
|
|
153
|
+
[filerobot-image]: https://img.shields.io/static/v1?label=Scaleflex&message=website&color=orange&style=for-the-badge
|
|
154
|
+
[filerobot-version]: https://img.shields.io/npm/v/@scaleflex/widget-preupload-processors?label=Version&style=for-the-badge&logo=npm
|
|
155
|
+
[codeSandbox-image]: https://img.shields.io/badge/CodeSandbox-black?style=for-the-badge&logo=CodeSandbox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/widget-preupload-processors",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Scaleflex preupload-processors module.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@scaleflex/icons": "^3.0.0-beta.11",
|
|
17
17
|
"@scaleflex/ui": "^3.0.0-beta.11",
|
|
18
|
-
"@scaleflex/widget-common": "^4.0
|
|
19
|
-
"@scaleflex/widget-icons": "^4.0
|
|
20
|
-
"@scaleflex/widget-tus": "^4.0
|
|
21
|
-
"@scaleflex/widget-utils": "^4.0
|
|
18
|
+
"@scaleflex/widget-common": "^4.1.0",
|
|
19
|
+
"@scaleflex/widget-icons": "^4.1.0",
|
|
20
|
+
"@scaleflex/widget-tus": "^4.1.0",
|
|
21
|
+
"@scaleflex/widget-utils": "^4.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"react": "^19.0.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"react-dom": ">=19.0.0"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "471120d67066617a0d8824eae11b07d1f2259473"
|
|
34
34
|
}
|