@declarion/react 0.66.1 → 0.81.0

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.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/api/auth.js +24 -14
  3. package/dist-lib/app.js +28 -23
  4. package/dist-lib/components/chrome/AssociationTabs.js +35 -38
  5. package/dist-lib/components/chrome/HighlightsStrip.js +2 -1
  6. package/dist-lib/components/chrome/RecordHeader.js +33 -38
  7. package/dist-lib/components/detail-layout/AssociatedBlock.js +10 -21
  8. package/dist-lib/components/detail-layout/ChildrenBlock.js +1 -8
  9. package/dist-lib/components/detail-layout/ChildrenCards.js +1 -8
  10. package/dist-lib/components/detail-layout/ChildrenList.js +1 -8
  11. package/dist-lib/components/detail-layout/ChildrenTable.js +1 -8
  12. package/dist-lib/components/detail-layout/ChildrenTimeline.js +1 -8
  13. package/dist-lib/components/detail-layout/DetailAuditStrip.js +33 -29
  14. package/dist-lib/components/detail-layout/DetailHighlights.js +7 -2
  15. package/dist-lib/components/detail-layout/FieldsBlock.js +12 -9
  16. package/dist-lib/components/detail-layout/LayoutRenderer.js +10 -10
  17. package/dist-lib/components/detail-layout/LayoutTabs.js +49 -48
  18. package/dist-lib/components/detail-layout/SectionBlock.js +20 -28
  19. package/dist-lib/components/detail-layout/visibility.js +28 -0
  20. package/dist-lib/components/fields/IntArrayField.js +37 -33
  21. package/dist-lib/components/fields/NumberField.js +28 -55
  22. package/dist-lib/components/fields/RichTextField.js +1 -1
  23. package/dist-lib/components/fields/TimestampField.js +50 -89
  24. package/dist-lib/components/fields/cells/factories/date.js +13 -14
  25. package/dist-lib/components/fields/cells/factories/money.js +1 -1
  26. package/dist-lib/components/fields/cells/factories/number.js +4 -4
  27. package/dist-lib/components/file-widgets/DocumentCard.js +1 -1
  28. package/dist-lib/components/file-widgets/Grid.js +153 -152
  29. package/dist-lib/components/file-widgets/ImageWidget.js +90 -91
  30. package/dist-lib/components/file-widgets/LabeledSlots.js +1 -0
  31. package/dist-lib/components/file-widgets/helpers.js +15 -19
  32. package/dist-lib/components/file-widgets/host.js +33 -32
  33. package/dist-lib/components/file-widgets/upload.js +10 -6
  34. package/dist-lib/components/layout/Layout.js +125 -123
  35. package/dist-lib/components/pages/NoScreensPage.impl.js +14 -0
  36. package/dist-lib/components/pages/NoScreensPage.js +12 -0
  37. package/dist-lib/components/pages/SmartDetailPage.impl.js +451 -451
  38. package/dist-lib/components/pages/auth/AuthShell.js +62 -61
  39. package/dist-lib/components/pages/auth/CodeInput.js +63 -0
  40. package/dist-lib/components/pages/auth/SignIn.js +12 -4
  41. package/dist-lib/components/pages/auth/SignUp.impl.js +80 -103
  42. package/dist-lib/components/pages/auth/SignUpCode.js +122 -0
  43. package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -55
  44. package/dist-lib/components/pages/list/cardProjection.js +135 -122
  45. package/dist-lib/components/pages/list/columns.js +58 -43
  46. package/dist-lib/components/pages/profile/Profile.impl.js +87 -104
  47. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +1 -1
  48. package/dist-lib/components/params/ParamsBlock.js +6 -17
  49. package/dist-lib/components/params/param-editors.js +14 -10
  50. package/dist-lib/components/primitives/Fields.js +314 -236
  51. package/dist-lib/components/shared/MarkdownRenderer.js +44 -43
  52. package/dist-lib/declarion-react.css +1 -1
  53. package/dist-lib/hooks/useActiveTabFollowsRoute.js +49 -0
  54. package/dist-lib/hooks/useAuth.js +44 -37
  55. package/dist-lib/hooks/useDocumentTitle.js +20 -0
  56. package/dist-lib/hooks/useFollowAgentOpen.js +1 -0
  57. package/dist-lib/hooks/useTabTitle.js +1 -1
  58. package/dist-lib/index.d.ts +21 -7
  59. package/dist-lib/lib/date-text.js +57 -0
  60. package/dist-lib/lib/number-text.js +9 -0
  61. package/dist-lib/lib/timestamp.js +29 -29
  62. package/dist-lib/stores/tabs.js +7 -5
  63. package/dist-lib/testing.d.ts +1 -1
  64. package/dist-lib/testing.js +1 -0
  65. package/dist-lib/{useResponsiveMode-DmrpMbZX.d.ts → useResponsiveMode-D3SKz5z4.d.ts} +20 -9
  66. package/package.json +11 -11
@@ -1,6 +1,6 @@
1
1
  import { i as DynamicIcon, n as IconName, r as IconProps, t as Icon } from "./Icons-Dzl-AkD_.js";
2
2
  import { i as setIconRegistry, n as getIcon, t as IconDef } from "./icon-registry-CUT4eF63.js";
