@uploadcare/file-uploader 1.3.0-alpha.3 → 1.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/Block.d.ts +0 -3
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +8 -32
- package/package.json +2 -4
- package/web/file-uploader.iife.min.js +4 -4
- package/web/file-uploader.min.js +4 -4
- package/web/uc-cloud-image-editor.min.js +4 -4
- package/web/uc-file-uploader-inline.min.js +4 -4
- package/web/uc-file-uploader-minimal.min.js +3 -3
- package/web/uc-file-uploader-regular.min.js +4 -4
package/abstract/Block.d.ts
CHANGED
|
@@ -52,9 +52,6 @@ export class Block extends Symbiote<any> {
|
|
|
52
52
|
* @param {any} newVal
|
|
53
53
|
*/
|
|
54
54
|
setOrAddState(prop: string, newVal: any): void;
|
|
55
|
-
/** @private */
|
|
56
|
-
private _readyResolvers;
|
|
57
|
-
get ready(): Promise<void>;
|
|
58
55
|
/**
|
|
59
56
|
* @private
|
|
60
57
|
* @returns {LocaleManager | null}
|
package/abstract/Block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["Block.js"],"names":[],"mappings":"AAuBA;IACE,4BAA4B;IAC5B,2BADW,MAAM,GAAG,IAAI,CACS;IAEjC,uBAAuB;IACvB,mBADW,MAAM,EAAE,CACI;IA4TvB,6BAA6B;IAC7B,4CAQC;IAjRD,cAUC;IA5DD,iBAAiB;IACjB,kCAAuB;IAEvB,wDAAwD;IACxD,cADW,OAAO,oBAAoB,EAAE,YAAY,CAChC;IAEpB,UAAmB;IAEnB;;;;OAIG;IACH,8BAHW;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,UAiB5C;IAED;;;;;OAKG;IACH,kBAIC;IAED;;;;OAIG;IACH,wBAJW,MAAM,YACN,MAAM,IAAI,QAKpB;IAIC,uDAAuD;IACvD,mBADW,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC,CACjB;IASpC;;;;OAIG;IACH,WAJW,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YACzF,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,YACzF,UAAU,CAAC,OAAO,6CAA6C,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QASnG;IAED;;;OAGG;IACH,wBAHW,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,WAUnC;IAED;;;OAGG;IACH,oCAFW,GAAG,QASb;IAqED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,yBAAyB;IACzB,iCAEC;IAsBD;;;;OAIG;IACH,qCAIC;IAED;;;;OAIG;IACH,iCAHa,OAAO,QAAQ,CA6B3B;IAED,iDAAiD;IACjD,yCA8BC;IA3BG,eAAe;IACf,mBAuBE;IAKN;;;;OAIG;IACH,eAJmD,CAAC,SAAvC,MAAO,OAAO,UAAU,EAAE,UAAW,OACvC,CAAC,YACD,CAAC,KAAK,EAAE,OAAO,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,QAQ3D;IAED,8BAA8B;IAC9B,oBADY,OAAO,EAAE,QAYpB;CAYF;yBAjWsC,sBAAsB;qBAaxC,WAAW"}
|
package/abstract/Block.js
CHANGED
|
@@ -16,7 +16,6 @@ import { A11y } from './a11y.js';
|
|
|
16
16
|
import { l10nProcessor } from './l10nProcessor.js';
|
|
17
17
|
import { sharedConfigKey } from './sharedConfigKey.js';
|
|
18
18
|
import { bindCompatibilityFallbackProcessor } from './bindCompatibilityFallbackProcessor.js';
|
|
19
|
-
import { withResolvers } from '../utils/withResolvers.js';
|
|
20
19
|
|
|
21
20
|
const TAG_PREFIX = 'uc-';
|
|
22
21
|
const CTX_NAME_FALLBACK_ATTR = 'ctx-name';
|
|
@@ -144,31 +143,19 @@ export class Block extends Symbiote {
|
|
|
144
143
|
this.processInnerHtml = true;
|
|
145
144
|
}
|
|
146
145
|
if (this.requireCtxName) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}),
|
|
152
|
-
waitForAttribute({
|
|
153
|
-
element: this,
|
|
154
|
-
attribute: CTX_NAME_FALLBACK_ATTR,
|
|
155
|
-
}),
|
|
156
|
-
]).then((result) => {
|
|
157
|
-
console.log(this, result);
|
|
146
|
+
waitForAttribute({
|
|
147
|
+
element: this,
|
|
148
|
+
attribute: CTX_NAME_FALLBACK_ATTR,
|
|
149
|
+
}).then((result) => {
|
|
158
150
|
if (result.success) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.setAttribute(DICT.CTX_NAME_ATTR, ctxName);
|
|
163
|
-
this.style.setProperty(CTX_NAME_FALLBACK_ATTR, `'${ctxName}'`);
|
|
164
|
-
}
|
|
151
|
+
const ctxName = result.value;
|
|
152
|
+
this.style.setProperty(DICT.CSS_CTX_PROP, `'${ctxName}'`);
|
|
153
|
+
this.setAttribute(DICT.CTX_NAME_ATTR, ctxName);
|
|
165
154
|
// async wait for ctx attribute to be set, needed for Angular because it sets attributes after mount
|
|
166
155
|
// TODO: should be moved to the symbiote core
|
|
167
156
|
super.connectedCallback();
|
|
168
157
|
} else {
|
|
169
|
-
console.error(
|
|
170
|
-
`Attribute "${DICT.CTX_NAME_ATTR}" or "${CTX_NAME_FALLBACK_ATTR}" is required and it is not set.`,
|
|
171
|
-
);
|
|
158
|
+
console.error(`Attribute "${CTX_NAME_FALLBACK_ATTR}" is required and it is not set.`);
|
|
172
159
|
}
|
|
173
160
|
});
|
|
174
161
|
} else {
|
|
@@ -208,17 +195,6 @@ export class Block extends Symbiote {
|
|
|
208
195
|
const direction = getLocaleDirection(localeId);
|
|
209
196
|
this.style.direction = direction === 'ltr' ? '' : direction;
|
|
210
197
|
});
|
|
211
|
-
|
|
212
|
-
setTimeout(() => {
|
|
213
|
-
this._readyResolvers.resolve();
|
|
214
|
-
}, 0);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/** @private */
|
|
218
|
-
_readyResolvers = /** @type {typeof withResolvers<void>} */ (withResolvers)();
|
|
219
|
-
|
|
220
|
-
get ready() {
|
|
221
|
-
return this._readyResolvers.promise;
|
|
222
198
|
}
|
|
223
199
|
|
|
224
200
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadcare/file-uploader",
|
|
3
|
-
"version": "1.3.0-alpha.
|
|
3
|
+
"version": "1.3.0-alpha.4",
|
|
4
4
|
"description": "Building blocks for Uploadcare products integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web components",
|
|
@@ -35,9 +35,7 @@
|
|
|
35
35
|
"MIT"
|
|
36
36
|
],
|
|
37
37
|
"type": "module",
|
|
38
|
-
"sideEffects": [
|
|
39
|
-
"*.css"
|
|
40
|
-
],
|
|
38
|
+
"sideEffects": ["*.css"],
|
|
41
39
|
"module": "./index.js",
|
|
42
40
|
"exports": {
|
|
43
41
|
".": {
|