@alfakit/core 0.1.1 → 0.1.2
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 +6 -0
- package/components.css +347 -0
- package/dist/actions.d.ts +9 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +25 -5
- package/dist/actions.js.map +1 -1
- package/dist/cms-live-preview.d.ts.map +1 -1
- package/dist/cms-live-preview.js +7 -1
- package/dist/cms-live-preview.js.map +1 -1
- package/dist/file-size.js +1 -1
- package/dist/file-size.js.map +1 -1
- package/dist/form.d.ts +33 -1
- package/dist/form.d.ts.map +1 -1
- package/dist/form.js +48 -1
- package/dist/form.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/page-actions.d.ts +8 -0
- package/dist/page-actions.d.ts.map +1 -1
- package/dist/page-actions.js +11 -1
- package/dist/page-actions.js.map +1 -1
- package/dist/schema/cms.d.ts +2 -0
- package/dist/schema/cms.d.ts.map +1 -1
- package/dist/schema/components.d.ts +5 -0
- package/dist/schema/components.d.ts.map +1 -1
- package/dist/schema/components.js.map +1 -1
- package/dist/schema/panel.d.ts +6 -0
- package/dist/schema/panel.d.ts.map +1 -1
- package/dist/schema/panel.js.map +1 -1
- package/dist/schema/table-grouping.d.ts +5 -1
- package/dist/schema/table-grouping.d.ts.map +1 -1
- package/package.json +5 -3
- package/themes.css +2 -334
package/dist/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../src/form.ts"],"sourcesContent":["import { modalTableQuery } from './advanced-fields'\nimport { debugRecorder } from './debug'\nimport { reportRequestError } from './error-notifications'\nimport { HttpError, requestJson } from './http'\nimport { mergeRefreshResponse } from './partial'\nimport type { ModalTableSelectResponse } from './schema/advanced-fields'\nimport type { FieldSchema, SchemaComponent } from './schema/components'\nimport { isField } from './schema/components'\nimport type {\n FormPayload,\n SchemaRefreshResponse,\n StepValidationHaltedResponse,\n} from './schema/form'\nimport type { IconPickerResponse } from './schema/icon-picker'\nimport type { NotificationSchema } from './schema/notifications'\nimport { createStore, type Store } from './store'\nimport type { TableQuery } from './table'\nimport { cloneState } from './utils/clone'\nimport { debounce, type Debounced } from './utils/debounce'\nimport { getPath, setPath } from './utils/path'\n\nexport interface FormState {\n components: SchemaComponent[]\n values: Record<string, unknown>\n errors: Record<string, string[]>\n /** State paths that changed since the last fill. */\n dirty: Set<string>\n /** True while a live refresh or submit is in flight. */\n processing: boolean\n refreshing: boolean\n columns: FormPayload['columns']\n}\n\nexport interface FormStoreOptions {\n /** Encrypted page context token. */\n token: string\n /** Context component name (`form`, `action:table.edit`, …). */\n component: string\n /** Record key when the schema belongs to a table action. */\n record?: string | number | null\n /** URL of the schema refresh endpoint. */\n refreshUrl?: string\n /** URL of the select options endpoint. */\n optionsUrl?: string\n /** URL of the step validation endpoint (wizards validate each step on \"Next\"). */\n validateUrl?: string\n /**\n * Extra parameters for every request (refresh, options). The modal form of a field\n * action sends its owning form's state (`ownerState`) so the server can find the field.\n */\n params?: () => Record<string, unknown>\n onError?: (error: unknown) => void\n /** Shows notifications the server sent with a JSON answer (a halted wizard step). */\n onNotifications?: (notifications: NotificationSchema[]) => void\n /** Called after a live refresh was merged (e.g. to reload what depends on the form). */\n onRefreshed?: (path: string | undefined) => void\n}\n\n/**\n * Walk a component tree and collect every field (including those inside Repeater items).\n */\nexport function collectFields(\n components: SchemaComponent[],\n into: FieldSchema[] = [],\n): FieldSchema[] {\n for (const component of components) {\n if (isField(component)) {\n into.push(component)\n\n if (component.type === 'Repeater' || component.type === 'Builder') {\n for (const item of component.items) {\n collectFields(item.schema, into)\n }\n }\n }\n\n if (component.schema) {\n collectFields(component.schema, into)\n }\n }\n\n return into\n}\n\n/**\n * The field at `path`. Items the browser added (or cloned) before the server has seen\n * them have no per-item schema yet: their fields are found in the Repeater's `template`\n * (or the Builder block's schema, preferring the block named by the item's `type` in\n * `values`), whose `__INDEX__` placeholders stand for any item index, so `live()` fields\n * of fresh items refresh like any other.\n */\nexport function findFieldByPath(\n components: SchemaComponent[],\n path: string,\n values: Record<string, unknown> = {},\n): FieldSchema | undefined {\n return (\n collectFields(components).find((field) => field.statePath === path) ??\n findTemplateField(components, path, values)\n )\n}\n\nfunction findTemplateField(\n components: SchemaComponent[],\n path: string,\n values: Record<string, unknown>,\n): FieldSchema | undefined {\n for (const field of collectFields(components)) {\n for (const template of itemTemplates(field, path, values)) {\n const found =\n collectFields(template).find((candidate) =>\n templatePathMatches(candidate.statePath, path),\n ) ?? findTemplateField(template, path, values)\n\n if (found) return found\n }\n }\n\n return undefined\n}\n\n/** The blank item schemas of a Repeater or Builder (the item's own block first). */\nfunction itemTemplates(\n field: FieldSchema,\n path: string,\n values: Record<string, unknown>,\n): SchemaComponent[][] {\n if (field.type === 'Repeater') {\n return [(field as unknown as { template?: SchemaComponent[] }).template ?? []]\n }\n\n if (field.type !== 'Builder') return []\n\n const blocks =\n (field as unknown as { blocks?: Array<{ name: string; schema: SchemaComponent[] }> }).blocks ??\n []\n const item = new RegExp(`^(${templatePathPattern(field.statePath)}\\\\.\\\\d+)\\\\.`).exec(path)\n const type = item ? getPath<unknown>(values, `${item[1]}.type`) : undefined\n\n return [...blocks]\n .sort((a, b) => Number(b.name === type) - Number(a.name === type))\n .map((block) => block.schema)\n}\n\nfunction templatePathPattern(statePath: string): string {\n return statePath\n .split('__INDEX__')\n .map((part) => part.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'))\n .join('\\\\d+')\n}\n\nfunction templatePathMatches(statePath: string, path: string): boolean {\n return (\n statePath.includes('__INDEX__') && new RegExp(`^${templatePathPattern(statePath)}$`).test(path)\n )\n}\n\n/**\n * The wizard step to reveal after the errors change: the first step with an error, but\n * only when new error keys arrived (a submit or validation response), so the user can\n * still move between steps while errors are shown.\n */\nexport function wizardStepToReveal(\n steps: SchemaComponent[],\n previousErrors: Record<string, unknown>,\n errors: Record<string, unknown>,\n): number | null {\n if (!Object.keys(errors).some((key) => !(key in previousErrors))) {\n return null\n }\n\n const index = steps.findIndex((step) =>\n collectFields(step.schema ?? []).some((field) => errors[field.statePath]),\n )\n\n return index === -1 ? null : index\n}\n\n/**\n * Framework-agnostic form state: values addressed by `statePath`, validation errors,\n * dirty tracking and server round-trips for `live()` fields.\n */\nexport class FormStore {\n public readonly store: Store<FormState>\n\n private readonly liveDebouncers = new Map<string, Debounced<[]>>()\n\n private refreshController: AbortController | null = null\n\n /**\n * The values as the server last sent them, so a refresh can tell `afterStateUpdated`\n * hooks what the field held before the change (`$old`).\n */\n private serverValues: Record<string, unknown>\n\n /**\n * Paths the user changed while a live refresh was in flight. Only these keep their\n * client value when the response is merged; every other path takes the server's value\n * (including values set by `$set` in `afterStateUpdated` hooks).\n */\n private editsInFlight: Set<string> | null = null\n\n /** The fingerprints of the components the store holds (see `PartialFormPayload`). */\n private fingerprints: Record<string, string> | undefined\n\n constructor(\n payload: FormPayload,\n private options: FormStoreOptions,\n ) {\n this.serverValues = payload.state ?? {}\n this.fingerprints = payload.fingerprints\n this.store = createStore<FormState>({\n components: payload.components,\n values: payload.state ?? {},\n errors: {},\n dirty: new Set(),\n processing: false,\n refreshing: false,\n columns: payload.columns,\n })\n\n // Listed by the developer debug panel while it is enabled; a no-op otherwise.\n debugRecorder.registerForm(this)\n }\n\n get state(): FormState {\n return this.store.get()\n }\n\n /**\n * Swap in a fresher context token (every response re-issues it) without touching the\n * form state, so live refreshes keep working after unrelated reloads.\n */\n setToken(token: string): void {\n this.options = { ...this.options, token }\n }\n\n /** Context component name of the schema (`form`, `action:table.edit`, …). */\n get component(): string {\n return this.options.component\n }\n\n get record(): string | number | null {\n return this.options.record ?? null\n }\n\n get token(): string {\n return this.options.token\n }\n\n get optionsUrl(): string | undefined {\n return this.options.optionsUrl\n }\n\n get validateUrl(): string | undefined {\n return this.options.validateUrl\n }\n\n /** The fingerprints of the held components, sent so responses can be partial. */\n get currentFingerprints(): Record<string, string> | undefined {\n return this.fingerprints\n }\n\n /** The parameters that identify this schema to the internal endpoints. */\n requestContext(): Record<string, unknown> {\n return {\n token: this.options.token,\n component: this.options.component,\n record: this.options.record ?? undefined,\n ...this.options.params?.(),\n }\n }\n\n /**\n * `requestContext()` plus the form state for GET requests (options, picker tables,\n * mentions). States travel as JSON: a query string drops nulls and empty arrays, and with\n * them repeater items that are still blank, so the server couldn't find their fields.\n */\n queryContext(): Record<string, unknown> {\n const context = this.requestContext()\n const ownerState = context.ownerState\n\n return {\n ...context,\n ...(ownerState !== null && typeof ownerState === 'object'\n ? { ownerState: JSON.stringify(ownerState) }\n : {}),\n state: JSON.stringify(this.state.values),\n }\n }\n\n subscribe(listener: (state: FormState) => void): () => void {\n return this.store.subscribe(listener)\n }\n\n // ---------------------------------------------------------------- Values\n\n getValue<T = unknown>(path: string, fallback?: T): T {\n return getPath<T>(this.state.values, path, fallback)\n }\n\n /**\n * Set a value. Live fields schedule a server refresh (debounced); `onBlur` fields\n * refresh via `blur()` instead.\n */\n setValue(path: string, value: unknown, options: { silent?: boolean } = {}): void {\n const current = this.getValue(path)\n\n if (Object.is(current, value)) {\n return\n }\n\n this.store.set((state) => {\n const dirty = new Set(state.dirty)\n dirty.add(path)\n\n const errors = { ...state.errors }\n delete errors[path]\n\n return { ...state, values: setPath(state.values, path, value), dirty, errors }\n })\n\n this.editsInFlight?.add(path)\n\n if (options.silent) {\n return\n }\n\n const field = this.findField(path)\n\n if (field?.live && !field.live.onBlur) {\n this.scheduleRefresh(path, field.live.debounce ?? 150)\n }\n }\n\n /** Call when a field loses focus so `live(onBlur: true)` fields refresh. */\n blur(path: string): void {\n const field = this.findField(path)\n\n if (field?.live?.onBlur && this.state.dirty.has(path)) {\n void this.refresh(path)\n }\n }\n\n /** Replace the whole state (e.g. after the server returns a refreshed payload). */\n fill(payload: FormPayload, options: { keepDirty?: boolean } = {}): void {\n this.serverValues = payload.state ?? {}\n this.fingerprints = payload.fingerprints\n this.store.set((state) => ({\n ...state,\n components: payload.components,\n values: payload.state ?? {},\n columns: payload.columns ?? state.columns,\n dirty: options.keepDirty ? state.dirty : new Set(),\n }))\n }\n\n setErrors(errors: Record<string, string[] | string>): void {\n const normalized: Record<string, string[]> = {}\n\n for (const [key, value] of Object.entries(errors)) {\n normalized[key] = Array.isArray(value) ? value : [value]\n }\n\n this.store.update({ errors: normalized })\n }\n\n clearErrors(): void {\n this.store.update({ errors: {} })\n }\n\n getError(path: string): string | undefined {\n return this.state.errors[path]?.[0]\n }\n\n setProcessing(processing: boolean): void {\n this.store.update({ processing })\n }\n\n get isDirty(): boolean {\n return this.state.dirty.size > 0\n }\n\n findField(path: string): FieldSchema | undefined {\n return findFieldByPath(this.state.components, path, this.state.values)\n }\n\n // ---------------------------------------------------------------- Live refresh\n\n private scheduleRefresh(path: string, wait: number): void {\n let debounced = this.liveDebouncers.get(path)\n\n if (!debounced) {\n debounced = debounce(() => {\n void this.refresh(path)\n }, wait)\n this.liveDebouncers.set(path, debounced)\n }\n\n debounced()\n }\n\n /**\n * Send the current state to the server, which re-evaluates closures and\n * `afterStateUpdated` hooks, and replace components + values with the response.\n */\n async refresh(path?: string): Promise<void> {\n if (!this.options.refreshUrl) {\n return\n }\n\n this.refreshController?.abort()\n const controller = new AbortController()\n this.refreshController = controller\n // The request carries the current state, so only edits made from now on are newer\n // than what the server sees.\n const edits = new Set<string>()\n this.editsInFlight = edits\n\n this.store.update({ refreshing: true })\n const sent = this.state.values\n\n try {\n const response = await requestJson<SchemaRefreshResponse>(this.options.refreshUrl, {\n method: 'POST',\n body: {\n ...this.requestContext(),\n state: sent,\n path,\n old: path ? (getPath(this.serverValues, path) ?? null) : undefined,\n // With fingerprints the server answers with only what changed.\n fingerprints: this.fingerprints,\n },\n signal: controller.signal,\n })\n\n if (controller.signal.aborted) {\n return\n }\n\n if (this.editsInFlight === edits) {\n this.editsInFlight = null\n }\n\n if (!this.applyResponse(response, sent, edits)) {\n // The patches didn't fit the tree: ask for the whole form instead.\n this.fingerprints = undefined\n await this.refresh(path)\n\n return\n }\n\n this.options.onRefreshed?.(path)\n } catch (error) {\n if ((error as Error).name === 'AbortError') {\n return\n }\n\n if (this.editsInFlight === edits) {\n this.editsInFlight = null\n }\n\n this.store.update({ refreshing: false })\n // Without an `onError`, the panel's error notification for the status is shown.\n ;(this.options.onError ?? reportRequestError)(error)\n }\n }\n\n /**\n * Merge a refresh response (full or partial) for the state `sent` with the request.\n * Paths in `edits` changed while the request was in flight and keep their client value;\n * everything else takes the server's (including values set by `$set`). Returns false\n * when a partial response doesn't fit the tree the store holds.\n */\n applyResponse(\n response: SchemaRefreshResponse,\n sent: Record<string, unknown>,\n edits: Iterable<string> = [],\n ): boolean {\n const merged = mergeRefreshResponse(this.state.components, sent, response)\n\n if (!merged) {\n this.store.update({ refreshing: false })\n\n return false\n }\n\n this.serverValues = merged.values\n this.fingerprints = merged.fingerprints\n\n this.store.set((state) => {\n let values = merged.values\n\n for (const editedPath of edits) {\n values = setPath(values, editedPath, getPath(state.values, editedPath))\n }\n\n return {\n ...state,\n components: merged.components,\n values,\n columns: merged.columns ?? state.columns,\n refreshing: false,\n }\n })\n\n return true\n }\n\n /**\n * Validate the fields of one wizard step (by the Step component's `key`) on the server.\n * Resolves with true when they pass; otherwise the step's errors replace the errors of\n * those fields and false is returned. Without a validation endpoint every step passes.\n */\n async validateStep(stepKey: string, fieldPaths: string[]): Promise<boolean> {\n if (!this.options.validateUrl) {\n return true\n }\n\n try {\n const response = await requestJson<StepValidationHaltedResponse | null>(\n this.options.validateUrl,\n {\n method: 'POST',\n body: {\n ...this.requestContext(),\n state: this.state.values,\n step: stepKey,\n },\n },\n )\n\n // A step hook halted: stay on the step, keep the field errors as they are.\n if (response !== null && typeof response === 'object' && response.halted) {\n const notifications = response.notifications ?? []\n\n if (notifications.length > 0) this.options.onNotifications?.(notifications)\n\n return false\n }\n } catch (error) {\n if (error instanceof HttpError && error.status === 422) {\n this.store.update({\n errors: { ...withoutStepErrors(this.state.errors, fieldPaths), ...error.errors },\n })\n\n return false\n }\n\n ;(this.options.onError ?? reportRequestError)(error)\n\n return false\n }\n\n this.store.update({ errors: withoutStepErrors(this.state.errors, fieldPaths) })\n\n return true\n }\n\n /** Search options for a searchable select at `path`. */\n async searchOptions(\n path: string,\n search: string,\n ): Promise<Array<{ value: string; label: string }>> {\n if (!this.options.optionsUrl) {\n return []\n }\n\n const response = await requestJson<{ options?: Array<{ value: string; label: string }> }>(\n this.options.optionsUrl,\n {\n query: { ...this.queryContext(), path, search },\n },\n )\n\n return response.options ?? []\n }\n\n async optionLabels(\n path: string,\n values: Array<string | number>,\n ): Promise<Record<string, string>> {\n if (!this.options.optionsUrl || values.length === 0) {\n return {}\n }\n\n const response = await requestJson<{ labels?: Record<string, string> }>(\n this.options.optionsUrl,\n {\n query: { ...this.queryContext(), path, values },\n },\n )\n\n return response.labels ?? {}\n }\n\n /** One page of icons for the IconPicker at `path` (`set`: one of its sets, or all). */\n async searchIcons(\n path: string,\n query: { search?: string; set?: string | null; page?: number },\n signal?: AbortSignal,\n ): Promise<IconPickerResponse | null> {\n if (!this.options.optionsUrl) {\n return null\n }\n\n return requestJson<IconPickerResponse>(this.options.optionsUrl, {\n query: {\n ...this.queryContext(),\n path,\n search: query.search ?? '',\n ...(query.set ? { set: query.set } : {}),\n page: query.page ?? 1,\n },\n signal,\n })\n }\n\n /**\n * The picker table of a ModalTableSelect at `path` (`query` is its table state) and the\n * labels of the records it lists.\n */\n async modalTable(\n path: string,\n identifier: string,\n query: TableQuery,\n signal?: AbortSignal,\n ): Promise<ModalTableSelectResponse | null> {\n if (!this.options.optionsUrl) {\n return null\n }\n\n return requestJson<ModalTableSelectResponse>(this.options.optionsUrl, {\n query: {\n ...this.queryContext(),\n path,\n table: 1,\n ...modalTableQuery(identifier, query),\n },\n signal,\n })\n }\n\n destroy(): void {\n debugRecorder.unregisterForm(this)\n this.refreshController?.abort()\n\n for (const debounced of this.liveDebouncers.values()) {\n debounced.cancel()\n }\n\n this.liveDebouncers.clear()\n }\n}\n\n/** The errors without those of the given fields (and of their nested paths). */\nfunction withoutStepErrors(\n errors: Record<string, string[]>,\n fieldPaths: string[],\n): Record<string, string[]> {\n const kept: Record<string, string[]> = {}\n\n for (const [key, messages] of Object.entries(errors)) {\n if (!fieldPaths.some((path) => key === path || key.startsWith(`${path}.`))) {\n kept[key] = messages\n }\n }\n\n return kept\n}\n\n/**\n * A stable key for a page form: the page class, record and the form's own key/component.\n * The context token is re-encrypted on every response, so it cannot identify a form.\n * Renderers re-initialise a FormStore from server state only when this key changes (or\n * after the form's own successful submit), never on unrelated reloads of the same page.\n */\nexport function formIdentity(\n page: { class?: string; record?: string | number | null } | null | undefined,\n block: { key: string; component: string; operation?: string | null },\n): string {\n return JSON.stringify([\n page?.class ?? null,\n page?.record ?? null,\n block.key,\n block.component,\n block.operation ?? null,\n ])\n}\n\n/** The parts of an Inertia visit the unsaved-changes guard needs. */\nexport interface GuardedVisit {\n method: string\n url: URL | string\n only?: string[]\n except?: string[]\n preserveState?: unknown\n}\n\n/**\n * True when an Inertia visit would navigate away from the current form, i.e. when the\n * unsaved-changes guard should ask. Partial reloads (`only`/`except`, used by table\n * sorting, paging and polling) and state-preserving visits to the same path stay on the\n * page and keep the form, so they never prompt. Non-GET visits are submissions.\n */\nexport function isLeavingVisit(visit: GuardedVisit, currentUrl?: string): boolean {\n if (visit.method.toLowerCase() !== 'get') {\n return false\n }\n\n if ((visit.only?.length ?? 0) > 0 || (visit.except?.length ?? 0) > 0) {\n return false\n }\n\n const base =\n currentUrl ?? (typeof window !== 'undefined' ? window.location.href : 'http://localhost/')\n const here = new URL(base)\n const target = new URL(String(visit.url), here)\n\n return !(\n visit.preserveState === true &&\n target.origin === here.origin &&\n target.pathname === here.pathname\n )\n}\n\n// ---------------------------------------------------------------- Repeater helpers\n\nexport interface RepeaterItemState {\n key: string\n state: Record<string, unknown>\n}\n\n/** Append a blank item using the Repeater's template state. */\nexport function appendRepeaterItem(\n items: unknown[],\n templateState: Record<string, unknown>,\n): unknown[] {\n return [...items, cloneState(templateState)]\n}\n\nexport function removeRepeaterItem(items: unknown[], index: number): unknown[] {\n return items.filter((_, i) => i !== index)\n}\n\nexport function moveRepeaterItem(items: unknown[], from: number, to: number): unknown[] {\n if (from === to || from < 0 || to < 0 || from >= items.length || to >= items.length) {\n return items\n }\n\n const copy = [...items]\n const [item] = copy.splice(from, 1)\n copy.splice(to, 0, item)\n\n return copy\n}\n\nexport function cloneRepeaterItem(items: unknown[], index: number): unknown[] {\n const copy = [...items]\n copy.splice(index + 1, 0, cloneState(items[index]))\n\n return copy\n}\n\n/**\n * Per-item UI state (collapsed flags, …) keyed by item index, remapped after the items\n * are reordered, removed or cloned with the helpers above so it stays with its item.\n */\nexport type IndexedState<T> = Record<number, T>\n\nfunction remapIndexedState<T>(\n state: IndexedState<T>,\n newIndex: (index: number) => number | null,\n): IndexedState<T> {\n const result: IndexedState<T> = {}\n\n for (const [key, value] of Object.entries(state) as [string, T][]) {\n const index = newIndex(Number(key))\n\n if (index !== null) result[index] = value\n }\n\n return result\n}\n\nexport function moveIndexedState<T>(\n state: IndexedState<T>,\n from: number,\n to: number,\n): IndexedState<T> {\n if (from === to) return state\n\n return remapIndexedState(state, (index) => {\n if (index === from) return to\n if (from < to && index > from && index <= to) return index - 1\n if (from > to && index >= to && index < from) return index + 1\n\n return index\n })\n}\n\nexport function removeIndexedState<T>(state: IndexedState<T>, removed: number): IndexedState<T> {\n return remapIndexedState(state, (index) =>\n index === removed ? null : index > removed ? index - 1 : index,\n )\n}\n\nexport function cloneIndexedState<T>(state: IndexedState<T>, cloned: number): IndexedState<T> {\n const result = remapIndexedState(state, (index) => (index > cloned ? index + 1 : index))\n\n if (cloned in state) result[cloned + 1] = state[cloned] as T\n\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;AA6DA,SAAgB,cACd,YACA,OAAsB,CAAC,GACR;CACf,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,QAAQ,SAAS,GAAG;GACtB,KAAK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M,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAAoB;EACjE,MAAM,QAAQ,SAAS,OAAO,GAAG,CAAC;EAElC,IAAI,UAAU,MAAM,OAAO,SAAS;CACtC;CAEA,OAAO;AACT;AAEA,SAAgB,iBACd,OACA,MACA,IACiB;CACjB,IAAI,SAAS,IAAI,OAAO;CAExB,OAAO,kBAAkB,QAAQ,UAAU;EACzC,IAAI,UAAU,MAAM,OAAO;EAC3B,IAAI,OAAO,MAAM,QAAQ,QAAQ,SAAS,IAAI,OAAO,QAAQ;EAC7D,IAAI,OAAO,MAAM,SAAS,MAAM,QAAQ,MAAM,OAAO,QAAQ;EAE7D,OAAO;CACT,CAAC;AACH;AAEA,SAAgB,mBAAsB,OAAwB,SAAkC;CAC9F,OAAO,kBAAkB,QAAQ,UAC/B,UAAU,UAAU,OAAO,QAAQ,UAAU,QAAQ,IAAI,KAC3D;AACF;AAEA,SAAgB,kBAAqB,OAAwB,QAAiC;CAC5F,MAAM,SAAS,kBAAkB,QAAQ,UAAW,QAAQ,SAAS,QAAQ,IAAI,KAAM;CAEvF,IAAI,UAAU,OAAO,OAAO,SAAS,KAAK,MAAM;CAEhD,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"form.js","names":[],"sources":["../src/form.ts"],"sourcesContent":["import { modalTableQuery } from './advanced-fields'\nimport { debugRecorder } from './debug'\nimport { reportRequestError } from './error-notifications'\nimport { HttpError, requestJson } from './http'\nimport { mergeRefreshResponse } from './partial'\nimport type { ModalTableSelectResponse } from './schema/advanced-fields'\nimport type { FieldSchema, SchemaComponent, TabSchema } from './schema/components'\nimport { isField } from './schema/components'\nimport type {\n FormPayload,\n SchemaRefreshResponse,\n StepValidationHaltedResponse,\n} from './schema/form'\nimport type { IconPickerResponse } from './schema/icon-picker'\nimport type { NotificationSchema } from './schema/notifications'\nimport { createStore, type Store } from './store'\nimport type { TableQuery } from './table'\nimport { cloneState } from './utils/clone'\nimport { debounce, type Debounced } from './utils/debounce'\nimport { getPath, setPath } from './utils/path'\n\nexport interface FormState {\n components: SchemaComponent[]\n values: Record<string, unknown>\n errors: Record<string, string[]>\n /** State paths that changed since the last fill. */\n dirty: Set<string>\n /** True while a live refresh or submit is in flight. */\n processing: boolean\n refreshing: boolean\n columns: FormPayload['columns']\n}\n\nexport interface FormStoreOptions {\n /** Encrypted page context token. */\n token: string\n /** Context component name (`form`, `action:table.edit`, …). */\n component: string\n /** Record key when the schema belongs to a table action. */\n record?: string | number | null\n /** URL of the schema refresh endpoint. */\n refreshUrl?: string\n /** URL of the select options endpoint. */\n optionsUrl?: string\n /** URL of the step validation endpoint (wizards validate each step on \"Next\"). */\n validateUrl?: string\n /**\n * Extra parameters for every request (refresh, options). The modal form of a field\n * action sends its owning form's state (`ownerState`) so the server can find the field.\n */\n params?: () => Record<string, unknown>\n onError?: (error: unknown) => void\n /** Shows notifications the server sent with a JSON answer (a halted wizard step). */\n onNotifications?: (notifications: NotificationSchema[]) => void\n /** Called after a live refresh was merged (e.g. to reload what depends on the form). */\n onRefreshed?: (path: string | undefined) => void\n /**\n * Prefix of the fields' DOM ids (`{idPrefix}-{statePath}`), default `alfakit`. Forms shown\n * over another form (action modals) use their own, so ids never repeat on the page.\n */\n idPrefix?: string\n}\n\n/** A DOM-safe id prefix for a form, e.g. `action:field.category_id.createOption` -> `alfakit-action-field-category_id-createOption`. */\nexport function formIdPrefix(scope: string): string {\n return `alfakit-${scope.replace(/[^a-zA-Z0-9_-]/g, '-')}`\n}\n\n/** The DOM id of a field: `{prefix}-{statePath}` with unsafe characters replaced. */\nexport function fieldDomId(prefix: string, statePath: string): string {\n return `${prefix}-${statePath.replace(/[^a-zA-Z0-9_-]/g, '-')}`\n}\n\n/**\n * Walk a component tree and collect every field (including those inside Repeater items).\n */\nexport function collectFields(\n components: SchemaComponent[],\n into: FieldSchema[] = [],\n): FieldSchema[] {\n for (const component of components) {\n if (isField(component)) {\n into.push(component)\n\n if (component.type === 'Repeater' || component.type === 'Builder') {\n for (const item of component.items) {\n collectFields(item.schema, into)\n }\n }\n }\n\n if (component.schema) {\n collectFields(component.schema, into)\n }\n }\n\n return into\n}\n\n/**\n * The field at `path`. Items the browser added (or cloned) before the server has seen\n * them have no per-item schema yet: their fields are found in the Repeater's `template`\n * (or the Builder block's schema, preferring the block named by the item's `type` in\n * `values`), whose `__INDEX__` placeholders stand for any item index, so `live()` fields\n * of fresh items refresh like any other.\n */\nexport function findFieldByPath(\n components: SchemaComponent[],\n path: string,\n values: Record<string, unknown> = {},\n): FieldSchema | undefined {\n return (\n collectFields(components).find((field) => field.statePath === path) ??\n findTemplateField(components, path, values)\n )\n}\n\nfunction findTemplateField(\n components: SchemaComponent[],\n path: string,\n values: Record<string, unknown>,\n): FieldSchema | undefined {\n for (const field of collectFields(components)) {\n for (const template of itemTemplates(field, path, values)) {\n const found =\n collectFields(template).find((candidate) =>\n templatePathMatches(candidate.statePath, path),\n ) ?? findTemplateField(template, path, values)\n\n if (found) return found\n }\n }\n\n return undefined\n}\n\n/** The blank item schemas of a Repeater or Builder (the item's own block first). */\nfunction itemTemplates(\n field: FieldSchema,\n path: string,\n values: Record<string, unknown>,\n): SchemaComponent[][] {\n if (field.type === 'Repeater') {\n return [(field as unknown as { template?: SchemaComponent[] }).template ?? []]\n }\n\n if (field.type !== 'Builder') return []\n\n const blocks =\n (field as unknown as { blocks?: Array<{ name: string; schema: SchemaComponent[] }> }).blocks ??\n []\n const item = new RegExp(`^(${templatePathPattern(field.statePath)}\\\\.\\\\d+)\\\\.`).exec(path)\n const type = item ? getPath<unknown>(values, `${item[1]}.type`) : undefined\n\n return [...blocks]\n .sort((a, b) => Number(b.name === type) - Number(a.name === type))\n .map((block) => block.schema)\n}\n\nfunction templatePathPattern(statePath: string): string {\n return statePath\n .split('__INDEX__')\n .map((part) => part.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'))\n .join('\\\\d+')\n}\n\nfunction templatePathMatches(statePath: string, path: string): boolean {\n return (\n statePath.includes('__INDEX__') && new RegExp(`^${templatePathPattern(statePath)}$`).test(path)\n )\n}\n\n/**\n * The wizard step to reveal after the errors change: the first step with an error, but\n * only when new error keys arrived (a submit or validation response), so the user can\n * still move between steps while errors are shown.\n */\nexport function wizardStepToReveal(\n steps: SchemaComponent[],\n previousErrors: Record<string, unknown>,\n errors: Record<string, unknown>,\n): number | null {\n if (!Object.keys(errors).some((key) => !(key in previousErrors))) {\n return null\n }\n\n const index = steps.findIndex((step) =>\n collectFields(step.schema ?? []).some((field) => errors[field.statePath]),\n )\n\n return index === -1 ? null : index\n}\n\n/**\n * Whether a layout component (a tab, a section) holds a field with a validation error:\n * one of its fields, a nested repeater/builder item field (`items.0.sku`), or, while the\n * component is deferred and its fields aren't loaded, one of its `deferredPaths`.\n */\nexport function componentHasErrors(\n component: Pick<SchemaComponent, 'schema' | 'deferred' | 'deferredPaths'>,\n errors: Record<string, unknown>,\n): boolean {\n const keys = Object.keys(errors).filter((key) => errors[key])\n\n if (keys.length === 0) return false\n\n const paths =\n component.deferred && !component.schema?.length\n ? (component.deferredPaths ?? [])\n : collectFields(component.schema ?? []).map((field) => field.statePath)\n\n return paths.some((path) => keys.some((key) => key === path || key.startsWith(`${path}.`)))\n}\n\n/**\n * The value a tab is written to the query string as (`persistTabInQueryString()`): its\n * readable `queryValue` (`billing-address`), else its key.\n */\nexport function tabQueryValue(tab: Pick<TabSchema, 'key' | 'queryValue'>): string {\n return tab.queryValue ?? tab.key\n}\n\n/**\n * The key of the tab a query-string value names: a tab's `queryValue`, or its key (links\n * written before tabs had readable values, `?tab=tabs-0.tab-1`). Null when none matches.\n */\nexport function tabFromQuery(\n tabs: Array<Pick<TabSchema, 'key' | 'queryValue'>>,\n value: string | null | undefined,\n): string | null {\n if (!value) return null\n\n return (\n (tabs.find((tab) => tab.queryValue === value) ?? tabs.find((tab) => tab.key === value))?.key ??\n null\n )\n}\n\n/**\n * The tab to show after the errors change: when new error keys arrived (a submit or\n * validation response) and the active tab has none, the first tab with an error.\n */\nexport function tabToReveal(\n tabs: Array<Pick<SchemaComponent, 'key' | 'schema' | 'deferred' | 'deferredPaths'>>,\n activeKey: string,\n previousErrors: Record<string, unknown>,\n errors: Record<string, unknown>,\n): string | null {\n if (!Object.keys(errors).some((key) => !(key in previousErrors))) {\n return null\n }\n\n const active = tabs.find((tab) => tab.key === activeKey)\n\n if (active && componentHasErrors(active, errors)) return null\n\n return tabs.find((tab) => componentHasErrors(tab, errors))?.key ?? null\n}\n\n/**\n * Framework-agnostic form state: values addressed by `statePath`, validation errors,\n * dirty tracking and server round-trips for `live()` fields.\n */\nexport class FormStore {\n public readonly store: Store<FormState>\n\n private readonly liveDebouncers = new Map<string, Debounced<[]>>()\n\n private refreshController: AbortController | null = null\n\n /**\n * The values as the server last sent them, so a refresh can tell `afterStateUpdated`\n * hooks what the field held before the change (`$old`).\n */\n private serverValues: Record<string, unknown>\n\n /**\n * Paths the user changed while a live refresh was in flight. Only these keep their\n * client value when the response is merged; every other path takes the server's value\n * (including values set by `$set` in `afterStateUpdated` hooks).\n */\n private editsInFlight: Set<string> | null = null\n\n /** The fingerprints of the components the store holds (see `PartialFormPayload`). */\n private fingerprints: Record<string, string> | undefined\n\n constructor(\n payload: FormPayload,\n private options: FormStoreOptions,\n ) {\n this.serverValues = payload.state ?? {}\n this.fingerprints = payload.fingerprints\n this.store = createStore<FormState>({\n components: payload.components,\n values: payload.state ?? {},\n errors: {},\n dirty: new Set(),\n processing: false,\n refreshing: false,\n columns: payload.columns,\n })\n\n // Listed by the developer debug panel while it is enabled; a no-op otherwise.\n debugRecorder.registerForm(this)\n }\n\n get state(): FormState {\n return this.store.get()\n }\n\n /**\n * Swap in a fresher context token (every response re-issues it) without touching the\n * form state, so live refreshes keep working after unrelated reloads.\n */\n setToken(token: string): void {\n this.options = { ...this.options, token }\n }\n\n /** Context component name of the schema (`form`, `action:table.edit`, …). */\n get component(): string {\n return this.options.component\n }\n\n /** Prefix of the fields' DOM ids (see `FormStoreOptions.idPrefix`). */\n get idPrefix(): string {\n return this.options.idPrefix ?? 'alfakit'\n }\n\n get record(): string | number | null {\n return this.options.record ?? null\n }\n\n get token(): string {\n return this.options.token\n }\n\n get optionsUrl(): string | undefined {\n return this.options.optionsUrl\n }\n\n get validateUrl(): string | undefined {\n return this.options.validateUrl\n }\n\n /** The fingerprints of the held components, sent so responses can be partial. */\n get currentFingerprints(): Record<string, string> | undefined {\n return this.fingerprints\n }\n\n /** The parameters that identify this schema to the internal endpoints. */\n requestContext(): Record<string, unknown> {\n return {\n token: this.options.token,\n component: this.options.component,\n record: this.options.record ?? undefined,\n ...this.options.params?.(),\n }\n }\n\n /**\n * `requestContext()` plus the form state for GET requests (options, picker tables,\n * mentions). States travel as JSON: a query string drops nulls and empty arrays, and with\n * them repeater items that are still blank, so the server couldn't find their fields.\n */\n queryContext(): Record<string, unknown> {\n const context = this.requestContext()\n const ownerState = context.ownerState\n\n return {\n ...context,\n ...(ownerState !== null && typeof ownerState === 'object'\n ? { ownerState: JSON.stringify(ownerState) }\n : {}),\n state: JSON.stringify(this.state.values),\n }\n }\n\n subscribe(listener: (state: FormState) => void): () => void {\n return this.store.subscribe(listener)\n }\n\n // ---------------------------------------------------------------- Values\n\n getValue<T = unknown>(path: string, fallback?: T): T {\n return getPath<T>(this.state.values, path, fallback)\n }\n\n /**\n * Set a value. Live fields schedule a server refresh (debounced); `onBlur` fields\n * refresh via `blur()` instead.\n */\n setValue(path: string, value: unknown, options: { silent?: boolean } = {}): void {\n const current = this.getValue(path)\n\n if (Object.is(current, value)) {\n return\n }\n\n this.store.set((state) => {\n const dirty = new Set(state.dirty)\n dirty.add(path)\n\n const errors = { ...state.errors }\n delete errors[path]\n\n return { ...state, values: setPath(state.values, path, value), dirty, errors }\n })\n\n this.editsInFlight?.add(path)\n\n if (options.silent) {\n return\n }\n\n const field = this.findField(path)\n\n if (field?.live && !field.live.onBlur) {\n this.scheduleRefresh(path, field.live.debounce ?? 150)\n }\n }\n\n /** Call when a field loses focus so `live(onBlur: true)` fields refresh. */\n blur(path: string): void {\n const field = this.findField(path)\n\n if (field?.live?.onBlur && this.state.dirty.has(path)) {\n void this.refresh(path)\n }\n }\n\n /** Replace the whole state (e.g. after the server returns a refreshed payload). */\n fill(payload: FormPayload, options: { keepDirty?: boolean } = {}): void {\n this.serverValues = payload.state ?? {}\n this.fingerprints = payload.fingerprints\n this.store.set((state) => ({\n ...state,\n components: payload.components,\n values: payload.state ?? {},\n columns: payload.columns ?? state.columns,\n dirty: options.keepDirty ? state.dirty : new Set(),\n }))\n }\n\n setErrors(errors: Record<string, string[] | string>): void {\n const normalized: Record<string, string[]> = {}\n\n for (const [key, value] of Object.entries(errors)) {\n normalized[key] = Array.isArray(value) ? value : [value]\n }\n\n this.store.update({ errors: normalized })\n }\n\n clearErrors(): void {\n this.store.update({ errors: {} })\n }\n\n getError(path: string): string | undefined {\n return this.state.errors[path]?.[0]\n }\n\n setProcessing(processing: boolean): void {\n this.store.update({ processing })\n }\n\n get isDirty(): boolean {\n return this.state.dirty.size > 0\n }\n\n findField(path: string): FieldSchema | undefined {\n return findFieldByPath(this.state.components, path, this.state.values)\n }\n\n // ---------------------------------------------------------------- Live refresh\n\n private scheduleRefresh(path: string, wait: number): void {\n let debounced = this.liveDebouncers.get(path)\n\n if (!debounced) {\n debounced = debounce(() => {\n void this.refresh(path)\n }, wait)\n this.liveDebouncers.set(path, debounced)\n }\n\n debounced()\n }\n\n /**\n * Send the current state to the server, which re-evaluates closures and\n * `afterStateUpdated` hooks, and replace components + values with the response.\n */\n async refresh(path?: string): Promise<void> {\n if (!this.options.refreshUrl) {\n return\n }\n\n this.refreshController?.abort()\n const controller = new AbortController()\n this.refreshController = controller\n // The request carries the current state, so only edits made from now on are newer\n // than what the server sees.\n const edits = new Set<string>()\n this.editsInFlight = edits\n\n this.store.update({ refreshing: true })\n const sent = this.state.values\n\n try {\n const response = await requestJson<SchemaRefreshResponse>(this.options.refreshUrl, {\n method: 'POST',\n body: {\n ...this.requestContext(),\n state: sent,\n path,\n old: path ? (getPath(this.serverValues, path) ?? null) : undefined,\n // With fingerprints the server answers with only what changed.\n fingerprints: this.fingerprints,\n },\n signal: controller.signal,\n })\n\n if (controller.signal.aborted) {\n return\n }\n\n if (this.editsInFlight === edits) {\n this.editsInFlight = null\n }\n\n if (!this.applyResponse(response, sent, edits)) {\n // The patches didn't fit the tree: ask for the whole form instead.\n this.fingerprints = undefined\n await this.refresh(path)\n\n return\n }\n\n this.options.onRefreshed?.(path)\n } catch (error) {\n if ((error as Error).name === 'AbortError') {\n return\n }\n\n if (this.editsInFlight === edits) {\n this.editsInFlight = null\n }\n\n this.store.update({ refreshing: false })\n // Without an `onError`, the panel's error notification for the status is shown.\n ;(this.options.onError ?? reportRequestError)(error)\n }\n }\n\n /**\n * Merge a refresh response (full or partial) for the state `sent` with the request.\n * Paths in `edits` changed while the request was in flight and keep their client value;\n * everything else takes the server's (including values set by `$set`). Returns false\n * when a partial response doesn't fit the tree the store holds.\n */\n applyResponse(\n response: SchemaRefreshResponse,\n sent: Record<string, unknown>,\n edits: Iterable<string> = [],\n ): boolean {\n const merged = mergeRefreshResponse(this.state.components, sent, response)\n\n if (!merged) {\n this.store.update({ refreshing: false })\n\n return false\n }\n\n this.serverValues = merged.values\n this.fingerprints = merged.fingerprints\n\n this.store.set((state) => {\n let values = merged.values\n\n for (const editedPath of edits) {\n values = setPath(values, editedPath, getPath(state.values, editedPath))\n }\n\n return {\n ...state,\n components: merged.components,\n values,\n columns: merged.columns ?? state.columns,\n refreshing: false,\n }\n })\n\n return true\n }\n\n /**\n * Validate the fields of one wizard step (by the Step component's `key`) on the server.\n * Resolves with true when they pass; otherwise the step's errors replace the errors of\n * those fields and false is returned. Without a validation endpoint every step passes.\n */\n async validateStep(stepKey: string, fieldPaths: string[]): Promise<boolean> {\n if (!this.options.validateUrl) {\n return true\n }\n\n try {\n const response = await requestJson<StepValidationHaltedResponse | null>(\n this.options.validateUrl,\n {\n method: 'POST',\n body: {\n ...this.requestContext(),\n state: this.state.values,\n step: stepKey,\n },\n },\n )\n\n // A step hook halted: stay on the step, keep the field errors as they are.\n if (response !== null && typeof response === 'object' && response.halted) {\n const notifications = response.notifications ?? []\n\n if (notifications.length > 0) this.options.onNotifications?.(notifications)\n\n return false\n }\n } catch (error) {\n if (error instanceof HttpError && error.status === 422) {\n this.store.update({\n errors: { ...withoutStepErrors(this.state.errors, fieldPaths), ...error.errors },\n })\n\n return false\n }\n\n ;(this.options.onError ?? reportRequestError)(error)\n\n return false\n }\n\n this.store.update({ errors: withoutStepErrors(this.state.errors, fieldPaths) })\n\n return true\n }\n\n /** Search options for a searchable select at `path`. */\n async searchOptions(\n path: string,\n search: string,\n ): Promise<Array<{ value: string; label: string }>> {\n if (!this.options.optionsUrl) {\n return []\n }\n\n const response = await requestJson<{ options?: Array<{ value: string; label: string }> }>(\n this.options.optionsUrl,\n {\n query: { ...this.queryContext(), path, search },\n },\n )\n\n return response.options ?? []\n }\n\n async optionLabels(\n path: string,\n values: Array<string | number>,\n ): Promise<Record<string, string>> {\n if (!this.options.optionsUrl || values.length === 0) {\n return {}\n }\n\n const response = await requestJson<{ labels?: Record<string, string> }>(\n this.options.optionsUrl,\n {\n query: { ...this.queryContext(), path, values },\n },\n )\n\n return response.labels ?? {}\n }\n\n /** One page of icons for the IconPicker at `path` (`set`: one of its sets, or all). */\n async searchIcons(\n path: string,\n query: { search?: string; set?: string | null; page?: number },\n signal?: AbortSignal,\n ): Promise<IconPickerResponse | null> {\n if (!this.options.optionsUrl) {\n return null\n }\n\n return requestJson<IconPickerResponse>(this.options.optionsUrl, {\n query: {\n ...this.queryContext(),\n path,\n search: query.search ?? '',\n ...(query.set ? { set: query.set } : {}),\n page: query.page ?? 1,\n },\n signal,\n })\n }\n\n /**\n * The picker table of a ModalTableSelect at `path` (`query` is its table state) and the\n * labels of the records it lists.\n */\n async modalTable(\n path: string,\n identifier: string,\n query: TableQuery,\n signal?: AbortSignal,\n ): Promise<ModalTableSelectResponse | null> {\n if (!this.options.optionsUrl) {\n return null\n }\n\n return requestJson<ModalTableSelectResponse>(this.options.optionsUrl, {\n query: {\n ...this.queryContext(),\n path,\n table: 1,\n ...modalTableQuery(identifier, query),\n },\n signal,\n })\n }\n\n destroy(): void {\n debugRecorder.unregisterForm(this)\n this.refreshController?.abort()\n\n for (const debounced of this.liveDebouncers.values()) {\n debounced.cancel()\n }\n\n this.liveDebouncers.clear()\n }\n}\n\n/** The errors without those of the given fields (and of their nested paths). */\nfunction withoutStepErrors(\n errors: Record<string, string[]>,\n fieldPaths: string[],\n): Record<string, string[]> {\n const kept: Record<string, string[]> = {}\n\n for (const [key, messages] of Object.entries(errors)) {\n if (!fieldPaths.some((path) => key === path || key.startsWith(`${path}.`))) {\n kept[key] = messages\n }\n }\n\n return kept\n}\n\n/**\n * A stable key for a page form: the page class, record and the form's own key/component.\n * The context token is re-encrypted on every response, so it cannot identify a form.\n * Renderers re-initialise a FormStore from server state only when this key changes (or\n * after the form's own successful submit), never on unrelated reloads of the same page.\n */\nexport function formIdentity(\n page: { class?: string; record?: string | number | null } | null | undefined,\n block: { key: string; component: string; operation?: string | null },\n): string {\n return JSON.stringify([\n page?.class ?? null,\n page?.record ?? null,\n block.key,\n block.component,\n block.operation ?? null,\n ])\n}\n\n/** The parts of an Inertia visit the unsaved-changes guard needs. */\nexport interface GuardedVisit {\n method: string\n url: URL | string\n only?: string[]\n except?: string[]\n preserveState?: unknown\n}\n\n/**\n * True when an Inertia visit would navigate away from the current form, i.e. when the\n * unsaved-changes guard should ask. Partial reloads (`only`/`except`, used by table\n * sorting, paging and polling) and state-preserving visits to the same path stay on the\n * page and keep the form, so they never prompt. Non-GET visits are submissions.\n */\nexport function isLeavingVisit(visit: GuardedVisit, currentUrl?: string): boolean {\n if (visit.method.toLowerCase() !== 'get') {\n return false\n }\n\n if ((visit.only?.length ?? 0) > 0 || (visit.except?.length ?? 0) > 0) {\n return false\n }\n\n const base =\n currentUrl ?? (typeof window !== 'undefined' ? window.location.href : 'http://localhost/')\n const here = new URL(base)\n const target = new URL(String(visit.url), here)\n\n return !(\n visit.preserveState === true &&\n target.origin === here.origin &&\n target.pathname === here.pathname\n )\n}\n\n// ---------------------------------------------------------------- Repeater helpers\n\nexport interface RepeaterItemState {\n key: string\n state: Record<string, unknown>\n}\n\n/** Append a blank item using the Repeater's template state. */\nexport function appendRepeaterItem(\n items: unknown[],\n templateState: Record<string, unknown>,\n): unknown[] {\n return [...items, cloneState(templateState)]\n}\n\nexport function removeRepeaterItem(items: unknown[], index: number): unknown[] {\n return items.filter((_, i) => i !== index)\n}\n\nexport function moveRepeaterItem(items: unknown[], from: number, to: number): unknown[] {\n if (from === to || from < 0 || to < 0 || from >= items.length || to >= items.length) {\n return items\n }\n\n const copy = [...items]\n const [item] = copy.splice(from, 1)\n copy.splice(to, 0, item)\n\n return copy\n}\n\nexport function cloneRepeaterItem(items: unknown[], index: number): unknown[] {\n const copy = [...items]\n copy.splice(index + 1, 0, cloneState(items[index]))\n\n return copy\n}\n\n/**\n * Per-item UI state (collapsed flags, …) keyed by item index, remapped after the items\n * are reordered, removed or cloned with the helpers above so it stays with its item.\n */\nexport type IndexedState<T> = Record<number, T>\n\nfunction remapIndexedState<T>(\n state: IndexedState<T>,\n newIndex: (index: number) => number | null,\n): IndexedState<T> {\n const result: IndexedState<T> = {}\n\n for (const [key, value] of Object.entries(state) as [string, T][]) {\n const index = newIndex(Number(key))\n\n if (index !== null) result[index] = value\n }\n\n return result\n}\n\nexport function moveIndexedState<T>(\n state: IndexedState<T>,\n from: number,\n to: number,\n): IndexedState<T> {\n if (from === to) return state\n\n return remapIndexedState(state, (index) => {\n if (index === from) return to\n if (from < to && index > from && index <= to) return index - 1\n if (from > to && index >= to && index < from) return index + 1\n\n return index\n })\n}\n\nexport function removeIndexedState<T>(state: IndexedState<T>, removed: number): IndexedState<T> {\n return remapIndexedState(state, (index) =>\n index === removed ? null : index > removed ? index - 1 : index,\n )\n}\n\nexport function cloneIndexedState<T>(state: IndexedState<T>, cloned: number): IndexedState<T> {\n const result = remapIndexedState(state, (index) => (index > cloned ? index + 1 : index))\n\n if (cloned in state) result[cloned + 1] = state[cloned] as T\n\n return result\n}\n"],"mappings":";;;;;;;;;;;;AAgEA,SAAgB,aAAa,OAAuB;CAClD,OAAO,WAAW,MAAM,QAAQ,mBAAmB,GAAG;AACxD;;AAGA,SAAgB,WAAW,QAAgB,WAA2B;CACpE,OAAO,GAAG,OAAO,GAAG,UAAU,QAAQ,mBAAmB,GAAG;AAC9D;;;;AAKA,SAAgB,cACd,YACA,OAAsB,CAAC,GACR;CACf,KAAK,MAAM,aAAa,YAAY;EAClC,IAAI,QAAQ,SAAS,GAAG;GACtB,KAAK,KAAK,SAAS;GAEnB,IAAI,UAAU,SAAS,cAAc,UAAU,SAAS,WACtD,KAAK,MAAM,QAAQ,UAAU,OAC3B,cAAc,KAAK,QAAQ,IAAI;EAGrC;EAEA,IAAI,UAAU,QACZ,cAAc,UAAU,QAAQ,IAAI;CAExC;CAEA,OAAO;AACT;;;;;;;;AASA,SAAgB,gBACd,YACA,MACA,SAAkC,CAAC,GACV;CACzB,OACE,cAAc,UAAU,CAAC,CAAC,MAAM,UAAU,MAAM,cAAc,IAAI,KAClE,kBAAkB,YAAY,MAAM,MAAM;AAE9C;AAEA,SAAS,kBACP,YACA,MACA,QACyB;CACzB,KAAK,MAAM,SAAS,cAAc,UAAU,GAC1C,KAAK,MAAM,YAAY,cAAc,OAAO,MAAM,MAAM,GAAG;EACzD,MAAM,QACJ,cAAc,QAAQ,CAAC,CAAC,MAAM,cAC5B,oBAAoB,UAAU,WAAW,IAAI,CAC/C,KAAK,kBAAkB,UAAU,MAAM,MAAM;EAE/C,IAAI,OAAO,OAAO;CACpB;AAIJ;;AAGA,SAAS,cACP,OACA,MACA,QACqB;CACrB,IAAI,MAAM,SAAS,YACjB,OAAO,CAAE,MAAsD,YAAY,CAAC,CAAC;CAG/E,IAAI,MAAM,SAAS,WAAW,OAAO,CAAC;CAEtC,MAAM,SACH,MAAqF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A,SAAgB,kBAAkB,OAAkB,OAA0B;CAC5E,MAAM,OAAO,CAAC,GAAG,KAAK;CACtB,KAAK,OAAO,QAAQ,GAAG,GAAG,WAAW,MAAM,MAAM,CAAC;CAElD,OAAO;AACT;AAQA,SAAS,kBACP,OACA,UACiB;CACjB,MAAM,SAA0B,CAAC;CAEjC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAAoB;EACjE,MAAM,QAAQ,SAAS,OAAO,GAAG,CAAC;EAElC,IAAI,UAAU,MAAM,OAAO,SAAS;CACtC;CAEA,OAAO;AACT;AAEA,SAAgB,iBACd,OACA,MACA,IACiB;CACjB,IAAI,SAAS,IAAI,OAAO;CAExB,OAAO,kBAAkB,QAAQ,UAAU;EACzC,IAAI,UAAU,MAAM,OAAO;EAC3B,IAAI,OAAO,MAAM,QAAQ,QAAQ,SAAS,IAAI,OAAO,QAAQ;EAC7D,IAAI,OAAO,MAAM,SAAS,MAAM,QAAQ,MAAM,OAAO,QAAQ;EAE7D,OAAO;CACT,CAAC;AACH;AAEA,SAAgB,mBAAsB,OAAwB,SAAkC;CAC9F,OAAO,kBAAkB,QAAQ,UAC/B,UAAU,UAAU,OAAO,QAAQ,UAAU,QAAQ,IAAI,KAC3D;AACF;AAEA,SAAgB,kBAAqB,OAAwB,QAAiC;CAC5F,MAAM,SAAS,kBAAkB,QAAQ,UAAW,QAAQ,SAAS,QAAQ,IAAI,KAAM;CAEvF,IAAI,UAAU,OAAO,OAAO,SAAS,KAAK,MAAM;CAEhD,OAAO;AACT"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ import { AnyPaginationSchema, AppendingPaginationSchema, BaseColumnSchema, Break
|
|
|
12
12
|
import { BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderSchema, CodeEditorSchema, ModalTableSelectResponse, ModalTableSelectSchema, SliderBehavior, SliderNonLinearPoint, SliderPipSchema, SliderSchema, ToggleButtonsSchema } from "./schema/advanced-fields.js";
|
|
13
13
|
import { Listener, Store, createStore, derived } from "./store.js";
|
|
14
14
|
import { ALL_SELECTED_RECORDS_ARGUMENT, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FiltersPlacement, REMAINING_TEXT_SIZE_CLASSES, SELECTED_RECORDS_ARGUMENT, STACKED_TABLE_CLASSES, SelectionLimits, SelectionState, TableEndpoints, TableQuery, TableSelection, TableVisitCallbacks, actionsAccessSelectedRecords, buildTableUrl, canSelectAllRecords, filterSelectColumnOptions, filtersCollapsible, filtersFormWidthClass, filtersPlacement, isPageFullySelected, optionText, registerTablePersistence, remainingTextSizeClass, reorderTable, reorderingListsAllRecords, searchTableColumnOptions, selectColumnEmptyMessage, selectedRecordsArguments, stackedCellClasses, startTableReordering, stopTableReordering, tableQueryKey, updateTableCell, visibleColumns, visitTable } from "./table.js";
|
|
15
|
-
import { FormState, FormStore, FormStoreOptions, GuardedVisit, IndexedState, RepeaterItemState, appendRepeaterItem, cloneIndexedState, cloneRepeaterItem, collectFields, findFieldByPath, formIdentity, isLeavingVisit, moveIndexedState, moveRepeaterItem, removeIndexedState, removeRepeaterItem, wizardStepToReveal } from "./form.js";
|
|
16
|
-
import { ActionButtonSize, ActionContext, ActionRunner, ActionRunnerOptions, ActionRunnerState, CREATE_ANOTHER_ARGUMENT, DropdownPlacement, ExecuteOptions, OpenModal, actionEndpoint, bindsKeyBindings, confirmModalClose, createAnotherState, flattenActionGroup, groupMenuItems, guardModalUnload, iconButtonSize, isModalHiddenByChild, menuActionContext, modalFooterAlignment, parseDropdownPlacement, resolveActionSize, shouldConfirmModalClose, slideOverSide } from "./actions.js";
|
|
15
|
+
import { FormState, FormStore, FormStoreOptions, GuardedVisit, IndexedState, RepeaterItemState, appendRepeaterItem, cloneIndexedState, cloneRepeaterItem, collectFields, componentHasErrors, fieldDomId, findFieldByPath, formIdPrefix, formIdentity, isLeavingVisit, moveIndexedState, moveRepeaterItem, removeIndexedState, removeRepeaterItem, tabFromQuery, tabQueryValue, tabToReveal, wizardStepToReveal } from "./form.js";
|
|
16
|
+
import { ActionButtonSize, ActionContext, ActionRunner, ActionRunnerOptions, ActionRunnerState, CREATE_ANOTHER_ARGUMENT, DropdownPlacement, ExecuteOptions, OpenModal, actionEndpoint, bindsKeyBindings, confirmModalClose, createAnotherState, flattenActionGroup, groupMenuItems, guardModalUnload, iconButtonSize, isActionLoading, isActionProcessing, isModalHiddenByChild, menuActionContext, modalFooterAlignment, parseDropdownPlacement, resolveActionSize, shouldConfirmModalClose, slideOverSide } from "./actions.js";
|
|
17
17
|
import { BuilderBlockGroup, BuilderPickerRect, ModalTablePaging, SliderPip, TextEdit, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, canAddBuilderBlock, concurrencyLimiter, cssAspectRatio, fileUploadAccept, fileUploadPaths, filterBuilderBlocks, groupBuilderBlocks, indentCode, insertBuilderItem, insertUploadedFile, modalTablePaging, modalTableQuery, modalTableSelected, newlineWithIndent, pickerFilterFormOptions, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, startSliderRangeDrag, toggleButtonsNext, toggleButtonsSelected, toggleModalTableKey, uploadedFileLinks } from "./advanced-fields.js";
|
|
18
18
|
import { AI_STREAM_REGISTRY_KEY, AiStreamController, AiStreamOptions, AiStreamState, AiStreamStatus, StreamAnnouncer, StreamEvent, parseEventStream, readEventStream } from "./ai-stream.js";
|
|
19
19
|
import { HttpError, JsonRequestOptions, PAGE_EXPIRED_STATUS, buildQuery, csrfHeader, inertiaPost, inertiaReload, inertiaVisit, reloadExpiredPage, reloadOnExpiredPage, requestJson, router } from "./http.js";
|
|
@@ -81,7 +81,7 @@ import { FlatNavigationItem, flattenNavigationItems, hasActiveNavigationItem, na
|
|
|
81
81
|
import { resolveNavigation, resolvePanelNavigation } from "./navigation-state.js";
|
|
82
82
|
import { CLOSE_NOTIFICATION_EVENT, FILAMENT_CLOSE_NOTIFICATION_EVENT, FlashNotificationTracker, NotificationCenter, NotificationCenterState, NotificationEndpoints, OPEN_DATABASE_NOTIFICATIONS_EVENT, closeNotification, notificationTintStyles, onCloseNotification, onOpenDatabaseNotifications, openDatabaseNotifications } from "./notifications.js";
|
|
83
83
|
import { OneTimeCodeSubmitter, oneTimeCodeDigits } from "./one-time-code.js";
|
|
84
|
-
import { DEFAULT_ACTION_QUERY_KEYS, DefaultActionOpener, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, submitFormById, withoutDefaultActionQuery } from "./page-actions.js";
|
|
84
|
+
import { DEFAULT_ACTION_QUERY_KEYS, DefaultActionOpener, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, shouldResyncForm, submitFormById, withoutDefaultActionQuery } from "./page-actions.js";
|
|
85
85
|
import { CallPageMethodOptions, PageMethodArguments, PageMethodError, PageMethodResponse, callPageMethod, distributePageFormErrors, firstErrors, getPageForm, onPageFormsChanged, optimistic, pageFormName, registerPageForm, uploadPageMethodFiles } from "./page-methods.js";
|
|
86
86
|
import { currentPageQuery } from "./page-query.js";
|
|
87
87
|
import { EchoEventChannel, EchoWithChannels, LivePropsOptions, PageEventsOptions, PageMethodCallOptions, PageMethodRuntime, ShortcutOptions, listenForPageEvents, pollPageProps, propsPollScheduler, registerShortcut, reloadPageProps, runPageMethod, watchPageProps } from "./page-runtime.js";
|
|
@@ -132,4 +132,4 @@ import { applyMask } from "./utils/mask.js";
|
|
|
132
132
|
import { PathSegment, deletePath, getPath, hasPath, joinPath, parentPath, replacePlaceholder, setPath, splitPath } from "./utils/path.js";
|
|
133
133
|
import { DEFAULT_VIRTUALIZE_THRESHOLD, VIRTUAL_ESTIMATES, VirtualList, VirtualListOptions, VirtualRange, firstErroredItemIndex, hasNewErrors, virtualizeOptions } from "./virtual.js";
|
|
134
134
|
import { WIZARD_STEP_QUERY_KEY, completedStepIcon, initialWizardStep, persistWizardStep, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey } from "./wizard.js";
|
|
135
|
-
export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionButtonSize, ActionContext, ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultEditor, ActionResultFlash, ActionRunner, ActionRunnerOptions, ActionRunnerState, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamController, AiStreamOptions, AiStreamSchema, AiStreamState, AiStreamStatus, AlfakitFlash, AlfakitOptions, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnalyticsTracker, AnalyticsTrackerOptions, AnyActionSchema, AnyPaginationSchema, Appearance, AppendingPaginationSchema, Attributes, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BlockProps, BottomNavigationItems, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockGroup, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderPickerRect, BuilderSchema, BulkToggleActionSchema, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CalendarChangeResult, CalendarEnvironment, CalendarEventApi, CalendarEventChangeInfo, CalendarEventClickInfo, CalendarEventSchema, CalendarFetchInfo, CalendarSelectInfo, CalendarView, CalendarWidgetSchema, CallPageMethodOptions, CalloutSchema, CellSchema, ChartConfigInput, ChartConfigOutput, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartFormatter, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosave, CmsAutosaveOptions, CmsAutosaveResult, CmsAutosaveSnapshot, CmsAutosaveStatus, CmsBlockSchema, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeadTags, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLinkTag, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsMetaTag, CmsPageProps, CmsPageSchema, CmsPayload, CmsPreviewDevice, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, CodeToken, CodeTokenKind, Color, ColorColumnSchema, ColorEntrySchema, ColorFormat, ColorPickerSchema, ColumnGroupHeaderCell, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnManagerPosition, ColumnProps, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ComponentDiscovery, ComponentRegistry, ConflictField, ConflictMonitor, ConflictMonitorOptions, ConflictMonitorState, ConflictsSchema, ConstraintPickerSection, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CopilotController, CopilotControllerOptions, CopilotState, CopilotTotals, CopilotView, CropHandle, CropRect, CursorPaginationSchema, CustomBlockGroup, CustomBlockNodeOptions, CustomBlockPreview, CustomBlockResult, CustomWidgetSchema, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardCustomizeSchema, DashboardEditor, DashboardEditorOptions, DashboardEditorState, DashboardLayoutEntry, DashboardLibraryWidget, DashboardMove, DashboardSpanOption, DashboardTranslator, DatabaseNotificationsResponse, DatePickerSchema, Debounced, DebugClosure, DebugDeprecation, DebugNode, DebugRecorder, DebugRequest, DebugRequestOutcome, DebugSchema, DebugServerTimings, DebugState, DefaultActionOpener, DefaultActionSchema, DeferredBadgeSchema, DeferredRequestOptions, DeferredTabBadges, DeprecationOptions, DevToolsClass, DevToolsContext, DevToolsSchema, Direction, DiscoveredEntry, DiscoveryFolder, DiscoveryKey, DiscoveryModules, DiscoveryOptions, DropdownPlacement, EchoChannelLike, EchoConnectionOptions, EchoEventChannel, EchoFactory, EchoLike, EchoPresenceChannelLike, EchoWithChannels, EditConflict, EditableColumnSchema, EditorAttachments, EditorSuggestions, EmptyStateComponentSchema, EmptyStateSchema, EntryProps, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ExecuteOptions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FieldActionContextOptions, FieldActionResponse, FieldActions, FieldAriaAttributes, FieldAriaSource, FieldDescriptionIds, FieldProps, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerClick, FileManagerController, FileManagerDataTransfer, FileManagerDetailsSchema, FileManagerDialog, FileManagerEntrySchema, FileManagerEnvironment, FileManagerFolderSchema, FileManagerKeyEvent, FileManagerKeyResult, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerPreviewState, FileManagerResult, FileManagerSchema, FileManagerSort, FileManagerSortField, FileManagerState, FileManagerUpload, FileManagerUploader, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterFormSync, FilterIndicator, FilterSchema, FiltersFormWidth, FiltersPlacement, FlashNotificationTracker, FlatNavigationItem, FlexSchema, FloatingToolbarEditor, FloatingToolbarState, FormBlock, FormPayload, FormState, FormStore, FormStoreOptions, FormattedStateProps, FusedGroupSchema, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridBounds, GridCell, GridLayoutSchema, GridSchema, GroupSchema, GroupedTableRow, GuardedVisit, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HeadingTag, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatClient, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatOptions, HelpdeskChatResponse, HelpdeskChatState, HelpdeskComposerMode, HelpdeskInboxController, HelpdeskInboxEnvironment, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskInboxState, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSearch, IconPickerSearchState, IconPickerSetSchema, IconPickerSource, IconPosition, IconSchema, IconSource, ImageCellSchema, ImageColumnSchema, ImageEditor, ImageEditorData, ImageEditorDragMode, ImageEditorMode, ImageEditorOptions, ImageEditorPoint, ImageEditorState, ImageEntrySchema, ImageGeometry, ImageSchema, ImageStackProps, ImageTransformOptions, ImpersonationSchema, ImplicitSubmitEvent, IndexedState, InfolistBlock, ItemActionFallback, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, ItemMoveDirection, ItemMoveTracker, JsonEntry, JsonKind, JsonRequestOptions, JsonSearchResult, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanController, KanbanEnvironment, KanbanFetchResult, KanbanFiltersSchema, KanbanKeyResult, KanbanLaneSchema, KanbanLocation, KanbanMoveResult, KanbanPicked, KanbanPointerOptions, KanbanRefusal, KanbanSchema, KanbanState, KanbanTarget, KanbanWidgetSchema, KeyLike, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LABEL_SLOTS, LAZY_PROP, LanguageSwitcherPosition, LatestRequest, LayoutSchema, LazyComponentCache, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, Listener, LiveConfig, LivePropsOptions, LiveUpdates, LiveUpdatesOptions, LiveUpdatesSchema, LiveUpdatesState, LoadTableTotalsOptions, LoadedRichEditorExtensions, LocaleFormatter, LocaleSchema, LocalizationSchema, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, MenuItemSchema, MergedRefresh, ModalTablePaging, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, MoneyOptions, NOT_PROSE_CLASS, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationCenter, NotificationCenterState, NotificationEndpoints, NotificationSchema, NotificationUndoSchema, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeInputSchema, OneTimeCodeSubmitter, OpenModal, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageComponentProps, PageEventsOptions, PageLayout, PageMethodArguments, PageMethodCallOptions, PageMethodError, PageMethodResponse, PageMethodRuntime, PageSchema, PaginationSchema, PaletteGroup, PaletteItem, PaletteItemKind, PaletteLabels, PaletteSources, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, ParsedKeyBinding, PartialFormPayload, PastePlan, PathSegment, PersistStorage, PlaceholderSchema, PollScheduler, PolledComponents, PresenceMember, PresenceRoom, PresenceRoomOptions, PresenceRoomState, PresenceSchema, PresenceState, PwaInstallOutcome, PwaPushOutcome, PwaPushSchema, PwaPushStatus, PwaSchema, PwaState, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RadioSchema, RealtimeConfig, RealtimeSchema, RealtimeSubscriptionOptions, RecordChange, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RegisteredShortcut, RelationGroupSchema, RelationManagerSchema, RelationManagerTab, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterItemState, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorExtensionLoader, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorPanel, RichEditorRemote, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, RulePath, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_TOASTER_ID, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaComponentContextValue, SchemaComponentProps, SchemaContractCheck, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SelectionLimits, SelectionState, ShortcutDefinition, ShortcutGroup, ShortcutListGroup, ShortcutListItem, ShortcutOptions, ShortcutRegistry, ShortcutRegistryOptions, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPip, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SonnerPosition, SplitLayoutSchema, SpreadsheetAnnouncement, SpreadsheetCellKind, SpreadsheetChange, SpreadsheetColumn, SpreadsheetEdit, SpreadsheetGrid, SpreadsheetKey, SpreadsheetKeyResult, SpreadsheetRow, SpreadsheetSaveResult, SpreadsheetState, StackLayoutSchema, StandaloneComponentSchema, StandaloneComponentState, StandaloneDefaults, StarterKitBreadcrumb, StarterKitNavGroup, StarterKitNavItem, StarterKitNavigationSchema, StarterKitWidgets, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, Store, StreamAnnouncer, StreamEvent, SubNavigationSchema, SuggestionEditor, SuggestionItem, SuggestionMatch, SuggestionState, SummaryValueSchema, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableEndpoints, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableQuery, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSelection, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewOperation, TableViewResponse, TableViewsSchema, TableVisitCallbacks, TableWidgetSchema, TabsSchema, TagsInputSchema, TemporaryUploadOptions, TemporaryUploadResult, TenantSchema, TextAlignment, TextColumnSchema, TextEdit, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, ToolCommandContext, ToolbarCommand, ToolbarContext, ToolbarEditor, ToolbarKeyboardOptions, TranslatableLocaleSchema, TranslatableSchema, TranslationCellRef, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationHistoryState, TranslationKeyResult, TranslationLocaleSchema, TranslationManagerController, TranslationManagerEnvironment, TranslationManagerSchema, TranslationManagerState, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, Translator, TreeController, TreeDropPosition, TreeEnvironment, TreeKeyResult, TreeMove, TreeNodeSchema, TreeRow, TreeSaveResult, TreeSchema, TreeState, TreeStructureItem, TreeWidgetSchema, TriggerButtonDefaults, TriggerButtonView, USER_MENU_COMPONENT, UndoShortcuts, UnorderedListSchema, UploadedFile, VIRTUAL_ESTIMATES, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualList, VirtualListOptions, VirtualRange, VirtualizeSchema, WIZARD_STEP_QUERY_KEY, WidgetProps, WidgetSchema, WidgetsBlock, Width, WizardProgress, WizardSchema, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, customBlockNodeConfig, customColorClasses, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoShortcut, isValidShortcut, itemActionContext, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shouldChunkUpload, shouldConfirmModalClose, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, startAnalytics, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabKeyTarget, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
|
|
135
|
+
export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionButtonSize, ActionContext, ActionGroupSchema, ActionModalCancelledResponse, ActionModalSchema, ActionResultEditor, ActionResultFlash, ActionRunner, ActionRunnerOptions, ActionRunnerState, ActionSchema, ActionVariant, ActionsComponentSchema, Affixes, AiActionStatus, AiConversationSchema, AiCopilotSchema, AiMessageRole, AiMessageSchema, AiProposedActionSchema, AiSetupNoticeSchema, AiStreamController, AiStreamOptions, AiStreamSchema, AiStreamState, AiStreamStatus, AlfakitFlash, AlfakitOptions, AlfakitPageProps, Alignment, AnalyticsBreakdownRowSchema, AnalyticsBreakdownTabSchema, AnalyticsBreakdownWidgetSchema, AnalyticsTracker, AnalyticsTrackerOptions, AnyActionSchema, AnyPaginationSchema, Appearance, AppendingPaginationSchema, Attributes, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, BaseColumnSchema, BaseComponent, BaseEntry, BaseField, BaseWidgetSchema, BlockProps, BottomNavigationItems, BreadcrumbSchema, Breakpoint, Breakpoints, BuilderBlockGroup, BuilderBlockSchema, BuilderItemSchema, BuilderItemState, BuilderPickerRect, BuilderSchema, BulkToggleActionSchema, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CalendarChangeResult, CalendarEnvironment, CalendarEventApi, CalendarEventChangeInfo, CalendarEventClickInfo, CalendarEventSchema, CalendarFetchInfo, CalendarSelectInfo, CalendarView, CalendarWidgetSchema, CallPageMethodOptions, CalloutSchema, CellSchema, ChartConfigInput, ChartConfigOutput, ChartEmptyStateSchema, ChartFiltersFormSchema, ChartFormatter, ChartWidgetSchema, CheckboxColumnSchema, CheckboxListSchema, CheckboxSchema, CmsAdminBarSchema, CmsAlternateSchema, CmsAspectRatio, CmsAutosave, CmsAutosaveOptions, CmsAutosaveResult, CmsAutosaveSnapshot, CmsAutosaveStatus, CmsBlockSchema, CmsBreadcrumbSchema, CmsBuiltInBlocks, CmsCallToActionBlockData, CmsColumnsBlockData, CmsEditorStatusSchema, CmsEmbedBlockData, CmsFaqBlockData, CmsFeatureSchema, CmsFeaturesBlockData, CmsFormBlockData, CmsGalleryBlockData, CmsHeadTags, CmsHeroBlockData, CmsImageBlockData, CmsImageSchema, CmsLinkSchema, CmsLinkTag, CmsLivePreviewSchema, CmsMenuItemSchema, CmsMenuSchema, CmsMetaTag, CmsPageProps, CmsPageSchema, CmsPayload, CmsPreviewDevice, CmsRichTextBlockData, CmsSectionBlockData, CmsSeoSchema, CmsSiteSchema, CmsTestimonialSchema, CmsTestimonialsBlockData, CodeEditorSchema, CodeEntrySchema, CodeToken, CodeTokenKind, Color, ColorColumnSchema, ColorEntrySchema, ColorFormat, ColorPickerSchema, ColumnGroupHeaderCell, ColumnGroupSchema, ColumnLayoutColumnRef, ColumnLayoutNode, ColumnLayoutSchema, ColumnManagerPosition, ColumnProps, ColumnSchema, ColumnSpanValue, ColumnSummariesSchema, CommandPaletteLinkSchema, CommandPaletteResponse, CommandPaletteSchema, CommandSchema, ComponentDiscovery, ComponentRegistry, ConflictField, ConflictMonitor, ConflictMonitorOptions, ConflictMonitorState, ConflictsSchema, ConstraintPickerSection, ContainerBreakpoint, ContentBlock, ContentSlotItem, ContentSlotName, ContentSlotSchema, ContentSlots, CopilotController, CopilotControllerOptions, CopilotState, CopilotTotals, CopilotView, CropHandle, CropRect, CursorPaginationSchema, CustomBlockGroup, CustomBlockNodeOptions, CustomBlockPreview, CustomBlockResult, CustomWidgetSchema, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardCustomizeSchema, DashboardEditor, DashboardEditorOptions, DashboardEditorState, DashboardLayoutEntry, DashboardLibraryWidget, DashboardMove, DashboardSpanOption, DashboardTranslator, DatabaseNotificationsResponse, DatePickerSchema, Debounced, DebugClosure, DebugDeprecation, DebugNode, DebugRecorder, DebugRequest, DebugRequestOutcome, DebugSchema, DebugServerTimings, DebugState, DefaultActionOpener, DefaultActionSchema, DeferredBadgeSchema, DeferredRequestOptions, DeferredTabBadges, DeprecationOptions, DevToolsClass, DevToolsContext, DevToolsSchema, Direction, DiscoveredEntry, DiscoveryFolder, DiscoveryKey, DiscoveryModules, DiscoveryOptions, DropdownPlacement, EchoChannelLike, EchoConnectionOptions, EchoEventChannel, EchoFactory, EchoLike, EchoPresenceChannelLike, EchoWithChannels, EditConflict, EditableColumnSchema, EditorAttachments, EditorSuggestions, EmptyStateComponentSchema, EmptyStateSchema, EntryProps, EntrySchema, ErrorNotificationEntrySchema, ErrorNotificationsSchema, ExecuteOptions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FieldActionContextOptions, FieldActionResponse, FieldActions, FieldAriaAttributes, FieldAriaSource, FieldDescriptionIds, FieldProps, FieldSchema, FieldsetSchema, FileManagerActionNames, FileManagerBreadcrumbSchema, FileManagerClick, FileManagerController, FileManagerDataTransfer, FileManagerDetailsSchema, FileManagerDialog, FileManagerEntrySchema, FileManagerEnvironment, FileManagerFolderSchema, FileManagerKeyEvent, FileManagerKeyResult, FileManagerKind, FileManagerLinkSchema, FileManagerListingSchema, FileManagerPermissionsSchema, FileManagerPickedFileSchema, FileManagerPickerSchema, FileManagerPreviewSchema, FileManagerPreviewState, FileManagerResult, FileManagerSchema, FileManagerSort, FileManagerSortField, FileManagerState, FileManagerUpload, FileManagerUploader, FileUploadImageEditorSchema, FileUploadPositions, FileUploadSchema, FilterFormSync, FilterIndicator, FilterSchema, FiltersFormWidth, FiltersPlacement, FlashNotificationTracker, FlatNavigationItem, FlexSchema, FloatingToolbarEditor, FloatingToolbarState, FormBlock, FormPayload, FormState, FormStore, FormStoreOptions, FormattedStateProps, FusedGroupSchema, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, GlobalSearchGroupSchema, GlobalSearchResultSchema, GridBounds, GridCell, GridLayoutSchema, GridSchema, GroupSchema, GroupedTableRow, GuardedVisit, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HeadingTag, HelpdeskActivity, HelpdeskAttachment, HelpdeskBadge, HelpdeskChatClient, HelpdeskChatConfig, HelpdeskChatConversation, HelpdeskChatMessage, HelpdeskChatOptions, HelpdeskChatResponse, HelpdeskChatState, HelpdeskComposerMode, HelpdeskInboxController, HelpdeskInboxEnvironment, HelpdeskInboxList, HelpdeskInboxSchema, HelpdeskInboxState, HelpdeskMessage, HelpdeskSla, HelpdeskTicket, HelpdeskTicketSummary, HelpdeskView, HiddenSchema, HtmlSchema, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconCellItem, IconColumnSchema, IconEntrySchema, IconName, IconPickerOption, IconPickerResponse, IconPickerSchema, IconPickerSearch, IconPickerSearchState, IconPickerSetSchema, IconPickerSource, IconPosition, IconSchema, IconSource, ImageCellSchema, ImageColumnSchema, ImageEditor, ImageEditorData, ImageEditorDragMode, ImageEditorMode, ImageEditorOptions, ImageEditorPoint, ImageEditorState, ImageEntrySchema, ImageGeometry, ImageSchema, ImageStackProps, ImageTransformOptions, ImpersonationSchema, ImplicitSubmitEvent, IndexedState, InfolistBlock, ItemActionFallback, ItemActionName, ItemActionSchema, ItemActionsItemProps, ItemActionsProps, ItemActionsSchema, ItemMoveDirection, ItemMoveTracker, JsonEntry, JsonKind, JsonRequestOptions, JsonSearchResult, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanAssigneeSchema, KanbanBadgeSchema, KanbanCardSchema, KanbanColumnSchema, KanbanController, KanbanEnvironment, KanbanFetchResult, KanbanFiltersSchema, KanbanKeyResult, KanbanLaneSchema, KanbanLocation, KanbanMoveResult, KanbanPicked, KanbanPointerOptions, KanbanRefusal, KanbanSchema, KanbanState, KanbanTarget, KanbanWidgetSchema, KeyLike, KeyValueEntrySchema, KeyValueSchema, KeyboardShortcutsSchema, LABEL_SLOTS, LAZY_PROP, LanguageSwitcherPosition, LatestRequest, LayoutSchema, LazyComponentCache, LazyRelationManagerSchema, LazyWidgetSchema, LinksBlock, ListTabSchema, ListTabsProps, Listener, LiveConfig, LivePropsOptions, LiveUpdates, LiveUpdatesOptions, LiveUpdatesSchema, LiveUpdatesState, LoadTableTotalsOptions, LoadedRichEditorExtensions, LocaleFormatter, LocaleSchema, LocalizationSchema, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, MenuItemSchema, MergedRefresh, ModalTablePaging, ModalTableSelectResponse, ModalTableSelectSchema, MoneyInputSchema, MoneyOptions, NOT_PROSE_CLASS, NavigationBadgeSchema, NavigationGroupSchema, NavigationItemSchema, NavigationStateSchema, NotificationActionSchema, NotificationCenter, NotificationCenterState, NotificationEndpoints, NotificationSchema, NotificationUndoSchema, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeInputSchema, OneTimeCodeSubmitter, OpenModal, Operation, Option, OptionGroup, OptionOrGroup, OptionsGridDirection, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageComponentProps, PageEventsOptions, PageLayout, PageMethodArguments, PageMethodCallOptions, PageMethodError, PageMethodResponse, PageMethodRuntime, PageSchema, PaginationSchema, PaletteGroup, PaletteItem, PaletteItemKind, PaletteLabels, PaletteSources, PanelDesignSchema, PanelEndpoints, PanelLayoutSchema, PanelSchema, PanelThemeSchema, PanelUserSchema, ParsedKeyBinding, PartialFormPayload, PastePlan, PathSegment, PersistStorage, PlaceholderSchema, PollScheduler, PolledComponents, PresenceMember, PresenceRoom, PresenceRoomOptions, PresenceRoomState, PresenceSchema, PresenceState, PwaInstallOutcome, PwaPushOutcome, PwaPushSchema, PwaPushStatus, PwaSchema, PwaState, QueryBuilderConstraintRule, QueryBuilderConstraintSchema, QueryBuilderGroup, QueryBuilderGroupRule, QueryBuilderInput, QueryBuilderOperatorSchema, QueryBuilderRule, QueryBuilderRulesSchema, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RadioSchema, RealtimeConfig, RealtimeSchema, RealtimeSubscriptionOptions, RecordChange, RecordKey, RecordVersionChangeSchema, RecordVersionSchema, RecordVersionsSchema, RegisteredShortcut, RelationGroupSchema, RelationManagerSchema, RelationManagerTab, RelationManagersBlock, RelationManagersContentTabSchema, RepeatableEntrySchema, RepeaterItemSchema, RepeaterItemState, RepeaterSchema, RichEditorCustomBlockSchema, RichEditorExtensionLoader, RichEditorMentionSchema, RichEditorMergeTagSchema, RichEditorPanel, RichEditorRemote, RichEditorSchema, RichEditorToolSchema, RichEditorToolbarGroupSchema, RulePath, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_TOASTER_ID, SchemaBlock, SchemaComponent, SchemaComponentContext, SchemaComponentContextValue, SchemaComponentProps, SchemaContractCheck, SchemaPatch, SchemaRefreshResponse, SectionSchema, SelectColumnSchema, SelectOptionsResponse, SelectSchema, SelectionLimits, SelectionState, ShortcutDefinition, ShortcutGroup, ShortcutListGroup, ShortcutListItem, ShortcutOptions, ShortcutRegistry, ShortcutRegistryOptions, SimplePaginationSchema, Size, SliderBehavior, SliderNonLinearPoint, SliderPip, SliderPipSchema, SliderSchema, SlotDataValue, SlotItemSchema, SonnerPosition, SplitLayoutSchema, SpreadsheetAnnouncement, SpreadsheetCellKind, SpreadsheetChange, SpreadsheetColumn, SpreadsheetEdit, SpreadsheetGrid, SpreadsheetKey, SpreadsheetKeyResult, SpreadsheetRow, SpreadsheetSaveResult, SpreadsheetState, StackLayoutSchema, StandaloneComponentSchema, StandaloneComponentState, StandaloneDefaults, StarterKitBreadcrumb, StarterKitNavGroup, StarterKitNavItem, StarterKitNavigationSchema, StarterKitWidgets, StarterKitWidgetsSchema, StatSchema, StatsOverviewWidgetSchema, StepSchema, StepValidationHaltedResponse, Store, StreamAnnouncer, StreamEvent, SubNavigationSchema, SuggestionEditor, SuggestionItem, SuggestionMatch, SuggestionState, SummaryValueSchema, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TabSchema, TableBlock, TableColumnSchema, TableDeferredTotalsSchema, TableEndpoints, TableGroupOptionSchema, TableGroupingSchema, TablePersistedStateKey, TableQuery, TableRecordGroupSchema, TableRecordSchema, TableSchema, TableSelection, TableSortSchema, TableSpreadsheetSchema, TableSummariesSchema, TableSummaryRowSchema, TableTotalsSchema, TableTriggerActionKey, TableTriggerActionSchema, TableTriggerModalSchema, TableViewItemSchema, TableViewOperation, TableViewResponse, TableViewsSchema, TableVisitCallbacks, TableWidgetSchema, TabsSchema, TagsInputSchema, TemporaryUploadOptions, TemporaryUploadResult, TenantSchema, TextAlignment, TextColumnSchema, TextEdit, TextEntrySchema, TextInputColumnSchema, TextInputSchema, TextSchema, TextStyleProps, TextareaSchema, ToastPosition, ToggleButtonsSchema, ToggleColumnSchema, ToggleSchema, ToolCommandContext, ToolbarCommand, ToolbarContext, ToolbarEditor, ToolbarKeyboardOptions, TranslatableLocaleSchema, TranslatableSchema, TranslationCellRef, TranslationCellSchema, TranslationFilter, TranslationHistoryEntry, TranslationHistoryState, TranslationKeyResult, TranslationLocaleSchema, TranslationManagerController, TranslationManagerEnvironment, TranslationManagerSchema, TranslationManagerState, TranslationProgressSchema, TranslationRowSchema, TranslationRowsResult, TranslationSaveResult, TranslationSuggestionSchema, Translator, TreeController, TreeDropPosition, TreeEnvironment, TreeKeyResult, TreeMove, TreeNodeSchema, TreeRow, TreeSaveResult, TreeSchema, TreeState, TreeStructureItem, TreeWidgetSchema, TriggerButtonDefaults, TriggerButtonView, USER_MENU_COMPONENT, UndoShortcuts, UnorderedListSchema, UploadedFile, VIRTUAL_ESTIMATES, VerticalAlignment, ViewColumnSchema, ViewEntrySchema, ViewSchema, VirtualList, VirtualListOptions, VirtualRange, VirtualizeSchema, WIZARD_STEP_QUERY_KEY, WidgetProps, WidgetSchema, WidgetsBlock, Width, WizardProgress, WizardSchema, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, customBlockNodeConfig, customColorClasses, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoShortcut, isValidShortcut, itemActionContext, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, startAnalytics, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
|
package/dist/index.js
CHANGED
|
@@ -19,13 +19,13 @@ import { isPartialFormPayload } from "./schema/form.js";
|
|
|
19
19
|
import { applySchemaPatches, mergeRefreshResponse, mergeStatePatch } from "./partial.js";
|
|
20
20
|
import { FIELD_TYPES, isField } from "./schema/components.js";
|
|
21
21
|
import { debounce } from "./utils/debounce.js";
|
|
22
|
-
import { FormStore, appendRepeaterItem, cloneIndexedState, cloneRepeaterItem, collectFields, findFieldByPath, formIdentity, isLeavingVisit, moveIndexedState, moveRepeaterItem, removeIndexedState, removeRepeaterItem, wizardStepToReveal } from "./form.js";
|
|
22
|
+
import { FormStore, appendRepeaterItem, cloneIndexedState, cloneRepeaterItem, collectFields, componentHasErrors, fieldDomId, findFieldByPath, formIdPrefix, formIdentity, isLeavingVisit, moveIndexedState, moveRepeaterItem, removeIndexedState, removeRepeaterItem, tabFromQuery, tabQueryValue, tabToReveal, wizardStepToReveal } from "./form.js";
|
|
23
23
|
import { ACTION_PATH_SEPARATOR, PASSWORD_CONFIRMATION_INPUT, actionFormComponent, actionPath, isModalSubmitVisible, nestedActionContext, reportWizardProgress, wizardProgressStore } from "./modal-actions.js";
|
|
24
24
|
import { formatBytes, initials, interpolate, parseInterval, uniqueId } from "./utils/format.js";
|
|
25
25
|
import { CLOSE_NOTIFICATION_EVENT, FILAMENT_CLOSE_NOTIFICATION_EVENT, FlashNotificationTracker, NotificationCenter, OPEN_DATABASE_NOTIFICATIONS_EVENT, closeNotification, notificationTintStyles, onCloseNotification, onOpenDatabaseNotifications, openDatabaseNotifications } from "./notifications.js";
|
|
26
|
-
import { DEFAULT_ACTION_QUERY_KEYS, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, submitFormById, withoutDefaultActionQuery } from "./page-actions.js";
|
|
26
|
+
import { DEFAULT_ACTION_QUERY_KEYS, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, shouldResyncForm, submitFormById, withoutDefaultActionQuery } from "./page-actions.js";
|
|
27
27
|
import { isActionGroup } from "./schema/actions.js";
|
|
28
|
-
import { ActionRunner, CREATE_ANOTHER_ARGUMENT, actionEndpoint, bindsKeyBindings, confirmModalClose, createAnotherState, flattenActionGroup, groupMenuItems, guardModalUnload, iconButtonSize, isModalHiddenByChild, menuActionContext, modalFooterAlignment, parseDropdownPlacement, resolveActionSize, shouldConfirmModalClose, slideOverSide } from "./actions.js";
|
|
28
|
+
import { ActionRunner, CREATE_ANOTHER_ARGUMENT, actionEndpoint, bindsKeyBindings, confirmModalClose, createAnotherState, flattenActionGroup, groupMenuItems, guardModalUnload, iconButtonSize, isActionLoading, isActionProcessing, isModalHiddenByChild, menuActionContext, modalFooterAlignment, parseDropdownPlacement, resolveActionSize, shouldConfirmModalClose, slideOverSide } from "./actions.js";
|
|
29
29
|
import { AI_STREAM_REGISTRY_KEY, AiStreamController, StreamAnnouncer, parseEventStream, readEventStream } from "./ai-stream.js";
|
|
30
30
|
import { AI_COPILOT_REGISTRY_KEY, CopilotController, copilotBlocks } from "./ai-copilot.js";
|
|
31
31
|
import { analyticsAllowed, analyticsChangeColor, analyticsInitialTab, createAnalyticsTracker, startAnalytics, trackAnalyticsEvent } from "./analytics.js";
|
|
@@ -110,4 +110,4 @@ import { createLatestRequest } from "./utils/latest.js";
|
|
|
110
110
|
import { applyMask } from "./utils/mask.js";
|
|
111
111
|
import { DEFAULT_VIRTUALIZE_THRESHOLD, VIRTUAL_ESTIMATES, VirtualList, firstErroredItemIndex, hasNewErrors, virtualizeOptions } from "./virtual.js";
|
|
112
112
|
import { WIZARD_STEP_QUERY_KEY, completedStepIcon, initialWizardStep, persistWizardStep, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey } from "./wizard.js";
|
|
113
|
-
export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionRunner, AiStreamController, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CmsAutosave, ComponentDiscovery, ComponentRegistry, ConflictMonitor, CopilotController, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardEditor, DebugRecorder, EditorAttachments, EditorSuggestions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FileManagerController, FilterFormSync, FlashNotificationTracker, FormStore, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HelpdeskChatClient, HelpdeskInboxController, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconPickerSearch, ImageEditor, ItemMoveTracker, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanController, LABEL_SLOTS, LAZY_PROP, LazyComponentCache, LiveUpdates, LocaleFormatter, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, NOT_PROSE_CLASS, NotificationCenter, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeSubmitter, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageMethodError, PollScheduler, PresenceRoom, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RichEditorRemote, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_TOASTER_ID, ShortcutRegistry, SpreadsheetGrid, StandaloneComponentState, StreamAnnouncer, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TableSelection, TranslationManagerController, Translator, TreeController, USER_MENU_COMPONENT, UndoShortcuts, VIRTUAL_ESTIMATES, VirtualList, WIZARD_STEP_QUERY_KEY, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, customBlockNodeConfig, customColorClasses, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoShortcut, isValidShortcut, itemActionContext, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shouldChunkUpload, shouldConfirmModalClose, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, startAnalytics, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabKeyTarget, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
|
|
113
|
+
export { ACTION_PATH_SEPARATOR, ACTIVE_TAB_QUERY_KEY, AI_COPILOT_REGISTRY_KEY, AI_STREAM_REGISTRY_KEY, ALL_SELECTED_RECORDS_ARGUMENT, ActionRunner, AiStreamController, BOTTOM_NAVIGATION_SLOTS, BROADCAST_NOTIFICATION, BUILT_IN_COLORS, BUILT_IN_WIDGET_TYPES, CALENDAR_ARGUMENTS_KEY, CALENDAR_EVENT_DROP_ACTION, CALENDAR_EVENT_RESIZE_ACTION, CALENDAR_FETCH_EVENTS_ACTION, CALENDAR_REGISTRY_KEY, CLOSE_NOTIFICATION_EVENT, CMS_BLOCK_PREFIX, CMS_BUILT_IN_BLOCKS, CMS_FOOTER_KEY, CMS_FORM_KEY, CMS_HEADER_KEY, CMS_PAGE_COMPONENT, CMS_PREVIEW_DEVICES, CMS_PREVIEW_STORAGE_KEY, COMMANDS_COMPONENT, CONFLICT_ERROR_KEY, CONSTRAINT_PICKER_WIDTH_CLASSES, CONTAINER_BREAKPOINTS, CREATE_ANOTHER_ARGUMENT, CmsAutosave, ComponentDiscovery, ComponentRegistry, ConflictMonitor, CopilotController, DATABASE_NOTIFICATIONS_EVENT, DATABASE_NOTIFICATIONS_SENT, DEFAULT_ACTION_QUERY_KEYS, DEFAULT_LINK_PROTOCOLS, DEFAULT_VIRTUALIZE_THRESHOLD, DISCOVERY_FOLDERS, DashboardEditor, DebugRecorder, EditorAttachments, EditorSuggestions, FIELD_ACTION_PREFIX, FIELD_TYPES, FILAMENT_CLOSE_NOTIFICATION_EVENT, FILE_MANAGER_DRAG_TYPE, FILE_MANAGER_PICKER_REGISTRY_KEY, FILE_MANAGER_REGISTRY_KEY, FILTERS_FORM_WIDTH_CLASSES, FILTERS_MODAL_WIDTH_CLASSES, FILTERS_SIDEBAR_WIDTH_CLASSES, FileManagerController, FilterFormSync, FlashNotificationTracker, FormStore, GLOBAL_SEARCH_DEBOUNCE, GRID_MAX_COLUMNS, GRID_MIN_COLUMNS, HELPDESK_ACTIVITY_EVENT, HELPDESK_SHORTCUTS, HELPDESK_TYPING_MS, HelpdeskChatClient, HelpdeskInboxController, HttpError, IMAGE_EDITOR_ZOOM_STEP, ITEM_MOVE_ATTRIBUTE, IconPickerSearch, ImageEditor, ItemMoveTracker, KANBAN_NO_LANE, KANBAN_REGISTRY_KEY, KanbanController, LABEL_SLOTS, LAZY_PROP, LazyComponentCache, LiveUpdates, LocaleFormatter, MAX_DEBUG_REQUESTS, MERGE_TAG_TRIGGER, NOT_PROSE_CLASS, NotificationCenter, OPEN_DATABASE_NOTIFICATIONS_EVENT, OneTimeCodeSubmitter, PAGE_EXPIRED_STATUS, PALETTE_GROUP_ORDER, PANEL_TOAST_OFFSET, PASSWORD_CONFIRMATION_INPUT, POLL_HEADER, POLL_PROP, PREFETCH_CACHE_FOR, PRESENCE_STATE_WHISPER, PageMethodError, PollScheduler, PresenceRoom, RECORD_CHANGED_EVENT, RECORD_VERSION_INPUT, RELATION_MANAGERS_CONTENT_TAB, RELATION_QUERY_KEY, REMAINING_TEXT_SIZE_CLASSES, RichEditorRemote, SCHEMA_CONTRACT_VERSION, SELECTED_RECORDS_ARGUMENT, SEMANTIC_COLORS, SHORTCUT_IDS, SPREADSHEET_CLASSES, SPREADSHEET_ISSUE_MESSAGES, STACKED_TABLE_CLASSES, STARTER_KIT_TOASTER_ID, ShortcutRegistry, SpreadsheetGrid, StandaloneComponentState, StreamAnnouncer, TABLE_TOOLBAR_BUTTONS, TENANT_MENU_COMPONENT, TOOLBAR_COMMANDS, TRANSLATION_MANAGER_REGISTRY_KEY, TREE_REGISTRY_KEY, TableSelection, TranslationManagerController, Translator, TreeController, USER_MENU_COMPONENT, UndoShortcuts, VIRTUAL_ESTIMATES, VirtualList, WIZARD_STEP_QUERY_KEY, acquireChannel, actionEndpoint, actionFormComponent, actionFormParams, actionPath, actionsAccessSelectedRecords, actionsAlignmentClass, activeTableView, addActionJustify, addGroup, addRule, allToolbarButtons, analyticsAllowed, analyticsChangeColor, analyticsInitialTab, announceDatabaseNotificationsSent, appendRepeaterItem, applyAppearance, applyBodyAttributes, applyDocumentLocale, applyEditorActionResult, applyFormRefresh, applyMask, applyPanelColors, applyPanelFavicon, applyPanelTheme, applyPwaUpdate, applySchemaPatches, ariaSort, asHelpdeskActivity, attachKanbanPointer, attachToolbarKeyboard, beginTableLoading, bindUndo, bindingFromEvent, bindsKeyBindings, bottomNavigationItems, buildChartConfig, buildQuery, buildTableUrl, builderBlockCounts, builderItemLabel, builderItemSchema, builderItems, builderPickerMove, byteLength, cachedTableTotals, calendarActionContext, calendarIdentity, calendarOptions, calendarWallTime, callCmsAutosave, callPageMethod, canAddBuilderBlock, canEditImage, canEditImageName, canInstallPwa, canNestGroup, canSelectAllRecords, cancelChunkedUpload, chartColorVariable, chartFiltersUrl, checkSchemaContract, clearRichEditorExtensions, clientErrorNotification, cloneIndexedState, cloneRepeaterItem, cloneTreeNodes, closeNotification, cmsAspectClass, cmsBlockKey, cmsBlocks, cmsColumnsClass, cmsGridClass, cmsHeadTags, cmsLinkRel, cmsPayload, cmsPreviewFitsBeside, cmsPreviewOpensByDefault, cmsPreviewOpensOnLoad, cmsPreviewPaneWidth, cmsWidthClass, coerceSpreadsheetValue, collapsesLanguageSwitcher, collectFieldStatePaths, collectFields, colorAlpha, colorToHex, columnDraftChanged, columnGroupHeaderRow, columnManagerPosition, columnOrderChanged, columnOrderClasses, columnRegistryKey, columnSpanClasses, columnStartClasses, columnVisibilityClasses, commandLabel, commandPaletteItems, commandShortcutId, completedStepIcon, componentHasErrors, concurrencyLimiter, configureCharts, configureRealtime, confirmModalClose, conflictMessage, constraintPickerClasses, constraintPickerSections, containerColumnSpanClasses, containerGridColumnsClasses, copilotBlocks, countCodeLines, createAnalyticsTracker, createAnotherState, createCmsTranslator, createKanbanFiltersStore, createLatestRequest, createRule, createSchemaComponentContext, createStore, csrfHeader, cssAspectRatio, currencyDecimals, currentPageQuery, currentRecordVersion, currentSocketId, currentStarterKitPanel, customBlockNodeConfig, customColorClasses, dashboardMoveForKey, debounce, debugRecorder, defaultActionContext, defaultActionKey, defaultVisibleColumns, deferredComponentReference, deferredHasErrors, deletePath, deprecate, deprecationMessage, derived, detailsNodeConfigs, discoveryKey, distributePageFormErrors, dropTreeNode, editableImageName, effectiveErrorNotifications, endTableLoading, errorNotificationOutcome, extremePageLinks, fetchEditableImage, fetchStandaloneComponents, fieldActionComponent, fieldActionContext, fieldAria, fieldDomId, fieldIds, fieldMemory, fileAttachmentError, fileManagerAcceptAttribute, fileManagerAccepts, fileManagerErrorMessage, fileManagerExpiry, fileManagerSize, fileUploadAccept, fileUploadPaths, filesFromClipboard, filterBuilderBlocks, filterCommandPalette, filterFormComponents, filterQueryBuilderOptions, filterSelectColumnOptions, filterSuggestionItems, filterTenants, filtersAreDeferred, filtersCollapsible, filtersFormWidthClass, filtersPlacement, findAutofocusField, findConstraint, findFieldByPath, findGridContext, findOperator, findPageFormBlock, findStandalonePropName, findSuggestionMatch, firstErroredItemIndex, firstErrors, flattenActionGroup, flattenNavigationItems, flattenTreeStructure, flexItemClasses, flexLayoutClasses, floatingToolbarStyle, focusAutofocusField, focusMovedItem, focusTableSearch, focusToolbar, forgetFieldMemory, formActionsVisible, formIdPrefix, formIdentity, formRefreshFor, formatBytes, formatColor, formatKeyBinding, formatPhpDate, formatShortcut, fuzzyScore, getChartFormatters, getChartPlugins, getConflictForm, getEcho, getPageForm, getPath, getScriptData, getStoredAppearance, globalSearchDebounce, globalSearchStatus, globalSearchSuffix, gridColumnsClasses, gridContent, gridNodeConfigs, groupAt, groupBuilderBlocks, groupCustomBlocks, groupMenuItems, groupTableRows, groupTableViews, groupTriggerButton, guardModalUnload, hasActiveNavigationItem, hasCommandPalette, hasContainerBreakpoints, hasDevTools, hasMobilePreset, hasNewErrors, hasPath, hasRelationManagerTabs, hasRichEditorExtension, hasSlots, hasThemeSwitcher, hasTopbar, headingTag, helpdeskChatString, helpdeskFileSize, helpdeskSlaTone, highlightCode, highlightMarkConfig, htmlLabelToText, htmlToMarkdown, iconAlias, iconAliasOverride, iconButtonSize, iconGridMove, iconPickerPreview, iconSource, imageGeometry, indentCode, inertiaPost, inertiaReload, inertiaVisit, initialCollapsedGroups, initialTranslatableLocale, initialWizardStep, initializeAppearance, initials, insertBuilderItem, insertUploadedFile, inspectableProps, installErrorNotifications, installPrefetchInvalidation, installSpaUrlExceptions, installStarterKitRuntime, interpolate, invalidatePrefetchedPages, invalidateTableTotals, isActionGroup, isActionLoading, isActionProcessing, isAlfakitPage, isAllowedLinkUrl, isAppendingPagination, isCustomBlockResult, isCustomColorName, isCustomSvgIcon, isDeferredPlaceholder, isEditableTarget, isField, isFieldActionContext, isGroupedColumn, isHighlightedLanguage, isIconAlias, isImplicitSubmit, isIosSafari, isLazyPlaceholder, isLeavingVisit, isMacLike, isModalHiddenByChild, isModalSubmitVisible, isMutatingRequest, isNavigationItemActive, isOptionGroup, isPageFullySelected, isPartialFormPayload, isRealtimeEnabled, isRightToLeft, isSafeColor, isStandalone, isStandaloneComponent, isStarterKitPanel, isTableLoading, isToolbarGroup, isToolbarShortcut, isUndoShortcut, isValidShortcut, itemActionContext, joinPath, jsonEntries, jsonKind, jsonScalar, jsonSize, kanbanActiveFilters, kanbanCardPosition, kanbanCardsIn, kanbanInitials, kanbanMovePayload, kanbanRefusal, kanbanWipState, keepMoveButtonFocus, latestServerTiming, layoutColumnNames, layoutNodeGrows, layoutVisibilityClasses, lazyComponentCache, lazyComponents, leadExtensionConfig, limitedListItems, linkExtensionOptions, listTabIds, listTabUrl, listenForPageEvents, listenForRecordChanges, loadDeferredBadge, loadDeferredComponent, loadEditorImage, loadRichEditorExtensions, loadScript, loadStarterKitPanel, loadStyle, loadTableTotals, loadedStarterKitPanel, locateKanbanCard, logicalArrowKey, markRecordSubmitted, matchesKeyBinding, matchesShortcutStep, matchesUrlPattern, maxColumns, mentionNodeConfig, mentionText, menuActionContext, mergeAttributes, mergeChartOptions, mergeDeferredComponent, mergePolledComponents, mergeRefreshResponse, mergeStatePatch, mergeTagNodeConfig, mergeTagText, mobileCardLayout, mobileTable, modalFooterAlignment, modalTablePaging, modalTableQuery, modalTableSelected, moveColumn, moveColumnInManager, moveColumnTo, moveIndexedState, moveKanbanCard, moveListItem, moveRepeaterItem, moveTreeNode, navigationItemText, navigationItemUrl, nestedActionContext, newlineWithIndent, nextPageQuery, nextToolbarItem, normalizeRichEditorExtensions, normalizeRuleTree, notificationTintStyles, observeThemeChanges, onCloseNotification, onDatabaseNotificationsSent, onOpenDatabaseNotifications, onPageFormsChanged, onSaveConflict, oneTimeCodeDigits, openDatabaseNotifications, openDefaultAction, openRequestedStarterKitSearch, optimistic, optionText, orderColumnsBy, pageFlash, pageFormName, pageSelectionState, paginationTotal, paletteGroupKey, panelAppearance, panelUploadOptions, parentPath, parseAspectRatio, parseDropdownPlacement, parseEventStream, parseGridColumns, parseInterval, parseKeyBinding, parseServerTiming, parseTsv, performUndo, persistWizardStep, pickerFilterFormOptions, pollComponent, pollPageProps, pollScheduler, postFormWithProgress, prefetchTablePage, presenceInitials, prettyJson, previousPageQuery, primaryColumnName, promptPwaInstall, propsPollScheduler, pwaStore, queryBuilderInputType, queryBuilderOptions, readEventStream, readPersisted, realtimeHeaders, realtimeSettings, recordActionsAtStart, registerChartFormatters, registerChartPlugins, registerConflictForm, registerFormSubmitter, registerKeyBindings, registerPageForm, registerRichEditorExtensions, registerShortcut, registerStandaloneProp, registerStarterKitSearchShortcut, registerTablePersistence, relationGroupBadgeTarget, relationManagerBadgeTarget, relationManagerTabs, relationTabFromQuery, relationTabSlug, reloadExpiredPage, reloadOnExpiredPage, reloadPageProps, reloadPolledComponents, remainingTextSizeClass, rememberedCmsPreview, removeAllFilterIndicators, removeFilterIndicator, removeIndexedState, removeRepeaterItem, removeRule, reorderOffset, reorderTable, reorderedItemKeys, reorderingListsAllRecords, replaceComponentByKey, replacePlaceholder, reportRequestError, reportSaveConflict, reportSchemaContractMismatch, reportWizardProgress, reportedDeprecations, requestJson, requestStarterKitSearch, requestTableView, requiresFullPageLoad, reserveCmsPreviewSpace, resetChartRegistrations, resetDeprecations, resetPwa, resetRealtime, resetSchemaContractReports, resetStarterKitPanels, resetTableTotals, resizableImageAttributes, resizableImageOptions, resolveActionSize, resolveAppearance, resolveChartCallbacks, resolveContainerStatePath, resolveCssColor, resolveDeferredBadge, resolveDeferredGroupBadge, resolveEcho, resolveErrorNotification, resolveFirst, resolveFloatingToolbar, resolveItemAction, resolveLazyComponents, resolveNavigation, resolvePanelNavigation, resolvePartialProps, resolveRequestErrorNotification, resolveStatePath, resolveStickyOffset, resolveToastPosition, revealAutofocusField, router, runEditorCommands, runPageMethod, runsItemActionOnServer, saveColumnOrder, saveShortcutOverrides, saveSpreadsheetChanges, scheduleAutofocus, schemaComponentNames, schemaContractMajor, schemaContractMismatchMessage, schemaGapClass, scorePaletteItem, searchJson, searchTableColumnOptions, selectAllState, selectColumnEmptyMessage, selectPlural, selectedRecordsArguments, setAppearance, setCombinator, setIconAliases, setPath, setRecordVersion, setRequestErrorReporter, setTextColor, shortcutOverlayGroups, shortcutSteps, shortcuts, shouldChunkUpload, shouldConfirmModalClose, shouldResyncForm, shownRecordKeys, showsLanguageSwitcher, showsTableToolbar, sidebarDefaultOpen, sidebarWidthStyle, skeletonRowCount, slideOverSide, sliderBehavior, sliderBlocksTap, sliderBounds, sliderDirection, sliderFillSections, sliderFillStyle, sliderFromPrimitive, sliderHasTooltips, sliderNextValues, sliderPercent, sliderPips, sliderPrimitive, sliderShift, sliderShowsTooltip, sliderSnap, sliderState, sliderToPrimitive, sliderValueAt, sliderValues, slotAlignmentClass, slotDataMatches, slotItems, smallMarkConfig, splitClasses, splitPath, spreadsheetAnnouncement, spreadsheetAria, spreadsheetCellClass, spreadsheetCellId, spreadsheetCellKey, spreadsheetCellKind, spreadsheetColumns, spreadsheetRows, spreadsheetSelectionSize, stackClasses, stackedCellClasses, stackedImageStyle, standaloneDirection, standalonePageSchema, standalonePanelSchema, startAnalytics, startPwa, startSliderRangeDrag, startTableReordering, startUndoCountdown, starterKitBreadcrumbsFromProps, starterKitNavigation, starterKitNavigations, starterKitWidgets, starterKitWidgetsPage, starterKitWidgetsPanel, stickyCollisionPadding, stopTableReordering, submitFormById, subscribeToNotifications, subscribeToPush, subscriptMarkConfig, superscriptMarkConfig, switchLocale, syncStarterKitPage, syncToolbarTabStops, t, tabFromQuery, tabKeyTarget, tabQueryValue, tabToReveal, tableColumnAlignmentClass, tableColumnCells, tableLoadingStore, tableQueryKey, tableTotalsFailed, tableTotalsStore, tableViewError, tableViewFollowUp, tableViewUrl, tenantNameText, textAlignExtensionConfig, textColorMarkConfig, timeInputStep, toAsciiDigits, toEditorDocument, toStarterKitBreadcrumbs, toStarterKitNavGroups, toTsv, toggleButtonsNext, toggleButtonsSelected, toggleCollapsedGroup, toggleModalTableKey, toggleVisibleColumn, toolCommand, toolbarButtonLabel, toolbarCommands, toolbarItems, toolbarPanel, trackAnalyticsEvent, transformImage, translatableLocaleField, translatableLocalesWithErrors, translationCellValue, translator, treeParentKeys, treeSubtreeHeight, triggerButtonView, undoShortcuts, uniqueId, unsubscribeFromPush, updateGroup, updateRule, updateTableCell, uploadPageMethodFiles, uploadTemporaryFile, uploadWithProgress, uploadedFileLinks, urlBase64ToUint8Array, usesDefaultImageStack, virtualizeOptions, visibleColumns, visiblePresenceMembers, visibleTreeRows, visitTable, visitTableView, wallClockNow, watchPageProps, whenIdle, whenVisible, widgetPollTarget, widgetRegistryKeys, withAlpha, withColorAlpha, withDeferredTabBadges, withEcho, withItemActionState, withTableTotals, withoutDefaultActionQuery, withoutRequired, wizardProgressStore, wizardRequestedStepIndex, wizardStepFieldPaths, wizardStepQueryKey, wizardStepToReveal, writePersisted };
|
package/dist/page-actions.d.ts
CHANGED
|
@@ -53,6 +53,14 @@ export declare function formRefreshFor(flash: Pick<AlfakitFlash, 'alfakitFormRef
|
|
|
53
53
|
* their errors); every other field keeps what the user typed.
|
|
54
54
|
*/
|
|
55
55
|
export declare function applyFormRefresh(store: FormStore, state: Record<string, unknown>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Whether a page form reloads from the server's new schema after a visit it did not submit
|
|
58
|
+
* itself: another action (one embedded in a field, a table row in a relation manager)
|
|
59
|
+
* succeeded while the form held no edits. Its components may show server state that the
|
|
60
|
+
* action changed (a status, which actions are offered); with unsaved edits the form keeps
|
|
61
|
+
* what the user typed.
|
|
62
|
+
*/
|
|
63
|
+
export declare function shouldResyncForm(flash: Pick<AlfakitFlash, 'alfakitAction'>, store: Pick<FormStore, 'isDirty'>): boolean;
|
|
56
64
|
/** Whether a page form shows its buttons: always, except before a wizard form's last step. */
|
|
57
65
|
export declare function formActionsVisible(block: Pick<FormBlock, 'wizard'>, progress: WizardProgress | null | undefined): boolean;
|
|
58
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-actions.d.ts","names":[],"sources":["../src/page-actions.ts"],"mappings":";;;;;;;;;;;;;;qBAkBa;;wBAcG,qBACd,MAAM,KAAK,sBACX,eAAe,sBACd;;;;;;wBAgBa,iBACd,MAAM,KAAK,mDACX;;wBAiBc,0BAA0B;iBAiBzB;;EAEf;;;;;;;wBAQc,kBACd,MAAM,wBACN,QAAQ,qBACR,UAAU,QAAQ,cAAc,SAAS,yBAAyB;KA6B/D,iBAAiB,QAAQ,cAAc,SAAS,yBAAyB;;;;;;wBAS9D,sBAAsB,mBAAmB,QAAQ;;;;;;wBAejD,eAAe,QAAQ,cAAc,SAAS;;wBAiB9C,eACd,OAAO,KAAK,qCACZ,oBACC;;;;;wBAUa,iBAAiB,OAAO,WAAW,OAAO;;
|
|
1
|
+
{"version":3,"file":"page-actions.d.ts","names":[],"sources":["../src/page-actions.ts"],"mappings":";;;;;;;;;;;;;;qBAkBa;;wBAcG,qBACd,MAAM,KAAK,sBACX,eAAe,sBACd;;;;;;wBAgBa,iBACd,MAAM,KAAK,mDACX;;wBAiBc,0BAA0B;iBAiBzB;;EAEf;;;;;;;wBAQc,kBACd,MAAM,wBACN,QAAQ,qBACR,UAAU,QAAQ,cAAc,SAAS,yBAAyB;KA6B/D,iBAAiB,QAAQ,cAAc,SAAS,yBAAyB;;;;;;wBAS9D,sBAAsB,mBAAmB,QAAQ;;;;;;wBAejD,eAAe,QAAQ,cAAc,SAAS;;wBAiB9C,eACd,OAAO,KAAK,qCACZ,oBACC;;;;;wBAUa,iBAAiB,OAAO,WAAW,OAAO;;;;;;;;wBA2B1C,iBACd,OAAO,KAAK,gCACZ,OAAO,KAAK;;wBAQE,mBACd,OAAO,KAAK,sBACZ,UAAU;;;;;;wBAcI,gBACd,cACA,kBACA,kBACA,OAAO"}
|
package/dist/page-actions.js
CHANGED
|
@@ -127,6 +127,16 @@ function applyFormRefresh(store, state) {
|
|
|
127
127
|
};
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Whether a page form reloads from the server's new schema after a visit it did not submit
|
|
132
|
+
* itself: another action (one embedded in a field, a table row in a relation manager)
|
|
133
|
+
* succeeded while the form held no edits. Its components may show server state that the
|
|
134
|
+
* action changed (a status, which actions are offered); with unsaved edits the form keeps
|
|
135
|
+
* what the user typed.
|
|
136
|
+
*/
|
|
137
|
+
function shouldResyncForm(flash, store) {
|
|
138
|
+
return flash.alfakitAction?.status === "success" && !store.isDirty;
|
|
139
|
+
}
|
|
130
140
|
/** Whether a page form shows its buttons: always, except before a wizard form's last step. */
|
|
131
141
|
function formActionsVisible(block, progress) {
|
|
132
142
|
if (!block.wizard || !progress || progress.count === 0) return true;
|
|
@@ -153,6 +163,6 @@ function chartFiltersUrl(href, queryKey, widgetId, state) {
|
|
|
153
163
|
return /^https?:\/\//.test(href) ? url.toString() : relative;
|
|
154
164
|
}
|
|
155
165
|
//#endregion
|
|
156
|
-
export { DEFAULT_ACTION_QUERY_KEYS, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, submitFormById, withoutDefaultActionQuery };
|
|
166
|
+
export { DEFAULT_ACTION_QUERY_KEYS, applyFormRefresh, chartFiltersUrl, defaultActionContext, defaultActionKey, formActionsVisible, formRefreshFor, openDefaultAction, registerFormSubmitter, shouldResyncForm, submitFormById, withoutDefaultActionQuery };
|
|
157
167
|
|
|
158
168
|
//# sourceMappingURL=page-actions.js.map
|
package/dist/page-actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-actions.js","names":[],"sources":["../src/page-actions.ts"],"sourcesContent":["import type { ActionContext } from './actions'\nimport type { AlfakitFlash } from './flash'\nimport type { FormStore } from './form'\nimport type { WizardProgress } from './modal-actions'\nimport type { ActionSchema } from './schema/actions'\nimport type { FormBlock } from './schema/form'\nimport type { DefaultActionSchema, PageSchema } from './schema/panel'\nimport { setPath } from './utils/path'\n\n/**\n * Page-level runtime shared by the renderers: the default action opened after a page\n * hydrated, page forms submitted from buttons elsewhere (`Action::formId()`), form data\n * refreshed by the server (`refreshFormData()`), and the filters of chart widgets.\n */\n\n// ---------------------------------------------------------------- Default actions\n\n/** Query-string keys that ask a page to open an action (`?tableAction=edit&tableActionRecord=1`). */\nexport const DEFAULT_ACTION_QUERY_KEYS = [\n 'defaultAction',\n 'defaultActionArguments',\n 'defaultActionContext',\n 'tableAction',\n 'tableActionRecord',\n 'tableActionArguments',\n // Filament's deep-link keys (`?action=sendEmail&actionArguments[source]=email`).\n 'action',\n 'actionArguments',\n 'actionComponent',\n] as const\n\n/** The action context the default action opens in. */\nexport function defaultActionContext(\n page: Pick<PageSchema, 'token'>,\n defaultAction: DefaultActionSchema,\n): ActionContext {\n return {\n token: page.token,\n component: defaultAction.component,\n ...(defaultAction.record !== undefined && defaultAction.record !== null\n ? { record: defaultAction.record }\n : {}),\n ...(defaultAction.arguments ? { arguments: defaultAction.arguments } : {}),\n }\n}\n\n/**\n * Identifies \"this default action on this page\". A page re-rendered after the action ran\n * (the server redirects back) still names it, so renderers remember the key they opened\n * and open it again only for another page or another action.\n */\nexport function defaultActionKey(\n page: Pick<PageSchema, 'class' | 'record' | 'defaultAction'>,\n pathname: string = typeof window !== 'undefined' ? window.location.pathname : '',\n): string | null {\n const action = page.defaultAction\n\n if (!action) return null\n\n return JSON.stringify([\n page.class,\n page.record ?? null,\n pathname,\n action.component,\n action.action.name,\n action.record ?? null,\n ])\n}\n\n/** The URL without the query-string keys that open an action (bracketed forms included). */\nexport function withoutDefaultActionQuery(href: string): string {\n const url = new URL(href, 'http://localhost')\n const keys = [...url.searchParams.keys()]\n\n for (const key of keys) {\n const base = key.replace(/\\[.*$/, '')\n\n if ((DEFAULT_ACTION_QUERY_KEYS as readonly string[]).includes(base)) {\n url.searchParams.delete(key)\n }\n }\n\n const relative = `${url.pathname}${url.search}${url.hash}`\n\n return /^https?:\\/\\//.test(href) ? url.toString() : relative\n}\n\nexport interface DefaultActionOpener {\n /** Key of the default action opened last (see `defaultActionKey()`). */\n opened: string | null\n}\n\n/**\n * Open the page's default action once per page: call after every page render. The query\n * string that asked for it is removed (without a visit), so later redirects back to the\n * page don't open it again. Returns whether it was opened now.\n */\nexport function openDefaultAction(\n page: PageSchema | undefined,\n opener: DefaultActionOpener,\n trigger: (action: ActionSchema, context: ActionContext) => void | Promise<void>,\n): boolean {\n if (!page?.defaultAction) {\n opener.opened = null\n\n return false\n }\n\n const key = defaultActionKey(page)\n\n if (key === null || key === opener.opened) return false\n\n opener.opened = key\n\n if (typeof window !== 'undefined') {\n const clean = withoutDefaultActionQuery(window.location.href)\n\n if (clean !== window.location.href) {\n window.history.replaceState(window.history.state, '', clean)\n }\n }\n\n void trigger(page.defaultAction.action, defaultActionContext(page, page.defaultAction))\n\n return true\n}\n\n// ---------------------------------------------------------------- Page form submitters\n\ntype FormSubmitter = (action: ActionSchema, context: ActionContext) => void | Promise<void>\n\nconst formSubmitters = new Map<string, FormSubmitter>()\n\n/**\n * A page form publishes how it submits itself (with its state, processing flag and\n * error handling), so buttons with `formId()` elsewhere on the page can use it.\n * `form` is the page form; named forms register as `form:{name}`.\n */\nexport function registerFormSubmitter(component: string, submit: FormSubmitter): () => void {\n formSubmitters.set(component, submit)\n\n return () => {\n if (formSubmitters.get(component) === submit) {\n formSubmitters.delete(component)\n }\n }\n}\n\n/**\n * Submit the form an action's `formId` names. Returns false when the action has no\n * `formId`, is a plain link, or no such form is on the page (the caller then runs the\n * action normally).\n */\nexport function submitFormById(action: ActionSchema, context: ActionContext): boolean {\n if (!action.formId || (action.url && !action.hasAction)) return false\n\n const submit =\n formSubmitters.get(action.formId) ??\n (action.formId.startsWith('form:') ? undefined : formSubmitters.get(`form:${action.formId}`))\n\n if (!submit) return false\n\n void submit(action, context)\n\n return true\n}\n\n// ---------------------------------------------------------------- Form refresh\n\n/** The paths `refreshFormData()` sent for this form, or null. */\nexport function formRefreshFor(\n flash: Pick<AlfakitFlash, 'alfakitFormRefresh'>,\n component: string,\n): Record<string, unknown> | null {\n const refresh = flash.alfakitFormRefresh\n\n return refresh && refresh.component === component && refresh.state ? refresh.state : null\n}\n\n/**\n * Copy refreshed values into a form store. The paths stop counting as edited (and lose\n * their errors); every other field keeps what the user typed.\n */\nexport function applyFormRefresh(store: FormStore, state: Record<string, unknown>): void {\n const paths = Object.keys(state)\n\n if (paths.length === 0) return\n\n store.store.set((current) => {\n let values = current.values\n const dirty = new Set(current.dirty)\n const errors = { ...current.errors }\n\n for (const path of paths) {\n values = setPath(values, path, state[path])\n dirty.delete(path)\n delete errors[path]\n }\n\n return { ...current, values, dirty, errors }\n })\n}\n\n// ---------------------------------------------------------------- Wizard pages\n\n/** Whether a page form shows its buttons: always, except before a wizard form's last step. */\nexport function formActionsVisible(\n block: Pick<FormBlock, 'wizard'>,\n progress: WizardProgress | null | undefined,\n): boolean {\n if (!block.wizard || !progress || progress.count === 0) return true\n\n return progress.step >= progress.count - 1\n}\n\n// ---------------------------------------------------------------- Chart filters\n\n/**\n * The URL with a chart widget's filter values in the query string\n * (`chartFilters[{id}][field]=value`, lists as `[field][]`). The widget's previous values\n * are replaced; empty values are left out; other query values stay.\n */\nexport function chartFiltersUrl(\n href: string,\n queryKey: string,\n widgetId: string,\n state: Record<string, unknown> | null,\n): string {\n const url = new URL(href, 'http://localhost')\n const prefix = `${queryKey}[${widgetId}]`\n\n for (const key of [...url.searchParams.keys()]) {\n if (key.startsWith(prefix)) url.searchParams.delete(key)\n }\n\n for (const [field, value] of Object.entries(state ?? {})) {\n if (value === null || value === undefined || value === '') continue\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item !== null && item !== undefined)\n url.searchParams.append(`${prefix}[${field}][]`, String(item))\n }\n\n continue\n }\n\n url.searchParams.set(\n `${prefix}[${field}]`,\n typeof value === 'boolean' ? (value ? '1' : '0') : String(value),\n )\n }\n\n const relative = `${url.pathname}${url.search}${url.hash}`\n\n return /^https?:\\/\\//.test(href) ? url.toString() : relative\n}\n"],"mappings":";;;;;;;;AAkBA,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;AACF;;AAGA,SAAgB,qBACd,MACA,eACe;CACf,OAAO;EACL,OAAO,KAAK;EACZ,WAAW,cAAc;EACzB,GAAI,cAAc,WAAW,KAAA,KAAa,cAAc,WAAW,OAC/D,EAAE,QAAQ,cAAc,OAAO,IAC/B,CAAC;EACL,GAAI,c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AM,kBAAkB;CAC5C,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS;CAEvC,KAAK,MAAM,OAAO,CAAC,GAAG,IAAI,aAAa,KAAK,CAAC,GAC3C,IAAI,IAAI,WAAW,MAAM,GAAG,IAAI,aAAa,OAAO,GAAG;CAGzD,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,SAAS,CAAC,CAAC,GAAG;EACxD,IAAI,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU,IAAI;EAE3D,IAAI,MAAM,QAAQ,KAAK,GAAG;GACxB,KAAK,MAAM,QAAQ,OACjB,IAAI,SAAS,QAAQ,SAAS,KAAA,GAC5B,IAAI,aAAa,OAAO,GAAG,OAAO,GAAG,MAAM,MAAM,OAAO,IAAI,CAAC;GAGjE;EACF;EAEA,IAAI,aAAa,IACf,GAAG,OAAO,GAAG,MAAM,IACnB,OAAO,UAAU,YAAa,QAAQ,MAAM,MAAO,OAAO,KAAK,CACjE;CACF;CAEA,MAAM,WAAW,GAAG,IAAI,WAAW,IAAI,SAAS,IAAI;CAEpD,OAAO,eAAe,KAAK,IAAI,IAAI,IAAI,SAAS,IAAI;AACtD"}
|
|
1
|
+
{"version":3,"file":"page-actions.js","names":[],"sources":["../src/page-actions.ts"],"sourcesContent":["import type { ActionContext } from './actions'\nimport type { AlfakitFlash } from './flash'\nimport type { FormStore } from './form'\nimport type { WizardProgress } from './modal-actions'\nimport type { ActionSchema } from './schema/actions'\nimport type { FormBlock } from './schema/form'\nimport type { DefaultActionSchema, PageSchema } from './schema/panel'\nimport { setPath } from './utils/path'\n\n/**\n * Page-level runtime shared by the renderers: the default action opened after a page\n * hydrated, page forms submitted from buttons elsewhere (`Action::formId()`), form data\n * refreshed by the server (`refreshFormData()`), and the filters of chart widgets.\n */\n\n// ---------------------------------------------------------------- Default actions\n\n/** Query-string keys that ask a page to open an action (`?tableAction=edit&tableActionRecord=1`). */\nexport const DEFAULT_ACTION_QUERY_KEYS = [\n 'defaultAction',\n 'defaultActionArguments',\n 'defaultActionContext',\n 'tableAction',\n 'tableActionRecord',\n 'tableActionArguments',\n // Filament's deep-link keys (`?action=sendEmail&actionArguments[source]=email`).\n 'action',\n 'actionArguments',\n 'actionComponent',\n] as const\n\n/** The action context the default action opens in. */\nexport function defaultActionContext(\n page: Pick<PageSchema, 'token'>,\n defaultAction: DefaultActionSchema,\n): ActionContext {\n return {\n token: page.token,\n component: defaultAction.component,\n ...(defaultAction.record !== undefined && defaultAction.record !== null\n ? { record: defaultAction.record }\n : {}),\n ...(defaultAction.arguments ? { arguments: defaultAction.arguments } : {}),\n }\n}\n\n/**\n * Identifies \"this default action on this page\". A page re-rendered after the action ran\n * (the server redirects back) still names it, so renderers remember the key they opened\n * and open it again only for another page or another action.\n */\nexport function defaultActionKey(\n page: Pick<PageSchema, 'class' | 'record' | 'defaultAction'>,\n pathname: string = typeof window !== 'undefined' ? window.location.pathname : '',\n): string | null {\n const action = page.defaultAction\n\n if (!action) return null\n\n return JSON.stringify([\n page.class,\n page.record ?? null,\n pathname,\n action.component,\n action.action.name,\n action.record ?? null,\n ])\n}\n\n/** The URL without the query-string keys that open an action (bracketed forms included). */\nexport function withoutDefaultActionQuery(href: string): string {\n const url = new URL(href, 'http://localhost')\n const keys = [...url.searchParams.keys()]\n\n for (const key of keys) {\n const base = key.replace(/\\[.*$/, '')\n\n if ((DEFAULT_ACTION_QUERY_KEYS as readonly string[]).includes(base)) {\n url.searchParams.delete(key)\n }\n }\n\n const relative = `${url.pathname}${url.search}${url.hash}`\n\n return /^https?:\\/\\//.test(href) ? url.toString() : relative\n}\n\nexport interface DefaultActionOpener {\n /** Key of the default action opened last (see `defaultActionKey()`). */\n opened: string | null\n}\n\n/**\n * Open the page's default action once per page: call after every page render. The query\n * string that asked for it is removed (without a visit), so later redirects back to the\n * page don't open it again. Returns whether it was opened now.\n */\nexport function openDefaultAction(\n page: PageSchema | undefined,\n opener: DefaultActionOpener,\n trigger: (action: ActionSchema, context: ActionContext) => void | Promise<void>,\n): boolean {\n if (!page?.defaultAction) {\n opener.opened = null\n\n return false\n }\n\n const key = defaultActionKey(page)\n\n if (key === null || key === opener.opened) return false\n\n opener.opened = key\n\n if (typeof window !== 'undefined') {\n const clean = withoutDefaultActionQuery(window.location.href)\n\n if (clean !== window.location.href) {\n window.history.replaceState(window.history.state, '', clean)\n }\n }\n\n void trigger(page.defaultAction.action, defaultActionContext(page, page.defaultAction))\n\n return true\n}\n\n// ---------------------------------------------------------------- Page form submitters\n\ntype FormSubmitter = (action: ActionSchema, context: ActionContext) => void | Promise<void>\n\nconst formSubmitters = new Map<string, FormSubmitter>()\n\n/**\n * A page form publishes how it submits itself (with its state, processing flag and\n * error handling), so buttons with `formId()` elsewhere on the page can use it.\n * `form` is the page form; named forms register as `form:{name}`.\n */\nexport function registerFormSubmitter(component: string, submit: FormSubmitter): () => void {\n formSubmitters.set(component, submit)\n\n return () => {\n if (formSubmitters.get(component) === submit) {\n formSubmitters.delete(component)\n }\n }\n}\n\n/**\n * Submit the form an action's `formId` names. Returns false when the action has no\n * `formId`, is a plain link, or no such form is on the page (the caller then runs the\n * action normally).\n */\nexport function submitFormById(action: ActionSchema, context: ActionContext): boolean {\n if (!action.formId || (action.url && !action.hasAction)) return false\n\n const submit =\n formSubmitters.get(action.formId) ??\n (action.formId.startsWith('form:') ? undefined : formSubmitters.get(`form:${action.formId}`))\n\n if (!submit) return false\n\n void submit(action, context)\n\n return true\n}\n\n// ---------------------------------------------------------------- Form refresh\n\n/** The paths `refreshFormData()` sent for this form, or null. */\nexport function formRefreshFor(\n flash: Pick<AlfakitFlash, 'alfakitFormRefresh'>,\n component: string,\n): Record<string, unknown> | null {\n const refresh = flash.alfakitFormRefresh\n\n return refresh && refresh.component === component && refresh.state ? refresh.state : null\n}\n\n/**\n * Copy refreshed values into a form store. The paths stop counting as edited (and lose\n * their errors); every other field keeps what the user typed.\n */\nexport function applyFormRefresh(store: FormStore, state: Record<string, unknown>): void {\n const paths = Object.keys(state)\n\n if (paths.length === 0) return\n\n store.store.set((current) => {\n let values = current.values\n const dirty = new Set(current.dirty)\n const errors = { ...current.errors }\n\n for (const path of paths) {\n values = setPath(values, path, state[path])\n dirty.delete(path)\n delete errors[path]\n }\n\n return { ...current, values, dirty, errors }\n })\n}\n\n/**\n * Whether a page form reloads from the server's new schema after a visit it did not submit\n * itself: another action (one embedded in a field, a table row in a relation manager)\n * succeeded while the form held no edits. Its components may show server state that the\n * action changed (a status, which actions are offered); with unsaved edits the form keeps\n * what the user typed.\n */\nexport function shouldResyncForm(\n flash: Pick<AlfakitFlash, 'alfakitAction'>,\n store: Pick<FormStore, 'isDirty'>,\n): boolean {\n return flash.alfakitAction?.status === 'success' && !store.isDirty\n}\n\n// ---------------------------------------------------------------- Wizard pages\n\n/** Whether a page form shows its buttons: always, except before a wizard form's last step. */\nexport function formActionsVisible(\n block: Pick<FormBlock, 'wizard'>,\n progress: WizardProgress | null | undefined,\n): boolean {\n if (!block.wizard || !progress || progress.count === 0) return true\n\n return progress.step >= progress.count - 1\n}\n\n// ---------------------------------------------------------------- Chart filters\n\n/**\n * The URL with a chart widget's filter values in the query string\n * (`chartFilters[{id}][field]=value`, lists as `[field][]`). The widget's previous values\n * are replaced; empty values are left out; other query values stay.\n */\nexport function chartFiltersUrl(\n href: string,\n queryKey: string,\n widgetId: string,\n state: Record<string, unknown> | null,\n): string {\n const url = new URL(href, 'http://localhost')\n const prefix = `${queryKey}[${widgetId}]`\n\n for (const key of [...url.searchParams.keys()]) {\n if (key.startsWith(prefix)) url.searchParams.delete(key)\n }\n\n for (const [field, value] of Object.entries(state ?? {})) {\n if (value === null || value === undefined || value === '') continue\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (item !== null && item !== undefined)\n url.searchParams.append(`${prefix}[${field}][]`, String(item))\n }\n\n continue\n }\n\n url.searchParams.set(\n `${prefix}[${field}]`,\n typeof value === 'boolean' ? (value ? '1' : '0') : String(value),\n )\n }\n\n const relative = `${url.pathname}${url.search}${url.hash}`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
252
|
hasChanges: boolean;
|
|
253
253
|
previewUrl: string | null;
|
|
254
|
+
/** The record's version after the draft was stored, when the editor's was still current. */
|
|
255
|
+
recordVersion?: string | null;
|
|
254
256
|
}
|
|
255
257
|
export interface CmsPageProps {
|
|
256
258
|
cms: CmsPayload;
|
package/dist/schema/cms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms.d.ts","names":[],"sources":["../../src/schema/cms.ts"],"mappings":";;;;;;;;iBASiB;EACf;EACA;EACA;;;iBAIe;EACf;EACA;EACA;;;iBAIe,eAAe,QAAQ;EACtC;EACA;EACA,MAAM;;iBAGS;EACf;EACA;EACA;EACA,eAAe;EACf,iBAAiB;EACjB,OAAO;EACP;;iBAGe;;EAEf;EACA;;iBAGe;EACf,OAAO;EACP;EACA;;iBAGe;EACf;EACA;EACA,QAAQ;;iBAGO;EACf;EACA;EACA,eAAe;EACf,iBAAiB;EACjB;;iBAGe;;EAEf;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,OAAO;;iBAGQ;EACf;EACA;IAAS;IAAkB;;;iBAGZ;EACf;EACA;EACA;EACA,QAAQ;;iBAGO;EACf;EACA,OAAO;;YAGG;iBAEK;EACf;IACE;;IAEA;IACA;;EAEF;EACA,aAAa;;iBAGE;EACf;EACA;IAAW,QAAQ;;;iBAGJ;EACf;EACA;;EAEA;;EAEA,SAAS;;iBAGM;;EAEf;;EAEA,QAAQ;;;iBAIO;EACf,MAAM;EACN,aAAa;EACb,OAAO;EACP,SAAS;EACT,kBAAkB;EAClB,UAAU;EACV,KAAK;EACL,cAAc;EACd,OAAO;EACP,SAAS;EACT,MAAM;EACN,SAAS;;iBAGM;EACf;EACA;EACA;EACA;EACA,WAAW;EACX,SAAS;EACT;IAAc;IAAkB;;;EAEhC;;iBAGe;EACf;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,KAAK;;iBAGU;EACf;EACA;;EAEA;EACA;;EAEA;;EAEA;EACA,UAAU;;iBAGK;EACf;EACA;EACA,OAAO;;iBAGQ;EACf;EACA;EACA;EACA;EACA;EACA;IAAW;IAAc;IAAe;IAAa;;;;iBAItC;EACf,MAAM;EACN,OAAO,eAAe;EACtB,MAAM;;EAEN;;EAEA,QAAQ;;EAER;;EAEA,cAAc;;iBAGC;EACf;;EAEA;EACA;EACA;;;;;;iBAOe;EACf;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA,SAAS;;EAET,gBAAgB;;EAEhB,UAAU;;;iBAIK;EACf;;EAEA;EACA;;;iBAIe;EACf;EACA;EACA;;iBAGe;EACf,KAAK"}
|
|
1
|
+
{"version":3,"file":"cms.d.ts","names":[],"sources":["../../src/schema/cms.ts"],"mappings":";;;;;;;;iBASiB;EACf;EACA;EACA;;;iBAIe;EACf;EACA;EACA;;;iBAIe,eAAe,QAAQ;EACtC;EACA;EACA,MAAM;;iBAGS;EACf;EACA;EACA;EACA,eAAe;EACf,iBAAiB;EACjB,OAAO;EACP;;iBAGe;;EAEf;EACA;;iBAGe;EACf,OAAO;EACP;EACA;;iBAGe;EACf;EACA;EACA,QAAQ;;iBAGO;EACf;EACA;EACA,eAAe;EACf,iBAAiB;EACjB;;iBAGe;;EAEf;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,OAAO;;iBAGQ;EACf;EACA;IAAS;IAAkB;;;iBAGZ;EACf;EACA;EACA;EACA,QAAQ;;iBAGO;EACf;EACA,OAAO;;YAGG;iBAEK;EACf;IACE;;IAEA;IACA;;EAEF;EACA,aAAa;;iBAGE;EACf;EACA;IAAW,QAAQ;;;iBAGJ;EACf;EACA;;EAEA;;EAEA,SAAS;;iBAGM;;EAEf;;EAEA,QAAQ;;;iBAIO;EACf,MAAM;EACN,aAAa;EACb,OAAO;EACP,SAAS;EACT,kBAAkB;EAClB,UAAU;EACV,KAAK;EACL,cAAc;EACd,OAAO;EACP,SAAS;EACT,MAAM;EACN,SAAS;;iBAGM;EACf;EACA;EACA;EACA;EACA,WAAW;EACX,SAAS;EACT;IAAc;IAAkB;;;EAEhC;;iBAGe;EACf;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR,aAAa;EACb,YAAY;EACZ,KAAK;;iBAGU;EACf;EACA;;EAEA;EACA;;EAEA;;EAEA;EACA,UAAU;;iBAGK;EACf;EACA;EACA,OAAO;;iBAGQ;EACf;EACA;EACA;EACA;EACA;EACA;IAAW;IAAc;IAAe;IAAa;;;;iBAItC;EACf,MAAM;EACN,OAAO,eAAe;EACtB,MAAM;;EAEN;;EAEA,QAAQ;;EAER;;EAEA,cAAc;;iBAGC;EACf;;EAEA;EACA;EACA;;;;;;iBAOe;EACf;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA,SAAS;;EAET,gBAAgB;;EAEhB,UAAU;;;iBAIK;EACf;;EAEA;EACA;;;iBAIe;EACf;EACA;EACA;;EAEA;;iBAGe;EACf,KAAK"}
|
|
@@ -626,6 +626,11 @@ export interface FieldsetSchema extends BaseComponent {
|
|
|
626
626
|
}
|
|
627
627
|
export interface TabSchema extends BaseComponent {
|
|
628
628
|
type: 'Tab';
|
|
629
|
+
/**
|
|
630
|
+
* The tab's readable value in the query string when its tabs `persistTabInQueryString()`:
|
|
631
|
+
* its `id()`, explicit `key()` or label slug (`?tab=billing-address`).
|
|
632
|
+
*/
|
|
633
|
+
queryValue?: string;
|
|
629
634
|
icon?: IconName;
|
|
630
635
|
iconPosition?: IconPosition;
|
|
631
636
|
badge?: string | number;
|