@agilemotion/oui-react-js 2.0.0 → 2.0.2
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.
|
@@ -45,8 +45,11 @@ const AutoCompleteWrapper = props => {
|
|
|
45
45
|
value.current = [];
|
|
46
46
|
} else if (Array.isArray(base.value)) {
|
|
47
47
|
value.current = base.value.reduce((keys, currValue) => {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
if (currValue) {
|
|
49
|
+
keys.push(currValue[props.config.attributes.searchAttribute]);
|
|
50
|
+
return keys;
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
50
53
|
}, []);
|
|
51
54
|
for (const valueElement of base.value) {
|
|
52
55
|
entityStore.push(valueElement);
|
package/dist/js/Docs.js
CHANGED
|
@@ -104,14 +104,42 @@ class Docs {
|
|
|
104
104
|
body: data
|
|
105
105
|
};
|
|
106
106
|
let url = location + uploadUrl;
|
|
107
|
+
console.log("[Docs.cacheFile] POST", url, "metadata=", metadata, "orgCode=", orgCode);
|
|
107
108
|
return new Promise((resolve, reject) => {
|
|
108
109
|
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(url), fetchConfig).then(status).then(json).then(data => {
|
|
110
|
+
console.log("[Docs.cacheFile] success correlationId=", correlationId, "cacheFileId=", data);
|
|
109
111
|
resolve(data);
|
|
110
112
|
}).catch(e => {
|
|
113
|
+
console.error("[Docs.cacheFile] failed correlationId=", correlationId, "error=", e);
|
|
111
114
|
reject(e);
|
|
112
115
|
}));
|
|
113
116
|
});
|
|
114
117
|
});
|
|
118
|
+
_defineProperty(this, "cacheAndPublish", async (file, correlationId, viewId, sourceApiId, orgCode) => {
|
|
119
|
+
console.log("[Docs.cacheAndPublish] entry", "file=", file && {
|
|
120
|
+
name: file.name,
|
|
121
|
+
type: file.type,
|
|
122
|
+
size: file.size
|
|
123
|
+
}, "correlationId=", correlationId, "viewId=", viewId, "sourceApiId=", sourceApiId, "orgCode=", orgCode);
|
|
124
|
+
try {
|
|
125
|
+
const cacheFileId = await this.cacheFile(file, correlationId, orgCode);
|
|
126
|
+
console.log("[Docs.cacheAndPublish] cacheFileId=", cacheFileId, "(correlationId=", correlationId, ")");
|
|
127
|
+
_ApplicationManager.default.api.fireEvent('SERVICE_CALL_SUCCESS', {
|
|
128
|
+
source: {
|
|
129
|
+
api: {
|
|
130
|
+
id: sourceApiId
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
viewId: viewId,
|
|
134
|
+
data: undefined
|
|
135
|
+
});
|
|
136
|
+
console.log("[Docs.cacheAndPublish] fired SERVICE_CALL_SUCCESS sourceApiId=", sourceApiId, "viewId=", viewId);
|
|
137
|
+
return cacheFileId;
|
|
138
|
+
} catch (e) {
|
|
139
|
+
console.error("[Docs.cacheAndPublish] failed correlationId=", correlationId, "viewId=", viewId, "sourceApiId=", sourceApiId, "error=", e);
|
|
140
|
+
throw e;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
115
143
|
_defineProperty(this, "removeAllHtmlBackGroundImages", htmlBase64 => {
|
|
116
144
|
let html = atob(htmlBase64);
|
|
117
145
|
let parser = new DOMParser();
|
package/package.json
CHANGED