@elementor/editor-components 4.3.0-1039 → 4.3.0-1041
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/dist/index.js +41 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -23
- package/src/utils/component-document-data.ts +25 -8
package/dist/index.mjs
CHANGED
|
@@ -334,14 +334,21 @@ var useIsSanitizedComponent = (componentId, key) => {
|
|
|
334
334
|
};
|
|
335
335
|
|
|
336
336
|
// src/utils/component-document-data.ts
|
|
337
|
-
import {
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
337
|
+
import { ajax as ajax2 } from "@elementor/editor-v1-adapters";
|
|
338
|
+
var getComponentDocumentParams = (id) => ({
|
|
339
|
+
action: "get_document_config",
|
|
340
|
+
unique_id: `document-${id}`,
|
|
341
|
+
data: { id }
|
|
342
|
+
});
|
|
343
|
+
var pendingRequests = /* @__PURE__ */ new Map();
|
|
344
|
+
var getComponentDocumentData = (id) => {
|
|
345
|
+
const pendingRequest = pendingRequests.get(id);
|
|
346
|
+
if (pendingRequest) {
|
|
347
|
+
return pendingRequest;
|
|
348
|
+
}
|
|
349
|
+
const request = ajax2.load(getComponentDocumentParams(id)).catch(() => null).finally(() => pendingRequests.delete(id));
|
|
350
|
+
pendingRequests.set(id, request);
|
|
351
|
+
return request;
|
|
345
352
|
};
|
|
346
353
|
|
|
347
354
|
// src/component-instance-transformer.ts
|