@nexia/sdk 0.6.1 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/organization-target.d.ts +8 -0
- package/dist/resource-composition.js +1 -1
- package/dist/shell.d.ts +11 -0
- package/package.json +61 -61
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type { ApprovalActor, ApprovalBodySnapshot, ApprovalBusinessFormControlle
|
|
|
35
35
|
export { APPROVAL_STATES, APPROVAL_STEP_KINDS } from "./approval";
|
|
36
36
|
export type { BpmnEditorDocument, BpmnEditorElement, BpmnEditorNodeType, BpmnEditorProcess, DmnEditorDocument, DmnEditorHitPolicy, DmnEditorInputClause, DmnEditorOutputClause, DmnEditorRule, DmnEditorValueType, ProcessUserTaskFormController, ProcessUserTaskFormRegistrar, ProcessUserTaskFormRegistration, ProcessUserTaskFormRegistry, ProcessUserTaskFormSlotPropsV1, ProcessUserTaskFormWidgetLoader, ProcessUserTaskResourceRef, } from "./process";
|
|
37
37
|
export { DMN_EDITOR_HIT_POLICIES } from "./process";
|
|
38
|
-
export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
|
|
38
|
+
export type { AppRouteFrameProps, AppRoutePrefetchContext, AppRoutePrefetcher, AutoRegisterPackageSurfacesOptions, PackageSurfaceLoader, PackageSurfaceOverride, PackageSurfaceOverrideRegistration, FormFieldErrors, InspectorActionProps, InspectorResourceActionsProps, ListLocateRecord, MessageApi, MutationFormError, NxCanonicalRoutePaneProps, NxActionKind, NxIconButtonProps, NxComboboxOption, NxComboboxProps, NxRefreshControlProps, NxColumnBrowserLabels, NxColumnBrowserProps, NxColumnNode, NxColumnPickerLabels, NxColumnPickerProps, NxDatePickerLabels, NxDatePickerProps, NxDateRangePickerProps, NxDateRangeValue, NxDropdownMenuItem, NxHelpTooltipProps, InsightFilterControls, InsightFilterState, InsightQueryLike, InsightRangePreset, UseInsightFilterStateOptions, NxOverviewBandCard, NxSelectOption, NxStatDelta, NxStatDeltaDirection, NxStatDeltaTone, NxTabNavItem, NxTabNavProps, NxTooltipAlign, NxTooltipProps, NxTooltipSide, OpenResourceWorkTab, OpenResourceWorkTabOptions, ResourceCreateCompletion, ResourceCreateCompletionInput, ResourceCreateContinuationTarget, ResourceCreateReceiverRegistration, ResourceInspectorAdapter, ResourceInspectorAdapterLoader, ResourceInspectorAdapterProps, ResourceInspectorAdapterRegistry, ResourceInspectorPanelProps, ResourceInspectorStack, ResourceInspectorStackHostProps, ResourceInspectorStackProviderProps, ResourceInspectorStateProps, ResourceLinkProps, ResourceListFilters, ResourceListFilterValue, ResourceListFooterConfig, ResourceListParams, ResourceListParamsControls, ResourceListRefreshConfig, ResourceListToolbarConfig, ResourceListToolbarMoreMenuProps, ResourceListToolbarViewOption, ResourcePrimaryCellProps, ResourceActionDescriptor, ResourceRef, ResourceRowActionsMenuProps, ResourceStatusBadgeProps, ResourceTableColumn, ResourceTableAccess, ResourceTableDensity, ResourceTableProps, ResourceTableStyle, ResourceTableSummaryRow, ResourceTableSort, TabContextActionContext, TabContextActionRegistration, TabContextActionResult, ResourceTextCellProps, ToastOptions, ToastSource, UseRegisterListLocateActionOptions, UseResourceListParamsOptions, WorkSectionProps, FavoriteTarget, WorkTabRef, WorkSurfaceAction, WorkSurfaceLabelInput, WorkSurfaceLabels, WorkSurfaceProps, } from "./shell";
|
|
39
39
|
export { FavoriteButton } from "./host";
|
|
40
40
|
export type { FavoriteButtonProps } from "./host";
|
|
41
41
|
export { createSpreadsheetWorkbook } from "./spreadsheet";
|
|
@@ -51,6 +51,14 @@ interface OrganizationTargetSelectorBaseProps {
|
|
|
51
51
|
/** Host-localized organization target controls for the supported page-scope modes. */
|
|
52
52
|
export type NxOrganizationTargetSelectorProps = (OrganizationTargetSelectorBaseProps & {
|
|
53
53
|
mode: 'legal-entity-list';
|
|
54
|
+
/** Opt in only when the endpoint supports company-wide and legal-entity records.
|
|
55
|
+
* This selects record scope, not a Legal Entity or an authorization grant.
|
|
56
|
+
* The owning page must persist it and send it to its validated query.
|
|
57
|
+
*/
|
|
58
|
+
recordScope?: {
|
|
59
|
+
value: 'all' | 'tenant' | 'legal_entity';
|
|
60
|
+
onChange: (value: 'all' | 'tenant' | 'legal_entity') => void;
|
|
61
|
+
};
|
|
54
62
|
options: readonly OrganizationTargetSelectorOption[];
|
|
55
63
|
value: readonly string[];
|
|
56
64
|
onChange: (legalEntityPublicIds: string[]) => void;
|
|
@@ -138,7 +138,7 @@ export function parseCompositionSpec(value) {
|
|
|
138
138
|
const operation = oneOf(item.operation, `${path}.operation`, ['count', 'distinct_count', 'sum', 'avg', 'min', 'max', 'median'], 'invalid_measure');
|
|
139
139
|
const result_type = oneOf(item.result_type, `${path}.result_type`, ['integer', 'decimal'], 'invalid_measure');
|
|
140
140
|
const null_behavior = oneOf(item.null_behavior, `${path}.null_behavior`, ['zero', 'null_if_empty'], 'invalid_measure');
|
|
141
|
-
const unit = identifier(item.unit, `${path}.unit`, UNIT_PATTERN, 'invalid_measure');
|
|
141
|
+
const unit = item.unit === null ? null : identifier(item.unit, `${path}.unit`, UNIT_PATTERN, 'invalid_measure');
|
|
142
142
|
if (operation === 'count' && item.field !== null) {
|
|
143
143
|
fail('invalid_measure', `${path}.field`, 'Count cannot have a field.');
|
|
144
144
|
}
|
package/dist/shell.d.ts
CHANGED
|
@@ -397,6 +397,15 @@ export interface ResourceTableSummaryRow {
|
|
|
397
397
|
label?: string;
|
|
398
398
|
testId?: string;
|
|
399
399
|
}
|
|
400
|
+
/**
|
|
401
|
+
* Access resolution for a resource list. The App owns the permission and
|
|
402
|
+
* organization-scope query; ResourceTable owns the visual transition.
|
|
403
|
+
*/
|
|
404
|
+
export interface ResourceTableAccess {
|
|
405
|
+
state: "pending" | "denied";
|
|
406
|
+
deniedAction?: ReactNode;
|
|
407
|
+
deniedTestId?: string;
|
|
408
|
+
}
|
|
400
409
|
export interface ResourceTableProps<T> {
|
|
401
410
|
tableId?: string;
|
|
402
411
|
label: string;
|
|
@@ -428,6 +437,8 @@ export interface ResourceTableProps<T> {
|
|
|
428
437
|
onPageChange?: (page: number) => void;
|
|
429
438
|
onPerPageChange?: (pageSize: number) => void;
|
|
430
439
|
paginationDisabled?: boolean;
|
|
440
|
+
/** Pending keeps skeletons; denied hides rows. Omit after grant; failures use error/onRetry. */
|
|
441
|
+
access?: ResourceTableAccess;
|
|
431
442
|
loading?: boolean;
|
|
432
443
|
loadingLabel?: ReactNode;
|
|
433
444
|
loadingRows?: number;
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"name": "@nexia/sdk",
|
|
3
|
+
"version": "0.6.4",
|
|
4
|
+
"description": "Frontend contracts for Nexia App Packages",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"packageManager": "pnpm@11.17.0",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"development": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./host": {
|
|
20
|
+
"development": "./dist/host.js",
|
|
21
|
+
"types": "./dist/host.d.ts",
|
|
22
|
+
"import": "./dist/host.js"
|
|
23
|
+
},
|
|
24
|
+
"./testing": {
|
|
25
|
+
"development": "./dist/testing.js",
|
|
26
|
+
"types": "./dist/testing.d.ts",
|
|
27
|
+
"import": "./dist/testing.js"
|
|
28
|
+
}
|
|
18
29
|
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "node scripts/build.mjs",
|
|
33
|
+
"prepack": "npm run build",
|
|
34
|
+
"test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs",
|
|
35
|
+
"test:wire-values": "node tests/WireValuesTest.mjs",
|
|
36
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
|
+
"test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",
|
|
38
|
+
"test:organization-target": "pnpm run build && node scripts/organization-target-contract.mjs",
|
|
39
|
+
"build:watch": "node scripts/build.mjs --watch",
|
|
40
|
+
"test:build-watch": "node --test tests/BuildWatchTest.mjs"
|
|
23
41
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@tanstack/react-query": "^5.99.0",
|
|
44
|
+
"axios": "^1.11.0",
|
|
45
|
+
"react": "^19.1.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@tanstack/react-query": "^5.99.0",
|
|
49
|
+
"@types/react": "^19.1.0",
|
|
50
|
+
"axios": "^1.11.0",
|
|
51
|
+
"react": "^19.1.0",
|
|
52
|
+
"typescript": "^5.8.3"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"registry": "https://registry.npmjs.org/",
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "https://github.com/nexia-cloud-os/app-sdk.git",
|
|
61
|
+
"directory": "packages/react"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/nexia-cloud-os/developer-support/issues"
|
|
28
65
|
}
|
|
29
|
-
},
|
|
30
|
-
"sideEffects": false,
|
|
31
|
-
"scripts": {
|
|
32
|
-
"build": "node scripts/build.mjs",
|
|
33
|
-
"prepack": "npm run build",
|
|
34
|
-
"test": "npm run build && node tests/WireValuesTest.mjs && node tests/ResourceCompositionFrontendContractsTest.mjs && node scripts/organization-target-contract.mjs",
|
|
35
|
-
"test:wire-values": "node tests/WireValuesTest.mjs",
|
|
36
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
|
-
"test:resource-composition": "pnpm run build && node tests/ResourceCompositionFrontendContractsTest.mjs",
|
|
38
|
-
"test:organization-target": "pnpm run build && node scripts/organization-target-contract.mjs",
|
|
39
|
-
"build:watch": "node scripts/build.mjs --watch",
|
|
40
|
-
"test:build-watch": "node --test tests/BuildWatchTest.mjs"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"@tanstack/react-query": "^5.99.0",
|
|
44
|
-
"axios": "^1.11.0",
|
|
45
|
-
"react": "^19.1.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@tanstack/react-query": "^5.99.0",
|
|
49
|
-
"@types/react": "^19.1.0",
|
|
50
|
-
"axios": "^1.11.0",
|
|
51
|
-
"react": "^19.1.0",
|
|
52
|
-
"typescript": "^5.8.3"
|
|
53
|
-
},
|
|
54
|
-
"publishConfig": {
|
|
55
|
-
"registry": "https://registry.npmjs.org/",
|
|
56
|
-
"access": "public"
|
|
57
|
-
},
|
|
58
|
-
"repository": {
|
|
59
|
-
"type": "git",
|
|
60
|
-
"url": "https://github.com/nexia-cloud-os/app-sdk.git",
|
|
61
|
-
"directory": "packages/react"
|
|
62
|
-
},
|
|
63
|
-
"bugs": {
|
|
64
|
-
"url": "https://github.com/nexia-cloud-os/developer-support/issues"
|
|
65
|
-
}
|
|
66
66
|
}
|