@vectoriox/iox-ui 5.50.0 → 5.51.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.
|
@@ -2854,6 +2854,8 @@ declare enum StepState {
|
|
|
2854
2854
|
/** What a build creates, as Undo walks it. */
|
|
2855
2855
|
declare enum CreatedKind {
|
|
2856
2856
|
ContentType = "content-type",
|
|
2857
|
+
/** Fields the build added to a content type it found (types are shared by every organization of a studio). */
|
|
2858
|
+
ContentTypeFields = "content-type-fields",
|
|
2857
2859
|
SampleImage = "sample-image",
|
|
2858
2860
|
Item = "item",
|
|
2859
2861
|
DataSource = "data-source",
|
|
@@ -2865,7 +2867,9 @@ declare enum CreatedKind {
|
|
|
2865
2867
|
declare enum KeptReason {
|
|
2866
2868
|
Edited = "edited",
|
|
2867
2869
|
Published = "published",
|
|
2868
|
-
InUse = "in-use"
|
|
2870
|
+
InUse = "in-use",
|
|
2871
|
+
/** Added to a content type every organization shares: removing a field is the studio owner's change. */
|
|
2872
|
+
Shared = "shared"
|
|
2869
2873
|
}
|
|
2870
2874
|
interface BuildStepError {
|
|
2871
2875
|
code: string;
|
|
@@ -2890,6 +2894,8 @@ interface CreatedRecord {
|
|
|
2890
2894
|
contentType?: string;
|
|
2891
2895
|
/** A sample image's public URL — what items and pages reference. */
|
|
2892
2896
|
url?: string;
|
|
2897
|
+
/** `content-type-fields`: the fields the build added. */
|
|
2898
|
+
fields?: string[];
|
|
2893
2899
|
}
|
|
2894
2900
|
interface UndoKept {
|
|
2895
2901
|
kind: CreatedKind;
|
|
@@ -2910,7 +2916,9 @@ interface UndoRecord {
|
|
|
2910
2916
|
}
|
|
2911
2917
|
declare enum BuildNoticeCode {
|
|
2912
2918
|
/** Storage is not configured: sample items get the empty image box, and the run says so. */
|
|
2913
|
-
NoStorage = "no-storage"
|
|
2919
|
+
NoStorage = "no-storage",
|
|
2920
|
+
/** A content type the build reuses is not public in this studio: the site will not show its items. */
|
|
2921
|
+
ContentTypeNotPublic = "content-type-not-public"
|
|
2914
2922
|
}
|
|
2915
2923
|
interface BuildNotice {
|
|
2916
2924
|
code: string;
|
|
@@ -2948,12 +2956,13 @@ declare enum PreflightRefusalCode {
|
|
|
2948
2956
|
InvalidPlan = "invalid-plan",
|
|
2949
2957
|
/** A route the plan wants is already a page of this organization. */
|
|
2950
2958
|
RouteTaken = "route-taken",
|
|
2951
|
-
/**
|
|
2952
|
-
|
|
2959
|
+
/** The studio's content type of that name stores a field the plan needs differently (type or control) —
|
|
2960
|
+
* types are shared by every organization, so the build reuses one it finds and adds what it lacks. */
|
|
2961
|
+
ContentTypeConflict = "content-type-conflict",
|
|
2953
2962
|
/** The name may not be a content type (a platform collection, or not a valid name). */
|
|
2954
2963
|
ContentTypeName = "content-type-name",
|
|
2955
|
-
/**
|
|
2956
|
-
|
|
2964
|
+
/** The plan creates a content type or adds fields to one, and the caller may not (an org owner/admin — schema_all). */
|
|
2965
|
+
ContentTypesNeedPermission = "content-types-need-permission",
|
|
2957
2966
|
/** The org library holds the alias with a different definition. */
|
|
2958
2967
|
DataSourceConflict = "data-source-conflict",
|
|
2959
2968
|
/** The studio has pages AND a header/footer: replace or keep them is the caller's choice (D7). */
|
|
@@ -2976,6 +2985,7 @@ interface PreflightRefusal {
|
|
|
2976
2985
|
*/
|
|
2977
2986
|
declare const buildKeys: {
|
|
2978
2987
|
readonly contentType: (name: string) => string;
|
|
2988
|
+
readonly contentTypeFields: (name: string) => string;
|
|
2979
2989
|
readonly item: (contentType: string, n: number) => string;
|
|
2980
2990
|
readonly sampleImage: (n: number) => string;
|
|
2981
2991
|
readonly dataSource: (alias: string) => string;
|
|
@@ -2989,10 +2999,20 @@ declare function builtHomePageId(run: Pick<SiteBuildRun, 'plan' | 'created'> | n
|
|
|
2989
2999
|
declare function failedBuildStep(run: Pick<SiteBuildRun, 'steps'> | null | undefined): BuildStepRecord | null;
|
|
2990
3000
|
/** A run still holding the org's slot (building or undoing) — a page that left it comes back to its progress. */
|
|
2991
3001
|
declare function isActiveBuild(run: Pick<SiteBuildRun, 'status'> | null | undefined): boolean;
|
|
2992
|
-
/** What
|
|
3002
|
+
/** What a build does with each content type its plan names (the preflight's `summary.contentTypes[].action`): content
|
|
3003
|
+
* types are shared by every organization of a studio, so one the studio already has is reused, or extended with the
|
|
3004
|
+
* fields it lacks — never created twice. */
|
|
3005
|
+
declare enum ContentTypeAction {
|
|
3006
|
+
Create = "create",
|
|
3007
|
+
Reuse = "reuse",
|
|
3008
|
+
Extend = "extend"
|
|
3009
|
+
}
|
|
3010
|
+
/** What each step of a build of `plan` will make — the progress rows' words, from the plan (+ the preflight's actions). */
|
|
2993
3011
|
interface BuildStepFacts {
|
|
2994
|
-
/**
|
|
3012
|
+
/** The plan's content types: their labels (created, reused or extended — see `contentTypeActions`). */
|
|
2995
3013
|
contentTypes: string[];
|
|
3014
|
+
/** Per label, what the build does with it — known only once the preflight said so (absent = not known). */
|
|
3015
|
+
contentTypeActions: Partial<Record<ContentTypeAction, string[]>>;
|
|
2996
3016
|
/** Sample items, all types together. */
|
|
2997
3017
|
items: number;
|
|
2998
3018
|
/** Pages (template pages included) and their routes. */
|
|
@@ -3003,7 +3023,7 @@ interface BuildStepFacts {
|
|
|
3003
3023
|
/** The look's flavor. */
|
|
3004
3024
|
flavorId: string;
|
|
3005
3025
|
}
|
|
3006
|
-
declare function buildStepFacts(plan: SitePlan): BuildStepFacts;
|
|
3026
|
+
declare function buildStepFacts(plan: SitePlan, actions?: Readonly<Record<string, `${ContentTypeAction}`>>): BuildStepFacts;
|
|
3007
3027
|
|
|
3008
|
-
export { ACTIVE_BUILD_STATUSES, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CardBindTarget, ComposeError, ComposeIssueCode, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, FACT_KEYS, GlobalSlot, KeptReason, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, PreflightRefusalCode, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SiteBuildKind, SiteBuildStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, buildKeys, buildStepFacts, builtHomePageId, composeNavHeader, composeSection, composeSite, createSerializedNode, describePlanData, entranceAction, entranceInteraction, failedBuildStep, findNavRoot, isActiveBuild, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, sectionEntrances, setStyleProps, shapeKeys, siteNavPages, staggerDelay, validateSitePlan, walkSerialized };
|
|
3028
|
+
export { ACTIVE_BUILD_STATUSES, BAR_ITEMS_MAX, BAR_ITEMS_MIN, BASELINE_ROLES, BUILD_STEPS, BaselineRole, BindScope, BuildNoticeCode, BuildStep, CardBindTarget, ComposeError, ComposeIssueCode, ContentTypeAction, CreatedKind, DANGLING_LINK_CODES, DEFAULT_PHONE_MENU_BREAKPOINT, ENTRANCE_EASING, ENTRANCE_ORIGIN_LOOK, ENTRANCE_TRIGGER, EntrancePart, FACT_KEYS, GlobalSlot, KeptReason, NAV_PART_LABELS, NAV_SHAPE_COPY, NEUTRAL_STYLE_PROPS, NODE_BASELINES, NavPagesSource, NavRole, NavShape, NavShapeError, PRICING_PATTERN, PUBLISH_BLOCKING_PLACEHOLDERS, PageDataKind, PathIssueCollector, PatternDirective, PatternGlobalPosition, PatternOpens, PatternPlaceholder, PatternRecipe, PhoneMenuBreakpoint, PlaceholderKind, PlanDataSourceMode, PlanDataSourceType, PreflightRefusalCode, RelativeOp, SAMPLE_IMAGE_REF, SITE_FACT_LABELS, SITE_HEADER_PATTERN, SITE_PATTERNS, SITE_PLAN_VERSION, SITE_TEMPLATES, SPEC_SITE_FACTS, SPEC_SITE_LIBRARY, SPEC_SITE_PATTERNS, SPEC_SITE_PLAN_SHAPE, SPEC_SITE_TEMPLATES, STUDIO_TEMPLATE, SiteBuildKind, SiteBuildStatus, SitePlanError, SitePlanIssueCode, SitePlanSourceKind, SiteTemplateError, SiteTemplateId, StepState, addBarItem, altSourceScopes, assertStyleSlots, assertValidSitePlan, barIconForRoute, blocksPublish, buildKeys, buildStepFacts, builtHomePageId, composeNavHeader, composeSection, composeSite, createSerializedNode, describePlanData, entranceAction, entranceInteraction, failedBuildStep, findNavRoot, isActiveBuild, isNonEmptyString, isPlainObject, moveBarItem, navPages, navShapeBreakpoint, navShapeOf, nextSourceOf, nodeBindPaths, parseSampleImageRef, pathAt, patternById, patternNeedsBinding, patternNodes, patternOptionalParts, patternScopes, patternSlots, patternTakesBinding, phoneMenuPages, planFromTemplate, planNavShape, releasedLayoutDefaults, removeBarItem, requiredShapeKeys, routeParams, sampleImageRef, sectionEntrances, setStyleProps, shapeKeys, siteNavPages, staggerDelay, validateSitePlan, walkSerialized };
|
|
3009
3029
|
export type { AddBarItemResult, BarItemsEditResult, BuildNotice, BuildStepError, BuildStepFacts, BuildStepRecord, CmsDataSourcePlan, ComposeContext, ComposeIssue, ComposedDataSource, ComposedItem, ComposedNavHeader, ComposedPage, ComposedPlaceholder, ComposedRoute, ComposedSection, ComposedSite, ContentFieldPlan, ContentSeedPlan, ContentTypePlan, CreateNodeOptions, CreatedRecord, DataSourcePlan, EntranceAction, EntranceInteraction, EntranceSpec, FactKey, NavHeaderInput, NavHeaderOptions, NavPage, NavShapeOptions, NavShapeResult, NodeBaseline, PageData, PageDataLine, PagePlan, PageSectionPlan, PathIssue, PatternNode, PlainObject, PreflightRefusal, RelativeDataSourcePlan, SectionEntrances, SectionInput, SectionOptions, SerializedBinding, SerializedNode, SerializedResponsive, ShapeEntry, ShapeIssueCodes, SiteBuildRun, SiteBusiness, SitePageRef, SitePattern, SitePlan, SitePlanIssue, SitePlanSource, SitePlanValidation, SiteTemplate, TemplatePlanInput, UndoKept, UndoPreview, UndoRecord };
|
package/package.json
CHANGED
|
@@ -48,6 +48,8 @@ export enum StepState {
|
|
|
48
48
|
/** What a build creates, as Undo walks it. */
|
|
49
49
|
export enum CreatedKind {
|
|
50
50
|
ContentType = 'content-type',
|
|
51
|
+
/** Fields the build added to a content type it found (types are shared by every organization of a studio). */
|
|
52
|
+
ContentTypeFields = 'content-type-fields',
|
|
51
53
|
SampleImage = 'sample-image',
|
|
52
54
|
Item = 'item',
|
|
53
55
|
DataSource = 'data-source',
|
|
@@ -61,6 +63,8 @@ export enum KeptReason {
|
|
|
61
63
|
Edited = 'edited',
|
|
62
64
|
Published = 'published',
|
|
63
65
|
InUse = 'in-use',
|
|
66
|
+
/** Added to a content type every organization shares: removing a field is the studio owner's change. */
|
|
67
|
+
Shared = 'shared',
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
export interface BuildStepError {
|
|
@@ -88,6 +92,8 @@ export interface CreatedRecord {
|
|
|
88
92
|
contentType?: string;
|
|
89
93
|
/** A sample image's public URL — what items and pages reference. */
|
|
90
94
|
url?: string;
|
|
95
|
+
/** `content-type-fields`: the fields the build added. */
|
|
96
|
+
fields?: string[];
|
|
91
97
|
}
|
|
92
98
|
|
|
93
99
|
export interface UndoKept {
|
|
@@ -112,6 +118,8 @@ export interface UndoRecord {
|
|
|
112
118
|
export enum BuildNoticeCode {
|
|
113
119
|
/** Storage is not configured: sample items get the empty image box, and the run says so. */
|
|
114
120
|
NoStorage = 'no-storage',
|
|
121
|
+
/** A content type the build reuses is not public in this studio: the site will not show its items. */
|
|
122
|
+
ContentTypeNotPublic = 'content-type-not-public',
|
|
115
123
|
}
|
|
116
124
|
|
|
117
125
|
export interface BuildNotice {
|
|
@@ -153,12 +161,13 @@ export enum PreflightRefusalCode {
|
|
|
153
161
|
InvalidPlan = 'invalid-plan',
|
|
154
162
|
/** A route the plan wants is already a page of this organization. */
|
|
155
163
|
RouteTaken = 'route-taken',
|
|
156
|
-
/**
|
|
157
|
-
|
|
164
|
+
/** The studio's content type of that name stores a field the plan needs differently (type or control) —
|
|
165
|
+
* types are shared by every organization, so the build reuses one it finds and adds what it lacks. */
|
|
166
|
+
ContentTypeConflict = 'content-type-conflict',
|
|
158
167
|
/** The name may not be a content type (a platform collection, or not a valid name). */
|
|
159
168
|
ContentTypeName = 'content-type-name',
|
|
160
|
-
/**
|
|
161
|
-
|
|
169
|
+
/** The plan creates a content type or adds fields to one, and the caller may not (an org owner/admin — schema_all). */
|
|
170
|
+
ContentTypesNeedPermission = 'content-types-need-permission',
|
|
162
171
|
/** The org library holds the alias with a different definition. */
|
|
163
172
|
DataSourceConflict = 'data-source-conflict',
|
|
164
173
|
/** The studio has pages AND a header/footer: replace or keep them is the caller's choice (D7). */
|
|
@@ -183,6 +192,7 @@ export interface PreflightRefusal {
|
|
|
183
192
|
*/
|
|
184
193
|
export const buildKeys = {
|
|
185
194
|
contentType: (name: string) => `schema:${name}`,
|
|
195
|
+
contentTypeFields: (name: string) => `schema-fields:${name}`,
|
|
186
196
|
item: (contentType: string, n: number) => `item:${contentType}:${n}`,
|
|
187
197
|
sampleImage: (n: number) => `sample-image:${n}`,
|
|
188
198
|
dataSource: (alias: string) => `data-source:${alias}`,
|
|
@@ -209,10 +219,21 @@ export function isActiveBuild(run: Pick<SiteBuildRun, 'status'> | null | undefin
|
|
|
209
219
|
return !!run && ACTIVE_BUILD_STATUSES.includes(run.status);
|
|
210
220
|
}
|
|
211
221
|
|
|
212
|
-
/** What
|
|
222
|
+
/** What a build does with each content type its plan names (the preflight's `summary.contentTypes[].action`): content
|
|
223
|
+
* types are shared by every organization of a studio, so one the studio already has is reused, or extended with the
|
|
224
|
+
* fields it lacks — never created twice. */
|
|
225
|
+
export enum ContentTypeAction {
|
|
226
|
+
Create = 'create',
|
|
227
|
+
Reuse = 'reuse',
|
|
228
|
+
Extend = 'extend',
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** What each step of a build of `plan` will make — the progress rows' words, from the plan (+ the preflight's actions). */
|
|
213
232
|
export interface BuildStepFacts {
|
|
214
|
-
/**
|
|
233
|
+
/** The plan's content types: their labels (created, reused or extended — see `contentTypeActions`). */
|
|
215
234
|
contentTypes: string[];
|
|
235
|
+
/** Per label, what the build does with it — known only once the preflight said so (absent = not known). */
|
|
236
|
+
contentTypeActions: Partial<Record<ContentTypeAction, string[]>>;
|
|
216
237
|
/** Sample items, all types together. */
|
|
217
238
|
items: number;
|
|
218
239
|
/** Pages (template pages included) and their routes. */
|
|
@@ -224,9 +245,15 @@ export interface BuildStepFacts {
|
|
|
224
245
|
flavorId: string;
|
|
225
246
|
}
|
|
226
247
|
|
|
227
|
-
export function buildStepFacts(plan: SitePlan): BuildStepFacts {
|
|
248
|
+
export function buildStepFacts(plan: SitePlan, actions: Readonly<Record<string, `${ContentTypeAction}`>> = {}): BuildStepFacts {
|
|
249
|
+
const contentTypeActions: Partial<Record<ContentTypeAction, string[]>> = {};
|
|
250
|
+
for (const t of plan.contentTypes) {
|
|
251
|
+
const action = actions[t.name] as ContentTypeAction | undefined;
|
|
252
|
+
if (action) (contentTypeActions[action] ??= []).push(t.label);
|
|
253
|
+
}
|
|
228
254
|
return {
|
|
229
255
|
contentTypes: plan.contentTypes.map(t => t.label),
|
|
256
|
+
contentTypeActions,
|
|
230
257
|
items: plan.contentTypes.reduce((n, t) => n + (t.seed?.count ?? 0), 0),
|
|
231
258
|
pages: plan.pages.length,
|
|
232
259
|
routes: plan.pages.map(p => p.route),
|