@selfhelp/shared 1.24.0 → 1.25.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.
- package/CHANGELOG.md +20 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -1
- package/dist/index.mjs +12 -1
- package/dist/plugin-sdk/index.d.mts +1 -1
- package/dist/plugin-sdk/index.d.ts +1 -1
- package/dist/plugin-sdk/index.js +5 -1
- package/dist/plugin-sdk/index.mjs +5 -1
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.d.ts +2 -2
- package/dist/registry/index.js +13 -1
- package/dist/registry/index.mjs +12 -1
- package/dist/{styles.registry-BKWoDg7q.d.ts → styles.registry-C2ACy7H0.d.ts} +42 -9
- package/dist/{styles.registry-aopb3vsI.d.mts → styles.registry-DnIJqEzM.d.mts} +42 -9
- package/package.json +1 -1
- package/src/registry/__tests__/registry.test.ts +14 -0
- package/src/registry/styles.registry.ts +22 -1
- package/src/types/api/form-lists.ts +7 -1
- package/src/types/styles/__tests__/entryFormListFormFields.test.ts +44 -0
- package/src/types/styles/forms.ts +45 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,26 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
## v1.25.0
|
|
14
|
+
|
|
15
|
+
Minor: Entry List with Form is its own form (pairs with core `0.1.45`, frontend
|
|
16
|
+
`0.1.72`, mobile `0.1.37`).
|
|
17
|
+
|
|
18
|
+
- **`FORM_SECTION_STYLE_NAMES`.** Exported from the registry entry point and the
|
|
19
|
+
package root: `['form-record', 'form-log', 'entry-record-form', 'entry-form-list']`
|
|
20
|
+
as const, plus `TFormSectionStyleName`. The CMS add-section dialog uses it to
|
|
21
|
+
hide these styles below an `entry-form-list`.
|
|
22
|
+
- **`IEntryFormListStyle` form fields.** The list carries the same form knobs as
|
|
23
|
+
a form-record (`name`, save/update/cancel labels and colours, alerts,
|
|
24
|
+
confirm, button layout, `redirect_at_end`) via `TEntryFormListFormFields`
|
|
25
|
+
(`Pick` of `IFormRecordStyle`), so types cannot drift. Put the inputs
|
|
26
|
+
directly inside the list; a nested form style is refused by the backend.
|
|
27
|
+
- **`data_table` on a list.** Empty: the list owns its table (created on first
|
|
28
|
+
submit). Set to another table: read-only override (delete and quick actions
|
|
29
|
+
only). Documented on `IFormListBaseStyle` and in `form_section_id` (own list
|
|
30
|
+
id when the list writes; `null` for a foreign table or a data view).
|
|
31
|
+
- **Registry description** of `entry-form-list` updated to match.
|
|
32
|
+
|
|
13
33
|
## v1.24.0
|
|
14
34
|
|
|
15
35
|
- **Form list URL mode `history`.** `TFormListMode` and `FORM_LIST_MODES` include
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName,
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY,
|
|
1
|
+
import { T as TStyleName, k as IContentField, l as IBaseApiResponse, m as IAboutItem, n as TMobileButtonFeedback, o as TMobileFieldVariant, p as TMobileSelectPresentation, q as IFormInvalidData, r as IFormListRestoreBlockedData, s as IFormStaleVersionData, t as IFormListFilesCell, u as TFormListMode, v as IFormListSort } from './styles.registry-DnIJqEzM.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, F as FORM_SECTION_STYLE_NAMES, w as IAccordionItemStyle, x as IAccordionStyle, y as IActionIconStyle, z as IAdminDataRecordCompareResponse, A as IAdminDataRecordHistoryResponse, C as IAdminDataRecordRestoreRequest, D as IAdminDataRecordRestoreResponse, E as IAdminDataRecordVersionResponse, G as IAlertStyle, H as IApiError, J as IApiMeta, K as IAspectRatioStyle, L as IAudioStyle, M as IAvatarStyle, N as IBackgroundImageStyle, O as IBadgeStyle, P as IBaseStyle, Q as IBlockquoteStyle, R as IBoxStyle, U as IButtonStyle, V as ICardSegmentStyle, W as ICardStyle, X as ICarouselStyle, Y as ICenterStyle, Z as ICheckboxStyle, $ as IChipStyle, a0 as ICodeStyle, a1 as IColorInputStyle, a2 as IColorPickerStyle, a3 as IComboboxStyle, a4 as IContainerStyle, a5 as IDataContainerStyle, a6 as IDataViewStyle, a7 as IDatePickerStyle, a8 as IDividerStyle, a9 as IEntryFormListStyle, aa as IEntryListStyle, ab as IEntryRecordDeleteStyle, ac as IEntryRecordFormStyle, ad as IEntryRecordStyle, ae as IEntryTableEntry, af as IEntryTableStyle, ag as IFieldsetStyle, ah as IFigureStyle, ai as IFileInputStyle, aj as IFlexStyle, ak as IFormDeleteData, al as IFormDeleteRequest, am as IFormDeleteResponse, an as IFormEffectiveContext, ao as IFormFileFieldOp, ap as IFormInputError, aq as IFormListActor, ar as IFormListBaseStyle, as as IFormListCapabilities, at as IFormListColumn, au as IFormListCompareData, av as IFormListCompareQuery, aw as IFormListCompareResponse, ax as IFormListControl, ay as IFormListControlOption, az as IFormListError, aA as IFormListFileChange, aB as IFormListFileValue, aC as IFormListHistoricalFile, aD as IFormListHistoryData, aE as IFormListHistoryQuery, aF as IFormListHistoryResponse, aG as IFormListInfo, aH as IFormListPagination, aI as IFormListQuickActionData, aJ as IFormListQuickActionInfo, aK as IFormListQuickActionRequest, aL as IFormListQuickActionResponse, aM as IFormListRecordAccess, aN as IFormListRestoreBlocker, aO as IFormListRestoreChange, aP as IFormListRestorePreview, aQ as IFormListRestoreRequest, aR as IFormListRestoreResponse, aS as IFormListRestoreResult, aT as IFormListRevision, aU as IFormListRow, aV as IFormListSelected, aW as IFormListServedState, aX as IFormListState, aY as IFormListStateField, aZ as IFormListStateResponse, a_ as IFormListValueChange, a$ as IFormListVersionData, b0 as IFormListVersionResponse, b1 as IFormLogStyle, b2 as IFormRecordStyle, b3 as IFormResultLegacyFields, b4 as IFormStyle, b5 as IFormSubmitData, b6 as IFormSubmitRequest, b7 as IFormSubmitResponse, b8 as IFormUpdateData, b9 as IFormUpdateRequest, ba as IFormUpdateResponse, bb as IGridColumnStyle, bc as IGridStyle, bd as IGroupStyle, be as IHighlightStyle, bf as IHtmlTagStyle, bg as IImageStyle, bh as IIndicatorStyle, bi as IInputStyle, bj as IKbdStyle, bk as ILinkStyle, bl as IListItemStyle, bm as IListStyle, bn as ILoginStyle, bo as ILoopStyle, bp as IMeta, bq as IMissingStyle, br as INoAccessStyle, bs as INotFoundStyle, bt as INotificationStyle, bu as INumberInputStyle, bv as IPaperStyle, bw as IPlatformAbout, a as IPluginStyleRegistryEntry, bx as IProfileStyle, by as IProgressRootStyle, bz as IProgressSectionStyle, bA as IProgressStyle, bB as IRadioStyle, bC as IRangeSliderStyle, bD as IRatingStyle, bE as IRefContainerStyle, bF as IRegisterStyle, bG as IResetPasswordStyle, bH as IRichTextEditorStyle, bI as IScrollAreaStyle, bJ as ISegmentedControlStyle, bK as ISelectStyle, bL as ISimpleGridStyle, bM as ISliderStyle, bN as ISpaceStyle, bO as ISpoilerStyle, bP as IStackStyle, I as IStyleRegistryEntry, bQ as IStyleWithSpacing, bR as ISwitchStyle, bS as ITabStyle, bT as ITabsStyle, bU as ITextInputStyle, bV as ITextStyle, bW as ITextareaStyle, bX as IThemeIconStyle, bY as ITimelineItemStyle, bZ as ITimelineStyle, b_ as ITitleStyle, b$ as ITwoFactorAuthStyle, c0 as ITypographyStyle, c1 as IUnknownStyle, c2 as IValidateStyle, c3 as IVersionStyle, c4 as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, c5 as TDataRevisionOperation, c6 as TDataRevisionSource, c7 as TEntryFormListFormFields, c8 as TFormConflictData, c9 as TFormInputRule, ca as TFormListCellValue, cb as TFormListChange, cc as TFormListColumnFormat, cd as TFormListControlType, ce as TFormListErrorReason, cf as TFormListLabels, cg as TFormListLayout, ch as TFormListOpenMode, ci as TFormListPresentation, cj as TFormListRestoreBlockerReason, ck as TFormListRestoreData, cl as TFormListSortDirection, cm as TFormListStyleName, cn as TFormListTextMatch, e as TFormSectionStyleName, co as TFormWriteRefusalReason, cp as TMantineAccordionChevronPosition, cq as TMantineAccordionDisableChevronRotation, cr as TMantineAccordionLoop, cs as TMantineAccordionMultiple, ct as TMantineAnchorUnderline, cu as TMantineBorder, cv as TMantineCardPadding, cw as TMantineCardShadow, cx as TMantineCols, cy as TMantineDividerVariant, cz as TMantineGap, cA as TMantineGridOffset, cB as TMantineGridOrder, cC as TMantineHeight, cD as TMantineIconSize, cE as TMantineImageFit, cF as TMantineLineClamp, cG as TMantineListCenter, cH as TMantineListStyleType, cI as TMantineListType, cJ as TMantineListWithPadding, cK as TMantinePaperShadow, cL as TMantineProgressTransition, cM as TMantineScrollAreaSize, cN as TMantineScrollAreaType, cO as TMantineTextAlign, cP as TMantineTextDecoration, cQ as TMantineTextFontStyle, cR as TMantineTextFontWeight, cS as TMantineTextInherit, cT as TMantineTextInputVariant, cU as TMantineTextSpan, cV as TMantineTextTransform, cW as TMantineTextTruncate, cX as TMantineTextVariant, cY as TMantineTextareaAutosize, cZ as TMantineTextareaResize, c_ as TMantineTextareaVariant, c$ as TMantineTimelineAlign, d0 as TMantineTitleLineClamp, d1 as TMantineTitleTextWrap, d2 as TMantineTranslatable, d3 as TMantineUseInputWrapper, d4 as TMantineWidth, d5 as TSharedBorder, d6 as TSharedCols, d7 as TSharedDimension, d8 as TSharedDividerLabelPosition, d9 as TSharedDividerVariant, da as TSharedLabelPosition, db as TStyle, b as TStylePlacement, d as TStylePlatform, f as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, g as _resetPluginStyleRegistry, h as extendStyleRegistry, i as getMergedStyleRegistry, j as getPluginStyleRegistry } from './styles.registry-DnIJqEzM.mjs';
|
|
3
3
|
export { v as TMantineAccordionVariant, y as TMantineActionIconLoading, d as TMantineAlign, z as TMantineAllowNextClicks, A as TMantineAllowStepClick, B as TMantineAspectRatio, C as TMantineAutoContrast, r as TMantineAvatarVariant, q as TMantineBadgeVariant, D as TMantineBlock, E as TMantineCenterInline, F as TMantineChecked, G as TMantineChipChecked, H as TMantineChipMultiple, s as TMantineChipVariant, I as TMantineClampBehavior, J as TMantineCodeBlock, T as TMantineColor, K as TMantineColorFormat, L as TMantineColorInputSwatches, M as TMantineColorPickerSwatches, N as TMantineColorPickerSwatchesPerRow, O as TMantineCompact, P as TMantineContainerFluid, e as TMantineDirection, Q as TMantineDisabled, n as TMantineFieldsetVariant, R as TMantineFileAccept, S as TMantineFileInputMultiple, U as TMantineFluid, V as TMantineFullWidth, i as TMantineGridGrow, g as TMantineGridOverflow, h as TMantineGridSpan, W as TMantineGroupGrow, X as TMantineGroupWrap, Y as TMantineGrow, Z as TMantineHighlight, t as TMantineIndicatorPosition, _ as TMantineInline, $ as TMantineIsLink, c as TMantineJustify, a0 as TMantineKbdSize, a1 as TMantineLoading, a2 as TMantineMultiple, a3 as TMantineNotificationWithCloseButton, a4 as TMantineNumberInputDecimalScale, a5 as TMantineOpenInNewTab, j as TMantineOrientation, a6 as TMantineProcessing, a as TMantineRadius, a7 as TMantineRangeSliderMarks, a8 as TMantineRatingCount, a9 as TMantineRatingFractions, aa as TMantineRatingReadonly, ab as TMantineReadonly, m as TMantineSize, ac as TMantineSpaceHorizontal, ad as TMantineSpacing, o as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, w as TMantineTabsVariant, u as TMantineThemeIconVariant, x as TMantineTimelineLineVariant, l as TMantineTitleOrder, ag as TMantineUseMantineStyle, p as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, f as TMantineWrap, k as TSharedRadius, b as TSharedSize } from './common-qaDIAYS3.mjs';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import { THeroUiButtonVariant, THeroUiSize } from './theme/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName,
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY,
|
|
1
|
+
import { T as TStyleName, k as IContentField, l as IBaseApiResponse, m as IAboutItem, n as TMobileButtonFeedback, o as TMobileFieldVariant, p as TMobileSelectPresentation, q as IFormInvalidData, r as IFormListRestoreBlockedData, s as IFormStaleVersionData, t as IFormListFilesCell, u as TFormListMode, v as IFormListSort } from './styles.registry-C2ACy7H0.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, F as FORM_SECTION_STYLE_NAMES, w as IAccordionItemStyle, x as IAccordionStyle, y as IActionIconStyle, z as IAdminDataRecordCompareResponse, A as IAdminDataRecordHistoryResponse, C as IAdminDataRecordRestoreRequest, D as IAdminDataRecordRestoreResponse, E as IAdminDataRecordVersionResponse, G as IAlertStyle, H as IApiError, J as IApiMeta, K as IAspectRatioStyle, L as IAudioStyle, M as IAvatarStyle, N as IBackgroundImageStyle, O as IBadgeStyle, P as IBaseStyle, Q as IBlockquoteStyle, R as IBoxStyle, U as IButtonStyle, V as ICardSegmentStyle, W as ICardStyle, X as ICarouselStyle, Y as ICenterStyle, Z as ICheckboxStyle, $ as IChipStyle, a0 as ICodeStyle, a1 as IColorInputStyle, a2 as IColorPickerStyle, a3 as IComboboxStyle, a4 as IContainerStyle, a5 as IDataContainerStyle, a6 as IDataViewStyle, a7 as IDatePickerStyle, a8 as IDividerStyle, a9 as IEntryFormListStyle, aa as IEntryListStyle, ab as IEntryRecordDeleteStyle, ac as IEntryRecordFormStyle, ad as IEntryRecordStyle, ae as IEntryTableEntry, af as IEntryTableStyle, ag as IFieldsetStyle, ah as IFigureStyle, ai as IFileInputStyle, aj as IFlexStyle, ak as IFormDeleteData, al as IFormDeleteRequest, am as IFormDeleteResponse, an as IFormEffectiveContext, ao as IFormFileFieldOp, ap as IFormInputError, aq as IFormListActor, ar as IFormListBaseStyle, as as IFormListCapabilities, at as IFormListColumn, au as IFormListCompareData, av as IFormListCompareQuery, aw as IFormListCompareResponse, ax as IFormListControl, ay as IFormListControlOption, az as IFormListError, aA as IFormListFileChange, aB as IFormListFileValue, aC as IFormListHistoricalFile, aD as IFormListHistoryData, aE as IFormListHistoryQuery, aF as IFormListHistoryResponse, aG as IFormListInfo, aH as IFormListPagination, aI as IFormListQuickActionData, aJ as IFormListQuickActionInfo, aK as IFormListQuickActionRequest, aL as IFormListQuickActionResponse, aM as IFormListRecordAccess, aN as IFormListRestoreBlocker, aO as IFormListRestoreChange, aP as IFormListRestorePreview, aQ as IFormListRestoreRequest, aR as IFormListRestoreResponse, aS as IFormListRestoreResult, aT as IFormListRevision, aU as IFormListRow, aV as IFormListSelected, aW as IFormListServedState, aX as IFormListState, aY as IFormListStateField, aZ as IFormListStateResponse, a_ as IFormListValueChange, a$ as IFormListVersionData, b0 as IFormListVersionResponse, b1 as IFormLogStyle, b2 as IFormRecordStyle, b3 as IFormResultLegacyFields, b4 as IFormStyle, b5 as IFormSubmitData, b6 as IFormSubmitRequest, b7 as IFormSubmitResponse, b8 as IFormUpdateData, b9 as IFormUpdateRequest, ba as IFormUpdateResponse, bb as IGridColumnStyle, bc as IGridStyle, bd as IGroupStyle, be as IHighlightStyle, bf as IHtmlTagStyle, bg as IImageStyle, bh as IIndicatorStyle, bi as IInputStyle, bj as IKbdStyle, bk as ILinkStyle, bl as IListItemStyle, bm as IListStyle, bn as ILoginStyle, bo as ILoopStyle, bp as IMeta, bq as IMissingStyle, br as INoAccessStyle, bs as INotFoundStyle, bt as INotificationStyle, bu as INumberInputStyle, bv as IPaperStyle, bw as IPlatformAbout, a as IPluginStyleRegistryEntry, bx as IProfileStyle, by as IProgressRootStyle, bz as IProgressSectionStyle, bA as IProgressStyle, bB as IRadioStyle, bC as IRangeSliderStyle, bD as IRatingStyle, bE as IRefContainerStyle, bF as IRegisterStyle, bG as IResetPasswordStyle, bH as IRichTextEditorStyle, bI as IScrollAreaStyle, bJ as ISegmentedControlStyle, bK as ISelectStyle, bL as ISimpleGridStyle, bM as ISliderStyle, bN as ISpaceStyle, bO as ISpoilerStyle, bP as IStackStyle, I as IStyleRegistryEntry, bQ as IStyleWithSpacing, bR as ISwitchStyle, bS as ITabStyle, bT as ITabsStyle, bU as ITextInputStyle, bV as ITextStyle, bW as ITextareaStyle, bX as IThemeIconStyle, bY as ITimelineItemStyle, bZ as ITimelineStyle, b_ as ITitleStyle, b$ as ITwoFactorAuthStyle, c0 as ITypographyStyle, c1 as IUnknownStyle, c2 as IValidateStyle, c3 as IVersionStyle, c4 as IVideoStyle, S as STYLE_REGISTRY, c as TConcretePlatform, c5 as TDataRevisionOperation, c6 as TDataRevisionSource, c7 as TEntryFormListFormFields, c8 as TFormConflictData, c9 as TFormInputRule, ca as TFormListCellValue, cb as TFormListChange, cc as TFormListColumnFormat, cd as TFormListControlType, ce as TFormListErrorReason, cf as TFormListLabels, cg as TFormListLayout, ch as TFormListOpenMode, ci as TFormListPresentation, cj as TFormListRestoreBlockerReason, ck as TFormListRestoreData, cl as TFormListSortDirection, cm as TFormListStyleName, cn as TFormListTextMatch, e as TFormSectionStyleName, co as TFormWriteRefusalReason, cp as TMantineAccordionChevronPosition, cq as TMantineAccordionDisableChevronRotation, cr as TMantineAccordionLoop, cs as TMantineAccordionMultiple, ct as TMantineAnchorUnderline, cu as TMantineBorder, cv as TMantineCardPadding, cw as TMantineCardShadow, cx as TMantineCols, cy as TMantineDividerVariant, cz as TMantineGap, cA as TMantineGridOffset, cB as TMantineGridOrder, cC as TMantineHeight, cD as TMantineIconSize, cE as TMantineImageFit, cF as TMantineLineClamp, cG as TMantineListCenter, cH as TMantineListStyleType, cI as TMantineListType, cJ as TMantineListWithPadding, cK as TMantinePaperShadow, cL as TMantineProgressTransition, cM as TMantineScrollAreaSize, cN as TMantineScrollAreaType, cO as TMantineTextAlign, cP as TMantineTextDecoration, cQ as TMantineTextFontStyle, cR as TMantineTextFontWeight, cS as TMantineTextInherit, cT as TMantineTextInputVariant, cU as TMantineTextSpan, cV as TMantineTextTransform, cW as TMantineTextTruncate, cX as TMantineTextVariant, cY as TMantineTextareaAutosize, cZ as TMantineTextareaResize, c_ as TMantineTextareaVariant, c$ as TMantineTimelineAlign, d0 as TMantineTitleLineClamp, d1 as TMantineTitleTextWrap, d2 as TMantineTranslatable, d3 as TMantineUseInputWrapper, d4 as TMantineWidth, d5 as TSharedBorder, d6 as TSharedCols, d7 as TSharedDimension, d8 as TSharedDividerLabelPosition, d9 as TSharedDividerVariant, da as TSharedLabelPosition, db as TStyle, b as TStylePlacement, d as TStylePlatform, f as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, g as _resetPluginStyleRegistry, h as extendStyleRegistry, i as getMergedStyleRegistry, j as getPluginStyleRegistry } from './styles.registry-C2ACy7H0.js';
|
|
3
3
|
export { v as TMantineAccordionVariant, y as TMantineActionIconLoading, d as TMantineAlign, z as TMantineAllowNextClicks, A as TMantineAllowStepClick, B as TMantineAspectRatio, C as TMantineAutoContrast, r as TMantineAvatarVariant, q as TMantineBadgeVariant, D as TMantineBlock, E as TMantineCenterInline, F as TMantineChecked, G as TMantineChipChecked, H as TMantineChipMultiple, s as TMantineChipVariant, I as TMantineClampBehavior, J as TMantineCodeBlock, T as TMantineColor, K as TMantineColorFormat, L as TMantineColorInputSwatches, M as TMantineColorPickerSwatches, N as TMantineColorPickerSwatchesPerRow, O as TMantineCompact, P as TMantineContainerFluid, e as TMantineDirection, Q as TMantineDisabled, n as TMantineFieldsetVariant, R as TMantineFileAccept, S as TMantineFileInputMultiple, U as TMantineFluid, V as TMantineFullWidth, i as TMantineGridGrow, g as TMantineGridOverflow, h as TMantineGridSpan, W as TMantineGroupGrow, X as TMantineGroupWrap, Y as TMantineGrow, Z as TMantineHighlight, t as TMantineIndicatorPosition, _ as TMantineInline, $ as TMantineIsLink, c as TMantineJustify, a0 as TMantineKbdSize, a1 as TMantineLoading, a2 as TMantineMultiple, a3 as TMantineNotificationWithCloseButton, a4 as TMantineNumberInputDecimalScale, a5 as TMantineOpenInNewTab, j as TMantineOrientation, a6 as TMantineProcessing, a as TMantineRadius, a7 as TMantineRangeSliderMarks, a8 as TMantineRatingCount, a9 as TMantineRatingFractions, aa as TMantineRatingReadonly, ab as TMantineReadonly, m as TMantineSize, ac as TMantineSpaceHorizontal, ad as TMantineSpacing, o as TMantineSpoilerMaxHeight, ae as TMantineSwatches, af as TMantineTabDisabled, w as TMantineTabsVariant, u as TMantineThemeIconVariant, x as TMantineTimelineLineVariant, l as TMantineTitleOrder, ag as TMantineUseMantineStyle, p as TMantineVariant, ah as TMantineWithCloseButton, ai as TMantineWithIcon, f as TMantineWrap, k as TSharedRadius, b as TSharedSize } from './common-qaDIAYS3.js';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
5
|
import { THeroUiButtonVariant, THeroUiSize } from './theme/index.js';
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,7 @@ __export(index_exports, {
|
|
|
59
59
|
FORM_LIST_SEARCH_MAX_LENGTH: () => FORM_LIST_SEARCH_MAX_LENGTH,
|
|
60
60
|
FORM_LIST_SEARCH_MIN_LENGTH: () => FORM_LIST_SEARCH_MIN_LENGTH,
|
|
61
61
|
FORM_RECORD_PREFILL_SKIP_FIELDS: () => FORM_RECORD_PREFILL_SKIP_FIELDS,
|
|
62
|
+
FORM_SECTION_STYLE_NAMES: () => FORM_SECTION_STYLE_NAMES,
|
|
62
63
|
FULL_RADIUS_PX: () => FULL_RADIUS_PX,
|
|
63
64
|
HEADER_CLIENT_TYPE: () => HEADER_CLIENT_TYPE,
|
|
64
65
|
LINE_HEIGHT: () => LINE_HEIGHT,
|
|
@@ -515,9 +516,19 @@ var BASE_STYLE_REGISTRY = {
|
|
|
515
516
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
516
517
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
517
518
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
518
|
-
"entry-form-list": {
|
|
519
|
+
"entry-form-list": {
|
|
520
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
521
|
+
category: "forms",
|
|
522
|
+
canHaveChildren: true
|
|
523
|
+
},
|
|
519
524
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
520
525
|
};
|
|
526
|
+
var FORM_SECTION_STYLE_NAMES = [
|
|
527
|
+
"form-record",
|
|
528
|
+
"form-log",
|
|
529
|
+
"entry-record-form",
|
|
530
|
+
"entry-form-list"
|
|
531
|
+
];
|
|
521
532
|
var STYLE_REGISTRY = BASE_STYLE_REGISTRY;
|
|
522
533
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
523
534
|
var REGISTERED_PLUGIN_KEYS = /* @__PURE__ */ new Map();
|
|
@@ -3341,6 +3352,7 @@ function transformPagesData(pages) {
|
|
|
3341
3352
|
FORM_LIST_SEARCH_MAX_LENGTH,
|
|
3342
3353
|
FORM_LIST_SEARCH_MIN_LENGTH,
|
|
3343
3354
|
FORM_RECORD_PREFILL_SKIP_FIELDS,
|
|
3355
|
+
FORM_SECTION_STYLE_NAMES,
|
|
3344
3356
|
FULL_RADIUS_PX,
|
|
3345
3357
|
HEADER_CLIENT_TYPE,
|
|
3346
3358
|
LINE_HEIGHT,
|
package/dist/index.mjs
CHANGED
|
@@ -272,9 +272,19 @@ var BASE_STYLE_REGISTRY = {
|
|
|
272
272
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
273
273
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
274
274
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
275
|
-
"entry-form-list": {
|
|
275
|
+
"entry-form-list": {
|
|
276
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
277
|
+
category: "forms",
|
|
278
|
+
canHaveChildren: true
|
|
279
|
+
},
|
|
276
280
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
277
281
|
};
|
|
282
|
+
var FORM_SECTION_STYLE_NAMES = [
|
|
283
|
+
"form-record",
|
|
284
|
+
"form-log",
|
|
285
|
+
"entry-record-form",
|
|
286
|
+
"entry-form-list"
|
|
287
|
+
];
|
|
278
288
|
var STYLE_REGISTRY = BASE_STYLE_REGISTRY;
|
|
279
289
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
280
290
|
var REGISTERED_PLUGIN_KEYS = /* @__PURE__ */ new Map();
|
|
@@ -3097,6 +3107,7 @@ export {
|
|
|
3097
3107
|
FORM_LIST_SEARCH_MAX_LENGTH,
|
|
3098
3108
|
FORM_LIST_SEARCH_MIN_LENGTH,
|
|
3099
3109
|
FORM_RECORD_PREFILL_SKIP_FIELDS,
|
|
3110
|
+
FORM_SECTION_STYLE_NAMES,
|
|
3100
3111
|
FULL_RADIUS_PX,
|
|
3101
3112
|
HEADER_CLIENT_TYPE,
|
|
3102
3113
|
LINE_HEIGHT,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-8YXAk-4o.mjs';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-DnIJqEzM.mjs';
|
|
3
3
|
import '../common-qaDIAYS3.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { I as IPluginManifest, a as IPluginManifestAdminPage, b as IPluginManifestApiRoute, c as IPluginManifestAsset, d as IPluginManifestCapability, e as IPluginManifestCompatibility, f as IPluginManifestConflict, g as IPluginManifestDataAccess, h as IPluginManifestDependency, i as IPluginManifestExternalHost, j as IPluginManifestFeatureFlag, k as IPluginManifestHealth, l as IPluginManifestLookupExtension, m as IPluginManifestMobile, n as IPluginManifestPermission, o as IPluginManifestRealtimeTopic, p as IPluginManifestScheduledJob, q as IPluginManifestSecurity, r as IPluginManifestStyle, s as IPluginManifestTrustLevel } from '../manifest-8YXAk-4o.js';
|
|
2
|
-
import { I as IStyleRegistryEntry } from '../styles.registry-
|
|
2
|
+
import { I as IStyleRegistryEntry } from '../styles.registry-C2ACy7H0.js';
|
|
3
3
|
import '../common-qaDIAYS3.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/plugin-sdk/index.js
CHANGED
|
@@ -288,7 +288,11 @@ var BASE_STYLE_REGISTRY = {
|
|
|
288
288
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
289
289
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
290
290
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
291
|
-
"entry-form-list": {
|
|
291
|
+
"entry-form-list": {
|
|
292
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
293
|
+
category: "forms",
|
|
294
|
+
canHaveChildren: true
|
|
295
|
+
},
|
|
292
296
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
293
297
|
};
|
|
294
298
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
@@ -240,7 +240,11 @@ var BASE_STYLE_REGISTRY = {
|
|
|
240
240
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
241
241
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
242
242
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
243
|
-
"entry-form-list": {
|
|
243
|
+
"entry-form-list": {
|
|
244
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
245
|
+
category: "forms",
|
|
246
|
+
canHaveChildren: true
|
|
247
|
+
},
|
|
244
248
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
245
249
|
};
|
|
246
250
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName,
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-DnIJqEzM.mjs';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, F as FORM_SECTION_STYLE_NAMES, S as STYLE_REGISTRY, e as TFormSectionStyleName, f as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, g as _resetPluginStyleRegistry, h as extendStyleRegistry, i as getMergedStyleRegistry, j as getPluginStyleRegistry } from '../styles.registry-DnIJqEzM.mjs';
|
|
3
3
|
import '../common-qaDIAYS3.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-
|
|
2
|
-
export { B as BASE_STYLE_REGISTRY, S as STYLE_REGISTRY, e as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName,
|
|
1
|
+
import { T as TStyleName, I as IStyleRegistryEntry, a as IPluginStyleRegistryEntry, b as TStylePlacement, c as TConcretePlatform, d as TStylePlatform } from '../styles.registry-C2ACy7H0.js';
|
|
2
|
+
export { B as BASE_STYLE_REGISTRY, F as FORM_SECTION_STYLE_NAMES, S as STYLE_REGISTRY, e as TFormSectionStyleName, f as TStyleRegistryKey, _ as _AssertRegistryMatchesStyleName, g as _resetPluginStyleRegistry, h as extendStyleRegistry, i as getMergedStyleRegistry, j as getPluginStyleRegistry } from '../styles.registry-C2ACy7H0.js';
|
|
3
3
|
import '../common-qaDIAYS3.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/registry/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var registry_exports = {};
|
|
22
22
|
__export(registry_exports, {
|
|
23
23
|
BASE_STYLE_REGISTRY: () => BASE_STYLE_REGISTRY,
|
|
24
|
+
FORM_SECTION_STYLE_NAMES: () => FORM_SECTION_STYLE_NAMES,
|
|
24
25
|
STYLE_REGISTRY: () => STYLE_REGISTRY,
|
|
25
26
|
_resetPluginStyleRegistry: () => _resetPluginStyleRegistry,
|
|
26
27
|
extendStyleRegistry: () => extendStyleRegistry,
|
|
@@ -142,9 +143,19 @@ var BASE_STYLE_REGISTRY = {
|
|
|
142
143
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
143
144
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
144
145
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
145
|
-
"entry-form-list": {
|
|
146
|
+
"entry-form-list": {
|
|
147
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
148
|
+
category: "forms",
|
|
149
|
+
canHaveChildren: true
|
|
150
|
+
},
|
|
146
151
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
147
152
|
};
|
|
153
|
+
var FORM_SECTION_STYLE_NAMES = [
|
|
154
|
+
"form-record",
|
|
155
|
+
"form-log",
|
|
156
|
+
"entry-record-form",
|
|
157
|
+
"entry-form-list"
|
|
158
|
+
];
|
|
148
159
|
var STYLE_REGISTRY = BASE_STYLE_REGISTRY;
|
|
149
160
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
150
161
|
var REGISTERED_PLUGIN_KEYS = /* @__PURE__ */ new Map();
|
|
@@ -259,6 +270,7 @@ function isStylePlacementAllowed(name, isRoot) {
|
|
|
259
270
|
// Annotate the CommonJS export names for ESM import in node:
|
|
260
271
|
0 && (module.exports = {
|
|
261
272
|
BASE_STYLE_REGISTRY,
|
|
273
|
+
FORM_SECTION_STYLE_NAMES,
|
|
262
274
|
STYLE_REGISTRY,
|
|
263
275
|
_resetPluginStyleRegistry,
|
|
264
276
|
extendStyleRegistry,
|
package/dist/registry/index.mjs
CHANGED
|
@@ -99,9 +99,19 @@ var BASE_STYLE_REGISTRY = {
|
|
|
99
99
|
"ref-container": { description: "Renders content referenced from another section", category: "layout", canHaveChildren: true },
|
|
100
100
|
"data-container": { description: "Data-scoped container (renders subtree against a data scope)", category: "layout", canHaveChildren: true },
|
|
101
101
|
"entry-table": { description: "Built-in admin CRUD grid over a form's records (search/sort/paginate/CSV, add / edit / delete actions)", category: "forms", canHaveChildren: false },
|
|
102
|
-
"entry-form-list": {
|
|
102
|
+
"entry-form-list": {
|
|
103
|
+
description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history",
|
|
104
|
+
category: "forms",
|
|
105
|
+
canHaveChildren: true
|
|
106
|
+
},
|
|
103
107
|
"data-view": { description: "Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table", category: "forms", canHaveChildren: true }
|
|
104
108
|
};
|
|
109
|
+
var FORM_SECTION_STYLE_NAMES = [
|
|
110
|
+
"form-record",
|
|
111
|
+
"form-log",
|
|
112
|
+
"entry-record-form",
|
|
113
|
+
"entry-form-list"
|
|
114
|
+
];
|
|
105
115
|
var STYLE_REGISTRY = BASE_STYLE_REGISTRY;
|
|
106
116
|
var PLUGIN_STYLE_REGISTRY = {};
|
|
107
117
|
var REGISTERED_PLUGIN_KEYS = /* @__PURE__ */ new Map();
|
|
@@ -215,6 +225,7 @@ function isStylePlacementAllowed(name, isRoot) {
|
|
|
215
225
|
}
|
|
216
226
|
export {
|
|
217
227
|
BASE_STYLE_REGISTRY,
|
|
228
|
+
FORM_SECTION_STYLE_NAMES,
|
|
218
229
|
STYLE_REGISTRY,
|
|
219
230
|
_resetPluginStyleRegistry,
|
|
220
231
|
extendStyleRegistry,
|
|
@@ -920,7 +920,13 @@ interface IFormListInfo {
|
|
|
920
920
|
style: TFormListStyleName;
|
|
921
921
|
layout: TFormListLayout;
|
|
922
922
|
form_presentation: TFormListPresentation;
|
|
923
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* The section that creates and edits records.
|
|
925
|
+
* For an `entry-form-list` that owns its table (no foreign `data_table`),
|
|
926
|
+
* this is the **list's own** section id. It is `null` for a `data-view`
|
|
927
|
+
* and for an `entry-form-list` with a foreign `data_table` (read-only
|
|
928
|
+
* override: delete and quick actions only, no form).
|
|
929
|
+
*/
|
|
924
930
|
form_section_id: number | null;
|
|
925
931
|
/** False while the list's form was never submitted: there is nothing to read yet. */
|
|
926
932
|
table_exists: boolean;
|
|
@@ -1818,7 +1824,14 @@ interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
1818
1824
|
title?: IContentField<string>;
|
|
1819
1825
|
/** The list's name in the URL (`<key>.page`, `<key>.q`, ...); unique on a page. */
|
|
1820
1826
|
list_key?: IContentField<string>;
|
|
1821
|
-
/**
|
|
1827
|
+
/**
|
|
1828
|
+
* Numeric `data_tables.id`, or empty.
|
|
1829
|
+
* - On `entry-form-list`: empty means the list owns its table (created on
|
|
1830
|
+
* first submit as `data_tables.name = "<list section id>"`). Set to another
|
|
1831
|
+
* table for a read-only override: the list only deletes and runs quick
|
|
1832
|
+
* actions; inputs, create and edit are refused.
|
|
1833
|
+
* - On `data-view`: required; the view is always read-only.
|
|
1834
|
+
*/
|
|
1822
1835
|
data_table?: IContentField<string>;
|
|
1823
1836
|
list_layout?: IContentField<TFormListLayout>;
|
|
1824
1837
|
/** Rows per page, 1 to 100. */
|
|
@@ -1837,11 +1850,22 @@ interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
1837
1850
|
label_search?: IContentField<string>;
|
|
1838
1851
|
}
|
|
1839
1852
|
/**
|
|
1840
|
-
* Entry List with Form
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1853
|
+
* Form fields that an Entry List with Form carries when it is its own form.
|
|
1854
|
+
* Picked from {@link IFormRecordStyle} so labels, alerts and button knobs cannot
|
|
1855
|
+
* drift from standalone forms. Not included: `description` (the list has
|
|
1856
|
+
* `title`), `close_modal_on_save`, `redirect_on_save`, `btn_cancel_url` (the
|
|
1857
|
+
* list closes its modal or returns to itself).
|
|
1843
1858
|
*/
|
|
1844
|
-
|
|
1859
|
+
type TEntryFormListFormFields = Pick<IFormRecordStyle, 'name' | 'btn_save_label' | 'btn_save_color' | 'btn_update_label' | 'btn_update_color' | 'btn_cancel_label' | 'btn_cancel_color' | 'alert_success' | 'alert_success_title' | 'alert_error' | 'alert_error_title' | 'confirm_submit' | 'confirm_message' | 'buttons_size' | 'buttons_radius' | 'buttons_variant' | 'buttons_position' | 'buttons_order' | 'redirect_at_end'>;
|
|
1860
|
+
/**
|
|
1861
|
+
* Entry List with Form: a server-rendered list of records that is also the form
|
|
1862
|
+
* that creates and edits them. Put the inputs directly inside the list; the
|
|
1863
|
+
* first successful submit creates `data_tables.name = "<list section id>"`.
|
|
1864
|
+
* A nested `form-record` / `form-log` / `entry-record-form` / `entry-form-list`
|
|
1865
|
+
* is refused. When {@link IFormListBaseStyle.data_table} names another table,
|
|
1866
|
+
* the list is a read-only override (delete and quick actions only).
|
|
1867
|
+
*/
|
|
1868
|
+
interface IEntryFormListStyle extends IFormListBaseStyle, TEntryFormListFormFields {
|
|
1845
1869
|
style_name: 'entry-form-list';
|
|
1846
1870
|
form_presentation?: IContentField<TFormListPresentation>;
|
|
1847
1871
|
/** JSON: up to 8 server-defined quick actions `{id, label, confirm, set, when}`. */
|
|
@@ -2757,7 +2781,7 @@ declare const BASE_STYLE_REGISTRY: {
|
|
|
2757
2781
|
readonly canHaveChildren: false;
|
|
2758
2782
|
};
|
|
2759
2783
|
readonly 'entry-form-list': {
|
|
2760
|
-
readonly description: "Entry
|
|
2784
|
+
readonly description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history";
|
|
2761
2785
|
readonly category: "forms";
|
|
2762
2786
|
readonly canHaveChildren: true;
|
|
2763
2787
|
};
|
|
@@ -2767,6 +2791,15 @@ declare const BASE_STYLE_REGISTRY: {
|
|
|
2767
2791
|
readonly canHaveChildren: true;
|
|
2768
2792
|
};
|
|
2769
2793
|
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Style names that act as a form section: standalone forms plus
|
|
2796
|
+
* `entry-form-list` (the list is the form). Used by the CMS add-section
|
|
2797
|
+
* dialog to hide these styles below an `entry-form-list`, and by clients
|
|
2798
|
+
* that need the same closed set the backend refuses to nest.
|
|
2799
|
+
*/
|
|
2800
|
+
declare const FORM_SECTION_STYLE_NAMES: readonly ["form-record", "form-log", "entry-record-form", "entry-form-list"];
|
|
2801
|
+
/** One of {@link FORM_SECTION_STYLE_NAMES}. */
|
|
2802
|
+
type TFormSectionStyleName = (typeof FORM_SECTION_STYLE_NAMES)[number];
|
|
2770
2803
|
/**
|
|
2771
2804
|
* Backward-compatible alias for the core registry. Pre-plugin code
|
|
2772
2805
|
* imported `STYLE_REGISTRY`; that import still works and still resolves
|
|
@@ -3230,7 +3263,7 @@ declare const STYLE_REGISTRY: {
|
|
|
3230
3263
|
readonly canHaveChildren: false;
|
|
3231
3264
|
};
|
|
3232
3265
|
readonly 'entry-form-list': {
|
|
3233
|
-
readonly description: "Entry
|
|
3266
|
+
readonly description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history";
|
|
3234
3267
|
readonly category: "forms";
|
|
3235
3268
|
readonly canHaveChildren: true;
|
|
3236
3269
|
};
|
|
@@ -3284,4 +3317,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
3284
3317
|
*/
|
|
3285
3318
|
declare function _resetPluginStyleRegistry(): void;
|
|
3286
3319
|
|
|
3287
|
-
export { type
|
|
3320
|
+
export { type IChipStyle as $, type IAdminDataRecordHistoryResponse as A, BASE_STYLE_REGISTRY as B, type IAdminDataRecordRestoreRequest as C, type IAdminDataRecordRestoreResponse as D, type IAdminDataRecordVersionResponse as E, FORM_SECTION_STYLE_NAMES as F, type IAlertStyle as G, type IApiError as H, type IStyleRegistryEntry as I, type IApiMeta as J, type IAspectRatioStyle as K, type IAudioStyle as L, type IAvatarStyle as M, type IBackgroundImageStyle as N, type IBadgeStyle as O, type IBaseStyle as P, type IBlockquoteStyle as Q, type IBoxStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IButtonStyle as U, type ICardSegmentStyle as V, type ICardStyle as W, type ICarouselStyle as X, type ICenterStyle as Y, type ICheckboxStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type IFormListVersionData as a$, type ICodeStyle as a0, type IColorInputStyle as a1, type IColorPickerStyle as a2, type IComboboxStyle as a3, type IContainerStyle as a4, type IDataContainerStyle as a5, type IDataViewStyle as a6, type IDatePickerStyle as a7, type IDividerStyle as a8, type IEntryFormListStyle as a9, type IFormListFileChange as aA, type IFormListFileValue as aB, type IFormListHistoricalFile as aC, type IFormListHistoryData as aD, type IFormListHistoryQuery as aE, type IFormListHistoryResponse as aF, type IFormListInfo as aG, type IFormListPagination as aH, type IFormListQuickActionData as aI, type IFormListQuickActionInfo as aJ, type IFormListQuickActionRequest as aK, type IFormListQuickActionResponse as aL, type IFormListRecordAccess as aM, type IFormListRestoreBlocker as aN, type IFormListRestoreChange as aO, type IFormListRestorePreview as aP, type IFormListRestoreRequest as aQ, type IFormListRestoreResponse as aR, type IFormListRestoreResult as aS, type IFormListRevision as aT, type IFormListRow as aU, type IFormListSelected as aV, type IFormListServedState as aW, type IFormListState as aX, type IFormListStateField as aY, type IFormListStateResponse as aZ, type IFormListValueChange as a_, type IEntryListStyle as aa, type IEntryRecordDeleteStyle as ab, type IEntryRecordFormStyle as ac, type IEntryRecordStyle as ad, type IEntryTableEntry as ae, type IEntryTableStyle as af, type IFieldsetStyle as ag, type IFigureStyle as ah, type IFileInputStyle as ai, type IFlexStyle as aj, type IFormDeleteData as ak, type IFormDeleteRequest as al, type IFormDeleteResponse as am, type IFormEffectiveContext as an, type IFormFileFieldOp as ao, type IFormInputError as ap, type IFormListActor as aq, type IFormListBaseStyle as ar, type IFormListCapabilities as as, type IFormListColumn as at, type IFormListCompareData as au, type IFormListCompareQuery as av, type IFormListCompareResponse as aw, type IFormListControl as ax, type IFormListControlOption as ay, type IFormListError as az, type TStylePlacement as b, type ITwoFactorAuthStyle as b$, type IFormListVersionResponse as b0, type IFormLogStyle as b1, type IFormRecordStyle as b2, type IFormResultLegacyFields as b3, type IFormStyle as b4, type IFormSubmitData as b5, type IFormSubmitRequest as b6, type IFormSubmitResponse as b7, type IFormUpdateData as b8, type IFormUpdateRequest as b9, type IProgressStyle as bA, type IRadioStyle as bB, type IRangeSliderStyle as bC, type IRatingStyle as bD, type IRefContainerStyle as bE, type IRegisterStyle as bF, type IResetPasswordStyle as bG, type IRichTextEditorStyle as bH, type IScrollAreaStyle as bI, type ISegmentedControlStyle as bJ, type ISelectStyle as bK, type ISimpleGridStyle as bL, type ISliderStyle as bM, type ISpaceStyle as bN, type ISpoilerStyle as bO, type IStackStyle as bP, type IStyleWithSpacing as bQ, type ISwitchStyle as bR, type ITabStyle as bS, type ITabsStyle as bT, type ITextInputStyle as bU, type ITextStyle as bV, type ITextareaStyle as bW, type IThemeIconStyle as bX, type ITimelineItemStyle as bY, type ITimelineStyle as bZ, type ITitleStyle as b_, type IFormUpdateResponse as ba, type IGridColumnStyle as bb, type IGridStyle as bc, type IGroupStyle as bd, type IHighlightStyle as be, type IHtmlTagStyle as bf, type IImageStyle as bg, type IIndicatorStyle as bh, type IInputStyle as bi, type IKbdStyle as bj, type ILinkStyle as bk, type IListItemStyle as bl, type IListStyle as bm, type ILoginStyle as bn, type ILoopStyle as bo, type IMeta as bp, type IMissingStyle as bq, type INoAccessStyle as br, type INotFoundStyle as bs, type INotificationStyle as bt, type INumberInputStyle as bu, type IPaperStyle as bv, type IPlatformAbout as bw, type IProfileStyle as bx, type IProgressRootStyle as by, type IProgressSectionStyle as bz, type TConcretePlatform as c, type TMantineTimelineAlign as c$, type ITypographyStyle as c0, type IUnknownStyle as c1, type IValidateStyle as c2, type IVersionStyle as c3, type IVideoStyle as c4, type TDataRevisionOperation as c5, type TDataRevisionSource as c6, type TEntryFormListFormFields as c7, type TFormConflictData as c8, type TFormInputRule as c9, type TMantineGridOffset as cA, type TMantineGridOrder as cB, type TMantineHeight as cC, type TMantineIconSize as cD, type TMantineImageFit as cE, type TMantineLineClamp as cF, type TMantineListCenter as cG, type TMantineListStyleType as cH, type TMantineListType as cI, type TMantineListWithPadding as cJ, type TMantinePaperShadow as cK, type TMantineProgressTransition as cL, type TMantineScrollAreaSize as cM, type TMantineScrollAreaType as cN, type TMantineTextAlign as cO, type TMantineTextDecoration as cP, type TMantineTextFontStyle as cQ, type TMantineTextFontWeight as cR, type TMantineTextInherit as cS, type TMantineTextInputVariant as cT, type TMantineTextSpan as cU, type TMantineTextTransform as cV, type TMantineTextTruncate as cW, type TMantineTextVariant as cX, type TMantineTextareaAutosize as cY, type TMantineTextareaResize as cZ, type TMantineTextareaVariant as c_, type TFormListCellValue as ca, type TFormListChange as cb, type TFormListColumnFormat as cc, type TFormListControlType as cd, type TFormListErrorReason as ce, type TFormListLabels as cf, type TFormListLayout as cg, type TFormListOpenMode as ch, type TFormListPresentation as ci, type TFormListRestoreBlockerReason as cj, type TFormListRestoreData as ck, type TFormListSortDirection as cl, type TFormListStyleName as cm, type TFormListTextMatch as cn, type TFormWriteRefusalReason as co, type TMantineAccordionChevronPosition as cp, type TMantineAccordionDisableChevronRotation as cq, type TMantineAccordionLoop as cr, type TMantineAccordionMultiple as cs, type TMantineAnchorUnderline as ct, type TMantineBorder as cu, type TMantineCardPadding as cv, type TMantineCardShadow as cw, type TMantineCols as cx, type TMantineDividerVariant as cy, type TMantineGap as cz, type TStylePlatform as d, type TMantineTitleLineClamp as d0, type TMantineTitleTextWrap as d1, type TMantineTranslatable as d2, type TMantineUseInputWrapper as d3, type TMantineWidth as d4, type TSharedBorder as d5, type TSharedCols as d6, type TSharedDimension as d7, type TSharedDividerLabelPosition as d8, type TSharedDividerVariant as d9, type TSharedLabelPosition as da, type TStyle as db, type TFormSectionStyleName as e, type TStyleRegistryKey as f, _resetPluginStyleRegistry as g, extendStyleRegistry as h, getMergedStyleRegistry as i, getPluginStyleRegistry as j, type IContentField as k, type IBaseApiResponse as l, type IAboutItem as m, type TMobileButtonFeedback as n, type TMobileFieldVariant as o, type TMobileSelectPresentation as p, type IFormInvalidData as q, type IFormListRestoreBlockedData as r, type IFormStaleVersionData as s, type IFormListFilesCell as t, type TFormListMode as u, type IFormListSort as v, type IAccordionItemStyle as w, type IAccordionStyle as x, type IActionIconStyle as y, type IAdminDataRecordCompareResponse as z };
|
|
@@ -920,7 +920,13 @@ interface IFormListInfo {
|
|
|
920
920
|
style: TFormListStyleName;
|
|
921
921
|
layout: TFormListLayout;
|
|
922
922
|
form_presentation: TFormListPresentation;
|
|
923
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* The section that creates and edits records.
|
|
925
|
+
* For an `entry-form-list` that owns its table (no foreign `data_table`),
|
|
926
|
+
* this is the **list's own** section id. It is `null` for a `data-view`
|
|
927
|
+
* and for an `entry-form-list` with a foreign `data_table` (read-only
|
|
928
|
+
* override: delete and quick actions only, no form).
|
|
929
|
+
*/
|
|
924
930
|
form_section_id: number | null;
|
|
925
931
|
/** False while the list's form was never submitted: there is nothing to read yet. */
|
|
926
932
|
table_exists: boolean;
|
|
@@ -1818,7 +1824,14 @@ interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
1818
1824
|
title?: IContentField<string>;
|
|
1819
1825
|
/** The list's name in the URL (`<key>.page`, `<key>.q`, ...); unique on a page. */
|
|
1820
1826
|
list_key?: IContentField<string>;
|
|
1821
|
-
/**
|
|
1827
|
+
/**
|
|
1828
|
+
* Numeric `data_tables.id`, or empty.
|
|
1829
|
+
* - On `entry-form-list`: empty means the list owns its table (created on
|
|
1830
|
+
* first submit as `data_tables.name = "<list section id>"`). Set to another
|
|
1831
|
+
* table for a read-only override: the list only deletes and runs quick
|
|
1832
|
+
* actions; inputs, create and edit are refused.
|
|
1833
|
+
* - On `data-view`: required; the view is always read-only.
|
|
1834
|
+
*/
|
|
1822
1835
|
data_table?: IContentField<string>;
|
|
1823
1836
|
list_layout?: IContentField<TFormListLayout>;
|
|
1824
1837
|
/** Rows per page, 1 to 100. */
|
|
@@ -1837,11 +1850,22 @@ interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
1837
1850
|
label_search?: IContentField<string>;
|
|
1838
1851
|
}
|
|
1839
1852
|
/**
|
|
1840
|
-
* Entry List with Form
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1853
|
+
* Form fields that an Entry List with Form carries when it is its own form.
|
|
1854
|
+
* Picked from {@link IFormRecordStyle} so labels, alerts and button knobs cannot
|
|
1855
|
+
* drift from standalone forms. Not included: `description` (the list has
|
|
1856
|
+
* `title`), `close_modal_on_save`, `redirect_on_save`, `btn_cancel_url` (the
|
|
1857
|
+
* list closes its modal or returns to itself).
|
|
1843
1858
|
*/
|
|
1844
|
-
|
|
1859
|
+
type TEntryFormListFormFields = Pick<IFormRecordStyle, 'name' | 'btn_save_label' | 'btn_save_color' | 'btn_update_label' | 'btn_update_color' | 'btn_cancel_label' | 'btn_cancel_color' | 'alert_success' | 'alert_success_title' | 'alert_error' | 'alert_error_title' | 'confirm_submit' | 'confirm_message' | 'buttons_size' | 'buttons_radius' | 'buttons_variant' | 'buttons_position' | 'buttons_order' | 'redirect_at_end'>;
|
|
1860
|
+
/**
|
|
1861
|
+
* Entry List with Form: a server-rendered list of records that is also the form
|
|
1862
|
+
* that creates and edits them. Put the inputs directly inside the list; the
|
|
1863
|
+
* first successful submit creates `data_tables.name = "<list section id>"`.
|
|
1864
|
+
* A nested `form-record` / `form-log` / `entry-record-form` / `entry-form-list`
|
|
1865
|
+
* is refused. When {@link IFormListBaseStyle.data_table} names another table,
|
|
1866
|
+
* the list is a read-only override (delete and quick actions only).
|
|
1867
|
+
*/
|
|
1868
|
+
interface IEntryFormListStyle extends IFormListBaseStyle, TEntryFormListFormFields {
|
|
1845
1869
|
style_name: 'entry-form-list';
|
|
1846
1870
|
form_presentation?: IContentField<TFormListPresentation>;
|
|
1847
1871
|
/** JSON: up to 8 server-defined quick actions `{id, label, confirm, set, when}`. */
|
|
@@ -2757,7 +2781,7 @@ declare const BASE_STYLE_REGISTRY: {
|
|
|
2757
2781
|
readonly canHaveChildren: false;
|
|
2758
2782
|
};
|
|
2759
2783
|
readonly 'entry-form-list': {
|
|
2760
|
-
readonly description: "Entry
|
|
2784
|
+
readonly description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history";
|
|
2761
2785
|
readonly category: "forms";
|
|
2762
2786
|
readonly canHaveChildren: true;
|
|
2763
2787
|
};
|
|
@@ -2767,6 +2791,15 @@ declare const BASE_STYLE_REGISTRY: {
|
|
|
2767
2791
|
readonly canHaveChildren: true;
|
|
2768
2792
|
};
|
|
2769
2793
|
};
|
|
2794
|
+
/**
|
|
2795
|
+
* Style names that act as a form section: standalone forms plus
|
|
2796
|
+
* `entry-form-list` (the list is the form). Used by the CMS add-section
|
|
2797
|
+
* dialog to hide these styles below an `entry-form-list`, and by clients
|
|
2798
|
+
* that need the same closed set the backend refuses to nest.
|
|
2799
|
+
*/
|
|
2800
|
+
declare const FORM_SECTION_STYLE_NAMES: readonly ["form-record", "form-log", "entry-record-form", "entry-form-list"];
|
|
2801
|
+
/** One of {@link FORM_SECTION_STYLE_NAMES}. */
|
|
2802
|
+
type TFormSectionStyleName = (typeof FORM_SECTION_STYLE_NAMES)[number];
|
|
2770
2803
|
/**
|
|
2771
2804
|
* Backward-compatible alias for the core registry. Pre-plugin code
|
|
2772
2805
|
* imported `STYLE_REGISTRY`; that import still works and still resolves
|
|
@@ -3230,7 +3263,7 @@ declare const STYLE_REGISTRY: {
|
|
|
3230
3263
|
readonly canHaveChildren: false;
|
|
3231
3264
|
};
|
|
3232
3265
|
readonly 'entry-form-list': {
|
|
3233
|
-
readonly description: "Entry
|
|
3266
|
+
readonly description: "Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history";
|
|
3234
3267
|
readonly category: "forms";
|
|
3235
3268
|
readonly canHaveChildren: true;
|
|
3236
3269
|
};
|
|
@@ -3284,4 +3317,4 @@ declare function getPluginStyleRegistry(): Record<string, IPluginStyleRegistryEn
|
|
|
3284
3317
|
*/
|
|
3285
3318
|
declare function _resetPluginStyleRegistry(): void;
|
|
3286
3319
|
|
|
3287
|
-
export { type
|
|
3320
|
+
export { type IChipStyle as $, type IAdminDataRecordHistoryResponse as A, BASE_STYLE_REGISTRY as B, type IAdminDataRecordRestoreRequest as C, type IAdminDataRecordRestoreResponse as D, type IAdminDataRecordVersionResponse as E, FORM_SECTION_STYLE_NAMES as F, type IAlertStyle as G, type IApiError as H, type IStyleRegistryEntry as I, type IApiMeta as J, type IAspectRatioStyle as K, type IAudioStyle as L, type IAvatarStyle as M, type IBackgroundImageStyle as N, type IBadgeStyle as O, type IBaseStyle as P, type IBlockquoteStyle as Q, type IBoxStyle as R, STYLE_REGISTRY as S, type TStyleName as T, type IButtonStyle as U, type ICardSegmentStyle as V, type ICardStyle as W, type ICarouselStyle as X, type ICenterStyle as Y, type ICheckboxStyle as Z, type _AssertRegistryMatchesStyleName as _, type IPluginStyleRegistryEntry as a, type IFormListVersionData as a$, type ICodeStyle as a0, type IColorInputStyle as a1, type IColorPickerStyle as a2, type IComboboxStyle as a3, type IContainerStyle as a4, type IDataContainerStyle as a5, type IDataViewStyle as a6, type IDatePickerStyle as a7, type IDividerStyle as a8, type IEntryFormListStyle as a9, type IFormListFileChange as aA, type IFormListFileValue as aB, type IFormListHistoricalFile as aC, type IFormListHistoryData as aD, type IFormListHistoryQuery as aE, type IFormListHistoryResponse as aF, type IFormListInfo as aG, type IFormListPagination as aH, type IFormListQuickActionData as aI, type IFormListQuickActionInfo as aJ, type IFormListQuickActionRequest as aK, type IFormListQuickActionResponse as aL, type IFormListRecordAccess as aM, type IFormListRestoreBlocker as aN, type IFormListRestoreChange as aO, type IFormListRestorePreview as aP, type IFormListRestoreRequest as aQ, type IFormListRestoreResponse as aR, type IFormListRestoreResult as aS, type IFormListRevision as aT, type IFormListRow as aU, type IFormListSelected as aV, type IFormListServedState as aW, type IFormListState as aX, type IFormListStateField as aY, type IFormListStateResponse as aZ, type IFormListValueChange as a_, type IEntryListStyle as aa, type IEntryRecordDeleteStyle as ab, type IEntryRecordFormStyle as ac, type IEntryRecordStyle as ad, type IEntryTableEntry as ae, type IEntryTableStyle as af, type IFieldsetStyle as ag, type IFigureStyle as ah, type IFileInputStyle as ai, type IFlexStyle as aj, type IFormDeleteData as ak, type IFormDeleteRequest as al, type IFormDeleteResponse as am, type IFormEffectiveContext as an, type IFormFileFieldOp as ao, type IFormInputError as ap, type IFormListActor as aq, type IFormListBaseStyle as ar, type IFormListCapabilities as as, type IFormListColumn as at, type IFormListCompareData as au, type IFormListCompareQuery as av, type IFormListCompareResponse as aw, type IFormListControl as ax, type IFormListControlOption as ay, type IFormListError as az, type TStylePlacement as b, type ITwoFactorAuthStyle as b$, type IFormListVersionResponse as b0, type IFormLogStyle as b1, type IFormRecordStyle as b2, type IFormResultLegacyFields as b3, type IFormStyle as b4, type IFormSubmitData as b5, type IFormSubmitRequest as b6, type IFormSubmitResponse as b7, type IFormUpdateData as b8, type IFormUpdateRequest as b9, type IProgressStyle as bA, type IRadioStyle as bB, type IRangeSliderStyle as bC, type IRatingStyle as bD, type IRefContainerStyle as bE, type IRegisterStyle as bF, type IResetPasswordStyle as bG, type IRichTextEditorStyle as bH, type IScrollAreaStyle as bI, type ISegmentedControlStyle as bJ, type ISelectStyle as bK, type ISimpleGridStyle as bL, type ISliderStyle as bM, type ISpaceStyle as bN, type ISpoilerStyle as bO, type IStackStyle as bP, type IStyleWithSpacing as bQ, type ISwitchStyle as bR, type ITabStyle as bS, type ITabsStyle as bT, type ITextInputStyle as bU, type ITextStyle as bV, type ITextareaStyle as bW, type IThemeIconStyle as bX, type ITimelineItemStyle as bY, type ITimelineStyle as bZ, type ITitleStyle as b_, type IFormUpdateResponse as ba, type IGridColumnStyle as bb, type IGridStyle as bc, type IGroupStyle as bd, type IHighlightStyle as be, type IHtmlTagStyle as bf, type IImageStyle as bg, type IIndicatorStyle as bh, type IInputStyle as bi, type IKbdStyle as bj, type ILinkStyle as bk, type IListItemStyle as bl, type IListStyle as bm, type ILoginStyle as bn, type ILoopStyle as bo, type IMeta as bp, type IMissingStyle as bq, type INoAccessStyle as br, type INotFoundStyle as bs, type INotificationStyle as bt, type INumberInputStyle as bu, type IPaperStyle as bv, type IPlatformAbout as bw, type IProfileStyle as bx, type IProgressRootStyle as by, type IProgressSectionStyle as bz, type TConcretePlatform as c, type TMantineTimelineAlign as c$, type ITypographyStyle as c0, type IUnknownStyle as c1, type IValidateStyle as c2, type IVersionStyle as c3, type IVideoStyle as c4, type TDataRevisionOperation as c5, type TDataRevisionSource as c6, type TEntryFormListFormFields as c7, type TFormConflictData as c8, type TFormInputRule as c9, type TMantineGridOffset as cA, type TMantineGridOrder as cB, type TMantineHeight as cC, type TMantineIconSize as cD, type TMantineImageFit as cE, type TMantineLineClamp as cF, type TMantineListCenter as cG, type TMantineListStyleType as cH, type TMantineListType as cI, type TMantineListWithPadding as cJ, type TMantinePaperShadow as cK, type TMantineProgressTransition as cL, type TMantineScrollAreaSize as cM, type TMantineScrollAreaType as cN, type TMantineTextAlign as cO, type TMantineTextDecoration as cP, type TMantineTextFontStyle as cQ, type TMantineTextFontWeight as cR, type TMantineTextInherit as cS, type TMantineTextInputVariant as cT, type TMantineTextSpan as cU, type TMantineTextTransform as cV, type TMantineTextTruncate as cW, type TMantineTextVariant as cX, type TMantineTextareaAutosize as cY, type TMantineTextareaResize as cZ, type TMantineTextareaVariant as c_, type TFormListCellValue as ca, type TFormListChange as cb, type TFormListColumnFormat as cc, type TFormListControlType as cd, type TFormListErrorReason as ce, type TFormListLabels as cf, type TFormListLayout as cg, type TFormListOpenMode as ch, type TFormListPresentation as ci, type TFormListRestoreBlockerReason as cj, type TFormListRestoreData as ck, type TFormListSortDirection as cl, type TFormListStyleName as cm, type TFormListTextMatch as cn, type TFormWriteRefusalReason as co, type TMantineAccordionChevronPosition as cp, type TMantineAccordionDisableChevronRotation as cq, type TMantineAccordionLoop as cr, type TMantineAccordionMultiple as cs, type TMantineAnchorUnderline as ct, type TMantineBorder as cu, type TMantineCardPadding as cv, type TMantineCardShadow as cw, type TMantineCols as cx, type TMantineDividerVariant as cy, type TMantineGap as cz, type TStylePlatform as d, type TMantineTitleLineClamp as d0, type TMantineTitleTextWrap as d1, type TMantineTranslatable as d2, type TMantineUseInputWrapper as d3, type TMantineWidth as d4, type TSharedBorder as d5, type TSharedCols as d6, type TSharedDimension as d7, type TSharedDividerLabelPosition as d8, type TSharedDividerVariant as d9, type TSharedLabelPosition as da, type TStyle as db, type TFormSectionStyleName as e, type TStyleRegistryKey as f, _resetPluginStyleRegistry as g, extendStyleRegistry as h, getMergedStyleRegistry as i, getPluginStyleRegistry as j, type IContentField as k, type IBaseApiResponse as l, type IAboutItem as m, type TMobileButtonFeedback as n, type TMobileFieldVariant as o, type TMobileSelectPresentation as p, type IFormInvalidData as q, type IFormListRestoreBlockedData as r, type IFormStaleVersionData as s, type IFormListFilesCell as t, type TFormListMode as u, type IFormListSort as v, type IAccordionItemStyle as w, type IAccordionStyle as x, type IActionIconStyle as y, type IAdminDataRecordCompareResponse as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfhelp/shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "Shared TypeScript package for SelfHelp web frontend and mobile app: style registry, types, API contracts, Mantine theme tokens, condition + interpolation engines, CMS class allow-list.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { afterEach, describe, expect, it } from 'vitest';
|
|
7
7
|
import {
|
|
8
8
|
BASE_STYLE_REGISTRY,
|
|
9
|
+
FORM_SECTION_STYLE_NAMES,
|
|
9
10
|
STYLE_REGISTRY,
|
|
10
11
|
extendStyleRegistry,
|
|
11
12
|
getMergedStyleRegistry,
|
|
@@ -73,6 +74,19 @@ describe('shared style registry', () => {
|
|
|
73
74
|
expect(getRegistryEntry('text')?.canHaveChildren).toBe(false);
|
|
74
75
|
expect(getRegistryEntry('container')?.canHaveChildren).toBe(true);
|
|
75
76
|
});
|
|
77
|
+
|
|
78
|
+
it('lists every FORM_SECTION_STYLE_NAMES entry in the core registry', () => {
|
|
79
|
+
expect([...FORM_SECTION_STYLE_NAMES]).toEqual([
|
|
80
|
+
'form-record',
|
|
81
|
+
'form-log',
|
|
82
|
+
'entry-record-form',
|
|
83
|
+
'entry-form-list',
|
|
84
|
+
]);
|
|
85
|
+
for (const name of FORM_SECTION_STYLE_NAMES) {
|
|
86
|
+
expect(BASE_STYLE_REGISTRY[name], name).toBeDefined();
|
|
87
|
+
expect(isKnownStyleName(name), name).toBe(true);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
76
90
|
});
|
|
77
91
|
|
|
78
92
|
describe('lookups for unknown keys are safe', () => {
|
|
@@ -227,10 +227,31 @@ export const BASE_STYLE_REGISTRY = {
|
|
|
227
227
|
'ref-container': { description: 'Renders content referenced from another section', category: 'layout', canHaveChildren: true },
|
|
228
228
|
'data-container': { description: 'Data-scoped container (renders subtree against a data scope)', category: 'layout', canHaveChildren: true },
|
|
229
229
|
'entry-table': { description: 'Built-in admin CRUD grid over a form\'s records (search/sort/paginate/CSV, add / edit / delete actions)', category: 'forms', canHaveChildren: false },
|
|
230
|
-
'entry-form-list': {
|
|
230
|
+
'entry-form-list': {
|
|
231
|
+
description:
|
|
232
|
+
'Entry List with Form: a list of records that is also the form that creates and edits them (put the inputs directly inside it); supports search, sort, filters, paging, quick actions and history',
|
|
233
|
+
category: 'forms',
|
|
234
|
+
canHaveChildren: true,
|
|
235
|
+
},
|
|
231
236
|
'data-view': { description: 'Read-only server-rendered table, cards or your own layout (sections placed inside, drawn once per record) of records of a data table', category: 'forms', canHaveChildren: true },
|
|
232
237
|
} as const satisfies Record<string, IStyleRegistryEntry>;
|
|
233
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Style names that act as a form section: standalone forms plus
|
|
241
|
+
* `entry-form-list` (the list is the form). Used by the CMS add-section
|
|
242
|
+
* dialog to hide these styles below an `entry-form-list`, and by clients
|
|
243
|
+
* that need the same closed set the backend refuses to nest.
|
|
244
|
+
*/
|
|
245
|
+
export const FORM_SECTION_STYLE_NAMES = [
|
|
246
|
+
'form-record',
|
|
247
|
+
'form-log',
|
|
248
|
+
'entry-record-form',
|
|
249
|
+
'entry-form-list',
|
|
250
|
+
] as const;
|
|
251
|
+
|
|
252
|
+
/** One of {@link FORM_SECTION_STYLE_NAMES}. */
|
|
253
|
+
export type TFormSectionStyleName = (typeof FORM_SECTION_STYLE_NAMES)[number];
|
|
254
|
+
|
|
234
255
|
/**
|
|
235
256
|
* Backward-compatible alias for the core registry. Pre-plugin code
|
|
236
257
|
* imported `STYLE_REGISTRY`; that import still works and still resolves
|
|
@@ -69,7 +69,13 @@ export interface IFormListInfo {
|
|
|
69
69
|
style: TFormListStyleName;
|
|
70
70
|
layout: TFormListLayout;
|
|
71
71
|
form_presentation: TFormListPresentation;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* The section that creates and edits records.
|
|
74
|
+
* For an `entry-form-list` that owns its table (no foreign `data_table`),
|
|
75
|
+
* this is the **list's own** section id. It is `null` for a `data-view`
|
|
76
|
+
* and for an `entry-form-list` with a foreign `data_table` (read-only
|
|
77
|
+
* override: delete and quick actions only, no form).
|
|
78
|
+
*/
|
|
73
79
|
form_section_id: number | null;
|
|
74
80
|
/** False while the list's form was never submitted: there is nothing to read yet. */
|
|
75
81
|
table_exists: boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2026 Humdek, University of Bern
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { describe, expectTypeOf, it } from 'vitest';
|
|
7
|
+
import type { IContentField } from '../base';
|
|
8
|
+
import type { IEntryFormListStyle, IFormRecordStyle, TEntryFormListFormFields } from '../forms';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Compile-time pin: the form fields on Entry List with Form stay aligned with
|
|
12
|
+
* form-record (Pick), so a rename or type change on the form cannot drift.
|
|
13
|
+
*/
|
|
14
|
+
describe('TEntryFormListFormFields', () => {
|
|
15
|
+
it('matches the corresponding IFormRecordStyle members', () => {
|
|
16
|
+
expectTypeOf<TEntryFormListFormFields['name']>().toEqualTypeOf<IFormRecordStyle['name']>();
|
|
17
|
+
expectTypeOf<TEntryFormListFormFields['btn_save_label']>().toEqualTypeOf<
|
|
18
|
+
IFormRecordStyle['btn_save_label']
|
|
19
|
+
>();
|
|
20
|
+
expectTypeOf<TEntryFormListFormFields['btn_update_label']>().toEqualTypeOf<
|
|
21
|
+
IFormRecordStyle['btn_update_label']
|
|
22
|
+
>();
|
|
23
|
+
expectTypeOf<TEntryFormListFormFields['btn_update_color']>().toEqualTypeOf<
|
|
24
|
+
IFormRecordStyle['btn_update_color']
|
|
25
|
+
>();
|
|
26
|
+
expectTypeOf<TEntryFormListFormFields['alert_success']>().toEqualTypeOf<
|
|
27
|
+
IFormRecordStyle['alert_success']
|
|
28
|
+
>();
|
|
29
|
+
expectTypeOf<TEntryFormListFormFields['redirect_at_end']>().toEqualTypeOf<
|
|
30
|
+
IFormRecordStyle['redirect_at_end']
|
|
31
|
+
>();
|
|
32
|
+
expectTypeOf<TEntryFormListFormFields['buttons_order']>().toEqualTypeOf<
|
|
33
|
+
IFormRecordStyle['buttons_order']
|
|
34
|
+
>();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('is carried by IEntryFormListStyle without changing style_name', () => {
|
|
38
|
+
expectTypeOf<IEntryFormListStyle['style_name']>().toEqualTypeOf<'entry-form-list'>();
|
|
39
|
+
expectTypeOf<IEntryFormListStyle['name']>().toEqualTypeOf<IContentField<string> | undefined>();
|
|
40
|
+
expectTypeOf<IEntryFormListStyle['btn_update_label']>().toEqualTypeOf<
|
|
41
|
+
IContentField<string> | undefined
|
|
42
|
+
>();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -614,7 +614,14 @@ export interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
614
614
|
title?: IContentField<string>;
|
|
615
615
|
/** The list's name in the URL (`<key>.page`, `<key>.q`, ...); unique on a page. */
|
|
616
616
|
list_key?: IContentField<string>;
|
|
617
|
-
/**
|
|
617
|
+
/**
|
|
618
|
+
* Numeric `data_tables.id`, or empty.
|
|
619
|
+
* - On `entry-form-list`: empty means the list owns its table (created on
|
|
620
|
+
* first submit as `data_tables.name = "<list section id>"`). Set to another
|
|
621
|
+
* table for a read-only override: the list only deletes and runs quick
|
|
622
|
+
* actions; inputs, create and edit are refused.
|
|
623
|
+
* - On `data-view`: required; the view is always read-only.
|
|
624
|
+
*/
|
|
618
625
|
data_table?: IContentField<string>;
|
|
619
626
|
list_layout?: IContentField<TFormListLayout>;
|
|
620
627
|
/** Rows per page, 1 to 100. */
|
|
@@ -634,11 +641,44 @@ export interface IFormListBaseStyle extends IStyleWithSpacing {
|
|
|
634
641
|
}
|
|
635
642
|
|
|
636
643
|
/**
|
|
637
|
-
* Entry List with Form
|
|
638
|
-
*
|
|
639
|
-
*
|
|
644
|
+
* Form fields that an Entry List with Form carries when it is its own form.
|
|
645
|
+
* Picked from {@link IFormRecordStyle} so labels, alerts and button knobs cannot
|
|
646
|
+
* drift from standalone forms. Not included: `description` (the list has
|
|
647
|
+
* `title`), `close_modal_on_save`, `redirect_on_save`, `btn_cancel_url` (the
|
|
648
|
+
* list closes its modal or returns to itself).
|
|
649
|
+
*/
|
|
650
|
+
export type TEntryFormListFormFields = Pick<
|
|
651
|
+
IFormRecordStyle,
|
|
652
|
+
| 'name'
|
|
653
|
+
| 'btn_save_label'
|
|
654
|
+
| 'btn_save_color'
|
|
655
|
+
| 'btn_update_label'
|
|
656
|
+
| 'btn_update_color'
|
|
657
|
+
| 'btn_cancel_label'
|
|
658
|
+
| 'btn_cancel_color'
|
|
659
|
+
| 'alert_success'
|
|
660
|
+
| 'alert_success_title'
|
|
661
|
+
| 'alert_error'
|
|
662
|
+
| 'alert_error_title'
|
|
663
|
+
| 'confirm_submit'
|
|
664
|
+
| 'confirm_message'
|
|
665
|
+
| 'buttons_size'
|
|
666
|
+
| 'buttons_radius'
|
|
667
|
+
| 'buttons_variant'
|
|
668
|
+
| 'buttons_position'
|
|
669
|
+
| 'buttons_order'
|
|
670
|
+
| 'redirect_at_end'
|
|
671
|
+
>;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Entry List with Form: a server-rendered list of records that is also the form
|
|
675
|
+
* that creates and edits them. Put the inputs directly inside the list; the
|
|
676
|
+
* first successful submit creates `data_tables.name = "<list section id>"`.
|
|
677
|
+
* A nested `form-record` / `form-log` / `entry-record-form` / `entry-form-list`
|
|
678
|
+
* is refused. When {@link IFormListBaseStyle.data_table} names another table,
|
|
679
|
+
* the list is a read-only override (delete and quick actions only).
|
|
640
680
|
*/
|
|
641
|
-
export interface IEntryFormListStyle extends IFormListBaseStyle {
|
|
681
|
+
export interface IEntryFormListStyle extends IFormListBaseStyle, TEntryFormListFormFields {
|
|
642
682
|
style_name: 'entry-form-list';
|
|
643
683
|
form_presentation?: IContentField<TFormListPresentation>;
|
|
644
684
|
/** JSON: up to 8 server-defined quick actions `{id, label, confirm, set, when}`. */
|