3
- import { $ as ChildRelation, $t as UploadedFile, A as EnrichedRow, At as TextFn, B as Refs, Bt as NO_VALUE_OPS, C as ApiErrorBody, Ct as getPrimaryKeyFields, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesToId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuesToDetailId, F as LoginResponse, Ft as textWithNodes, G as V2ListResponse, Gt as parseFiltersFromURL, H as Tenant, Ht as countActiveFilters, I as ParamLookup, It as FilterNode, J as V2PropertyInstance, Jt as FileFieldDisplay, K as V2Meta, Kt as setFiltersInURL, L as PropertyValue, Lt as FilterOp, M as ListMeta, Mt as makeTextFn, N as ListParams, Nt as pickLocalized, O as CheckSetupResponse, Ot as resolveDetailRoute, P as ListResponse, Pt as pluralText, Q as AreaDef, Qt as UploadProgress, R as PublicParam, Rt as FilterURLState, S as ApiError, St as fieldDisplayName, T as BrandingIdentity, Tt as pkValuesFromId, U as TenantEnv, Ut as hasOrGroups, V as StatusInfo, Vt as OP_LABELS, W as V2ListParams, Wt as parseFilterURLState, X as isCursorStaleError, Xt as FileFieldValue, Y as V2StatusInstance, Yt as FileFieldMode, Z as Action, Zt as HydratedFile, _ as executeAction$1, _t as StructureDef, a as ResponsiveMode, at as LanguageDef, b as AggregateParams, bt as buildRowDetailHref, c as resolveViewportCategory, ct as ParameterDef, d as ActionExecuteResponse, dt as RefConfig, en as OrderedMap, et as ClassificationTierDef, f as ActionItemError, ft as Schema, g as deleteObject, gt as StatusGroupDef, h as buildActionBody, ht as StatusDef, i as ResponsiveBreakpoints, it as FieldAccessInfo, j as ImpersonationInfo, jt as TextVars, k as DataResponse, kt as MANDATORY_LANGUAGE, l as ActionBatchError, lt as PkValues, m as GetEntityOptions, mt as SpecialValue, n as useResponsiveMode, nt as EntityField, o as ResponsiveViewport, ot as LocalizedString, p as ActionItemSkip, pt as Screen, q as V2ParamInstance, qt as FileFieldDef, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rt as EnumDef, s as ViewportCategory, st as NavNode, t as ResponsiveModeProvider, tt as Entity, u as ActionExecuteRequest, ut as PropertyDef, v as restoreObject, vt as buildDetailHrefFromId, w as AuthUser, wt as pkValuePartsToId, x as AggregateResponse, xt as extractPkValues, y as AggregateGroup, yt as buildEntityDetailHref, z as PublicParamsResponse, zt as FilterValueResolver } from "./useResponsiveMode-DmrpMbZX.js";
3
+ import { $ as AreaDef, $t as HydratedFile, A as EnrichedRow, At as MANDATORY_LANGUAGE, B as Refs, Bt as FilterValueResolver, C as ApiErrorBody, Ct as fieldDisplayName, D as CURSOR_SEMANTICS_MISMATCH, Dt as pkValuesToDetailId, E as CURSOR_LANGUAGE_CHANGED, Et as pkValuesFromId, F as LoginResponse, Ft as pluralText, G as V2ListParams, Gt as parseFilterURLState, H as StatusInfo, Ht as OP_LABELS, I as ParamLookup, It as textWithNodes, J as V2ParamInstance, Jt as FileAddress, K as V2ListResponse, Kt as parseFiltersFromURL, L as PropertyValue, Lt as FilterNode, M as ListMeta, Mt as TextVars, N as ListParams, Nt as makeTextFn, O as CheckSetupResponse, Ot as pkValuesToId, P as ListResponse, Pt as pickLocalized, Q as Action, Qt as FileFieldValue, R as PublicParam, Rt as FilterOp, S as ApiError, St as extractPkValues, T as BrandingIdentity, Tt as pkValuePartsToId, U as Tenant, Ut as countActiveFilters, V as SignupResponse, Vt as NO_VALUE_OPS, W as TenantEnv, Wt as hasOrGroups, X as V2StatusInstance, Xt as FileFieldDisplay, Y as V2PropertyInstance, Yt as FileFieldDef, Z as isCursorStaleError, Zt as FileFieldMode, _ as executeAction$1, _t as StatusGroupDef, a as ResponsiveMode, at as FieldAccessInfo, b as AggregateParams, bt as buildEntityDetailHref, c as resolveViewportCategory, ct as NavNode, d as ActionExecuteResponse, dt as PropertyDef, en as UploadProgress, et as ChildRelation, f as ActionItemError, ft as RefConfig, g as deleteObject, gt as StatusDef, h as buildActionBody, ht as SpecialValue, i as ResponsiveBreakpoints, it as EnumDef, j as ImpersonationInfo, jt as TextFn, k as DataResponse, kt as resolveDetailRoute, l as ActionBatchError, lt as ParameterDef, m as GetEntityOptions, mt as Screen, n as useResponsiveMode, nn as OrderedMap, nt as Entity, o as ResponsiveViewport, ot as LanguageDef, p as ActionItemSkip, pt as Schema, q as V2Meta, qt as setFiltersInURL, r as DEFAULT_RESPONSIVE_BREAKPOINTS, rt as EntityField, s as ViewportCategory, st as LocalizedString, t as ResponsiveModeProvider, tn as UploadedFile, tt as ClassificationTierDef, u as ActionExecuteRequest, ut as PkValues, v as restoreObject, vt as StructureDef, w as AuthUser, wt as getPrimaryKeyFields, x as AggregateResponse, xt as buildRowDetailHref, y as AggregateGroup, yt as buildDetailHrefFromId, z as PublicParamsResponse, zt as FilterURLState } from "./useResponsiveMode-D3SKz5z4.js";
4
4
  import { ButtonHTMLAttributes, CSSProperties, ComponentType, InputHTMLAttributes, MouseEvent, ReactNode, RefObject } from "react";
5
5
  import { QueryClient, QueryKey, UseQueryResult } from "@tanstack/react-query";
6
6
  import { useLocation, useNavigate, useParams, useSearchParams } from "react-router";
@@ -262,15 +262,20 @@ export declare function useAuth(): {
262
262
  password: string;
263
263
  remember?: boolean;
264
264
  }, unknown>;
265
- signup: import("@tanstack/react-query").UseMutateFunction<LoginResponse, Error, {
265
+ signup: import("@tanstack/react-query").UseMutateFunction<SignupResponse, Error, {
266
266
  email: string;
267
267
  password: string;
268
268
  displayName: string;
269
269
  }, unknown>;
270
+ confirmSignup: import("@tanstack/react-query").UseMutateFunction<LoginResponse, Error, {
271
+ email: string;
272
+ code: string;
273
+ }, unknown>;
270
274
  switchTenant: import("@tanstack/react-query").UseMutateFunction<LoginResponse, Error, string, unknown>;
271
275
  logout: () => Promise<void>;
272
276
  isLoginPending: boolean;
273
277
  isSignupPending: boolean;
278
+ isConfirmSignupPending: boolean;
274
279
  isSwitchingTenant: boolean;
275
280
  };
