@carbonorm/carbonreact 3.4.1 → 3.4.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/dist/CarbonReact.d.ts +0 -3
- package/dist/api/hoc/getStatefulObjectWithWhere.d.ts +11 -0
- package/dist/api/hoc/watchInputElementChangeEvent.d.ts +2 -0
- package/dist/api/rest/C6.d.ts +579 -0
- package/dist/api/rest/Carbons.d.ts +88 -0
- package/dist/api/rest/Carbons.test.d.ts +14 -0
- package/dist/api/rest/Chat_Messages.d.ts +88 -0
- package/dist/api/rest/Chat_Messages.test.d.ts +20 -0
- package/dist/api/rest/Documentation.d.ts +88 -0
- package/dist/api/rest/Documentation.test.d.ts +11 -0
- package/dist/api/rest/Feature_Group_References.d.ts +88 -0
- package/dist/api/rest/Feature_Group_References.test.d.ts +13 -0
- package/dist/api/rest/Features.d.ts +88 -0
- package/dist/api/rest/Features.test.d.ts +14 -0
- package/dist/api/rest/Group_References.d.ts +88 -0
- package/dist/api/rest/Group_References.test.d.ts +13 -0
- package/dist/api/rest/Groups.d.ts +88 -0
- package/dist/api/rest/Groups.test.d.ts +15 -0
- package/dist/api/rest/History_Logs.d.ts +88 -0
- package/dist/api/rest/History_Logs.test.d.ts +13 -0
- package/dist/api/rest/Likes.d.ts +88 -0
- package/dist/api/rest/Likes.test.d.ts +13 -0
- package/dist/api/rest/Location_References.d.ts +88 -0
- package/dist/api/rest/Location_References.test.d.ts +14 -0
- package/dist/api/rest/Locations.d.ts +88 -0
- package/dist/api/rest/Locations.test.d.ts +18 -0
- package/dist/api/rest/Photos.d.ts +88 -0
- package/dist/api/rest/Photos.test.d.ts +20 -0
- package/dist/api/rest/Posts.d.ts +88 -0
- package/dist/api/rest/Posts.test.d.ts +22 -0
- package/dist/api/rest/Projects.d.ts +88 -0
- package/dist/api/rest/Projects.test.d.ts +21 -0
- package/dist/api/rest/Reports.d.ts +88 -0
- package/dist/api/rest/Reports.test.d.ts +11 -0
- package/dist/api/rest/Sessions.d.ts +88 -0
- package/dist/api/rest/Sessions.test.d.ts +14 -0
- package/dist/api/rest/Subscription.d.ts +88 -0
- package/dist/api/rest/Subscription.test.d.ts +20 -0
- package/dist/api/rest/User_Followers.d.ts +88 -0
- package/dist/api/rest/User_Followers.test.d.ts +16 -0
- package/dist/api/rest/User_Groups.d.ts +88 -0
- package/dist/api/rest/User_Groups.test.d.ts +13 -0
- package/dist/api/rest/User_Messages.d.ts +88 -0
- package/dist/api/rest/User_Messages.test.d.ts +20 -0
- package/dist/api/rest/User_Sessions.d.ts +88 -0
- package/dist/api/rest/User_Sessions.test.d.ts +14 -0
- package/dist/api/rest/User_Tasks.d.ts +88 -0
- package/dist/api/rest/User_Tasks.test.d.ts +22 -0
- package/dist/api/rest/Users.d.ts +88 -0
- package/dist/api/rest/Users.test.d.ts +44 -0
- package/dist/api/rest/WsLiveUpdates.d.ts +3 -0
- package/dist/components/WebSocket/CarbonWebSocket.d.ts +8 -4
- package/dist/index.cjs.js +5056 -2124
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +53 -0
- package/dist/index.esm.js +4957 -2105
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/CarbonReact.tsx +0 -3
- package/src/api/hoc/getStatefulObjectWithWhere.tsx +17 -0
- package/src/api/hoc/watchInputElementChangeEvent.tsx +24 -0
- package/src/api/rest/C6.tsx +2687 -0
- package/src/api/rest/Carbons.test.tsx +128 -0
- package/src/api/rest/Carbons.tsx +145 -0
- package/src/api/rest/Chat_Messages.test.tsx +138 -0
- package/src/api/rest/Chat_Messages.tsx +151 -0
- package/src/api/rest/Documentation.test.tsx +128 -0
- package/src/api/rest/Documentation.tsx +142 -0
- package/src/api/rest/Feature_Group_References.test.tsx +126 -0
- package/src/api/rest/Feature_Group_References.tsx +144 -0
- package/src/api/rest/Features.test.tsx +128 -0
- package/src/api/rest/Features.tsx +145 -0
- package/src/api/rest/Group_References.test.tsx +126 -0
- package/src/api/rest/Group_References.tsx +144 -0
- package/src/api/rest/Groups.test.tsx +130 -0
- package/src/api/rest/Groups.tsx +146 -0
- package/src/api/rest/History_Logs.test.tsx +130 -0
- package/src/api/rest/History_Logs.tsx +144 -0
- package/src/api/rest/Likes.test.tsx +126 -0
- package/src/api/rest/Likes.tsx +144 -0
- package/src/api/rest/Location_References.test.tsx +128 -0
- package/src/api/rest/Location_References.tsx +145 -0
- package/src/api/rest/Locations.test.tsx +137 -0
- package/src/api/rest/Locations.tsx +149 -0
- package/src/api/rest/Photos.test.tsx +139 -0
- package/src/api/rest/Photos.tsx +151 -0
- package/src/api/rest/Posts.test.tsx +142 -0
- package/src/api/rest/Posts.tsx +153 -0
- package/src/api/rest/Projects.test.tsx +144 -0
- package/src/api/rest/Projects.tsx +152 -0
- package/src/api/rest/Reports.test.tsx +128 -0
- package/src/api/rest/Reports.tsx +142 -0
- package/src/api/rest/Sessions.test.tsx +133 -0
- package/src/api/rest/Sessions.tsx +145 -0
- package/src/api/rest/Subscription.test.tsx +138 -0
- package/src/api/rest/Subscription.tsx +151 -0
- package/src/api/rest/User_Followers.test.tsx +130 -0
- package/src/api/rest/User_Followers.tsx +147 -0
- package/src/api/rest/User_Groups.test.tsx +126 -0
- package/src/api/rest/User_Groups.tsx +144 -0
- package/src/api/rest/User_Messages.test.tsx +137 -0
- package/src/api/rest/User_Messages.tsx +151 -0
- package/src/api/rest/User_Sessions.test.tsx +133 -0
- package/src/api/rest/User_Sessions.tsx +145 -0
- package/src/api/rest/User_Tasks.test.tsx +141 -0
- package/src/api/rest/User_Tasks.tsx +153 -0
- package/src/api/rest/Users.test.tsx +193 -0
- package/src/api/rest/Users.tsx +175 -0
- package/src/api/rest/WsLiveUpdates.tsx +150 -0
- package/src/components/WebSocket/CarbonWebSocket.tsx +22 -11
- package/src/index.ts +53 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbonorm/carbonreact",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"browser": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@carbonorm/carbonnode": "^1.2.
|
|
10
|
+
"@carbonorm/carbonnode": "^1.2.14",
|
|
11
11
|
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
12
12
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
13
13
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
package/src/CarbonReact.tsx
CHANGED
|
@@ -53,9 +53,6 @@ const CarbonReact= class <P = {}, S = {}> extends Component<{
|
|
|
53
53
|
} & any, any & iCarbonReactState>;
|
|
54
54
|
|
|
55
55
|
static lastLocation = window.location.pathname;
|
|
56
|
-
static websocketUrl = (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.host + ':8888/ws';
|
|
57
|
-
static websocketTimeoutSeconds : number = 250;
|
|
58
|
-
static websocketHeartbeatSeconds : number = 250;
|
|
59
56
|
|
|
60
57
|
// @link https://github.com/welldone-software/why-did-you-render
|
|
61
58
|
// noinspection JSUnusedGlobalSymbols
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {iAPI} from "@carbonorm/carbonnode";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
interface iWHERE {
|
|
5
|
+
[key: string]: any|iWHERE
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface iGetStatefulObjectWithWhere {
|
|
9
|
+
WHERE: iWHERE | iWHERE[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default ({request}: { request: iAPI<any> & iWHERE }) => {
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {ChangeEvent} from "react";
|
|
2
|
+
import {timeout} from "@carbonorm/carbonnode";
|
|
3
|
+
|
|
4
|
+
export default function watchInputElementChangeEvent(event: ChangeEvent<HTMLInputElement>, cb: (event: ChangeEvent<HTMLInputElement>) => (Promise<boolean> | boolean), timeoutMs: number = 3000) {
|
|
5
|
+
|
|
6
|
+
const target = event.target;
|
|
7
|
+
|
|
8
|
+
const value = target.value;
|
|
9
|
+
|
|
10
|
+
event.target.style.color = "orange";
|
|
11
|
+
|
|
12
|
+
timeout(() => value === ((() => target.value)()),
|
|
13
|
+
async () => {
|
|
14
|
+
|
|
15
|
+
const callbackResult = await cb(event);
|
|
16
|
+
|
|
17
|
+
console.log('User provided input callbackResult passed to WatchInputElementChangeEvent (will cause green or red) value (' + value + ')', callbackResult)
|
|
18
|
+
|
|
19
|
+
target.style.color = false === callbackResult ? "red" : "green"
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
timeoutMs)
|
|
23
|
+
|
|
24
|
+
}
|