quidproquo-web 0.1.16 → 0.1.18
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/README.md +26 -7
- package/lib/commonjs/actions/queryParams/askQueryParamsGet.d.ts +4 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsGet.js +10 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsGet.js.map +1 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsGetAll.d.ts +3 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsGetAll.js +10 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsGetAll.js.map +1 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsSet.d.ts +6 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsSet.js +10 -0
- package/lib/commonjs/actions/queryParams/askQueryParamsSet.js.map +1 -0
- package/lib/commonjs/actions/queryParams/index.d.ts +3 -6
- package/lib/commonjs/actions/queryParams/index.js +3 -6
- package/lib/commonjs/actions/queryParams/index.js.map +1 -1
- package/lib/commonjs/actions/window/askWindowGetLocation.d.ts +14 -0
- package/lib/commonjs/actions/window/askWindowGetLocation.js +10 -0
- package/lib/commonjs/actions/window/askWindowGetLocation.js.map +1 -0
- package/lib/commonjs/actions/window/index.d.ts +1 -2
- package/lib/commonjs/actions/window/index.js +1 -2
- package/lib/commonjs/actions/window/index.js.map +1 -1
- package/lib/esm/actions/queryParams/askQueryParamsGet.d.ts +4 -0
- package/lib/esm/actions/queryParams/askQueryParamsGet.js +7 -0
- package/lib/esm/actions/queryParams/askQueryParamsGet.js.map +1 -0
- package/lib/esm/actions/queryParams/askQueryParamsGetAll.d.ts +3 -0
- package/lib/esm/actions/queryParams/askQueryParamsGetAll.js +7 -0
- package/lib/esm/actions/queryParams/askQueryParamsGetAll.js.map +1 -0
- package/lib/esm/actions/queryParams/askQueryParamsSet.d.ts +6 -0
- package/lib/esm/actions/queryParams/askQueryParamsSet.js +7 -0
- package/lib/esm/actions/queryParams/askQueryParamsSet.js.map +1 -0
- package/lib/esm/actions/queryParams/index.d.ts +3 -6
- package/lib/esm/actions/queryParams/index.js +3 -6
- package/lib/esm/actions/queryParams/index.js.map +1 -1
- package/lib/esm/actions/window/askWindowGetLocation.d.ts +14 -0
- package/lib/esm/actions/window/askWindowGetLocation.js +7 -0
- package/lib/esm/actions/window/askWindowGetLocation.js.map +1 -0
- package/lib/esm/actions/window/index.d.ts +1 -2
- package/lib/esm/actions/window/index.js +1 -2
- package/lib/esm/actions/window/index.js.map +1 -1
- package/package.json +10 -7
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequester.d.ts +0 -3
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequester.js +0 -9
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequester.js.map +0 -1
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequesterTypes.d.ts +0 -11
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequesterTypes.js +0 -3
- package/lib/commonjs/actions/queryParams/QueryParamsGetActionRequesterTypes.js.map +0 -1
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequester.d.ts +0 -3
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequester.js +0 -9
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequester.js.map +0 -1
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequesterTypes.d.ts +0 -8
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequesterTypes.js +0 -3
- package/lib/commonjs/actions/queryParams/QueryParamsGetAllActionRequesterTypes.js.map +0 -1
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequester.d.ts +0 -7
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequester.js +0 -13
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequester.js.map +0 -1
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequesterTypes.d.ts +0 -13
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequesterTypes.js +0 -3
- package/lib/commonjs/actions/queryParams/QueryParamsSetActionRequesterTypes.js.map +0 -1
- package/lib/commonjs/actions/window/WindowGetLocationActionRequester.d.ts +0 -3
- package/lib/commonjs/actions/window/WindowGetLocationActionRequester.js +0 -9
- package/lib/commonjs/actions/window/WindowGetLocationActionRequester.js.map +0 -1
- package/lib/commonjs/actions/window/WindowGetLocationActionRequesterTypes.d.ts +0 -19
- package/lib/commonjs/actions/window/WindowGetLocationActionRequesterTypes.js +0 -3
- package/lib/commonjs/actions/window/WindowGetLocationActionRequesterTypes.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequester.d.ts +0 -3
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequester.js +0 -6
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequester.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequesterTypes.d.ts +0 -11
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequesterTypes.js +0 -2
- package/lib/esm/actions/queryParams/QueryParamsGetActionRequesterTypes.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequester.d.ts +0 -3
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequester.js +0 -6
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequester.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequesterTypes.d.ts +0 -8
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequesterTypes.js +0 -2
- package/lib/esm/actions/queryParams/QueryParamsGetAllActionRequesterTypes.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequester.d.ts +0 -7
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequester.js +0 -10
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequester.js.map +0 -1
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequesterTypes.d.ts +0 -13
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequesterTypes.js +0 -2
- package/lib/esm/actions/queryParams/QueryParamsSetActionRequesterTypes.js.map +0 -1
- package/lib/esm/actions/window/WindowGetLocationActionRequester.d.ts +0 -3
- package/lib/esm/actions/window/WindowGetLocationActionRequester.js +0 -6
- package/lib/esm/actions/window/WindowGetLocationActionRequester.js.map +0 -1
- package/lib/esm/actions/window/WindowGetLocationActionRequesterTypes.d.ts +0 -19
- package/lib/esm/actions/window/WindowGetLocationActionRequesterTypes.js +0 -2
- package/lib/esm/actions/window/WindowGetLocationActionRequesterTypes.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
# quidproquo
|
|
1
|
+
# quidproquo-web
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browser-side building blocks for [quidproquo](https://github.com/qpqjs/quidproquo), with no UI framework attached.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
If you are writing a React app, install [`quidproquo-web-react`](https://www.npmjs.com/package/quidproquo-web-react) instead. It depends on this package and adds the hooks, state store, and providers.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install quidproquo-web
|
|
9
|
+
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## What is in here
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
- **Web actions**: reading and writing query parameters, and window access, expressed as qpq actions so a story can use them
|
|
14
|
+
- **`WebsocketService`**: a managed websocket connection with reconnect handling
|
|
15
|
+
- **Federation helpers**: forcing a federated remote to reload, which is what makes a deploy visible to an already-open tab
|
|
16
|
+
- **Small utilities** shared across qpq frontends, such as `timeAgo` and `uniqueBy`
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
## Why the actions
|
|
19
|
+
|
|
20
|
+
Query parameters and window state are side effects like any other. Going through an action keeps the story that uses them testable and lets the same logic run server-side, where a processor answers with something else.
|
|
21
|
+
|
|
22
|
+
## Status
|
|
23
|
+
|
|
24
|
+
Pre-1.0. The whole `quidproquo-*` family releases in lockstep, so versions that share a number were built and tested together. Expect APIs to move between releases, and pin your versions.
|
|
25
|
+
|
|
26
|
+
## Documentation
|
|
27
|
+
|
|
28
|
+
[docs.quidproquojs.com](https://docs.quidproquojs.com)
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT. See [LICENSE](https://github.com/qpqjs/quidproquo/blob/main/LICENSE).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askQueryParamsGet = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
6
|
+
exports.askQueryParamsGet = (0, quidproquo_core_1.createActionRequester)()({
|
|
7
|
+
actionType: QueryParamsActionType_1.QueryParamsActionType.Get,
|
|
8
|
+
getPayload: (key) => ({ key }),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=askQueryParamsGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsGet.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsGet.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,mEAAgE;AAEnD,QAAA,iBAAiB,GAAG,IAAA,uCAAqB,GAAY,CAAC;IACjE,UAAU,EAAE,6CAAqB,CAAC,GAAG;IACrC,UAAU,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;CACvC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\nexport const askQueryParamsGet = createActionRequester<string[]>()({\n actionType: QueryParamsActionType.Get,\n getPayload: (key: string) => ({ key }),\n});\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
+
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
3
|
+
export declare const askQueryParamsGetAll: import("quidproquo-core").ActionRequesterFunction<QueryParamsActionType.GetAll, [], undefined, Record<string, string[]>, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askQueryParamsGetAll = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
6
|
+
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
7
|
+
exports.askQueryParamsGetAll = (0, quidproquo_core_1.createActionRequester)()({
|
|
8
|
+
actionType: QueryParamsActionType_1.QueryParamsActionType.GetAll,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=askQueryParamsGetAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsGetAll.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsGetAll.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,mEAAgE;AAEhE,yFAAyF;AAC5E,QAAA,oBAAoB,GAAG,IAAA,uCAAqB,GAA4B,CAAC;IACpF,UAAU,EAAE,6CAAqB,CAAC,MAAM;CACzC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n/** Reads the whole query string of the current url as key -> all values for that key. */\nexport const askQueryParamsGetAll = createActionRequester<Record<string, string[]>>()({\n actionType: QueryParamsActionType.GetAll,\n});\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
+
export declare const askQueryParamsSet: import("quidproquo-core").ActionRequesterFunction<QueryParamsActionType.Set, [key: string, values: string[], createHistoryEntry?: boolean | undefined], {
|
|
3
|
+
key: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
createHistoryEntry: boolean;
|
|
6
|
+
}, void, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askQueryParamsSet = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
6
|
+
exports.askQueryParamsSet = (0, quidproquo_core_1.createActionRequester)()({
|
|
7
|
+
actionType: QueryParamsActionType_1.QueryParamsActionType.Set,
|
|
8
|
+
getPayload: (key, values, createHistoryEntry = false) => ({ key, values, createHistoryEntry }),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=askQueryParamsSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsSet.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsSet.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,mEAAgE;AAEnD,QAAA,iBAAiB,GAAG,IAAA,uCAAqB,GAAQ,CAAC;IAC7D,UAAU,EAAE,6CAAqB,CAAC,GAAG;IACrC,UAAU,EAAE,CAAC,GAAW,EAAE,MAAgB,EAAE,qBAA8B,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC1H,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\nexport const askQueryParamsSet = createActionRequester<void>()({\n actionType: QueryParamsActionType.Set,\n getPayload: (key: string, values: string[], createHistoryEntry: boolean = false) => ({ key, values, createHistoryEntry }),\n});\n"]}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
+
export * from './askQueryParamsGet';
|
|
2
|
+
export * from './askQueryParamsGetAll';
|
|
3
|
+
export * from './askQueryParamsSet';
|
|
1
4
|
export * from './QueryParamsActionType';
|
|
2
|
-
export * from './QueryParamsGetActionRequester';
|
|
3
|
-
export * from './QueryParamsGetActionRequesterTypes';
|
|
4
|
-
export * from './QueryParamsGetAllActionRequester';
|
|
5
|
-
export * from './QueryParamsGetAllActionRequesterTypes';
|
|
6
|
-
export * from './QueryParamsSetActionRequester';
|
|
7
|
-
export * from './QueryParamsSetActionRequesterTypes';
|
|
@@ -14,11 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./askQueryParamsGet"), exports);
|
|
18
|
+
__exportStar(require("./askQueryParamsGetAll"), exports);
|
|
19
|
+
__exportStar(require("./askQueryParamsSet"), exports);
|
|
17
20
|
__exportStar(require("./QueryParamsActionType"), exports);
|
|
18
|
-
__exportStar(require("./QueryParamsGetActionRequester"), exports);
|
|
19
|
-
__exportStar(require("./QueryParamsGetActionRequesterTypes"), exports);
|
|
20
|
-
__exportStar(require("./QueryParamsGetAllActionRequester"), exports);
|
|
21
|
-
__exportStar(require("./QueryParamsGetAllActionRequesterTypes"), exports);
|
|
22
|
-
__exportStar(require("./QueryParamsSetActionRequester"), exports);
|
|
23
|
-
__exportStar(require("./QueryParamsSetActionRequesterTypes"), exports);
|
|
24
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAuC;AACvC,sDAAoC;AACpC,0DAAwC","sourcesContent":["export * from './askQueryParamsGet';\nexport * from './askQueryParamsGetAll';\nexport * from './askQueryParamsSet';\nexport * from './QueryParamsActionType';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WindowActionType } from './WindowActionType';
|
|
2
|
+
export type WindowLocation = {
|
|
3
|
+
href: string;
|
|
4
|
+
origin: string;
|
|
5
|
+
protocol: string;
|
|
6
|
+
host: string;
|
|
7
|
+
hostname: string;
|
|
8
|
+
port: string;
|
|
9
|
+
pathname: string;
|
|
10
|
+
search: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
};
|
|
13
|
+
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
14
|
+
export declare const askWindowGetLocation: import("quidproquo-core").ActionRequesterFunction<WindowActionType, [], undefined, WindowLocation, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askWindowGetLocation = void 0;
|
|
4
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
5
|
+
const WindowActionType_1 = require("./WindowActionType");
|
|
6
|
+
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
7
|
+
exports.askWindowGetLocation = (0, quidproquo_core_1.createActionRequester)()({
|
|
8
|
+
actionType: WindowActionType_1.WindowActionType.GetLocation,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=askWindowGetLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askWindowGetLocation.js","sourceRoot":"","sources":["../../../../src/actions/window/askWindowGetLocation.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AAExD,yDAAsD;AAetD,6GAA6G;AAChG,QAAA,oBAAoB,GAAG,IAAA,uCAAqB,GAAkB,CAAC;IAC1E,UAAU,EAAE,mCAAgB,CAAC,WAAW;CACzC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { WindowActionType } from './WindowActionType';\n\n// A plain, serializable copy of the browser `window.location`.\nexport type WindowLocation = {\n href: string;\n origin: string;\n protocol: string;\n host: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n};\n\n/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */\nexport const askWindowGetLocation = createActionRequester<WindowLocation>()({\n actionType: WindowActionType.GetLocation,\n});\n"]}
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./askWindowGetLocation"), exports);
|
|
17
18
|
__exportStar(require("./WindowActionType"), exports);
|
|
18
|
-
__exportStar(require("./WindowGetLocationActionRequester"), exports);
|
|
19
|
-
__exportStar(require("./WindowGetLocationActionRequesterTypes"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/window/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/window/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,qDAAmC","sourcesContent":["export * from './askWindowGetLocation';\nexport * from './WindowActionType';\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createActionRequester } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
+
export const askQueryParamsGet = createActionRequester()({
|
|
4
|
+
actionType: QueryParamsActionType.Get,
|
|
5
|
+
getPayload: (key) => ({ key }),
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=askQueryParamsGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsGet.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsGet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,EAAY,CAAC;IACjE,UAAU,EAAE,qBAAqB,CAAC,GAAG;IACrC,UAAU,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;CACvC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\nexport const askQueryParamsGet = createActionRequester<string[]>()({\n actionType: QueryParamsActionType.Get,\n getPayload: (key: string) => ({ key }),\n});\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
+
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
3
|
+
export declare const askQueryParamsGetAll: import("quidproquo-core").ActionRequesterFunction<QueryParamsActionType.GetAll, [], undefined, Record<string, string[]>, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createActionRequester } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
+
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
4
|
+
export const askQueryParamsGetAll = createActionRequester()({
|
|
5
|
+
actionType: QueryParamsActionType.GetAll,
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=askQueryParamsGetAll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsGetAll.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsGetAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,yFAAyF;AACzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,EAA4B,CAAC;IACpF,UAAU,EAAE,qBAAqB,CAAC,MAAM;CACzC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n/** Reads the whole query string of the current url as key -> all values for that key. */\nexport const askQueryParamsGetAll = createActionRequester<Record<string, string[]>>()({\n actionType: QueryParamsActionType.GetAll,\n});\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
+
export declare const askQueryParamsSet: import("quidproquo-core").ActionRequesterFunction<QueryParamsActionType.Set, [key: string, values: string[], createHistoryEntry?: boolean | undefined], {
|
|
3
|
+
key: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
createHistoryEntry: boolean;
|
|
6
|
+
}, void, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createActionRequester } from 'quidproquo-core';
|
|
2
|
+
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
+
export const askQueryParamsSet = createActionRequester()({
|
|
4
|
+
actionType: QueryParamsActionType.Set,
|
|
5
|
+
getPayload: (key, values, createHistoryEntry = false) => ({ key, values, createHistoryEntry }),
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=askQueryParamsSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askQueryParamsSet.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/askQueryParamsSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,EAAQ,CAAC;IAC7D,UAAU,EAAE,qBAAqB,CAAC,GAAG;IACrC,UAAU,EAAE,CAAC,GAAW,EAAE,MAAgB,EAAE,qBAA8B,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC1H,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\nexport const askQueryParamsSet = createActionRequester<void>()({\n actionType: QueryParamsActionType.Set,\n getPayload: (key: string, values: string[], createHistoryEntry: boolean = false) => ({ key, values, createHistoryEntry }),\n});\n"]}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
+
export * from './askQueryParamsGet';
|
|
2
|
+
export * from './askQueryParamsGetAll';
|
|
3
|
+
export * from './askQueryParamsSet';
|
|
1
4
|
export * from './QueryParamsActionType';
|
|
2
|
-
export * from './QueryParamsGetActionRequester';
|
|
3
|
-
export * from './QueryParamsGetActionRequesterTypes';
|
|
4
|
-
export * from './QueryParamsGetAllActionRequester';
|
|
5
|
-
export * from './QueryParamsGetAllActionRequesterTypes';
|
|
6
|
-
export * from './QueryParamsSetActionRequester';
|
|
7
|
-
export * from './QueryParamsSetActionRequesterTypes';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
export * from './askQueryParamsGet';
|
|
2
|
+
export * from './askQueryParamsGetAll';
|
|
3
|
+
export * from './askQueryParamsSet';
|
|
1
4
|
export * from './QueryParamsActionType';
|
|
2
|
-
export * from './QueryParamsGetActionRequester';
|
|
3
|
-
export * from './QueryParamsGetActionRequesterTypes';
|
|
4
|
-
export * from './QueryParamsGetAllActionRequester';
|
|
5
|
-
export * from './QueryParamsGetAllActionRequesterTypes';
|
|
6
|
-
export * from './QueryParamsSetActionRequester';
|
|
7
|
-
export * from './QueryParamsSetActionRequesterTypes';
|
|
8
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './askQueryParamsGet';\nexport * from './askQueryParamsGetAll';\nexport * from './askQueryParamsSet';\nexport * from './QueryParamsActionType';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WindowActionType } from './WindowActionType';
|
|
2
|
+
export type WindowLocation = {
|
|
3
|
+
href: string;
|
|
4
|
+
origin: string;
|
|
5
|
+
protocol: string;
|
|
6
|
+
host: string;
|
|
7
|
+
hostname: string;
|
|
8
|
+
port: string;
|
|
9
|
+
pathname: string;
|
|
10
|
+
search: string;
|
|
11
|
+
hash: string;
|
|
12
|
+
};
|
|
13
|
+
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
14
|
+
export declare const askWindowGetLocation: import("quidproquo-core").ActionRequesterFunction<WindowActionType, [], undefined, WindowLocation, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createActionRequester } from 'quidproquo-core';
|
|
2
|
+
import { WindowActionType } from './WindowActionType';
|
|
3
|
+
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
4
|
+
export const askWindowGetLocation = createActionRequester()({
|
|
5
|
+
actionType: WindowActionType.GetLocation,
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=askWindowGetLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askWindowGetLocation.js","sourceRoot":"","sources":["../../../../src/actions/window/askWindowGetLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAetD,6GAA6G;AAC7G,MAAM,CAAC,MAAM,oBAAoB,GAAG,qBAAqB,EAAkB,CAAC;IAC1E,UAAU,EAAE,gBAAgB,CAAC,WAAW;CACzC,CAAC,CAAC","sourcesContent":["import { createActionRequester } from 'quidproquo-core';\n\nimport { WindowActionType } from './WindowActionType';\n\n// A plain, serializable copy of the browser `window.location`.\nexport type WindowLocation = {\n href: string;\n origin: string;\n protocol: string;\n host: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n};\n\n/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */\nexport const askWindowGetLocation = createActionRequester<WindowLocation>()({\n actionType: WindowActionType.GetLocation,\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/window/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/actions/window/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './askWindowGetLocation';\nexport * from './WindowActionType';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"lib/**/*"
|
|
11
11
|
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
12
15
|
"scripts": {
|
|
13
16
|
"test": "vitest run",
|
|
14
17
|
"test:watch": "vitest",
|
|
@@ -23,19 +26,19 @@
|
|
|
23
26
|
},
|
|
24
27
|
"repository": {
|
|
25
28
|
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/
|
|
29
|
+
"url": "git+https://github.com/qpqjs/quidproquo.git"
|
|
27
30
|
},
|
|
28
31
|
"keywords": [],
|
|
29
32
|
"author": "",
|
|
30
33
|
"license": "MIT",
|
|
31
34
|
"bugs": {
|
|
32
|
-
"url": "https://github.com/
|
|
35
|
+
"url": "https://github.com/qpqjs/quidproquo/issues"
|
|
33
36
|
},
|
|
34
|
-
"homepage": "https://github.com/
|
|
37
|
+
"homepage": "https://github.com/qpqjs/quidproquo#readme",
|
|
35
38
|
"devDependencies": {
|
|
36
|
-
"quidproquo-core": "0.1.
|
|
37
|
-
"quidproquo-tsconfig": "0.1.
|
|
38
|
-
"quidproquo-webserver": "0.1.
|
|
39
|
+
"quidproquo-core": "0.1.18",
|
|
40
|
+
"quidproquo-tsconfig": "0.1.18",
|
|
41
|
+
"quidproquo-webserver": "0.1.18",
|
|
39
42
|
"typescript": "^5.8.2"
|
|
40
43
|
}
|
|
41
44
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { QueryParamsGetActionRequester } from './QueryParamsGetActionRequesterTypes';
|
|
2
|
-
/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */
|
|
3
|
-
export declare function askQueryParamsGet(key: string): QueryParamsGetActionRequester;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.askQueryParamsGet = askQueryParamsGet;
|
|
4
|
-
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
5
|
-
/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */
|
|
6
|
-
function* askQueryParamsGet(key) {
|
|
7
|
-
return yield { type: QueryParamsActionType_1.QueryParamsActionType.Get, payload: { key } };
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=QueryParamsGetActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetActionRequester.ts"],"names":[],"mappings":";;AAIA,8CAEC;AAND,mEAAgE;AAGhE,sIAAsI;AACtI,QAAe,CAAC,CAAC,iBAAiB,CAAC,GAAW;IAC5C,OAAO,MAAM,EAAE,IAAI,EAAE,6CAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC;AACrE,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsGetActionRequester } from './QueryParamsGetActionRequesterTypes';\n\n/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */\nexport function* askQueryParamsGet(key: string): QueryParamsGetActionRequester {\n return yield { type: QueryParamsActionType.Get, payload: { key } };\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsGetActionPayload = {
|
|
4
|
-
key: string;
|
|
5
|
-
};
|
|
6
|
-
export interface QueryParamsGetAction extends Action<QueryParamsGetActionPayload> {
|
|
7
|
-
type: QueryParamsActionType.Get;
|
|
8
|
-
payload: QueryParamsGetActionPayload;
|
|
9
|
-
}
|
|
10
|
-
export type QueryParamsGetActionProcessor = ActionProcessor<QueryParamsGetAction, string[]>;
|
|
11
|
-
export type QueryParamsGetActionRequester = ActionRequester<QueryParamsGetAction, string[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsGetActionPayload = {\n key: string;\n};\n\n// Action\nexport interface QueryParamsGetAction extends Action<QueryParamsGetActionPayload> {\n type: QueryParamsActionType.Get;\n payload: QueryParamsGetActionPayload;\n}\n\n// Function Types\nexport type QueryParamsGetActionProcessor = ActionProcessor<QueryParamsGetAction, string[]>;\nexport type QueryParamsGetActionRequester = ActionRequester<QueryParamsGetAction, string[]>;\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.askQueryParamsGetAll = askQueryParamsGetAll;
|
|
4
|
-
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
5
|
-
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
6
|
-
function* askQueryParamsGetAll() {
|
|
7
|
-
return yield { type: QueryParamsActionType_1.QueryParamsActionType.GetAll };
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=QueryParamsGetAllActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetAllActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetAllActionRequester.ts"],"names":[],"mappings":";;AAIA,oDAEC;AAND,mEAAgE;AAGhE,yFAAyF;AACzF,QAAe,CAAC,CAAC,oBAAoB;IACnC,OAAO,MAAM,EAAE,IAAI,EAAE,6CAAqB,CAAC,MAAM,EAAE,CAAC;AACtD,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsGetAllActionRequester } from './QueryParamsGetAllActionRequesterTypes';\n\n/** Reads the whole query string of the current url as key -> all values for that key. */\nexport function* askQueryParamsGetAll(): QueryParamsGetAllActionRequester {\n return yield { type: QueryParamsActionType.GetAll };\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsGetAllActionPayload = undefined;
|
|
4
|
-
export interface QueryParamsGetAllAction extends Action<QueryParamsGetAllActionPayload> {
|
|
5
|
-
type: QueryParamsActionType.GetAll;
|
|
6
|
-
}
|
|
7
|
-
export type QueryParamsGetAllActionProcessor = ActionProcessor<QueryParamsGetAllAction, Record<string, string[]>>;
|
|
8
|
-
export type QueryParamsGetAllActionRequester = ActionRequester<QueryParamsGetAllAction, Record<string, string[]>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetAllActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetAllActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsGetAllActionPayload = undefined;\n\n// Action\nexport interface QueryParamsGetAllAction extends Action<QueryParamsGetAllActionPayload> {\n type: QueryParamsActionType.GetAll;\n}\n\n// Function Types\nexport type QueryParamsGetAllActionProcessor = ActionProcessor<QueryParamsGetAllAction, Record<string, string[]>>;\nexport type QueryParamsGetAllActionRequester = ActionRequester<QueryParamsGetAllAction, Record<string, string[]>>;\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { QueryParamsSetActionRequester } from './QueryParamsSetActionRequesterTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Replaces a query-string key's values in the current url; an empty array removes
|
|
4
|
-
* the key. By default the url is swapped in place (replaceState); pass
|
|
5
|
-
* createHistoryEntry to make the change a back-button stop (pushState).
|
|
6
|
-
*/
|
|
7
|
-
export declare function askQueryParamsSet(key: string, values: string[], createHistoryEntry?: boolean): QueryParamsSetActionRequester;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.askQueryParamsSet = askQueryParamsSet;
|
|
4
|
-
const QueryParamsActionType_1 = require("./QueryParamsActionType");
|
|
5
|
-
/**
|
|
6
|
-
* Replaces a query-string key's values in the current url; an empty array removes
|
|
7
|
-
* the key. By default the url is swapped in place (replaceState); pass
|
|
8
|
-
* createHistoryEntry to make the change a back-button stop (pushState).
|
|
9
|
-
*/
|
|
10
|
-
function* askQueryParamsSet(key, values, createHistoryEntry = false) {
|
|
11
|
-
return yield { type: QueryParamsActionType_1.QueryParamsActionType.Set, payload: { key, values, createHistoryEntry } };
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=QueryParamsSetActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsSetActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsSetActionRequester.ts"],"names":[],"mappings":";;AAQA,8CAEC;AAVD,mEAAgE;AAGhE;;;;GAIG;AACH,QAAe,CAAC,CAAC,iBAAiB,CAAC,GAAW,EAAE,MAAgB,EAAE,qBAA8B,KAAK;IACnG,OAAO,MAAM,EAAE,IAAI,EAAE,6CAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,CAAC;AACjG,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsSetActionRequester } from './QueryParamsSetActionRequesterTypes';\n\n/**\n * Replaces a query-string key's values in the current url; an empty array removes\n * the key. By default the url is swapped in place (replaceState); pass\n * createHistoryEntry to make the change a back-button stop (pushState).\n */\nexport function* askQueryParamsSet(key: string, values: string[], createHistoryEntry: boolean = false): QueryParamsSetActionRequester {\n return yield { type: QueryParamsActionType.Set, payload: { key, values, createHistoryEntry } };\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsSetActionPayload = {
|
|
4
|
-
key: string;
|
|
5
|
-
values: string[];
|
|
6
|
-
createHistoryEntry: boolean;
|
|
7
|
-
};
|
|
8
|
-
export interface QueryParamsSetAction extends Action<QueryParamsSetActionPayload> {
|
|
9
|
-
type: QueryParamsActionType.Set;
|
|
10
|
-
payload: QueryParamsSetActionPayload;
|
|
11
|
-
}
|
|
12
|
-
export type QueryParamsSetActionProcessor = ActionProcessor<QueryParamsSetAction, void>;
|
|
13
|
-
export type QueryParamsSetActionRequester = ActionRequester<QueryParamsSetAction, void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsSetActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsSetActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsSetActionPayload = {\n key: string;\n values: string[];\n createHistoryEntry: boolean;\n};\n\n// Action\nexport interface QueryParamsSetAction extends Action<QueryParamsSetActionPayload> {\n type: QueryParamsActionType.Set;\n payload: QueryParamsSetActionPayload;\n}\n\n// Function Types\nexport type QueryParamsSetActionProcessor = ActionProcessor<QueryParamsSetAction, void>;\nexport type QueryParamsSetActionRequester = ActionRequester<QueryParamsSetAction, void>;\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WindowGetLocationActionRequester } from './WindowGetLocationActionRequesterTypes';
|
|
2
|
-
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
3
|
-
export declare function askWindowGetLocation(): WindowGetLocationActionRequester;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.askWindowGetLocation = askWindowGetLocation;
|
|
4
|
-
const WindowActionType_1 = require("./WindowActionType");
|
|
5
|
-
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
6
|
-
function* askWindowGetLocation() {
|
|
7
|
-
return yield { type: WindowActionType_1.WindowActionType.GetLocation };
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=WindowGetLocationActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WindowGetLocationActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/window/WindowGetLocationActionRequester.ts"],"names":[],"mappings":";;AAIA,oDAEC;AAND,yDAAsD;AAGtD,6GAA6G;AAC7G,QAAe,CAAC,CAAC,oBAAoB;IACnC,OAAO,MAAM,EAAE,IAAI,EAAE,mCAAgB,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC","sourcesContent":["import { WindowActionType } from './WindowActionType';\nimport { WindowGetLocationActionRequester } from './WindowGetLocationActionRequesterTypes';\n\n/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */\nexport function* askWindowGetLocation(): WindowGetLocationActionRequester {\n return yield { type: WindowActionType.GetLocation };\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { WindowActionType } from './WindowActionType';
|
|
3
|
-
export type WindowLocation = {
|
|
4
|
-
href: string;
|
|
5
|
-
origin: string;
|
|
6
|
-
protocol: string;
|
|
7
|
-
host: string;
|
|
8
|
-
hostname: string;
|
|
9
|
-
port: string;
|
|
10
|
-
pathname: string;
|
|
11
|
-
search: string;
|
|
12
|
-
hash: string;
|
|
13
|
-
};
|
|
14
|
-
export type WindowGetLocationActionPayload = undefined;
|
|
15
|
-
export interface WindowGetLocationAction extends Action<WindowGetLocationActionPayload> {
|
|
16
|
-
type: WindowActionType.GetLocation;
|
|
17
|
-
}
|
|
18
|
-
export type WindowGetLocationActionProcessor = ActionProcessor<WindowGetLocationAction, WindowLocation>;
|
|
19
|
-
export type WindowGetLocationActionRequester = ActionRequester<WindowGetLocationAction, WindowLocation>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WindowGetLocationActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/window/WindowGetLocationActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { WindowActionType } from './WindowActionType';\n\n// A plain, serializable copy of the browser `window.location`.\nexport type WindowLocation = {\n href: string;\n origin: string;\n protocol: string;\n host: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n};\n\n// Payload\nexport type WindowGetLocationActionPayload = undefined;\n\n// Action\nexport interface WindowGetLocationAction extends Action<WindowGetLocationActionPayload> {\n type: WindowActionType.GetLocation;\n}\n\n// Function Types\nexport type WindowGetLocationActionProcessor = ActionProcessor<WindowGetLocationAction, WindowLocation>;\nexport type WindowGetLocationActionRequester = ActionRequester<WindowGetLocationAction, WindowLocation>;\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { QueryParamsGetActionRequester } from './QueryParamsGetActionRequesterTypes';
|
|
2
|
-
/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */
|
|
3
|
-
export declare function askQueryParamsGet(key: string): QueryParamsGetActionRequester;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
-
/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */
|
|
3
|
-
export function* askQueryParamsGet(key) {
|
|
4
|
-
return yield { type: QueryParamsActionType.Get, payload: { key } };
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=QueryParamsGetActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetActionRequester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,sIAAsI;AACtI,MAAM,SAAS,CAAC,CAAC,iBAAiB,CAAC,GAAW;IAC5C,OAAO,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC;AACrE,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsGetActionRequester } from './QueryParamsGetActionRequesterTypes';\n\n/** Reads ALL values of a query-string key from the current url (repeated keys are legal, hence string[]). Empty array when absent. */\nexport function* askQueryParamsGet(key: string): QueryParamsGetActionRequester {\n return yield { type: QueryParamsActionType.Get, payload: { key } };\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsGetActionPayload = {
|
|
4
|
-
key: string;
|
|
5
|
-
};
|
|
6
|
-
export interface QueryParamsGetAction extends Action<QueryParamsGetActionPayload> {
|
|
7
|
-
type: QueryParamsActionType.Get;
|
|
8
|
-
payload: QueryParamsGetActionPayload;
|
|
9
|
-
}
|
|
10
|
-
export type QueryParamsGetActionProcessor = ActionProcessor<QueryParamsGetAction, string[]>;
|
|
11
|
-
export type QueryParamsGetActionRequester = ActionRequester<QueryParamsGetAction, string[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsGetActionPayload = {\n key: string;\n};\n\n// Action\nexport interface QueryParamsGetAction extends Action<QueryParamsGetActionPayload> {\n type: QueryParamsActionType.Get;\n payload: QueryParamsGetActionPayload;\n}\n\n// Function Types\nexport type QueryParamsGetActionProcessor = ActionProcessor<QueryParamsGetAction, string[]>;\nexport type QueryParamsGetActionRequester = ActionRequester<QueryParamsGetAction, string[]>;\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
-
/** Reads the whole query string of the current url as key -> all values for that key. */
|
|
3
|
-
export function* askQueryParamsGetAll() {
|
|
4
|
-
return yield { type: QueryParamsActionType.GetAll };
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=QueryParamsGetAllActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetAllActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetAllActionRequester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,yFAAyF;AACzF,MAAM,SAAS,CAAC,CAAC,oBAAoB;IACnC,OAAO,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,EAAE,CAAC;AACtD,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsGetAllActionRequester } from './QueryParamsGetAllActionRequesterTypes';\n\n/** Reads the whole query string of the current url as key -> all values for that key. */\nexport function* askQueryParamsGetAll(): QueryParamsGetAllActionRequester {\n return yield { type: QueryParamsActionType.GetAll };\n}\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsGetAllActionPayload = undefined;
|
|
4
|
-
export interface QueryParamsGetAllAction extends Action<QueryParamsGetAllActionPayload> {
|
|
5
|
-
type: QueryParamsActionType.GetAll;
|
|
6
|
-
}
|
|
7
|
-
export type QueryParamsGetAllActionProcessor = ActionProcessor<QueryParamsGetAllAction, Record<string, string[]>>;
|
|
8
|
-
export type QueryParamsGetAllActionRequester = ActionRequester<QueryParamsGetAllAction, Record<string, string[]>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsGetAllActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsGetAllActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsGetAllActionPayload = undefined;\n\n// Action\nexport interface QueryParamsGetAllAction extends Action<QueryParamsGetAllActionPayload> {\n type: QueryParamsActionType.GetAll;\n}\n\n// Function Types\nexport type QueryParamsGetAllActionProcessor = ActionProcessor<QueryParamsGetAllAction, Record<string, string[]>>;\nexport type QueryParamsGetAllActionRequester = ActionRequester<QueryParamsGetAllAction, Record<string, string[]>>;\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { QueryParamsSetActionRequester } from './QueryParamsSetActionRequesterTypes';
|
|
2
|
-
/**
|
|
3
|
-
* Replaces a query-string key's values in the current url; an empty array removes
|
|
4
|
-
* the key. By default the url is swapped in place (replaceState); pass
|
|
5
|
-
* createHistoryEntry to make the change a back-button stop (pushState).
|
|
6
|
-
*/
|
|
7
|
-
export declare function askQueryParamsSet(key: string, values: string[], createHistoryEntry?: boolean): QueryParamsSetActionRequester;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
2
|
-
/**
|
|
3
|
-
* Replaces a query-string key's values in the current url; an empty array removes
|
|
4
|
-
* the key. By default the url is swapped in place (replaceState); pass
|
|
5
|
-
* createHistoryEntry to make the change a back-button stop (pushState).
|
|
6
|
-
*/
|
|
7
|
-
export function* askQueryParamsSet(key, values, createHistoryEntry = false) {
|
|
8
|
-
return yield { type: QueryParamsActionType.Set, payload: { key, values, createHistoryEntry } };
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=QueryParamsSetActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsSetActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsSetActionRequester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;GAIG;AACH,MAAM,SAAS,CAAC,CAAC,iBAAiB,CAAC,GAAW,EAAE,MAAgB,EAAE,qBAA8B,KAAK;IACnG,OAAO,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,CAAC;AACjG,CAAC","sourcesContent":["import { QueryParamsActionType } from './QueryParamsActionType';\nimport { QueryParamsSetActionRequester } from './QueryParamsSetActionRequesterTypes';\n\n/**\n * Replaces a query-string key's values in the current url; an empty array removes\n * the key. By default the url is swapped in place (replaceState); pass\n * createHistoryEntry to make the change a back-button stop (pushState).\n */\nexport function* askQueryParamsSet(key: string, values: string[], createHistoryEntry: boolean = false): QueryParamsSetActionRequester {\n return yield { type: QueryParamsActionType.Set, payload: { key, values, createHistoryEntry } };\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { QueryParamsActionType } from './QueryParamsActionType';
|
|
3
|
-
export type QueryParamsSetActionPayload = {
|
|
4
|
-
key: string;
|
|
5
|
-
values: string[];
|
|
6
|
-
createHistoryEntry: boolean;
|
|
7
|
-
};
|
|
8
|
-
export interface QueryParamsSetAction extends Action<QueryParamsSetActionPayload> {
|
|
9
|
-
type: QueryParamsActionType.Set;
|
|
10
|
-
payload: QueryParamsSetActionPayload;
|
|
11
|
-
}
|
|
12
|
-
export type QueryParamsSetActionProcessor = ActionProcessor<QueryParamsSetAction, void>;
|
|
13
|
-
export type QueryParamsSetActionRequester = ActionRequester<QueryParamsSetAction, void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParamsSetActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/queryParams/QueryParamsSetActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { QueryParamsActionType } from './QueryParamsActionType';\n\n// Payload\nexport type QueryParamsSetActionPayload = {\n key: string;\n values: string[];\n createHistoryEntry: boolean;\n};\n\n// Action\nexport interface QueryParamsSetAction extends Action<QueryParamsSetActionPayload> {\n type: QueryParamsActionType.Set;\n payload: QueryParamsSetActionPayload;\n}\n\n// Function Types\nexport type QueryParamsSetActionProcessor = ActionProcessor<QueryParamsSetAction, void>;\nexport type QueryParamsSetActionRequester = ActionRequester<QueryParamsSetAction, void>;\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WindowGetLocationActionRequester } from './WindowGetLocationActionRequesterTypes';
|
|
2
|
-
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
3
|
-
export declare function askWindowGetLocation(): WindowGetLocationActionRequester;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WindowActionType } from './WindowActionType';
|
|
2
|
-
/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */
|
|
3
|
-
export function* askWindowGetLocation() {
|
|
4
|
-
return yield { type: WindowActionType.GetLocation };
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=WindowGetLocationActionRequester.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WindowGetLocationActionRequester.js","sourceRoot":"","sources":["../../../../src/actions/window/WindowGetLocationActionRequester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,6GAA6G;AAC7G,MAAM,SAAS,CAAC,CAAC,oBAAoB;IACnC,OAAO,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC","sourcesContent":["import { WindowActionType } from './WindowActionType';\nimport { WindowGetLocationActionRequester } from './WindowGetLocationActionRequesterTypes';\n\n/** Reads the current `window.location` as a plain serializable snapshot (never the live Location object). */\nexport function* askWindowGetLocation(): WindowGetLocationActionRequester {\n return yield { type: WindowActionType.GetLocation };\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
|
|
2
|
-
import { WindowActionType } from './WindowActionType';
|
|
3
|
-
export type WindowLocation = {
|
|
4
|
-
href: string;
|
|
5
|
-
origin: string;
|
|
6
|
-
protocol: string;
|
|
7
|
-
host: string;
|
|
8
|
-
hostname: string;
|
|
9
|
-
port: string;
|
|
10
|
-
pathname: string;
|
|
11
|
-
search: string;
|
|
12
|
-
hash: string;
|
|
13
|
-
};
|
|
14
|
-
export type WindowGetLocationActionPayload = undefined;
|
|
15
|
-
export interface WindowGetLocationAction extends Action<WindowGetLocationActionPayload> {
|
|
16
|
-
type: WindowActionType.GetLocation;
|
|
17
|
-
}
|
|
18
|
-
export type WindowGetLocationActionProcessor = ActionProcessor<WindowGetLocationAction, WindowLocation>;
|
|
19
|
-
export type WindowGetLocationActionRequester = ActionRequester<WindowGetLocationAction, WindowLocation>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WindowGetLocationActionRequesterTypes.js","sourceRoot":"","sources":["../../../../src/actions/window/WindowGetLocationActionRequesterTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';\n\nimport { WindowActionType } from './WindowActionType';\n\n// A plain, serializable copy of the browser `window.location`.\nexport type WindowLocation = {\n href: string;\n origin: string;\n protocol: string;\n host: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n};\n\n// Payload\nexport type WindowGetLocationActionPayload = undefined;\n\n// Action\nexport interface WindowGetLocationAction extends Action<WindowGetLocationActionPayload> {\n type: WindowActionType.GetLocation;\n}\n\n// Function Types\nexport type WindowGetLocationActionProcessor = ActionProcessor<WindowGetLocationAction, WindowLocation>;\nexport type WindowGetLocationActionRequester = ActionRequester<WindowGetLocationAction, WindowLocation>;\n"]}
|