quidproquo-web-admin 0.1.11 → 0.1.13
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/lib/commonjs/App/App.js +4 -2
- package/lib/commonjs/App/App.js.map +1 -1
- package/lib/commonjs/Auth/Auth.js +1 -2
- package/lib/commonjs/Auth/Auth.js.map +1 -1
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +7 -2
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js.map +1 -1
- package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +7 -2
- package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js.map +1 -1
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +7 -2
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js.map +1 -1
- package/lib/commonjs/Auth/logic/authRuntime.d.ts +2 -1
- package/lib/commonjs/Auth/logic/authRuntime.js +8 -1
- package/lib/commonjs/Auth/logic/authRuntime.js.map +1 -1
- package/lib/commonjs/LogViewer/LogChat/LogChat.js +1 -2
- package/lib/commonjs/LogViewer/LogChat/LogChat.js.map +1 -1
- package/lib/commonjs/LogViewer/LogChat/eventDocAiLogChatRuntime.js +11 -3
- package/lib/commonjs/LogViewer/LogChat/eventDocAiLogChatRuntime.js.map +1 -1
- package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.d.ts +2 -0
- package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.js +9 -0
- package/lib/commonjs/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.js.map +1 -0
- package/lib/commonjs/LogViewer/logic/actionComponentMap/core/index.js +2 -1
- package/lib/commonjs/LogViewer/logic/actionComponentMap/core/index.js.map +1 -1
- package/lib/commonjs/adminApp/actions/askApplySessionEventToLog.js +3 -1
- package/lib/commonjs/adminApp/actions/askApplySessionEventToLog.js.map +1 -1
- package/lib/commonjs/adminApp/adminAppRuntime.js +13 -1
- package/lib/commonjs/adminApp/adminAppRuntime.js.map +1 -1
- package/lib/commonjs/adminApp/components/AdminAppProvider/AdminAppProvider.js +5 -10
- package/lib/commonjs/adminApp/components/AdminAppProvider/AdminAppProvider.js.map +1 -1
- package/lib/commonjs/adminApp/hooks/useAdminApp.d.ts +1 -1
- package/lib/commonjs/adminApp/hooks/useAdminApp.js +3 -4
- package/lib/commonjs/adminApp/hooks/useAdminApp.js.map +1 -1
- package/lib/commonjs/adminApp/stateUpdaters/sessionLog/eventAppended.js +7 -8
- package/lib/commonjs/adminApp/stateUpdaters/sessionLog/eventAppended.js.map +1 -1
- package/lib/commonjs/adminApp/stateUpdaters/sessionLog/eventSaved.js +3 -2
- package/lib/commonjs/adminApp/stateUpdaters/sessionLog/eventSaved.js.map +1 -1
- package/lib/commonjs/adminApp/testHelpers/makeSessionEvent.js +2 -1
- package/lib/commonjs/adminApp/testHelpers/makeSessionEvent.js.map +1 -1
- package/lib/esm/App/App.js +5 -3
- package/lib/esm/App/App.js.map +1 -1
- package/lib/esm/Auth/Auth.js +1 -2
- package/lib/esm/Auth/Auth.js.map +1 -1
- package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +7 -2
- package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js.map +1 -1
- package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js +7 -2
- package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.js.map +1 -1
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +7 -2
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js.map +1 -1
- package/lib/esm/Auth/logic/authRuntime.d.ts +2 -1
- package/lib/esm/Auth/logic/authRuntime.js +8 -1
- package/lib/esm/Auth/logic/authRuntime.js.map +1 -1
- package/lib/esm/LogViewer/LogChat/LogChat.js +1 -2
- package/lib/esm/LogViewer/LogChat/LogChat.js.map +1 -1
- package/lib/esm/LogViewer/LogChat/eventDocAiLogChatRuntime.js +11 -3
- package/lib/esm/LogViewer/LogChat/eventDocAiLogChatRuntime.js.map +1 -1
- package/lib/esm/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.d.ts +2 -0
- package/lib/esm/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.js +7 -0
- package/lib/esm/LogViewer/logic/actionComponentMap/core/coreCryptoActionComponentMap.js.map +1 -0
- package/lib/esm/LogViewer/logic/actionComponentMap/core/index.js +2 -0
- package/lib/esm/LogViewer/logic/actionComponentMap/core/index.js.map +1 -1
- package/lib/esm/adminApp/actions/askApplySessionEventToLog.js +4 -2
- package/lib/esm/adminApp/actions/askApplySessionEventToLog.js.map +1 -1
- package/lib/esm/adminApp/adminAppRuntime.js +13 -1
- package/lib/esm/adminApp/adminAppRuntime.js.map +1 -1
- package/lib/esm/adminApp/components/AdminAppProvider/AdminAppProvider.js +6 -11
- package/lib/esm/adminApp/components/AdminAppProvider/AdminAppProvider.js.map +1 -1
- package/lib/esm/adminApp/hooks/useAdminApp.d.ts +1 -1
- package/lib/esm/adminApp/hooks/useAdminApp.js +3 -4
- package/lib/esm/adminApp/hooks/useAdminApp.js.map +1 -1
- package/lib/esm/adminApp/stateUpdaters/sessionLog/eventAppended.js +6 -13
- package/lib/esm/adminApp/stateUpdaters/sessionLog/eventAppended.js.map +1 -1
- package/lib/esm/adminApp/stateUpdaters/sessionLog/eventSaved.js +3 -8
- package/lib/esm/adminApp/stateUpdaters/sessionLog/eventSaved.js.map +1 -1
- package/lib/esm/adminApp/testHelpers/makeSessionEvent.js +2 -1
- package/lib/esm/adminApp/testHelpers/makeSessionEvent.js.map +1 -1
- package/package.json +7 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/LogViewer/logic/actionComponentMap/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,iCAAiC,MAAM,qCAAqC,CAAC;AACpF,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AACxF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAC1F,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AACxF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AAExF,eAAe;IACb,GAAG,iCAAiC;IACpC,GAAG,wBAAwB;IAC3B,GAAG,8BAA8B;IACjC,GAAG,4BAA4B;IAC/B,GAAG,6BAA6B;IAChC,GAAG,0BAA0B;IAC7B,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,GAAG,8BAA8B;IACjC,GAAG,0BAA0B;IAC7B,GAAG,mCAAmC;IACtC,GAAG,0BAA0B;IAC7B,GAAG,oCAAoC;IACvC,GAAG,mCAAmC;IACtC,GAAG,0BAA0B;IAC7B,GAAG,8BAA8B;IACjC,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,GAAG,4BAA4B;IAC/B,GAAG,4BAA4B;IAC/B,GAAG,mCAAmC;CACvC,CAAC","sourcesContent":["import coreAiActionComponentMap from './coreAiActionComponentMap';\nimport coreClaudeAiActionComponentMap from './coreClaudeAiActionComponentMap';\nimport coreConfigActionComponentMap from './coreConfigActionComponentMap';\nimport coreContextActionComponentMap from './coreContextActionComponentMap';\nimport coreDateActionComponentMap from './coreDateActionComponentMap';\nimport coreDeployEventActionComponentMap from './coreDeployEventActionComponentMap';\nimport coreErrorActionComponentMap from './coreErrorActionComponentMap';\nimport coreEventActionComponentMap from './coreEventActionComponentMap';\nimport coreEventBusActionComponentMap from './coreEventBusActionComponentMap';\nimport coreFileActionComponentMap from './coreFileActionComponentMap';\nimport coreGraphDatabaseActionComponentMap from './coreGraphDatabaseActionComponentMap';\nimport coreGuidActionComponentMap from './coreGuidActionComponentMap';\nimport coreInlineFunctionActionComponentMap from './coreInlineFunctionActionComponentMap';\nimport coreKeyValueStoreActionComponentMap from './coreKeyValueStoreActionComponentMap';\nimport coreMathActionComponentMap from './coreMathActionComponentMap';\nimport corePlatformActionComponentMap from './corePlatformActionComponentMap';\nimport coreQueueActionComponentMap from './coreQueueActionComponentMap';\nimport coreStateActionComponentMap from './coreStateActionComponentMap';\nimport coreStreamActionComponentMap from './coreStreamActionComponentMap';\nimport coreSystemActionComponentMap from './coreSystemActionComponentMap';\nimport coreUserDirectoryActionComponentMap from './coreUserDirectoryActionComponentMap';\n\nexport default {\n ...coreDeployEventActionComponentMap,\n ...coreAiActionComponentMap,\n ...coreClaudeAiActionComponentMap,\n ...coreConfigActionComponentMap,\n ...coreContextActionComponentMap,\n ...coreDateActionComponentMap,\n ...coreErrorActionComponentMap,\n ...coreEventActionComponentMap,\n ...coreEventBusActionComponentMap,\n ...coreFileActionComponentMap,\n ...coreGraphDatabaseActionComponentMap,\n ...coreGuidActionComponentMap,\n ...coreInlineFunctionActionComponentMap,\n ...coreKeyValueStoreActionComponentMap,\n ...coreMathActionComponentMap,\n ...corePlatformActionComponentMap,\n ...coreQueueActionComponentMap,\n ...coreStateActionComponentMap,\n ...coreStreamActionComponentMap,\n ...coreSystemActionComponentMap,\n ...coreUserDirectoryActionComponentMap,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/LogViewer/logic/actionComponentMap/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,iCAAiC,MAAM,qCAAqC,CAAC;AACpF,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AACxF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAC1F,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AACxF,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AACxE,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,4BAA4B,MAAM,gCAAgC,CAAC;AAC1E,OAAO,mCAAmC,MAAM,uCAAuC,CAAC;AAExF,eAAe;IACb,GAAG,iCAAiC;IACpC,GAAG,wBAAwB;IAC3B,GAAG,8BAA8B;IACjC,GAAG,4BAA4B;IAC/B,GAAG,6BAA6B;IAChC,GAAG,4BAA4B;IAC/B,GAAG,0BAA0B;IAC7B,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,GAAG,8BAA8B;IACjC,GAAG,0BAA0B;IAC7B,GAAG,mCAAmC;IACtC,GAAG,0BAA0B;IAC7B,GAAG,oCAAoC;IACvC,GAAG,mCAAmC;IACtC,GAAG,0BAA0B;IAC7B,GAAG,8BAA8B;IACjC,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,GAAG,4BAA4B;IAC/B,GAAG,4BAA4B;IAC/B,GAAG,mCAAmC;CACvC,CAAC","sourcesContent":["import coreAiActionComponentMap from './coreAiActionComponentMap';\nimport coreClaudeAiActionComponentMap from './coreClaudeAiActionComponentMap';\nimport coreConfigActionComponentMap from './coreConfigActionComponentMap';\nimport coreContextActionComponentMap from './coreContextActionComponentMap';\nimport coreCryptoActionComponentMap from './coreCryptoActionComponentMap';\nimport coreDateActionComponentMap from './coreDateActionComponentMap';\nimport coreDeployEventActionComponentMap from './coreDeployEventActionComponentMap';\nimport coreErrorActionComponentMap from './coreErrorActionComponentMap';\nimport coreEventActionComponentMap from './coreEventActionComponentMap';\nimport coreEventBusActionComponentMap from './coreEventBusActionComponentMap';\nimport coreFileActionComponentMap from './coreFileActionComponentMap';\nimport coreGraphDatabaseActionComponentMap from './coreGraphDatabaseActionComponentMap';\nimport coreGuidActionComponentMap from './coreGuidActionComponentMap';\nimport coreInlineFunctionActionComponentMap from './coreInlineFunctionActionComponentMap';\nimport coreKeyValueStoreActionComponentMap from './coreKeyValueStoreActionComponentMap';\nimport coreMathActionComponentMap from './coreMathActionComponentMap';\nimport corePlatformActionComponentMap from './corePlatformActionComponentMap';\nimport coreQueueActionComponentMap from './coreQueueActionComponentMap';\nimport coreStateActionComponentMap from './coreStateActionComponentMap';\nimport coreStreamActionComponentMap from './coreStreamActionComponentMap';\nimport coreSystemActionComponentMap from './coreSystemActionComponentMap';\nimport coreUserDirectoryActionComponentMap from './coreUserDirectoryActionComponentMap';\n\nexport default {\n ...coreDeployEventActionComponentMap,\n ...coreAiActionComponentMap,\n ...coreClaudeAiActionComponentMap,\n ...coreConfigActionComponentMap,\n ...coreContextActionComponentMap,\n ...coreCryptoActionComponentMap,\n ...coreDateActionComponentMap,\n ...coreErrorActionComponentMap,\n ...coreEventActionComponentMap,\n ...coreEventBusActionComponentMap,\n ...coreFileActionComponentMap,\n ...coreGraphDatabaseActionComponentMap,\n ...coreGuidActionComponentMap,\n ...coreInlineFunctionActionComponentMap,\n ...coreKeyValueStoreActionComponentMap,\n ...coreMathActionComponentMap,\n ...corePlatformActionComponentMap,\n ...coreQueueActionComponentMap,\n ...coreStateActionComponentMap,\n ...coreStreamActionComponentMap,\n ...coreSystemActionComponentMap,\n ...coreUserDirectoryActionComponentMap,\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { askDateNow, askNewGuid } from 'quidproquo-core';
|
|
1
|
+
import { askDateNow, askNewGuid, askNewSortableGuid } from 'quidproquo-core';
|
|
2
2
|
import { askUISessionLogEventAppended } from '../actionCreators/sessionLog/askUISessionLogEventAppended';
|
|
3
3
|
import { adminSessionSchemaVersion } from '../constants/adminSessionSchemaVersion';
|
|
4
4
|
import { localSessionEventActor } from '../constants/localSessionEventActor';
|
|
@@ -8,6 +8,8 @@ import { localSessionEventActor } from '../constants/localSessionEventActor';
|
|
|
8
8
|
// processors with the action's PAYLOAD, so that is what this story receives.
|
|
9
9
|
export function* askApplySessionEventToLog(payload) {
|
|
10
10
|
const clientMessageId = yield* askNewGuid();
|
|
11
|
+
// Sortable ids need no allocator, so the id is minted here rather than positioned later.
|
|
12
|
+
const eventId = yield* askNewSortableGuid();
|
|
11
13
|
const createdAt = yield* askDateNow();
|
|
12
14
|
const event = {
|
|
13
15
|
type: payload.type,
|
|
@@ -18,7 +20,7 @@ export function* askApplySessionEventToLog(payload) {
|
|
|
18
20
|
clientMessageId,
|
|
19
21
|
createdBy: localSessionEventActor,
|
|
20
22
|
createdAt,
|
|
21
|
-
|
|
23
|
+
eventId,
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askApplySessionEventToLog.js","sourceRoot":"","sources":["../../../../src/adminApp/actions/askApplySessionEventToLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"askApplySessionEventToLog.js","sourceRoot":"","sources":["../../../../src/adminApp/actions/askApplySessionEventToLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAe,MAAM,iBAAiB,CAAC;AAG1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAG7E,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,MAAM,SAAS,CAAC,CAAC,yBAAyB,CAAC,OAAuC;IAChF,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;IAC5C,yFAAyF;IACzF,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC5C,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;IAEtC,MAAM,KAAK,GAAkB;QAC3B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE;gBACR,OAAO,EAAE,yBAAyB;gBAClC,eAAe;gBACf,SAAS,EAAE,sBAAsB;gBACjC,SAAS;gBACT,OAAO;aACR;SACF;KACF,CAAC;IAEF,KAAK,CAAC,CAAC,4BAA4B,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import { askDateNow, askNewGuid, askNewSortableGuid, AskResponse } from 'quidproquo-core';\nimport { EventDocEvent } from 'quidproquo-features';\n\nimport { askUISessionLogEventAppended } from '../actionCreators/sessionLog/askUISessionLogEventAppended';\nimport { adminSessionSchemaVersion } from '../constants/adminSessionSchemaVersion';\nimport { localSessionEventActor } from '../constants/localSessionEventActor';\nimport { ApplySessionEventActionPayload } from './ApplySessionEventActionTypes';\n\n// The seam between pure yield and the event log: stamps local metadata and\n// appends optimistically (index assignment + coalescing live in the reducer);\n// the flush loop drains it to the backend. NOTE: the runtime invokes action\n// processors with the action's PAYLOAD, so that is what this story receives.\nexport function* askApplySessionEventToLog(payload: ApplySessionEventActionPayload): AskResponse<void> {\n const clientMessageId = yield* askNewGuid();\n // Sortable ids need no allocator, so the id is minted here rather than positioned later.\n const eventId = yield* askNewSortableGuid();\n const createdAt = yield* askDateNow();\n\n const event: EventDocEvent = {\n type: payload.type,\n payload: {\n data: payload.data,\n metadata: {\n version: adminSessionSchemaVersion,\n clientMessageId,\n createdBy: localSessionEventActor,\n createdAt,\n eventId,\n },\n },\n };\n\n yield* askUISessionLogEventAppended(event);\n}\n"]}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { createQpqRuntimeDefinition } from 'quidproquo-web-react';
|
|
2
|
+
import { getApplySessionEventActionProcessor } from './actions/getApplySessionEventActionProcessor';
|
|
3
|
+
import { askAdminAppMain } from './logic/askAdminAppMain';
|
|
2
4
|
import { adminAppReducer } from './adminAppReducer';
|
|
3
5
|
import { createInitialAdminAppState } from './AdminAppState';
|
|
4
6
|
import { sharedAdminAppApi } from './sharedAdminAppApi';
|
|
5
|
-
export const adminAppRuntime = createQpqRuntimeDefinition(
|
|
7
|
+
export const adminAppRuntime = createQpqRuntimeDefinition({
|
|
8
|
+
uniqueName: 'qpq/admin/adminApp',
|
|
9
|
+
api: sharedAdminAppApi,
|
|
10
|
+
initialState: createInitialAdminAppState(),
|
|
11
|
+
reducer: adminAppReducer,
|
|
12
|
+
// Boot story: session start is the first bind of the area (after login).
|
|
13
|
+
onInit: askAdminAppMain,
|
|
14
|
+
// On the definition so every binder (and the boot story, whichever
|
|
15
|
+
// component's bind runs it) gets the ApplyEvent processor.
|
|
16
|
+
getActionProcessors: getApplySessionEventActionProcessor,
|
|
17
|
+
});
|
|
6
18
|
//# sourceMappingURL=adminAppRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adminAppRuntime.js","sourceRoot":"","sources":["../../../src/adminApp/adminAppRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { createQpqRuntimeDefinition } from 'quidproquo-web-react';\n\nimport { adminAppReducer } from './adminAppReducer';\nimport { createInitialAdminAppState } from './AdminAppState';\nimport { sharedAdminAppApi } from './sharedAdminAppApi';\n\nexport const adminAppRuntime = createQpqRuntimeDefinition(sharedAdminAppApi
|
|
1
|
+
{"version":3,"file":"adminAppRuntime.js","sourceRoot":"","sources":["../../../src/adminApp/adminAppRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;IACxD,UAAU,EAAE,oBAAoB;IAChC,GAAG,EAAE,iBAAiB;IACtB,YAAY,EAAE,0BAA0B,EAAE;IAC1C,OAAO,EAAE,eAAe;IACxB,yEAAyE;IACzE,MAAM,EAAE,eAAe;IACvB,mEAAmE;IACnE,2DAA2D;IAC3D,mBAAmB,EAAE,mCAAmC;CACzD,CAAC,CAAC","sourcesContent":["import { createQpqRuntimeDefinition } from 'quidproquo-web-react';\n\nimport { getApplySessionEventActionProcessor } from './actions/getApplySessionEventActionProcessor';\nimport { askAdminAppMain } from './logic/askAdminAppMain';\nimport { adminAppReducer } from './adminAppReducer';\nimport { createInitialAdminAppState } from './AdminAppState';\nimport { sharedAdminAppApi } from './sharedAdminAppApi';\n\nexport const adminAppRuntime = createQpqRuntimeDefinition({\n uniqueName: 'qpq/admin/adminApp',\n api: sharedAdminAppApi,\n initialState: createInitialAdminAppState(),\n reducer: adminAppReducer,\n // Boot story: session start is the first bind of the area (after login).\n onInit: askAdminAppMain,\n // On the definition so every binder (and the boot story, whichever\n // component's bind runs it) gets the ApplyEvent processor.\n getActionProcessors: getApplySessionEventActionProcessor,\n});\n"]}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { authContext, QpqContextProvider, QpqRuntimeEffectCatcher
|
|
2
|
+
import { authContext, QpqContextProvider, QpqRuntimeEffectCatcher } from 'quidproquo-web-react';
|
|
3
3
|
import { useContext } from 'react';
|
|
4
|
-
import { getApplySessionEventActionProcessor } from '../../actions/getApplySessionEventActionProcessor';
|
|
5
4
|
import { adminAppRuntime } from '../../adminAppRuntime';
|
|
6
5
|
import { adminUserContext } from '../../contexts/adminUserContext';
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
const AdminAppRuntimeMount = ({ children }) => {
|
|
12
|
-
useQpqRuntime(adminAppRuntime, askAdminAppMain, undefined, getApplySessionEventActionProcessor);
|
|
13
|
-
return _jsx(QpqRuntimeEffectCatcher, { runtime: adminAppRuntime, children: children });
|
|
14
|
-
};
|
|
6
|
+
// Mounts only once authenticated (inside Auth), so the first bind of the
|
|
7
|
+
// adminApp area IS session start: the definition's onInit creates the session
|
|
8
|
+
// doc, seeds it from the URL, and runs the flush loop until logout unmounts
|
|
9
|
+
// the subtree and the area is released.
|
|
15
10
|
export const AdminAppProvider = ({ children }) => {
|
|
16
11
|
const authState = useContext(authContext);
|
|
17
12
|
const adminUser = {
|
|
18
13
|
username: authState?.username ?? '',
|
|
19
14
|
};
|
|
20
|
-
return (_jsx(QpqContextProvider, { contextIdentifier: adminUserContext, value: adminUser, children: _jsx(
|
|
15
|
+
return (_jsx(QpqContextProvider, { contextIdentifier: adminUserContext, value: adminUser, children: _jsx(QpqRuntimeEffectCatcher, { runtime: adminAppRuntime, children: children }) }));
|
|
21
16
|
};
|
|
22
17
|
//# sourceMappingURL=AdminAppProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminAppProvider.js","sourceRoot":"","sources":["../../../../../src/adminApp/components/AdminAppProvider/AdminAppProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"AdminAppProvider.js","sourceRoot":"","sources":["../../../../../src/adminApp/components/AdminAppProvider/AdminAppProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEhG,OAAO,EAAa,UAAU,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAoB,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMrF,yEAAyE;AACzE,8EAA8E;AAC9E,4EAA4E;AAC5E,wCAAwC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChF,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAqB;QAClC,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,EAAE;KACpC,CAAC;IAEF,OAAO,CACL,KAAC,kBAAkB,IAAC,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,YACvE,KAAC,uBAAuB,IAAC,OAAO,EAAE,eAAe,YAAG,QAAQ,GAA2B,GACpE,CACtB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { authContext, QpqContextProvider, QpqRuntimeEffectCatcher } from 'quidproquo-web-react';\n\nimport { ReactNode, useContext } from 'react';\n\nimport { adminAppRuntime } from '../../adminAppRuntime';\nimport { AdminUserContext, adminUserContext } from '../../contexts/adminUserContext';\n\ntype AdminAppProviderProps = {\n children?: ReactNode;\n};\n\n// Mounts only once authenticated (inside Auth), so the first bind of the\n// adminApp area IS session start: the definition's onInit creates the session\n// doc, seeds it from the URL, and runs the flush loop until logout unmounts\n// the subtree and the area is released.\nexport const AdminAppProvider: React.FC<AdminAppProviderProps> = ({ children }) => {\n const authState = useContext(authContext);\n\n const adminUser: AdminUserContext = {\n username: authState?.username ?? '',\n };\n\n return (\n <QpqContextProvider contextIdentifier={adminUserContext} value={adminUser}>\n <QpqRuntimeEffectCatcher runtime={adminAppRuntime}>{children}</QpqRuntimeEffectCatcher>\n </QpqContextProvider>\n );\n};\n"]}
|
|
@@ -14,4 +14,4 @@ export declare const useAdminApp: () => [import("quidproquo-web-react").QpqMappe
|
|
|
14
14
|
askRunLogLogSearch: typeof import("..").askRunLogLogSearch;
|
|
15
15
|
askRunLogSearch: typeof import("..").askRunLogSearch;
|
|
16
16
|
askSendChatMessage: typeof import("..").askSendChatMessage;
|
|
17
|
-
}>, import("..").AdminAppState, (action:
|
|
17
|
+
}>, import("..").AdminAppState, (action: import("..").SessionLogEffects | import("..").VolatileEffects) => void];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useQpqRuntime } from 'quidproquo-web-react';
|
|
2
|
-
import { getApplySessionEventActionProcessor } from '../actions/getApplySessionEventActionProcessor';
|
|
3
2
|
import { adminAppRuntime } from '../adminAppRuntime';
|
|
4
|
-
// The
|
|
5
|
-
//
|
|
6
|
-
export const useAdminApp = () => useQpqRuntime(adminAppRuntime
|
|
3
|
+
// The ApplyEvent processor and the boot story both live on the definition, so
|
|
4
|
+
// every consumer binds the same way; the first bind starts the session.
|
|
5
|
+
export const useAdminApp = () => useQpqRuntime(adminAppRuntime);
|
|
7
6
|
//# sourceMappingURL=useAdminApp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAdminApp.js","sourceRoot":"","sources":["../../../../src/adminApp/hooks/useAdminApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useAdminApp.js","sourceRoot":"","sources":["../../../../src/adminApp/hooks/useAdminApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,8EAA8E;AAC9E,wEAAwE;AACxE,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { useQpqRuntime } from 'quidproquo-web-react';\n\nimport { adminAppRuntime } from '../adminAppRuntime';\n\n// The ApplyEvent processor and the boot story both live on the definition, so\n// every consumer binds the same way; the first bind starts the session.\nexport const useAdminApp = () => useQpqRuntime(adminAppRuntime);\n"]}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { coalesceEventTypes } from '../../constants/coalesceEventTypes';
|
|
2
|
-
const nextLocalIndex = (state) => {
|
|
3
|
-
const tail = state.pendingEvents[state.pendingEvents.length - 1] ?? state.events[state.events.length - 1];
|
|
4
|
-
return tail ? tail.payload.metadata.index + 1 : 0;
|
|
5
|
-
};
|
|
6
2
|
// Optimistic append with coalescing: while the previous event of the same
|
|
7
3
|
// coalescable type is still pending, the new one replaces it (latest value
|
|
8
4
|
// wins). The head is never coalesced while the flush has it in flight — the
|
|
@@ -16,7 +12,9 @@ export const eventAppended = (state, event) => {
|
|
|
16
12
|
...event,
|
|
17
13
|
payload: {
|
|
18
14
|
...event.payload,
|
|
19
|
-
|
|
15
|
+
// Keeps the replaced event's id, so the coalesced event holds its place in the log
|
|
16
|
+
// rather than jumping to the end.
|
|
17
|
+
metadata: { ...event.payload.metadata, eventId: last.payload.metadata.eventId },
|
|
20
18
|
},
|
|
21
19
|
};
|
|
22
20
|
return {
|
|
@@ -24,16 +22,11 @@ export const eventAppended = (state, event) => {
|
|
|
24
22
|
pendingEvents: [...state.pendingEvents.slice(0, -1), coalesced],
|
|
25
23
|
};
|
|
26
24
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
payload: {
|
|
30
|
-
...event.payload,
|
|
31
|
-
metadata: { ...event.payload.metadata, index: nextLocalIndex(state) },
|
|
32
|
-
},
|
|
33
|
-
};
|
|
25
|
+
// The event already carries the id minted when it was created, and sortable ids order
|
|
26
|
+
// themselves, so there is nothing to assign here.
|
|
34
27
|
return {
|
|
35
28
|
...state,
|
|
36
|
-
pendingEvents: [...state.pendingEvents,
|
|
29
|
+
pendingEvents: [...state.pendingEvents, event],
|
|
37
30
|
};
|
|
38
31
|
};
|
|
39
32
|
//# sourceMappingURL=eventAppended.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventAppended.js","sourceRoot":"","sources":["../../../../../src/adminApp/stateUpdaters/sessionLog/eventAppended.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAIxE,
|
|
1
|
+
{"version":3,"file":"eventAppended.js","sourceRoot":"","sources":["../../../../../src/adminApp/stateUpdaters/sessionLog/eventAppended.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAIxE,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E;AAC5E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAsB,EAAE,KAAoB,EAAmB,EAAE;IAC7F,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEjE,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;IACpF,MAAM,cAAc,GAClB,CAAC,CAAC,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,IAA6B,CAAC,CAAC;IAEhI,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,SAAS,GAAkB;YAC/B,GAAG,KAAK;YACR,OAAO,EAAE;gBACP,GAAG,KAAK,CAAC,OAAO;gBAChB,mFAAmF;gBACnF,kCAAkC;gBAClC,QAAQ,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE;aAChF;SACF,CAAC;QAEF,OAAO;YACL,GAAG,KAAK;YACR,aAAa,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;SAChE,CAAC;IACJ,CAAC;IAED,sFAAsF;IACtF,kDAAkD;IAClD,OAAO;QACL,GAAG,KAAK;QACR,aAAa,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;KAC/C,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EventDocEvent } from 'quidproquo-features';\n\nimport { coalesceEventTypes } from '../../constants/coalesceEventTypes';\nimport { AdminSessionEventType } from '../../effects/session/AdminSessionEventType';\nimport { SessionLogState } from '../../SessionLogState';\n\n// Optimistic append with coalescing: while the previous event of the same\n// coalescable type is still pending, the new one replaces it (latest value\n// wins). The head is never coalesced while the flush has it in flight — the\n// POSTed clientMessageId must stay matchable for the save ack.\nexport const eventAppended = (state: SessionLogState, event: EventDocEvent): SessionLogState => {\n const last = state.pendingEvents[state.pendingEvents.length - 1];\n\n const lastIsInFlightHead = state.pendingEvents.length === 1 && state.flush.inFlight;\n const shouldCoalesce =\n !!last && !lastIsInFlightHead && last.type === event.type && coalesceEventTypes.includes(event.type as AdminSessionEventType);\n\n if (shouldCoalesce) {\n const coalesced: EventDocEvent = {\n ...event,\n payload: {\n ...event.payload,\n // Keeps the replaced event's id, so the coalesced event holds its place in the log\n // rather than jumping to the end.\n metadata: { ...event.payload.metadata, eventId: last.payload.metadata.eventId },\n },\n };\n\n return {\n ...state,\n pendingEvents: [...state.pendingEvents.slice(0, -1), coalesced],\n };\n }\n\n // The event already carries the id minted when it was created, and sortable ids order\n // themselves, so there is nothing to assign here.\n return {\n ...state,\n pendingEvents: [...state.pendingEvents, event],\n };\n};\n"]}
|
|
@@ -4,17 +4,12 @@
|
|
|
4
4
|
export const eventSaved = (state, payload) => {
|
|
5
5
|
const savedAt = state.pendingEvents.findIndex((event) => event.payload.metadata.clientMessageId === payload.clientMessageId);
|
|
6
6
|
const remaining = savedAt === -1 ? state.pendingEvents : [...state.pendingEvents.slice(0, savedAt), ...state.pendingEvents.slice(savedAt + 1)];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
payload: {
|
|
10
|
-
...event.payload,
|
|
11
|
-
metadata: { ...event.payload.metadata, index: payload.storedEvent.payload.metadata.index + 1 + offset },
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
7
|
+
// No renumbering: each pending event minted its own sortable id, which already sorts after
|
|
8
|
+
// the saved log. Removing one from the middle leaves the rest correctly ordered.
|
|
14
9
|
return {
|
|
15
10
|
...state,
|
|
16
11
|
events: [...state.events, payload.storedEvent],
|
|
17
|
-
pendingEvents:
|
|
12
|
+
pendingEvents: remaining,
|
|
18
13
|
flush: { inFlight: false, lastError: null, retryCount: 0 },
|
|
19
14
|
};
|
|
20
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventSaved.js","sourceRoot":"","sources":["../../../../../src/adminApp/stateUpdaters/sessionLog/eventSaved.ts"],"names":[],"mappings":"AAKA,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,OAAoC,EAAmB,EAAE;IAC1G,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7H,MAAM,SAAS,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/I,
|
|
1
|
+
{"version":3,"file":"eventSaved.js","sourceRoot":"","sources":["../../../../../src/adminApp/stateUpdaters/sessionLog/eventSaved.ts"],"names":[],"mappings":"AAKA,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,OAAoC,EAAmB,EAAE;IAC1G,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7H,MAAM,SAAS,GAAG,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/I,2FAA2F;IAC3F,iFAAiF;IACjF,OAAO;QACL,GAAG,KAAK;QACR,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC;QAC9C,aAAa,EAAE,SAAS;QACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE;KAC3D,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EventDocEvent } from 'quidproquo-features';\n\nimport { SessionLogEventSavedPayload } from '../../effects/sessionLog/SessionLogEventSavedEffect';\nimport { SessionLogState } from '../../SessionLogState';\n\n// Server ack: the pending event moves to the acked log with its server-stamped\n// metadata, and the remaining pending events renumber onto consecutive indexes\n// after it (the server may have assigned a later index than our optimistic one).\nexport const eventSaved = (state: SessionLogState, payload: SessionLogEventSavedPayload): SessionLogState => {\n const savedAt = state.pendingEvents.findIndex((event) => event.payload.metadata.clientMessageId === payload.clientMessageId);\n\n const remaining = savedAt === -1 ? state.pendingEvents : [...state.pendingEvents.slice(0, savedAt), ...state.pendingEvents.slice(savedAt + 1)];\n\n // No renumbering: each pending event minted its own sortable id, which already sorts after\n // the saved log. Removing one from the middle leaves the rest correctly ordered.\n return {\n ...state,\n events: [...state.events, payload.storedEvent],\n pendingEvents: remaining,\n flush: { inFlight: false, lastError: null, retryCount: 0 },\n };\n};\n"]}
|
|
@@ -10,7 +10,8 @@ export const makeSessionEvent = (type, data, index, overrides) => ({
|
|
|
10
10
|
clientMessageId: overrides?.clientMessageId ?? `cmid-${index}`,
|
|
11
11
|
createdBy: { userId: 'test-user', userDisplayName: 'Test User' },
|
|
12
12
|
createdAt: overrides?.createdAt ?? `2026-07-07T00:00:0${Math.min(index, 9)}.000Z`,
|
|
13
|
-
|
|
13
|
+
// Padded so the stub ids sort in creation order, like real sortable ids.
|
|
14
|
+
eventId: String(index).padStart(4, '0'),
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeSessionEvent.js","sourceRoot":"","sources":["../../../../src/adminApp/testHelpers/makeSessionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,IAAO,EACP,KAAa,EACb,SAAoE,EACrD,EAAE,CAAC,CAAC;IACnB,IAAI;IACJ,OAAO,EAAE;QACP,IAAI;QACJ,QAAQ,EAAE;YACR,OAAO,EAAE,yBAAyB;YAClC,eAAe,EAAE,SAAS,EAAE,eAAe,IAAI,QAAQ,KAAK,EAAE;YAC9D,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE;YAChE,SAAS,EAAE,SAAS,EAAE,SAAS,IAAK,qBAAqB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,OAA0B;YACrG,KAAK;
|
|
1
|
+
{"version":3,"file":"makeSessionEvent.js","sourceRoot":"","sources":["../../../../src/adminApp/testHelpers/makeSessionEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,IAAO,EACP,KAAa,EACb,SAAoE,EACrD,EAAE,CAAC,CAAC;IACnB,IAAI;IACJ,OAAO,EAAE;QACP,IAAI;QACJ,QAAQ,EAAE;YACR,OAAO,EAAE,yBAAyB;YAClC,eAAe,EAAE,SAAS,EAAE,eAAe,IAAI,QAAQ,KAAK,EAAE;YAC9D,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE;YAChE,SAAS,EAAE,SAAS,EAAE,SAAS,IAAK,qBAAqB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,OAA0B;YACrG,yEAAyE;YACzE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;SACxC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAU,EAAE,IAAY,EAAiB,EAAE,CAC5E,gBAAgB,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC","sourcesContent":["import { QpqIsoDateTime } from 'quidproquo-core';\nimport { EventDocEffect, EventDocEvent } from 'quidproquo-features';\n\nimport { adminSessionSchemaVersion } from '../constants/adminSessionSchemaVersion';\n\n// Builds a session event with sensible metadata defaults for tests.\nexport const makeSessionEvent = <T>(\n type: string,\n data: T,\n index: number,\n overrides?: { clientMessageId?: string; createdAt?: QpqIsoDateTime },\n): EventDocEvent => ({\n type,\n payload: {\n data,\n metadata: {\n version: adminSessionSchemaVersion,\n clientMessageId: overrides?.clientMessageId ?? `cmid-${index}`,\n createdBy: { userId: 'test-user', userDisplayName: 'Test User' },\n createdAt: overrides?.createdAt ?? (`2026-07-07T00:00:0${Math.min(index, 9)}.000Z` as QpqIsoDateTime),\n // Padded so the stub ids sort in creation order, like real sortable ids.\n eventId: String(index).padStart(4, '0'),\n },\n },\n});\n\nexport const makeInitStateEvent = (id: string, name: string): EventDocEvent =>\n makeSessionEvent(EventDocEffect.InitState, { id, code: 'session-code', name }, 0);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-web-admin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -44,19 +44,18 @@
|
|
|
44
44
|
"date-fns": "^2.30.0",
|
|
45
45
|
"dayjs": "^1.11.7",
|
|
46
46
|
"javascript-time-ago": "^2.5.9",
|
|
47
|
-
"quidproquo-core": "0.1.
|
|
48
|
-
"quidproquo-features": "0.1.
|
|
49
|
-
"quidproquo-tsconfig": "0.1.
|
|
50
|
-
"quidproquo-web": "0.1.
|
|
51
|
-
"quidproquo-web-react": "0.1.
|
|
52
|
-
"quidproquo-webserver": "0.1.
|
|
47
|
+
"quidproquo-core": "0.1.13",
|
|
48
|
+
"quidproquo-features": "0.1.13",
|
|
49
|
+
"quidproquo-tsconfig": "0.1.13",
|
|
50
|
+
"quidproquo-web": "0.1.13",
|
|
51
|
+
"quidproquo-web-react": "0.1.13",
|
|
52
|
+
"quidproquo-webserver": "0.1.13",
|
|
53
53
|
"react": ">=18.3.1",
|
|
54
54
|
"react-d3-tree": "^3.6.6",
|
|
55
55
|
"react-dom": "18.3.1",
|
|
56
56
|
"react-icons": "^4.8.0",
|
|
57
57
|
"react-inspector": "^6.0.2",
|
|
58
58
|
"react-markdown": "^9.0.1",
|
|
59
|
-
"react-router-dom": "^6.22.3",
|
|
60
59
|
"react-time-ago": "^7.2.1",
|
|
61
60
|
"recharts": "^2.12.3"
|
|
62
61
|
},
|