@rippling/rippling-sdk 0.2.0-alpha.84 → 0.2.0-alpha.86
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/examples/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +44 -26
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +470 -142
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/complete-visit.ts +55 -32
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +23 -13
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +23 -13
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +23 -68
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +375 -102
- package/examples/manifest/grant-program-management/grant-program-management.ts +419 -125
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/member-list.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +23 -13
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +23 -13
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +442 -92
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +408 -122
- package/examples/manifest/simple-todo-app/functions/mark-done.ts +12 -16
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +23 -13
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +109 -40
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +193 -166
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +47 -24
- package/package.json +13 -7
- package/resources/custom-objects/fields.d.mts +1 -40
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +1 -40
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/levels.d.mts +25 -4
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts +25 -4
- package/resources/levels.d.ts.map +1 -1
- package/src/resources/custom-objects/fields.ts +1 -46
- package/src/resources/levels.ts +28 -4
- package/src/tsconfig.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/core/platform/manifest/custom-objects/action.d.mts +0 -58
- package/core/platform/manifest/custom-objects/action.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/action.d.ts +0 -58
- package/core/platform/manifest/custom-objects/action.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/action.js +0 -44
- package/core/platform/manifest/custom-objects/action.js.map +0 -1
- package/core/platform/manifest/custom-objects/action.mjs +0 -40
- package/core/platform/manifest/custom-objects/action.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.d.mts +0 -240
- package/core/platform/manifest/custom-objects/conditions.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.d.ts +0 -240
- package/core/platform/manifest/custom-objects/conditions.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.js +0 -326
- package/core/platform/manifest/custom-objects/conditions.js.map +0 -1
- package/core/platform/manifest/custom-objects/conditions.mjs +0 -321
- package/core/platform/manifest/custom-objects/conditions.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/existing.d.mts +0 -87
- package/core/platform/manifest/custom-objects/existing.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/existing.d.ts +0 -87
- package/core/platform/manifest/custom-objects/existing.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/existing.js +0 -113
- package/core/platform/manifest/custom-objects/existing.js.map +0 -1
- package/core/platform/manifest/custom-objects/existing.mjs +0 -109
- package/core/platform/manifest/custom-objects/existing.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.d.mts +0 -48
- package/core/platform/manifest/custom-objects/field-resolution.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.d.ts +0 -48
- package/core/platform/manifest/custom-objects/field-resolution.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.js +0 -61
- package/core/platform/manifest/custom-objects/field-resolution.js.map +0 -1
- package/core/platform/manifest/custom-objects/field-resolution.mjs +0 -58
- package/core/platform/manifest/custom-objects/field-resolution.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.d.mts +0 -87
- package/core/platform/manifest/custom-objects/function-file.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.d.ts +0 -87
- package/core/platform/manifest/custom-objects/function-file.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.js +0 -76
- package/core/platform/manifest/custom-objects/function-file.js.map +0 -1
- package/core/platform/manifest/custom-objects/function-file.mjs +0 -69
- package/core/platform/manifest/custom-objects/function-file.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.d.mts +0 -65
- package/core/platform/manifest/custom-objects/list-view.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.d.ts +0 -65
- package/core/platform/manifest/custom-objects/list-view.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.js +0 -33
- package/core/platform/manifest/custom-objects/list-view.js.map +0 -1
- package/core/platform/manifest/custom-objects/list-view.mjs +0 -30
- package/core/platform/manifest/custom-objects/list-view.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.d.mts +0 -43
- package/core/platform/manifest/custom-objects/object-list-page.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.d.ts +0 -43
- package/core/platform/manifest/custom-objects/object-list-page.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.js +0 -54
- package/core/platform/manifest/custom-objects/object-list-page.js.map +0 -1
- package/core/platform/manifest/custom-objects/object-list-page.mjs +0 -50
- package/core/platform/manifest/custom-objects/object-list-page.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.d.mts +0 -142
- package/core/platform/manifest/custom-objects/page-layout.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.d.ts +0 -142
- package/core/platform/manifest/custom-objects/page-layout.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.js +0 -184
- package/core/platform/manifest/custom-objects/page-layout.js.map +0 -1
- package/core/platform/manifest/custom-objects/page-layout.mjs +0 -180
- package/core/platform/manifest/custom-objects/page-layout.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/register.d.mts +0 -87
- package/core/platform/manifest/custom-objects/register.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/register.d.ts +0 -87
- package/core/platform/manifest/custom-objects/register.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/register.js +0 -395
- package/core/platform/manifest/custom-objects/register.js.map +0 -1
- package/core/platform/manifest/custom-objects/register.mjs +0 -391
- package/core/platform/manifest/custom-objects/register.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/rule.d.mts +0 -113
- package/core/platform/manifest/custom-objects/rule.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/rule.d.ts +0 -113
- package/core/platform/manifest/custom-objects/rule.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/rule.js +0 -49
- package/core/platform/manifest/custom-objects/rule.js.map +0 -1
- package/core/platform/manifest/custom-objects/rule.mjs +0 -45
- package/core/platform/manifest/custom-objects/rule.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.d.mts +0 -214
- package/core/platform/manifest/custom-objects/sdui-page.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.d.ts +0 -214
- package/core/platform/manifest/custom-objects/sdui-page.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.js +0 -194
- package/core/platform/manifest/custom-objects/sdui-page.js.map +0 -1
- package/core/platform/manifest/custom-objects/sdui-page.mjs +0 -182
- package/core/platform/manifest/custom-objects/sdui-page.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.d.mts +0 -28
- package/core/platform/manifest/custom-objects/typed-condition.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.d.ts +0 -28
- package/core/platform/manifest/custom-objects/typed-condition.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.js +0 -434
- package/core/platform/manifest/custom-objects/typed-condition.js.map +0 -1
- package/core/platform/manifest/custom-objects/typed-condition.mjs +0 -431
- package/core/platform/manifest/custom-objects/typed-condition.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/types.d.mts +0 -29
- package/core/platform/manifest/custom-objects/types.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/types.d.ts +0 -29
- package/core/platform/manifest/custom-objects/types.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/types.js +0 -3
- package/core/platform/manifest/custom-objects/types.js.map +0 -1
- package/core/platform/manifest/custom-objects/types.mjs +0 -2
- package/core/platform/manifest/custom-objects/types.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/validation.d.mts +0 -44
- package/core/platform/manifest/custom-objects/validation.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/validation.d.ts +0 -44
- package/core/platform/manifest/custom-objects/validation.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/validation.js +0 -30
- package/core/platform/manifest/custom-objects/validation.js.map +0 -1
- package/core/platform/manifest/custom-objects/validation.mjs +0 -27
- package/core/platform/manifest/custom-objects/validation.mjs.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.d.mts +0 -47
- package/core/platform/manifest/custom-objects/workflow.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.d.ts +0 -47
- package/core/platform/manifest/custom-objects/workflow.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.js +0 -38
- package/core/platform/manifest/custom-objects/workflow.js.map +0 -1
- package/core/platform/manifest/custom-objects/workflow.mjs +0 -34
- package/core/platform/manifest/custom-objects/workflow.mjs.map +0 -1
- package/core/platform/manifest/custom-objects.d.mts +0 -85
- package/core/platform/manifest/custom-objects.d.mts.map +0 -1
- package/core/platform/manifest/custom-objects.d.ts +0 -85
- package/core/platform/manifest/custom-objects.d.ts.map +0 -1
- package/core/platform/manifest/custom-objects.js +0 -84
- package/core/platform/manifest/custom-objects.js.map +0 -1
- package/core/platform/manifest/custom-objects.mjs +0 -55
- package/core/platform/manifest/custom-objects.mjs.map +0 -1
- package/examples/manifest/custom-object-creation-workflow/functions/intake-request-created.ts +0 -20
- package/examples/manifest/custom-object-creation-workflow/schema.ts +0 -29
- package/examples/manifest/dental-practice-management/schema.ts +0 -298
- package/examples/manifest/field-service-dispatch/schema.ts +0 -248
- package/examples/manifest/grant-program-management/schema.ts +0 -269
- package/examples/manifest/gym-membership-management/schema.ts +0 -266
- package/examples/manifest/procurement-approval-hub/functions/route-purchase-request.ts +0 -20
- package/examples/manifest/procurement-approval-hub/schema.ts +0 -256
- package/examples/manifest/simple-todo-app/schema.ts +0 -60
- package/examples/manifest/todo-app-without-object-list-view/schema.ts +0 -28
- package/src/core/platform/README.md +0 -20
- package/src/core/platform/manifest/README.md +0 -26
- package/src/core/platform/manifest/custom-objects/action.ts +0 -87
- package/src/core/platform/manifest/custom-objects/conditions.ts +0 -762
- package/src/core/platform/manifest/custom-objects/existing.ts +0 -221
- package/src/core/platform/manifest/custom-objects/field-resolution.ts +0 -116
- package/src/core/platform/manifest/custom-objects/function-file.ts +0 -149
- package/src/core/platform/manifest/custom-objects/list-view.ts +0 -95
- package/src/core/platform/manifest/custom-objects/object-list-page.ts +0 -87
- package/src/core/platform/manifest/custom-objects/page-layout.ts +0 -380
- package/src/core/platform/manifest/custom-objects/register.ts +0 -555
- package/src/core/platform/manifest/custom-objects/rule.ts +0 -192
- package/src/core/platform/manifest/custom-objects/sdui-page.ts +0 -515
- package/src/core/platform/manifest/custom-objects/typed-condition.ts +0 -617
- package/src/core/platform/manifest/custom-objects/types.ts +0 -92
- package/src/core/platform/manifest/custom-objects/validation.ts +0 -70
- package/src/core/platform/manifest/custom-objects/workflow.ts +0 -71
- package/src/core/platform/manifest/custom-objects.ts +0 -203
- package/src/pebble-sdui-web-custom-apps-shim.d.ts +0 -3
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import { ManifestFunction, SduiPage, } from "../../../../lib/manifest.mjs";
|
|
4
|
-
import { defineTypedWorkflow } from "./workflow.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Loads one manifest function source file from disk.
|
|
7
|
-
*
|
|
8
|
-
* @param source - Directory + file-name pair describing the source file to read.
|
|
9
|
-
* @returns UTF-8 TypeScript handler source.
|
|
10
|
-
*/
|
|
11
|
-
export function loadManifestFunctionCode(source) {
|
|
12
|
-
return fs.readFileSync(path.join(source.codeDirectory, source.codeFilename), 'utf-8');
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Defines one manifest function by loading its handler source code from disk.
|
|
16
|
-
*
|
|
17
|
-
* @param scope - Manifest scope that should own the function.
|
|
18
|
-
* @param props - Function properties plus the source-file location.
|
|
19
|
-
* @returns Manifest function registered in the provided scope.
|
|
20
|
-
*/
|
|
21
|
-
export function defineManifestFunctionFromFile(scope, props) {
|
|
22
|
-
const { codeDirectory, codeFilename, ...rest } = props;
|
|
23
|
-
return new ManifestFunction(scope, {
|
|
24
|
-
...rest,
|
|
25
|
-
code: loadManifestFunctionCode({ codeDirectory, codeFilename }),
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Defines one SDUI page and its backing manifest function from a source file.
|
|
30
|
-
*
|
|
31
|
-
* @param scope - Manifest scope that should own the function and page.
|
|
32
|
-
* @param props - Function properties, source-file location, and page wiring metadata.
|
|
33
|
-
* @returns Created manifest function plus the SDUI page wired to it.
|
|
34
|
-
*/
|
|
35
|
-
export function defineSduiPageFromFunctionFile(scope, props) {
|
|
36
|
-
const { pageId, pageName, ...functionProps } = props;
|
|
37
|
-
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
38
|
-
return {
|
|
39
|
-
function: createdFunction,
|
|
40
|
-
page: new SduiPage(scope, {
|
|
41
|
-
sduiPageId: pageId,
|
|
42
|
-
name: pageName,
|
|
43
|
-
function: createdFunction,
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Defines one workflow and its backing manifest function from a source file.
|
|
49
|
-
*
|
|
50
|
-
* Prefer this helper when one workflow owns one colocated handler file and the
|
|
51
|
-
* caller wants the file loading plus workflow wiring in one step.
|
|
52
|
-
*
|
|
53
|
-
* @param scope - Manifest scope that should own the function and workflow.
|
|
54
|
-
* @param props - Workflow properties plus the function source-file location.
|
|
55
|
-
* @returns Created manifest function plus the workflow wired to it.
|
|
56
|
-
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
57
|
-
*/
|
|
58
|
-
export function defineTypedWorkflowFromFunctionFile(scope, props) {
|
|
59
|
-
const { function: functionProps, ...workflowProps } = props;
|
|
60
|
-
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
61
|
-
return {
|
|
62
|
-
function: createdFunction,
|
|
63
|
-
workflow: defineTypedWorkflow(scope, {
|
|
64
|
-
...workflowProps,
|
|
65
|
-
function: createdFunction,
|
|
66
|
-
}),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=function-file.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function-file.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/function-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,gBAAgB,EAEhB,QAAQ,GAGT,qCAAiC;AAGlC,OAAO,EAAE,mBAAmB,EAA2B,uBAAmB;AA4D1E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAkC;IACzE,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI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
|
1
|
-
import { ListViewDef, type ListViewDefProps } from "../../../../lib/manifest.mjs";
|
|
2
|
-
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.mjs";
|
|
3
|
-
import type { ManifestConditionInput } from "./conditions.mjs";
|
|
4
|
-
import type { ManifestRegistration } from "./types.mjs";
|
|
5
|
-
import type { StandardManifestFieldName, TypedManifestFieldInput, TypedManifestFieldName } from "./field-resolution.mjs";
|
|
6
|
-
/**
|
|
7
|
-
* Standard field-name strings accepted by the typed list-view helper.
|
|
8
|
-
*
|
|
9
|
-
* @typeParam TDefinition - Object definition whose standard field-name strings should be exposed.
|
|
10
|
-
*/
|
|
11
|
-
export type StandardListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = StandardManifestFieldName<TDefinition>;
|
|
12
|
-
/**
|
|
13
|
-
* Field-name strings accepted by the typed list-view helper.
|
|
14
|
-
*
|
|
15
|
-
* @typeParam TDefinition - Object definition whose valid list-view field-name strings should be exposed.
|
|
16
|
-
*/
|
|
17
|
-
export type TypedListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldName<TDefinition>;
|
|
18
|
-
/**
|
|
19
|
-
* Field inputs accepted by the typed list-view helper.
|
|
20
|
-
*
|
|
21
|
-
* @typeParam TDefinition - Object definition whose list-view field inputs are being authored.
|
|
22
|
-
*/
|
|
23
|
-
export type TypedListViewFieldInput<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldInput<TDefinition>;
|
|
24
|
-
/**
|
|
25
|
-
* Initialization properties for {@link defineTypedListView}.
|
|
26
|
-
*
|
|
27
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
28
|
-
*/
|
|
29
|
-
export interface TypedListViewDefProps<TDefinition extends AnyCustomObjectDefinition> extends Omit<ListViewDefProps, 'fields' | 'orderBy' | 'rqlFilter'> {
|
|
30
|
-
/**
|
|
31
|
-
* Optional typed manifest-condition used to filter the list view.
|
|
32
|
-
*
|
|
33
|
-
* This is rendered into the underlying low-level `rqlFilter` string.
|
|
34
|
-
*/
|
|
35
|
-
readonly filter?: ManifestConditionInput<TDefinition>;
|
|
36
|
-
/**
|
|
37
|
-
* Optional low-level filter string retained for escape hatches.
|
|
38
|
-
*
|
|
39
|
-
* Prefer `filter` for typed custom-object conditions when possible.
|
|
40
|
-
*/
|
|
41
|
-
readonly rqlFilter?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Columns to display, expressed as typed field-name strings or concrete manifest field references.
|
|
44
|
-
*/
|
|
45
|
-
readonly fields: readonly TypedListViewFieldInput<TDefinition>[];
|
|
46
|
-
/**
|
|
47
|
-
* Optional field used for sorting. Accepts the same typed field inputs as `fields`.
|
|
48
|
-
*/
|
|
49
|
-
readonly orderBy?: TypedListViewFieldInput<TDefinition>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Registers a typed list view for a manifest custom object.
|
|
53
|
-
*
|
|
54
|
-
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
55
|
-
* It preserves the runtime behavior of that class while replacing the untyped
|
|
56
|
-
* `Field | string` authoring surface with an object-specific string-literal
|
|
57
|
-
* union that powers IntelliSense for valid field names.
|
|
58
|
-
*
|
|
59
|
-
* @param registration - Manifest registration produced from the typed object definition.
|
|
60
|
-
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
61
|
-
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
62
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
63
|
-
*/
|
|
64
|
-
export declare function defineTypedListView<TDefinition extends AnyCustomObjectDefinition>(registration: ManifestRegistration<TDefinition>, props: TypedListViewDefProps<TDefinition>): ListViewDef;
|
|
65
|
-
//# sourceMappingURL=list-view.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-view.d.mts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gB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0,0 @@
|
|
|
1
|
-
import { ListViewDef, type ListViewDefProps } from "../../../../lib/manifest.js";
|
|
2
|
-
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.js";
|
|
3
|
-
import type { ManifestConditionInput } from "./conditions.js";
|
|
4
|
-
import type { ManifestRegistration } from "./types.js";
|
|
5
|
-
import type { StandardManifestFieldName, TypedManifestFieldInput, TypedManifestFieldName } from "./field-resolution.js";
|
|
6
|
-
/**
|
|
7
|
-
* Standard field-name strings accepted by the typed list-view helper.
|
|
8
|
-
*
|
|
9
|
-
* @typeParam TDefinition - Object definition whose standard field-name strings should be exposed.
|
|
10
|
-
*/
|
|
11
|
-
export type StandardListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = StandardManifestFieldName<TDefinition>;
|
|
12
|
-
/**
|
|
13
|
-
* Field-name strings accepted by the typed list-view helper.
|
|
14
|
-
*
|
|
15
|
-
* @typeParam TDefinition - Object definition whose valid list-view field-name strings should be exposed.
|
|
16
|
-
*/
|
|
17
|
-
export type TypedListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldName<TDefinition>;
|
|
18
|
-
/**
|
|
19
|
-
* Field inputs accepted by the typed list-view helper.
|
|
20
|
-
*
|
|
21
|
-
* @typeParam TDefinition - Object definition whose list-view field inputs are being authored.
|
|
22
|
-
*/
|
|
23
|
-
export type TypedListViewFieldInput<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldInput<TDefinition>;
|
|
24
|
-
/**
|
|
25
|
-
* Initialization properties for {@link defineTypedListView}.
|
|
26
|
-
*
|
|
27
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
28
|
-
*/
|
|
29
|
-
export interface TypedListViewDefProps<TDefinition extends AnyCustomObjectDefinition> extends Omit<ListViewDefProps, 'fields' | 'orderBy' | 'rqlFilter'> {
|
|
30
|
-
/**
|
|
31
|
-
* Optional typed manifest-condition used to filter the list view.
|
|
32
|
-
*
|
|
33
|
-
* This is rendered into the underlying low-level `rqlFilter` string.
|
|
34
|
-
*/
|
|
35
|
-
readonly filter?: ManifestConditionInput<TDefinition>;
|
|
36
|
-
/**
|
|
37
|
-
* Optional low-level filter string retained for escape hatches.
|
|
38
|
-
*
|
|
39
|
-
* Prefer `filter` for typed custom-object conditions when possible.
|
|
40
|
-
*/
|
|
41
|
-
readonly rqlFilter?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Columns to display, expressed as typed field-name strings or concrete manifest field references.
|
|
44
|
-
*/
|
|
45
|
-
readonly fields: readonly TypedListViewFieldInput<TDefinition>[];
|
|
46
|
-
/**
|
|
47
|
-
* Optional field used for sorting. Accepts the same typed field inputs as `fields`.
|
|
48
|
-
*/
|
|
49
|
-
readonly orderBy?: TypedListViewFieldInput<TDefinition>;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Registers a typed list view for a manifest custom object.
|
|
53
|
-
*
|
|
54
|
-
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
55
|
-
* It preserves the runtime behavior of that class while replacing the untyped
|
|
56
|
-
* `Field | string` authoring surface with an object-specific string-literal
|
|
57
|
-
* union that powers IntelliSense for valid field names.
|
|
58
|
-
*
|
|
59
|
-
* @param registration - Manifest registration produced from the typed object definition.
|
|
60
|
-
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
61
|
-
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
62
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
63
|
-
*/
|
|
64
|
-
export declare function defineTypedListView<TDefinition extends AnyCustomObjectDefinition>(registration: ManifestRegistration<TDefinition>, props: TypedListViewDefProps<TDefinition>): ListViewDef;
|
|
65
|
-
//# sourceMappingURL=list-view.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-view.d.ts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gB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0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineTypedListView = defineTypedListView;
|
|
4
|
-
const manifest_1 = require("../../../../lib/manifest.js");
|
|
5
|
-
const conditions_1 = require("./conditions.js");
|
|
6
|
-
const field_resolution_1 = require("./field-resolution.js");
|
|
7
|
-
/**
|
|
8
|
-
* Registers a typed list view for a manifest custom object.
|
|
9
|
-
*
|
|
10
|
-
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
11
|
-
* It preserves the runtime behavior of that class while replacing the untyped
|
|
12
|
-
* `Field | string` authoring surface with an object-specific string-literal
|
|
13
|
-
* union that powers IntelliSense for valid field names.
|
|
14
|
-
*
|
|
15
|
-
* @param registration - Manifest registration produced from the typed object definition.
|
|
16
|
-
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
17
|
-
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
18
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
19
|
-
*/
|
|
20
|
-
function defineTypedListView(registration, props) {
|
|
21
|
-
const { fields, orderBy, filter, rqlFilter, ...rest } = props;
|
|
22
|
-
if (filter != null && rqlFilter != null) {
|
|
23
|
-
throw new Error('defineTypedListView(...): use either filter or rqlFilter, not both.');
|
|
24
|
-
}
|
|
25
|
-
return new manifest_1.ListViewDef(registration.object, {
|
|
26
|
-
...rest,
|
|
27
|
-
fields: fields.map((field) => (0, field_resolution_1.resolveTypedManifestField)(registration, field)),
|
|
28
|
-
...(orderBy != null ? { orderBy: (0, field_resolution_1.resolveTypedManifestField)(registration, orderBy) } : {}),
|
|
29
|
-
...(filter != null ? { rqlFilter: (0, conditions_1.resolveManifestConditionInput)(registration, filter) } : {}),
|
|
30
|
-
...(rqlFilter != null ? { rqlFilter } : {}),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=list-view.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-view.js","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":";;AA8EA,kDAgBC;AA9FD,0DAA8E;AAG9E,gDAA6D;AAO7D,4DAA+D;AAuD/D;;;;;;;;;;;;GAYG;AACH,SAAgB,mBAAmB,CACjC,YAA+C,EAC/C,KAAyC;IAEzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC9D,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,IAAI,sBAAW,CAAC,YAAY,CAAC,MAAM,EAAE;QAC1C,GAAG,IAAI;QACP,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,4CAAyB,EAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7E,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAA,4CAAyB,EAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAA,0CAA6B,EAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ListViewDef } from "../../../../lib/manifest.mjs";
|
|
2
|
-
import { resolveManifestConditionInput } from "./conditions.mjs";
|
|
3
|
-
import { resolveTypedManifestField } from "./field-resolution.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Registers a typed list view for a manifest custom object.
|
|
6
|
-
*
|
|
7
|
-
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
8
|
-
* It preserves the runtime behavior of that class while replacing the untyped
|
|
9
|
-
* `Field | string` authoring surface with an object-specific string-literal
|
|
10
|
-
* union that powers IntelliSense for valid field names.
|
|
11
|
-
*
|
|
12
|
-
* @param registration - Manifest registration produced from the typed object definition.
|
|
13
|
-
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
14
|
-
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
15
|
-
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
16
|
-
*/
|
|
17
|
-
export function defineTypedListView(registration, props) {
|
|
18
|
-
const { fields, orderBy, filter, rqlFilter, ...rest } = props;
|
|
19
|
-
if (filter != null && rqlFilter != null) {
|
|
20
|
-
throw new Error('defineTypedListView(...): use either filter or rqlFilter, not both.');
|
|
21
|
-
}
|
|
22
|
-
return new ListViewDef(registration.object, {
|
|
23
|
-
...rest,
|
|
24
|
-
fields: fields.map((field) => resolveTypedManifestField(registration, field)),
|
|
25
|
-
...(orderBy != null ? { orderBy: resolveTypedManifestField(registration, orderBy) } : {}),
|
|
26
|
-
...(filter != null ? { rqlFilter: resolveManifestConditionInput(registration, filter) } : {}),
|
|
27
|
-
...(rqlFilter != null ? { rqlFilter } : {}),
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=list-view.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-view.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,qCAAiC;AAG9E,OAAO,EAAE,6BAA6B,EAAE,yBAAqB;AAO7D,OAAO,EAAE,yBAAyB,EAAE,+BAA2B;AAuD/D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CACjC,YAA+C,EAC/C,KAAyC;IAEzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC9D,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE;QAC1C,GAAG,IAAI;QACP,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7E,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,6BAA6B,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { FunctionResponse, type FunctionContext, type SduiPageFunctionEvent } from "../../../../functions.mjs";
|
|
2
|
-
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.mjs";
|
|
3
|
-
import type { ManifestCustomObjectTarget } from "./conditions.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Standard input shape for object-list page functions that only render their
|
|
6
|
-
* initial SDUI page.
|
|
7
|
-
*/
|
|
8
|
-
export type TypedObjectListPageInput = SduiPageFunctionEvent<{
|
|
9
|
-
action: 'init';
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* Standard output body for object-list page functions that return one rendered
|
|
13
|
-
* SDUI spec.
|
|
14
|
-
*/
|
|
15
|
-
export interface TypedObjectListPageOutput {
|
|
16
|
-
/** JSON-serialized SDUI spec payload returned to the platform. */
|
|
17
|
-
readonly spec: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Builds the standard SDUI function response for a custom-object-backed object
|
|
21
|
-
* list page.
|
|
22
|
-
*
|
|
23
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
24
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
25
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
26
|
-
*/
|
|
27
|
-
export declare function createTypedObjectListPageResponse<TDefinition extends AnyCustomObjectDefinition>(target: ManifestCustomObjectTarget<TDefinition>): FunctionResponse<TypedObjectListPageOutput>;
|
|
28
|
-
/**
|
|
29
|
-
* Handles the standard custom-object object-list page event shape.
|
|
30
|
-
*
|
|
31
|
-
* The event and context are accepted so callers can keep an exported
|
|
32
|
-
* `onRipplingEvent(event, context)` signature that matches backend IO-contract
|
|
33
|
-
* derivation expectations, while delegating the repetitive response plumbing to
|
|
34
|
-
* this helper.
|
|
35
|
-
*
|
|
36
|
-
* @param event - Incoming SDUI page event, expected to be the standard init-only object-list shape.
|
|
37
|
-
* @param context - Function context supplied by the platform.
|
|
38
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
39
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
40
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
41
|
-
*/
|
|
42
|
-
export declare function handleTypedObjectListPageEvent<TDefinition extends AnyCustomObjectDefinition>(event: TypedObjectListPageInput, context: FunctionContext, target: ManifestCustomObjectTarget<TDefinition>): Promise<FunctionResponse<TypedObjectListPageOutput>>;
|
|
43
|
-
//# sourceMappingURL=object-list-page.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-page.d.mts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/object-list-page.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,kCAA8B;AAM3G,OAAO,KAAK,EAAE,yBAAyB,EAAE,uCAAmC;AAC5E,OAAO,KAAK,EAAE,0BAA0B,EAAE,yBAAqB;AAG/D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAcD;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,SAAS,yBAAyB,EAC7F,MAAM,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAC9C,gBAAgB,CAAC,yBAAyB,CAAC,CAc7C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,8BAA8B,CAAC,WAAW,SAAS,yBAAyB,EAChG,KAAK,EAAE,wBAAwB,EAC/B,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAItD"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { FunctionResponse, type FunctionContext, type SduiPageFunctionEvent } from "../../../../functions.js";
|
|
2
|
-
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.js";
|
|
3
|
-
import type { ManifestCustomObjectTarget } from "./conditions.js";
|
|
4
|
-
/**
|
|
5
|
-
* Standard input shape for object-list page functions that only render their
|
|
6
|
-
* initial SDUI page.
|
|
7
|
-
*/
|
|
8
|
-
export type TypedObjectListPageInput = SduiPageFunctionEvent<{
|
|
9
|
-
action: 'init';
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* Standard output body for object-list page functions that return one rendered
|
|
13
|
-
* SDUI spec.
|
|
14
|
-
*/
|
|
15
|
-
export interface TypedObjectListPageOutput {
|
|
16
|
-
/** JSON-serialized SDUI spec payload returned to the platform. */
|
|
17
|
-
readonly spec: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Builds the standard SDUI function response for a custom-object-backed object
|
|
21
|
-
* list page.
|
|
22
|
-
*
|
|
23
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
24
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
25
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
26
|
-
*/
|
|
27
|
-
export declare function createTypedObjectListPageResponse<TDefinition extends AnyCustomObjectDefinition>(target: ManifestCustomObjectTarget<TDefinition>): FunctionResponse<TypedObjectListPageOutput>;
|
|
28
|
-
/**
|
|
29
|
-
* Handles the standard custom-object object-list page event shape.
|
|
30
|
-
*
|
|
31
|
-
* The event and context are accepted so callers can keep an exported
|
|
32
|
-
* `onRipplingEvent(event, context)` signature that matches backend IO-contract
|
|
33
|
-
* derivation expectations, while delegating the repetitive response plumbing to
|
|
34
|
-
* this helper.
|
|
35
|
-
*
|
|
36
|
-
* @param event - Incoming SDUI page event, expected to be the standard init-only object-list shape.
|
|
37
|
-
* @param context - Function context supplied by the platform.
|
|
38
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
39
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
40
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
41
|
-
*/
|
|
42
|
-
export declare function handleTypedObjectListPageEvent<TDefinition extends AnyCustomObjectDefinition>(event: TypedObjectListPageInput, context: FunctionContext, target: ManifestCustomObjectTarget<TDefinition>): Promise<FunctionResponse<TypedObjectListPageOutput>>;
|
|
43
|
-
//# sourceMappingURL=object-list-page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-page.d.ts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/object-list-page.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,iCAA8B;AAM3G,OAAO,KAAK,EAAE,yBAAyB,EAAE,sCAAmC;AAC5E,OAAO,KAAK,EAAE,0BAA0B,EAAE,wBAAqB;AAG/D;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjF;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAcD;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,SAAS,yBAAyB,EAC7F,MAAM,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAC9C,gBAAgB,CAAC,yBAAyB,CAAC,CAc7C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,8BAA8B,CAAC,WAAW,SAAS,yBAAyB,EAChG,KAAK,EAAE,wBAAwB,EAC/B,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAItD"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTypedObjectListPageResponse = createTypedObjectListPageResponse;
|
|
4
|
-
exports.handleTypedObjectListPageEvent = handleTypedObjectListPageEvent;
|
|
5
|
-
const custom_apps_1 = require("@rippling/pebble-sdui-web/catalogs/custom-apps");
|
|
6
|
-
const functions_1 = require("../../../../functions.js");
|
|
7
|
-
function isManifestRegistration(target) {
|
|
8
|
-
return typeof target === 'object' && target != null && 'definition' in target && 'object' in target;
|
|
9
|
-
}
|
|
10
|
-
function resolveObjectApiName(target) {
|
|
11
|
-
return isManifestRegistration(target) ? target.definition.apiName : target.apiName;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Builds the standard SDUI function response for a custom-object-backed object
|
|
15
|
-
* list page.
|
|
16
|
-
*
|
|
17
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
18
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
19
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
20
|
-
*/
|
|
21
|
-
function createTypedObjectListPageResponse(target) {
|
|
22
|
-
const spec = (0, custom_apps_1.render)({
|
|
23
|
-
root: (0, custom_apps_1.ObjectListView)({
|
|
24
|
-
props: { objectApiName: resolveObjectApiName(target) },
|
|
25
|
-
}),
|
|
26
|
-
state: {},
|
|
27
|
-
});
|
|
28
|
-
return new functions_1.FunctionResponse({
|
|
29
|
-
body: { spec: JSON.stringify(spec) },
|
|
30
|
-
statusCode: 200,
|
|
31
|
-
headers: {},
|
|
32
|
-
message: '',
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Handles the standard custom-object object-list page event shape.
|
|
37
|
-
*
|
|
38
|
-
* The event and context are accepted so callers can keep an exported
|
|
39
|
-
* `onRipplingEvent(event, context)` signature that matches backend IO-contract
|
|
40
|
-
* derivation expectations, while delegating the repetitive response plumbing to
|
|
41
|
-
* this helper.
|
|
42
|
-
*
|
|
43
|
-
* @param event - Incoming SDUI page event, expected to be the standard init-only object-list shape.
|
|
44
|
-
* @param context - Function context supplied by the platform.
|
|
45
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
46
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
47
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
48
|
-
*/
|
|
49
|
-
async function handleTypedObjectListPageEvent(event, context, target) {
|
|
50
|
-
void event;
|
|
51
|
-
void context;
|
|
52
|
-
return createTypedObjectListPageResponse(target);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=object-list-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-page.js","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/object-list-page.ts"],"names":[],"mappings":";;AA8CA,8EAgBC;AAgBD,wEAQC;AAtFD,gFAAwF;AACxF,wDAA2G;AAyB3G,SAAS,sBAAsB,CAC7B,MAA+C;IAE/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,IAAI,YAAY,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC;AACtG,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAA+C;IAE/C,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACrF,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iCAAiC,CAC/C,MAA+C;IAE/C,MAAM,IAAI,GAAG,IAAA,oBAAM,EAAC;QAClB,IAAI,EAAE,IAAA,4BAAc,EAAC;YACnB,KAAK,EAAE,EAAE,aAAa,EAAE,oBAAoB,CAAC,MAAM,CAAC,EAAE;SACvD,CAAC;QACF,KAAK,EAAE,EAAE;KACV,CAAC,CAAC;IAEH,OAAO,IAAI,4BAAgB,CAA4B;QACrD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACpC,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,8BAA8B,CAClD,KAA+B,EAC/B,OAAwB,EACxB,MAA+C;IAE/C,KAAK,KAAK,CAAC;IACX,KAAK,OAAO,CAAC;IACb,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ObjectListView, render } from '@rippling/pebble-sdui-web/catalogs/custom-apps';
|
|
2
|
-
import { FunctionResponse } from "../../../../functions.mjs";
|
|
3
|
-
function isManifestRegistration(target) {
|
|
4
|
-
return typeof target === 'object' && target != null && 'definition' in target && 'object' in target;
|
|
5
|
-
}
|
|
6
|
-
function resolveObjectApiName(target) {
|
|
7
|
-
return isManifestRegistration(target) ? target.definition.apiName : target.apiName;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Builds the standard SDUI function response for a custom-object-backed object
|
|
11
|
-
* list page.
|
|
12
|
-
*
|
|
13
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
14
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
15
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
16
|
-
*/
|
|
17
|
-
export function createTypedObjectListPageResponse(target) {
|
|
18
|
-
const spec = render({
|
|
19
|
-
root: ObjectListView({
|
|
20
|
-
props: { objectApiName: resolveObjectApiName(target) },
|
|
21
|
-
}),
|
|
22
|
-
state: {},
|
|
23
|
-
});
|
|
24
|
-
return new FunctionResponse({
|
|
25
|
-
body: { spec: JSON.stringify(spec) },
|
|
26
|
-
statusCode: 200,
|
|
27
|
-
headers: {},
|
|
28
|
-
message: '',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Handles the standard custom-object object-list page event shape.
|
|
33
|
-
*
|
|
34
|
-
* The event and context are accepted so callers can keep an exported
|
|
35
|
-
* `onRipplingEvent(event, context)` signature that matches backend IO-contract
|
|
36
|
-
* derivation expectations, while delegating the repetitive response plumbing to
|
|
37
|
-
* this helper.
|
|
38
|
-
*
|
|
39
|
-
* @param event - Incoming SDUI page event, expected to be the standard init-only object-list shape.
|
|
40
|
-
* @param context - Function context supplied by the platform.
|
|
41
|
-
* @param target - Typed custom-object definition or manifest registration that owns the object list page.
|
|
42
|
-
* @returns Function response containing the rendered ObjectListView spec.
|
|
43
|
-
* @typeParam TDefinition - Typed custom-object definition whose API name should back the list page.
|
|
44
|
-
*/
|
|
45
|
-
export async function handleTypedObjectListPageEvent(event, context, target) {
|
|
46
|
-
void event;
|
|
47
|
-
void context;
|
|
48
|
-
return createTypedObjectListPageResponse(target);
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=object-list-page.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-list-page.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/object-list-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAoD,kCAA8B;AAyB3G,SAAS,sBAAsB,CAC7B,MAA+C;IAE/C,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,IAAI,YAAY,IAAI,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC;AACtG,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAA+C;IAE/C,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACrF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAA+C;IAE/C,MAAM,IAAI,GAAG,MAAM,CAAC;QAClB,IAAI,EAAE,cAAc,CAAC;YACnB,KAAK,EAAE,EAAE,aAAa,EAAE,oBAAoB,CAAC,MAAM,CAAC,EAAE;SACvD,CAAC;QACF,KAAK,EAAE,EAAE;KACV,CAAC,CAAC;IAEH,OAAO,IAAI,gBAAgB,CAA4B;QACrD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;QACpC,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,KAA+B,EAC/B,OAAwB,EACxB,MAA+C;IAE/C,KAAK,KAAK,CAAC;IACX,KAAK,OAAO,CAAC;IACb,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|