Compare commits
No commits in common. "1284f46aa935595374ac6bccf5cace516cba2b3c" and "9f960a6729bffcf6fc9b3c06a756ac49fc368a68" have entirely different histories.
1284f46aa9
...
9f960a6729
@ -1,11 +1,5 @@
|
|||||||
# @warkypublic/zustandsyncstore
|
# @warkypublic/zustandsyncstore
|
||||||
|
|
||||||
## 0.0.15
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- a1202f9: Hopefully fix the options not always loading
|
|
||||||
|
|
||||||
## 0.0.14
|
## 0.0.14
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@warkypublic/oranguru",
|
"name": "@warkypublic/oranguru",
|
||||||
"author": "Warky Devs",
|
"author": "Warky Devs",
|
||||||
"version": "0.0.15",
|
"version": "0.0.14",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -97,8 +97,11 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((props.options ?? []).length > 0) {
|
if (props.options && props.options.length > 0) {
|
||||||
ops.push(...(props.options ?? []));
|
const optionHeaders = GoAPIHeaders(props.options);
|
||||||
|
for (const oh in optionHeaders) {
|
||||||
|
head.set(oh, optionHeaders[oh]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const col_ids =
|
const col_ids =
|
||||||
@ -186,7 +189,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
props.authtoken,
|
props.authtoken,
|
||||||
props.url,
|
props.url,
|
||||||
props.filter,
|
props.filter,
|
||||||
JSON.stringify(props.options),
|
props.options,
|
||||||
setState,
|
setState,
|
||||||
setStateFN,
|
setStateFN,
|
||||||
addError,
|
addError,
|
||||||
@ -200,10 +203,8 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
//console.log('APIAdaptorGoLangv2', { _active_requests, index, pageSize, props });
|
//console.log('APIAdaptorGoLangv2', { _active_requests, index, pageSize, props });
|
||||||
if (props && props.url) {
|
if (props && props.url) {
|
||||||
const head = new Headers();
|
const head = new Headers();
|
||||||
const ops: FetchAPIOperation[] = [
|
head.set('x-limit', '10');
|
||||||
{ type: 'limit', value: String(10) },
|
head.set('x-fetch-rownumber', String(key));
|
||||||
{ type: 'fetch-rownumber', value: key },
|
|
||||||
];
|
|
||||||
|
|
||||||
head.set('Authorization', `Token ${props.authtoken}`);
|
head.set('Authorization', `Token ${props.authtoken}`);
|
||||||
|
|
||||||
@ -218,11 +219,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (props.filter && props.filter !== '') {
|
if (props.filter && props.filter !== '') {
|
||||||
ops.push({
|
head.set('x-custom-sql-w-buildin-filter', props.filter);
|
||||||
name: 'sql_filter',
|
|
||||||
type: 'custom-sql-w',
|
|
||||||
value: props.filter,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.options && props.options.length > 0) {
|
if (props.options && props.options.length > 0) {
|
||||||
@ -232,13 +229,6 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ops && ops.length > 0) {
|
|
||||||
const optionHeaders = GoAPIHeaders(ops);
|
|
||||||
for (const oh in GoAPIHeaders(ops)) {
|
|
||||||
head.set(oh, optionHeaders[oh]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
|
|
||||||
const res = await fetch(`${props.url}?x-fetch-rownumber=${key}}`, {
|
const res = await fetch(`${props.url}?x-fetch-rownumber=${key}}`, {
|
||||||
@ -268,7 +258,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setState('useAPIQuery', useAPIQuery);
|
setState('useAPIQuery', useAPIQuery);
|
||||||
setState('askAPIRowNumber', askAPIRowNumber);
|
setState('askAPIRowNumber', askAPIRowNumber);
|
||||||
}, [props.url, props.authtoken, props.filter, JSON.stringify(props.options), mounted, setState]);
|
}, [props.url, props.authtoken, props.filter, props.options, mounted, setState]);
|
||||||
|
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,6 @@ export const GridlerGoAPIExampleEventlog = () => {
|
|||||||
>
|
>
|
||||||
<GlidlerAPIAdaptorForGoLangv2
|
<GlidlerAPIAdaptorForGoLangv2
|
||||||
authtoken={apiKey}
|
authtoken={apiKey}
|
||||||
options={[{ type: 'preload', value: 'PRO' }]}
|
|
||||||
//options={[{ type: 'fieldfilter', name: 'process', value: 'test' }]}
|
//options={[{ type: 'fieldfilter', name: 'process', value: 'test' }]}
|
||||||
url={`${apiUrl}/public/process`}
|
url={`${apiUrl}/public/process`}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user