276
281
  //#endregion
@@ -644,6 +649,7 @@ interface LayoutContext {
644
649
  refs?: Refs;
645
650
  columns?: number;
646
651
  hideEmptyFields?: boolean;
652
+ headerFields?: ReadonlySet<string>;
647
653
  objectProperties?: PropertyValue[];
648
654
  onSetProperty?: (propertyCode: string, value: unknown) => void;
649
655
  isPropertyPending?: boolean;
@@ -730,6 +736,7 @@ interface OpenTabOptions {
730
736
  interface TabState {
731
737
  tabs: TabItem[];
732
738
  activeTabId: string | null;
739
+ restored: boolean;
733
740
  openTab: (tab: Omit<TabItem, "id">, options?: OpenTabOptions) => string;
734
741
  closeTab: (id: string) => void;
735
742
  closeTabs: (ids: string[]) => TabItem | null;
@@ -1639,6 +1646,9 @@ interface ClassifiedFieldLockedProps {
1639
1646
  }
1640
1647
  export declare function ClassifiedFieldLocked({ tier, tierDef, requiredPermission, variant }: ClassifiedFieldLockedProps): import("react").JSX.Element;
1641
1648
  //#endregion
1649
+ //#region src/lib/date-text.d.ts
1650
+ type DateTextKind = "date" | "datetime";
1651
+ //#endregion
1642
1652
  //#region src/components/primitives/Fields.d.ts
1643
1653
  type FieldLabelProps = {
1644
1654
  children?: ReactNode;
@@ -1655,7 +1665,7 @@ type TextInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onC
1655
1665
  suffix?: ReactNode;
1656
1666
  style?: CSSProperties;
1657
1667
  };
1658
- export declare function TextInput({ value, onChange, placeholder, prefix, suffix, style, ...rest }: TextInputProps): import("react").JSX.Element;
1668
+ export declare function TextInput({ value, onChange, placeholder, prefix, suffix, style, onFocus, onBlur, ...rest }: TextInputProps): import("react").JSX.Element;
1659
1669
  type TextAreaProps = {
1660
1670
  value?: string | null;
1661
1671
  onChange?: (v: string) => void;
@@ -1696,10 +1706,14 @@ type MultiSelectProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value" |
1696
1706
  };
1697
1707
  export declare function MultiSelect({ value, options, onChange, placeholder, ...rest }: MultiSelectProps): import("react").JSX.Element;
1698
1708
  type DateInputProps = {
1699
- value?: string | null;
1700
- onChange?: (v: string) => void;
1709
+ kind: DateTextKind;
1710
+ value: string | null;
1711
+ onChange: (value: string | null, typed: string) => void;
1712
+ id?: string;
1713
+ name?: string;
1714
+ ariaRequired?: boolean;
1701
1715
  };
1702
- export declare function DateInput({ value, onChange }: DateInputProps): import("react").JSX.Element;
1716
+ export declare function DateInput({ kind, value, onChange, id, name, ariaRequired }: DateInputProps): import("react").JSX.Element;
1703
1717
  type PasswordInputProps = {
1704
1718
  value?: string | null;
1705
1719
  onChange?: (v: string) => void;
@@ -2535,4 +2549,4 @@ export declare function isFieldSoDProtected(schema: Schema | undefined, entity:
2535
2549
  */
2536
2550
  export declare function fieldAccessInfo(entity: Entity | undefined, fieldName: string): FieldAccessInfo | undefined;
2537
2551
  //#endregion
2538
- export { type Action, ActionBatchError, type ActionExecuteRequest, type ActionExecuteResponse, type ActionItemError, type ActionItemSkip, type ActionListPage, type AgentChatPanelProps, type AgentContentBlock, type AgentConversation, type AgentConversationDrawerProps, type AgentConversationStatus, type AgentElicitFormProps, type AgentInvocationKind, type AgentInvocationStatus, type AgentMessage, type AgentPickerProps, type AgentRole, type AgentToolInvocation, type AgentTurn, type AgentTurnState, type AgentTurnStatus, type AggregateGroup, type AggregateParams, type AggregateResponse, type ApiError, App as Declarion, type ApprovalScope, type AuthShellProps, type AuthUser, type AvailableAgent, type AvatarProps, type BatchOp, type BatchOpResult, type BatchResponse, type BoolToggleProps, type BrandGlyphProps, type BreadcrumbsProps, type BtnKind, type BtnProps, type BtnSize, CURSOR_LANGUAGE_CHANGED, CURSOR_SEMANTICS_MISMATCH, type CanonicalLocation, type ChangePasswordDialogProps, type CheckProps, type CheckSetupResponse, type ChildRelation, type ChipProps, type ClassificationTierDef, type CommandAction, type CommandActionType, type CommandPaletteProps, type CropperOptions, type CropperResult, type Crumb, type CurrentScreen, type CursorActionDataResult, type CursorEntityDataParams, type CursorEntityDataResult, type CustomScreenProps, DEFAULT_RESPONSIVE_BREAKPOINTS, type DataResponse, type DateInputProps, type DraftEntry, type DropdownProps, DynamicIcon, type EnrichedRow, type Entity, type EntityField, type EnumDef, type FieldAccessInfo, type FieldLabelProps, type FileDraftScopeApi, type FileFieldDef, type FileFieldDisplay, type FileFieldMode, type FileWidget, type FileWidgetProps, type FilterNode, type FilterOp, type FilterRecord, type FilterRecordField, type FilterRecordFields, type FilterURLState, type HoverCardAlign, type HoverCardProps, type HydratedFile, Icon, type IconBtnProps, type IconDef, type IconName, type IconProps, type ImageCropper, type InfoTooltipProps, type InlineEditCellProps, type InlineEditKind, type InlineEditTrigger, type JsonFieldProps, type LanguageDef, type LayoutWidget, type LayoutWidgetProps, type ListMeta, type ListParams, type ListResponse, type LiveObjectResult, type LocalizedString, type LoginResponse, MANDATORY_LANGUAGE, MULTIPLE_VALUES, type MassEditTarget, type MassEditTargetKind, type MenuItemProps, type MultiSelectProps, NO_VALUE_OPS, type NavNode, OP_LABELS, type ObjectActionBarProps, type ObjectActionBarSlot, type ObjectActionSelection, OrderedMap, type PageStateSetter, type ParameterDef, type PasswordInputProps, type PatchMap, type PillProps, type PillSize, type PillTone, type PkValues, type PropertyDef, type PropertyValue, type PublicParam, type QEFieldProps, type QuickEditCellProps, type QuickPeekFieldSpec, type QuickPeekProps, type RailAreaItem, type RailProps, type RecordIdBadgeProps, type RefComboboxProps, type RefFieldItem, type RefFieldProps, type RefreshControlProps, type Refs, type ResponsiveBreakpoints, type ResponsiveMode, ResponsiveModeProvider, type ResponsiveViewport, type ReturnTarget, type RowFieldProps, type RowHelpers, type RunActionOptions, type Schema, type Screen, type ScreenBack, type ScrollAnchor, type ScrollableVirtualizer, type SectionBadge, type SectionCardProps, type SectionEmphasis, type SelectOption, type SelectProps, type SidebarProps, type StatTileProps, type StatTileTone, type StatusDef, type StatusGroupDef, type StatusInfo, type StructureDef, type TabItem, type TabStripProps, type TagsInputProps, type Tenant, type TenantChipProps, type TextAreaProps, type TextFn, type TextInputProps, type TextVars, type TooltipProps, type TopBarProps, type UploadCheck, type UploadProgress, type UploadedFile, type UseObjectActionsResult, type UseScreenBackOptions, type UseScreenTabOptions, type V2ListParams, type V2ListResponse, type V2Meta, type V2ParamInstance, type V2PropertyInstance, type V2StatusInstance, type ViewFieldProps, type ViewportCategory, buildActionBody, buildDetailHrefFromId, buildEntityDetailHref, buildRowDetailHref, countActiveFilters, deleteObject, executeAction$1 as executeAction, extractPkValues, fieldDisplayName, getIcon, getPrimaryKeyFields, hasOrGroups, isCursorStaleError, makeTextFn, parseFilterURLState, parseFiltersFromURL, pickLocalized, pkValuePartsToId, pkValuesFromId, pkValuesToDetailId, pkValuesToId, pluralText, resolveDetailRoute, resolveViewportCategory, restoreObject, setFiltersInURL, setIconRegistry, textWithNodes, useLocation, useNavigate, useParams, useResponsiveMode, useSearchParams };
2552
+ export { type Action, ActionBatchError, type ActionExecuteRequest, type ActionExecuteResponse, type ActionItemError, type ActionItemSkip, type ActionListPage, type AgentChatPanelProps, type AgentContentBlock, type AgentConversation, type AgentConversationDrawerProps, type AgentConversationStatus, type AgentElicitFormProps, type AgentInvocationKind, type AgentInvocationStatus, type AgentMessage, type AgentPickerProps, type AgentRole, type AgentToolInvocation, type AgentTurn, type AgentTurnState, type AgentTurnStatus, type AggregateGroup, type AggregateParams, type AggregateResponse, type ApiError, App as Declarion, type ApprovalScope, type AuthShellProps, type AuthUser, type AvailableAgent, type AvatarProps, type BatchOp, type BatchOpResult, type BatchResponse, type BoolToggleProps, type BrandGlyphProps, type BreadcrumbsProps, type BtnKind, type BtnProps, type BtnSize, CURSOR_LANGUAGE_CHANGED, CURSOR_SEMANTICS_MISMATCH, type CanonicalLocation, type ChangePasswordDialogProps, type CheckProps, type CheckSetupResponse, type ChildRelation, type ChipProps, type ClassificationTierDef, type CommandAction, type CommandActionType, type CommandPaletteProps, type CropperOptions, type CropperResult, type Crumb, type CurrentScreen, type CursorActionDataResult, type CursorEntityDataParams, type CursorEntityDataResult, type CustomScreenProps, DEFAULT_RESPONSIVE_BREAKPOINTS, type DataResponse, type DateInputProps, type DraftEntry, type DropdownProps, DynamicIcon, type EnrichedRow, type Entity, type EntityField, type EnumDef, type FieldAccessInfo, type FieldLabelProps, type FileAddress, type FileDraftScopeApi, type FileFieldDef, type FileFieldDisplay, type FileFieldMode, type FileWidget, type FileWidgetProps, type FilterNode, type FilterOp, type FilterRecord, type FilterRecordField, type FilterRecordFields, type FilterURLState, type HoverCardAlign, type HoverCardProps, type HydratedFile, Icon, type IconBtnProps, type IconDef, type IconName, type IconProps, type ImageCropper, type InfoTooltipProps, type InlineEditCellProps, type InlineEditKind, type InlineEditTrigger, type JsonFieldProps, type LanguageDef, type LayoutWidget, type LayoutWidgetProps, type ListMeta, type ListParams, type ListResponse, type LiveObjectResult, type LocalizedString, type LoginResponse, MANDATORY_LANGUAGE, MULTIPLE_VALUES, type MassEditTarget, type MassEditTargetKind, type MenuItemProps, type MultiSelectProps, NO_VALUE_OPS, type NavNode, OP_LABELS, type ObjectActionBarProps, type ObjectActionBarSlot, type ObjectActionSelection, OrderedMap, type PageStateSetter, type ParameterDef, type PasswordInputProps, type PatchMap, type PillProps, type PillSize, type PillTone, type PkValues, type PropertyDef, type PropertyValue, type PublicParam, type QEFieldProps, type QuickEditCellProps, type QuickPeekFieldSpec, type QuickPeekProps, type RailAreaItem, type RailProps, type RecordIdBadgeProps, type RefComboboxProps, type RefFieldItem, type RefFieldProps, type RefreshControlProps, type Refs, type ResponsiveBreakpoints, type ResponsiveMode, ResponsiveModeProvider, type ResponsiveViewport, type ReturnTarget, type RowFieldProps, type RowHelpers, type RunActionOptions, type Schema, type Screen, type ScreenBack, type ScrollAnchor, type ScrollableVirtualizer, type SectionBadge, type SectionCardProps, type SectionEmphasis, type SelectOption, type SelectProps, type SidebarProps, type StatTileProps, type StatTileTone, type StatusDef, type StatusGroupDef, type StatusInfo, type StructureDef, type TabItem, type TabStripProps, type TagsInputProps, type Tenant, type TenantChipProps, type TextAreaProps, type TextFn, type TextInputProps, type TextVars, type TooltipProps, type TopBarProps, type UploadCheck, type UploadProgress, type UploadedFile, type UseObjectActionsResult, type UseScreenBackOptions, type UseScreenTabOptions, type V2ListParams, type V2ListResponse, type V2Meta, type V2ParamInstance, type V2PropertyInstance, type V2StatusInstance, type ViewFieldProps, type ViewportCategory, buildActionBody, buildDetailHrefFromId, buildEntityDetailHref, buildRowDetailHref, countActiveFilters, deleteObject, executeAction$1 as executeAction, extractPkValues, fieldDisplayName, getIcon, getPrimaryKeyFields, hasOrGroups, isCursorStaleError, makeTextFn, parseFilterURLState, parseFiltersFromURL, pickLocalized, pkValuePartsToId, pkValuesFromId, pkValuesToDetailId, pkValuesToId, pluralText, resolveDetailRoute, resolveViewportCategory, restoreObject, setFiltersInURL, setIconRegistry, textWithNodes, useLocation, useNavigate, useParams, useResponsiveMode, useSearchParams };
@@ -0,0 +1,57 @@
1
+ //#region src/lib/date-text.ts
2
+ var e = /^(\d{4})-(\d{2})-(\d{2})$/, t = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/, n = /^(\d{1,2})[-/.](\d{1,2})[-/.](\d{4})$|^(\d{2})(\d{2})(\d{4})$/, r = /^(\d{4})-(\d{1,2})-(\d{1,2})$/, i = /^(\d{1,2}):(\d{2})$/;
3
+ function a(t) {
4
+ let n = e.exec(t);
5
+ return n ? `${n[3]}-${n[2]}-${n[1]}` : null;
6
+ }
7
+ function o(e, n) {
8
+ if (e === "date") return a(n) ?? n;
9
+ let r = t.exec(n);
10
+ return r ? `${r[3]}-${r[2]}-${r[1]} ${r[4]}:${r[5]}` : n;
11
+ }
12
+ function s(e, t) {
13
+ let n = t.trim();
14
+ if (e === "date") return u(n);
15
+ let r = n.search(/[\sT]/);
16
+ if (r < 0) return null;
17
+ let i = u(n.slice(0, r)), a = d(n.slice(r + 1).trim());
18
+ return i && a ? `${i}T${a}` : null;
19
+ }
20
+ function c(e) {
21
+ return /^[\d\-/.: T]*$/.test(e);
22
+ }
23
+ function l(e) {
24
+ let t = r.exec(e);
25
+ if (t) return [
26
+ t[3],
27
+ t[2],
28
+ t[1]
29
+ ];
30
+ let i = n.exec(e);
31
+ return i ? i[1] ? [
32
+ i[1],
33
+ i[2],
34
+ i[3]
35
+ ] : [
36
+ i[4],
37
+ i[5],
38
+ i[6]
39
+ ] : null;
40
+ }
41
+ function u(e) {
42
+ let t = l(e);
43
+ if (!t) return null;
44
+ let [n, r, i] = t.map(Number), a = new Date(Date.UTC(i, r, 0)).getUTCDate();
45
+ return r < 1 || r > 12 || n < 1 || n > a ? null : `${t[2]}-${f(r)}-${f(n)}`;
46
+ }
47
+ function d(e) {
48
+ let t = i.exec(e);
49
+ if (!t) return null;
50
+ let n = Number(t[1]), r = Number(t[2]);
51
+ return n > 23 || r > 59 ? null : `${f(n)}:${f(r)}`;
52
+ }
53
+ function f(e) {
54
+ return String(e).padStart(2, "0");
55
+ }
56
+ //#endregion
57
+ export { e as CIVIL_DATE, a as formatCivilDateText, o as formatDateText, c as isDateDraft, s as parseDateText };
@@ -0,0 +1,9 @@
1
+ //#region src/lib/number-text.ts
2
+ function e(e, t) {
3
+ return (t ? /^-?\d*$/ : /^-?\d*\.?\d*$/).test(e);
4
+ }
5
+ function t(e) {
6
+ return /\d/.test(e) ? (e.endsWith(".") ? e.slice(0, -1) : e).replace(/^(-?)\./, (e, t) => `${t}0.`) : null;
7
+ }
8
+ //#endregion
9
+ export { e as isNumberDraft, t as numberTextValue };
@@ -1,9 +1,10 @@
1
- import { formatISO as e } from "date-fns";
1
+ import { CIVIL_DATE as e, formatCivilDateText as t } from "./date-text.js";
2
+ import { formatISO as n } from "date-fns";
2
3
  //#region src/lib/timestamp.ts
3
- function t(t = /* @__PURE__ */ new Date()) {
4
- return e(t);
4
+ function r(e = /* @__PURE__ */ new Date()) {
5
+ return n(e);
5
6
  }
6
- function n(e, t, n) {
7
+ function i(e, t, n) {
7
8
  let r = e.match(/([+-]\d{2}:\d{2})$/), i = e.endsWith("Z"), a = new Date(e);
8
9
  if (isNaN(a.getTime())) return e;
9
10
  if (r || i) {
@@ -29,8 +30,8 @@ function n(e, t, n) {
29
30
  }
30
31
  return new Intl.DateTimeFormat(n, t).format(a);
31
32
  }
32
- function r(e) {
33
- return n(e, {
33
+ function a(e) {
34
+ return i(e, {
34
35
  day: "2-digit",
35
36
  month: "2-digit",
36
37
  year: "numeric",
@@ -39,36 +40,35 @@ function r(e) {
39
40
  hour12: !1
40
41
  }, "en-GB").replace(/\//g, "-").replace(",", "");
41
42
  }
42
- var i = /^(\d{4})-(\d{2})-(\d{2})$/;
43
- function a(e) {
44
- let t = i.exec(e);
45
- if (!t) return null;
46
- let [, n, r, a] = t;
47
- return new Date(Number(n), Number(r) - 1, Number(a));
43
+ function o(t) {
44
+ let n = e.exec(t);
45
+ if (!n) return null;
46
+ let [, r, i, a] = n;
47
+ return new Date(Number(r), Number(i) - 1, Number(a));
48
48
  }
49
- function o(t, n, i = /* @__PURE__ */ new Date()) {
50
- if (n == null || n === "") return {
49
+ function s(e, r, i = /* @__PURE__ */ new Date()) {
50
+ if (r == null || r === "") return {
51
51
  text: "—",
52
52
  absolute: ""
53
53
  };
54
- let o = typeof n == "string" ? a(n) : null, s = n instanceof Date ? n : o ?? new Date(String(n));
55
- if (isNaN(s.getTime())) {
56
- let e = String(n);
54
+ let s = typeof r == "string" ? o(r) : null, c = r instanceof Date ? r : s ?? new Date(String(r));
55
+ if (isNaN(c.getTime())) {
56
+ let e = String(r);
57
57
  return {
58
58
  text: e,
59
59
  absolute: e
60
60
  };
61
61
  }
62
- let c = o ? String(n) : r(typeof n == "string" ? n : s.toISOString()), u = i.getTime() - s.getTime();
63
- return Math.abs(u) > 2592e6 ? {
64
- text: e(s, { representation: "date" }),
65
- absolute: c
62
+ let l = t(n(c, { representation: "date" })) ?? "", d = s ? l : a(typeof r == "string" ? r : c.toISOString()), f = i.getTime() - c.getTime();
63
+ return Math.abs(f) > 2592e6 ? {
64
+ text: l,
65
+ absolute: d
66
66
  } : {
67
- text: l(t, s, i),
68
- absolute: c
67
+ text: u(e, c, i),
68
+ absolute: d
69
69
  };
70
70
  }
71
- var s = [
71
+ var c = [
72
72
  {
73
73
  unit: "second",
74
74
  ms: 1e3,
@@ -84,14 +84,14 @@ var s = [
84
84
  ms: 36e5,
85
85
  limit: 24
86
86
  }
87
- ], c = 864e5;
88
- function l(e, t, n) {
87
+ ], l = 864e5;
88
+ function u(e, t, n) {
89
89
  let r = t.getTime() - n.getTime(), i = new Intl.RelativeTimeFormat(e, { numeric: "always" }), a = (e) => r > 0 ? e : -e;
90
- for (let { unit: e, ms: t, limit: n } of s) {
90
+ for (let { unit: e, ms: t, limit: n } of c) {
91
91
  let o = Math.round(Math.abs(r) / t);
92
92
  if (o < n) return i.format(a(o), e);
93
93
  }
94
- return i.format(a(Math.round(Math.abs(r) / c)), "day");
94
+ return i.format(a(Math.round(Math.abs(r) / l)), "day");
95
95
  }
96
96
  //#endregion
97
- export { a as civilDateAsLocal, n as formatInOffsetZone, r as formatOffsetTimestamp, o as formatRelativeOrAbsolute, t as formatWireDateTime };
97
+ export { o as civilDateAsLocal, i as formatInOffsetZone, a as formatOffsetTimestamp, s as formatRelativeOrAbsolute, r as formatWireDateTime };
@@ -119,6 +119,7 @@ function v() {
119
119
  var y = t((t, n) => ({
120
120
  tabs: [],
121
121
  activeTabId: null,
122
+ restored: !1,
122
123
  openTab: (i, a) => {
123
124
  if (r(i.pathname)) return "";
124
125
  let o = a?.activate ?? !0, s = n(), c = s.tabs.find((e) => e.pathname === i.pathname);
@@ -201,15 +202,16 @@ var y = t((t, n) => ({
201
202
  ...r
202
203
  } : t) })), _(n().tabs, n().activeTabId);
203
204
  },
204
- setScope: (e, t) => {
205
- u = e, d = t;
205
+ setScope: (e, n) => {
206
+ u = e, d = n, t({ restored: !1 });
206
207
  },
207
208
  hydrate: () => {
208
209
  let e = v();
209
- e && t({
210
+ t(e ? {
210
211
  tabs: e.tabs,
211
- activeTabId: e.activeTabId
212
- });
212
+ activeTabId: e.activeTabId,
213
+ restored: !0
214
+ } : { restored: !0 });
213
215
  }
214
216
  }));
215
217
  typeof window < "u" && window.addEventListener("pagehide", () => {
@@ -1,4 +1,4 @@
1
- import { At as TextFn, B as Refs, M as ListMeta, P as ListResponse, d as ActionExecuteResponse, ft as Schema, k as DataResponse, o as ResponsiveViewport, ot as LocalizedString, u as ActionExecuteRequest } from "./useResponsiveMode-DmrpMbZX.js";
1
+ import { B as Refs, M as ListMeta, P as ListResponse, d as ActionExecuteResponse, jt as TextFn, k as DataResponse, o as ResponsiveViewport, pt as Schema, st as LocalizedString, u as ActionExecuteRequest } from "./useResponsiveMode-D3SKz5z4.js";
2
2
  import { ReactElement, ReactNode } from "react";
3
3
  import { QueryClient } from "@tanstack/react-query";
4
4
  import { RenderResult } from "@testing-library/react";
@@ -93,6 +93,7 @@ function k() {
93
93
  display_name: "Test User",
94
94
  is_active: !0,
95
95
  roles: ["admin"],
96
+ role_names: { admin: "administrator" },
96
97
  permissions: ["*"],
97
98
  tenant: e,
98
99
  created_at: "2026-01-01T00:00:00Z",
@@ -45,6 +45,7 @@ declare class OrderedMap<T extends {
45
45
  type FileFieldMode = "single" | "array" | "named_map" | "rich_text_inline";
46
46
  interface FileFieldDisplay {
47
47
  widget: string;
48
+ name?: LocalizedString;
48
49
  placeholder?: LocalizedString;
49
50
  initials?: boolean;
50
51
  crop_on_upload?: boolean;
@@ -78,8 +79,13 @@ interface FileFieldDef {
78
79
  slots?: Record<string, FileNamedSlotDef>;
79
80
  display?: FileFieldDisplay;
80
81
  }
81
- interface HydratedFile {
82
+ /** How a client reaches one file row, an original or a derivation: `url` serves its bytes; `presigned_url` answers JSON with where to load them. */
83
+ interface FileAddress {
82
84
  id: string;
85
+ url: string;
86
+ presigned_url?: string;
87
+ }
88
+ interface HydratedFile extends FileAddress {
83
89
  filename: string;
84
90
  content_type: string;
85
91
  size_bytes: number;
@@ -89,9 +95,7 @@ interface HydratedFile {
89
95
  page_count?: number;
90
96
  uploaded_at?: string;
91
97
  uploaded_by?: string;
92
- url?: string;
93
- presigned_url?: string;
94
- derivations?: Record<string, string>;
98
+ derivations?: Record<string, FileAddress>;
95
99
  metadata?: Record<string, unknown>;
96
100
  position?: number;
97
101
  slot?: string;
@@ -108,8 +112,7 @@ interface UploadProgress {
108
112
  total: number;
109
113
  pct: number;
110
114
  }
111
- interface UploadedFile {
112
- id: string;
115
+ interface UploadedFile extends FileAddress {
113
116
  filename: string;
114
117
  content_type: string;
115
118
  size_bytes: number;
@@ -117,7 +120,6 @@ interface UploadedFile {
117
120
  dedup?: boolean;
118
121
  width?: number;
119
122
  height?: number;
120
- url?: string;
121
123
  metadata?: Record<string, unknown>;
122
124
  }
123
125
  //#endregion
@@ -1380,6 +1382,7 @@ interface AuthUser {
1380
1382
  display_name: string;
1381
1383
  is_active: boolean;
1382
1384
  roles: string[];
1385
+ role_names?: Record<string, string>;
1383
1386
  permissions?: string[];
1384
1387
  tenant?: Tenant;
1385
1388
  /** Populated only when the request is acting under an impersonation session. */
@@ -1410,7 +1413,14 @@ interface LoginResponse {
1410
1413
  }
1411
1414
  interface CheckSetupResponse {
1412
1415
  needs_setup: boolean;
1413
- }
1416
+ signup_enabled: boolean;
1417
+ }
1418
+ type SignupResponse = (LoginResponse & {
1419
+ verification_required?: false;
1420
+ }) | {
1421
+ verification_required: true;
1422
+ retry_after_seconds: number;
1423
+ };
1414
1424
  interface StatusInfo {
1415
1425
  group_code: string;
1416
1426
  status_code: string;
@@ -1445,6 +1455,7 @@ interface PublicLegalLinks {
1445
1455
  interface BrandingIdentity {
1446
1456
  app_name?: string;
1447
1457
  app_logo?: string;
1458
+ app_logo_on_accent?: string;
1448
1459
  app_initial?: string;
1449
1460
  ai_name?: string;
1450
1461
  wordmark?: string;
@@ -1811,4 +1822,4 @@ type ForcedViewport = "auto" | ViewportCategory;
1811
1822
  declare function ResponsiveModeProvider({ children, breakpoints, viewportOverride, viewport: declaredViewport }: ResponsiveModeProviderProps): import("react").JSX.Element;
1812
1823
  declare function useResponsiveMode(): ResponsiveMode;
1813
1824
  //#endregion
1814
- export { ChildRelation as $, UploadedFile as $t, EnrichedRow as A, TextFn as At, Refs as B, NO_VALUE_OPS as Bt, ApiErrorBody as C, getPrimaryKeyFields as Ct, CURSOR_SEMANTICS_MISMATCH as D, pkValuesToId as Dt, CURSOR_LANGUAGE_CHANGED as E, pkValuesToDetailId as Et, LoginResponse as F, textWithNodes as Ft, V2ListResponse as G, parseFiltersFromURL as Gt, Tenant as H, countActiveFilters as Ht, ParamLookup as I, FilterNode as It, V2PropertyInstance as J, FileFieldDisplay as Jt, V2Meta as K, setFiltersInURL as Kt, PropertyValue as L, FilterOp as Lt, ListMeta as M, makeTextFn as Mt, ListParams as N, pickLocalized as Nt, CheckSetupResponse as O, resolveDetailRoute as Ot, ListResponse as P, pluralText as Pt, AreaDef as Q, UploadProgress as Qt, PublicParam as R, FilterURLState as Rt, ApiError as S, fieldDisplayName as St, BrandingIdentity as T, pkValuesFromId as Tt, TenantEnv as U, hasOrGroups as Ut, StatusInfo as V, OP_LABELS as Vt, V2ListParams as W, parseFilterURLState as Wt, isCursorStaleError as X, FileFieldValue as Xt, V2StatusInstance as Y, FileFieldMode as Yt, Action as Z, HydratedFile as Zt, executeAction as _, StructureDef as _t, ResponsiveMode as a, LanguageDef as at, AggregateParams as b, buildRowDetailHref as bt, resolveViewportCategory as c, ParameterDef as ct, ActionExecuteResponse as d, RefConfig as dt, OrderedMap as en, ClassificationTierDef as et, ActionItemError as f, Schema as ft, deleteObject as g, StatusGroupDef as gt, buildActionBody as h, StatusDef as ht, ResponsiveBreakpoints as i, FieldAccessInfo as it, ImpersonationInfo as j, TextVars as jt, DataResponse as k, MANDATORY_LANGUAGE as kt, ActionBatchError as l, PkValues as lt, GetEntityOptions as m, SpecialValue as mt, useResponsiveMode as n, EntityField as nt, ResponsiveViewport as o, LocalizedString as ot, ActionItemSkip as p, Screen as pt, V2ParamInstance as q, FileFieldDef as qt, DEFAULT_RESPONSIVE_BREAKPOINTS as r, EnumDef as rt, ViewportCategory as s, NavNode as st, ResponsiveModeProvider as t, Entity as tt, ActionExecuteRequest as u, PropertyDef as ut, restoreObject as v, buildDetailHrefFromId as vt, AuthUser as w, pkValuePartsToId as wt, AggregateResponse as x, extractPkValues as xt, AggregateGroup as y, buildEntityDetailHref as yt, PublicParamsResponse as z, FilterValueResolver as zt };
1825
+ export { AreaDef as $, HydratedFile as $t, EnrichedRow as A, MANDATORY_LANGUAGE as At, Refs as B, FilterValueResolver as Bt, ApiErrorBody as C, fieldDisplayName as Ct, CURSOR_SEMANTICS_MISMATCH as D, pkValuesToDetailId as Dt, CURSOR_LANGUAGE_CHANGED as E, pkValuesFromId as Et, LoginResponse as F, pluralText as Ft, V2ListParams as G, parseFilterURLState as Gt, StatusInfo as H, OP_LABELS as Ht, ParamLookup as I, textWithNodes as It, V2ParamInstance as J, FileAddress as Jt, V2ListResponse as K, parseFiltersFromURL as Kt, PropertyValue as L, FilterNode as Lt, ListMeta as M, TextVars as Mt, ListParams as N, makeTextFn as Nt, CheckSetupResponse as O, pkValuesToId as Ot, ListResponse as P, pickLocalized as Pt, Action as Q, FileFieldValue as Qt, PublicParam as R, FilterOp as Rt, ApiError as S, extractPkValues as St, BrandingIdentity as T, pkValuePartsToId as Tt, Tenant as U, countActiveFilters as Ut, SignupResponse as V, NO_VALUE_OPS as Vt, TenantEnv as W, hasOrGroups as Wt, V2StatusInstance as X, FileFieldDisplay as Xt, V2PropertyInstance as Y, FileFieldDef as Yt, isCursorStaleError as Z, FileFieldMode as Zt, executeAction as _, StatusGroupDef as _t, ResponsiveMode as a, FieldAccessInfo as at, AggregateParams as b, buildEntityDetailHref as bt, resolveViewportCategory as c, NavNode as ct, ActionExecuteResponse as d, PropertyDef as dt, UploadProgress as en, ChildRelation as et, ActionItemError as f, RefConfig as ft, deleteObject as g, StatusDef as gt, buildActionBody as h, SpecialValue as ht, ResponsiveBreakpoints as i, EnumDef as it, ImpersonationInfo as j, TextFn as jt, DataResponse as k, resolveDetailRoute as kt, ActionBatchError as l, ParameterDef as lt, GetEntityOptions as m, Screen as mt, useResponsiveMode as n, OrderedMap as nn, Entity as nt, ResponsiveViewport as o, LanguageDef as ot, ActionItemSkip as p, Schema as pt, V2Meta as q, setFiltersInURL as qt, DEFAULT_RESPONSIVE_BREAKPOINTS as r, EntityField as rt, ViewportCategory as s, LocalizedString as st, ResponsiveModeProvider as t, UploadedFile as tn, ClassificationTierDef as tt, ActionExecuteRequest as u, PkValues as ut, restoreObject as v, StructureDef as vt, AuthUser as w, getPrimaryKeyFields as wt, AggregateResponse as x, buildRowDetailHref as xt, AggregateGroup as y, buildDetailHrefFromId as yt, PublicParamsResponse as z, FilterURLState as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@declarion/react",
3
- "version": "0.66.1",
3
+ "version": "0.81.0",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "description": "React SDK for Declarion, the schema-driven business apps platform.",
@@ -58,14 +58,14 @@
58
58
  "@dnd-kit/sortable": "^10.0.0",
59
59
  "@dnd-kit/utilities": "^3.2.2",
60
60
  "@monaco-editor/react": "^4.7.0",
61
- "@tanstack/react-query": "^5.104.2",
61
+ "@tanstack/react-query": "^5.104.3",
62
62
  "@tanstack/react-table": "^9.3.1",
63
- "@tanstack/react-virtual": "^3.14.19",
63
+ "@tanstack/react-virtual": "^3.14.20",
64
64
  "class-variance-authority": "^0.7.1",
65
65
  "clsx": "^2.1.1",
66
66
  "date-fns": "^4.4.0",
67
67
  "libphonenumber-js": "1.13.15",
68
- "lucide-react": "^1.56.0",
68
+ "lucide-react": "^1.57.0",
69
69
  "mdast-util-to-string": "^4.0.0",
70
70
  "monaco-editor": "^0.57.0",
71
71
  "react-markdown": "^10.1.0",
@@ -82,7 +82,7 @@
82
82
  "zustand": "^5.0.15"
83
83
  },
84
84
  "devDependencies": {
85
- "@axe-core/react": "^4.13.0",
85
+ "@axe-core/react": "^4.14.0",
86
86
  "@tailwindcss/typography": "^0.5.20",
87
87
  "@tailwindcss/vite": "^4.3.3",
88
88
  "@testing-library/dom": "^10.4.2",
@@ -93,21 +93,21 @@
93
93
  "@types/react-dom": "^19.3.0",
94
94
  "@typescript/native": "npm:typescript@^7.0.2",
95
95
  "@vitejs/plugin-react": "^6.1.2",
96
- "@vitest/coverage-v8": "^5.0.4",
96
+ "@vitest/coverage-v8": "^5.0.5",
97
97
  "axe-core": "^4.14.0",
98
98
  "eslint": "^10.12.0",
99
99
  "eslint-plugin-react-hooks": "^7.1.1",
100
- "jsdom": "^30.1.2",
100
+ "jsdom": "^30.1.3",
101
101
  "publint": "^0.3.25",
102
- "react": "^19.3.0",
103
- "react-dom": "^19.3.0",
104
- "rolldown": "^1.2.13",
102
+ "react": "^19.3.1",
103
+ "react-dom": "^19.3.1",
104
+ "rolldown": "^1.2.14",
105
105
  "rolldown-plugin-dts": "^0.28.8",
106
106
  "tailwindcss": "^4.3.3",
107
107
  "typescript": "npm:@typescript/typescript6@^6.0.2",
108
108
  "typescript-eslint": "^8.71.2",
109
109
  "vite": "^8.3.4",
110
- "vitest": "^5.0.4"
110
+ "vitest": "^5.0.5"
111
111
  },
112
112
  "scripts": {
113
113
  "dev": "vite",