@wix/bex-core 2.387.0 → 2.389.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/assets/locale/messages_ar.json +3 -3
- package/dist/cjs/assets/locale/messages_bg.json +3 -3
- package/dist/cjs/assets/locale/messages_ca.json +3 -3
- package/dist/cjs/assets/locale/messages_cs.json +10 -10
- package/dist/cjs/assets/locale/messages_da.json +10 -10
- package/dist/cjs/assets/locale/messages_de.json +10 -10
- package/dist/cjs/assets/locale/messages_el.json +3 -3
- package/dist/cjs/assets/locale/messages_en.json +3 -3
- package/dist/cjs/assets/locale/messages_es.json +10 -10
- package/dist/cjs/assets/locale/messages_fi.json +3 -3
- package/dist/cjs/assets/locale/messages_fr.json +10 -10
- package/dist/cjs/assets/locale/messages_he.json +3 -3
- package/dist/cjs/assets/locale/messages_hi.json +10 -10
- package/dist/cjs/assets/locale/messages_hu.json +3 -3
- package/dist/cjs/assets/locale/messages_id.json +10 -10
- package/dist/cjs/assets/locale/messages_it.json +10 -10
- package/dist/cjs/assets/locale/messages_ja.json +10 -10
- package/dist/cjs/assets/locale/messages_ko.json +10 -10
- package/dist/cjs/assets/locale/messages_lt.json +3 -3
- package/dist/cjs/assets/locale/messages_ms.json +3 -3
- package/dist/cjs/assets/locale/messages_nl.json +10 -10
- package/dist/cjs/assets/locale/messages_no.json +10 -10
- package/dist/cjs/assets/locale/messages_pl.json +10 -10
- package/dist/cjs/assets/locale/messages_pt.json +10 -10
- package/dist/cjs/assets/locale/messages_ro.json +3 -3
- package/dist/cjs/assets/locale/messages_ru.json +10 -10
- package/dist/cjs/assets/locale/messages_sk.json +3 -3
- package/dist/cjs/assets/locale/messages_sl.json +3 -3
- package/dist/cjs/assets/locale/messages_sv.json +10 -10
- package/dist/cjs/assets/locale/messages_th.json +10 -10
- package/dist/cjs/assets/locale/messages_tl.json +3 -3
- package/dist/cjs/assets/locale/messages_tr.json +10 -10
- package/dist/cjs/assets/locale/messages_uk.json +10 -10
- package/dist/cjs/assets/locale/messages_vi.json +10 -10
- package/dist/cjs/assets/locale/messages_zh.json +10 -10
- package/dist/cjs/assets/locale/version_file +1 -1
- package/dist/cjs/services/DataExtensionService/dataExtensionService.js.map +1 -1
- package/dist/cjs/state/CustomFieldModalBiReporter.js +13 -1
- package/dist/cjs/state/CustomFieldModalBiReporter.js.map +1 -1
- package/dist/cjs/state/CustomFieldModalState.js +16 -4
- package/dist/cjs/state/CustomFieldModalState.js.map +1 -1
- package/dist/cjs/state/WixPatternsContainer.js +1 -1
- package/dist/cjs/state/WixPatternsContainer.js.map +1 -1
- package/dist/cjs/types/FieldsSource.js.map +1 -1
- package/dist/cjs/types/SchemaSource.js +1 -0
- package/dist/cjs/types/SchemaSource.js.map +1 -1
- package/dist/esm/assets/locale/messages_ar.json +3 -3
- package/dist/esm/assets/locale/messages_bg.json +3 -3
- package/dist/esm/assets/locale/messages_ca.json +3 -3
- package/dist/esm/assets/locale/messages_cs.json +10 -10
- package/dist/esm/assets/locale/messages_da.json +10 -10
- package/dist/esm/assets/locale/messages_de.json +10 -10
- package/dist/esm/assets/locale/messages_el.json +3 -3
- package/dist/esm/assets/locale/messages_en.json +3 -3
- package/dist/esm/assets/locale/messages_es.json +10 -10
- package/dist/esm/assets/locale/messages_fi.json +3 -3
- package/dist/esm/assets/locale/messages_fr.json +10 -10
- package/dist/esm/assets/locale/messages_he.json +3 -3
- package/dist/esm/assets/locale/messages_hi.json +10 -10
- package/dist/esm/assets/locale/messages_hu.json +3 -3
- package/dist/esm/assets/locale/messages_id.json +10 -10
- package/dist/esm/assets/locale/messages_it.json +10 -10
- package/dist/esm/assets/locale/messages_ja.json +10 -10
- package/dist/esm/assets/locale/messages_ko.json +10 -10
- package/dist/esm/assets/locale/messages_lt.json +3 -3
- package/dist/esm/assets/locale/messages_ms.json +3 -3
- package/dist/esm/assets/locale/messages_nl.json +10 -10
- package/dist/esm/assets/locale/messages_no.json +10 -10
- package/dist/esm/assets/locale/messages_pl.json +10 -10
- package/dist/esm/assets/locale/messages_pt.json +10 -10
- package/dist/esm/assets/locale/messages_ro.json +3 -3
- package/dist/esm/assets/locale/messages_ru.json +10 -10
- package/dist/esm/assets/locale/messages_sk.json +3 -3
- package/dist/esm/assets/locale/messages_sl.json +3 -3
- package/dist/esm/assets/locale/messages_sv.json +10 -10
- package/dist/esm/assets/locale/messages_th.json +10 -10
- package/dist/esm/assets/locale/messages_tl.json +3 -3
- package/dist/esm/assets/locale/messages_tr.json +10 -10
- package/dist/esm/assets/locale/messages_uk.json +10 -10
- package/dist/esm/assets/locale/messages_vi.json +10 -10
- package/dist/esm/assets/locale/messages_zh.json +10 -10
- package/dist/esm/assets/locale/version_file +1 -1
- package/dist/esm/services/DataExtensionService/dataExtensionService.js.map +1 -1
- package/dist/esm/state/CustomFieldModalBiReporter.js +12 -0
- package/dist/esm/state/CustomFieldModalBiReporter.js.map +1 -1
- package/dist/esm/state/CustomFieldModalState.js +13 -0
- package/dist/esm/state/CustomFieldModalState.js.map +1 -1
- package/dist/esm/state/WixPatternsContainer.js +1 -2
- package/dist/esm/state/WixPatternsContainer.js.map +1 -1
- package/dist/esm/types/SchemaSource.js +1 -0
- package/dist/esm/types/SchemaSource.js.map +1 -1
- package/dist/types/services/DataExtensionService/dataExtensionService.d.ts +1 -1
- package/dist/types/services/DataExtensionService/dataExtensionService.d.ts.map +1 -1
- package/dist/types/state/CustomFieldModalBiReporter.d.ts +1 -0
- package/dist/types/state/CustomFieldModalBiReporter.d.ts.map +1 -1
- package/dist/types/state/CustomFieldModalState.d.ts +1 -0
- package/dist/types/state/CustomFieldModalState.d.ts.map +1 -1
- package/dist/types/state/WixPatternsContainer.d.ts.map +1 -1
- package/dist/types/types/FieldsSource.d.ts +2 -0
- package/dist/types/types/FieldsSource.d.ts.map +1 -1
- package/dist/types/types/SchemaSource.d.ts +4 -0
- package/dist/types/types/SchemaSource.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_services","require","_model","_mobx","_TaskState","_OnlineState","_createComponentSettings","_ConditionalModalState","_events","_util","_useExperimentsCompat","_uuid","_BeforeUnloadCompatState","WixPatternsContainer","constructor","params","_params$initialProps","_defineProperty2","default","TaskState","defaultParams","reportProps","environment","environmentBI","cairoSessionId","biLogger","user","url","rest","report","msid","id","uuid","artifactId","artifactIdNew","componentName","componentIdNew","componentId","cairoVersion","uiLibVersion","csid","providerType","_hostingPlatform","isAutoPatterns","_isAutoPatterns","fixDomainForBI","createEssentials","lodash","patchesCache","events","EventEmitter","_messagesEnImport","messagesEnImport","messagesEnImportGlobal","_fetchTranslations","fetchTranslations","onNavigationModal","ConditionalModalState","wixPatternsEnvironment","contextType","createComponentSettings","errorMonitor","errorHandler","withErrorHandler","fn","getResolvedError","translate","t","message","showError","_this$showToast","showToast","call","type","httpClient","onlineManager","focusManager","history","useTranslation","useExperiments","createUseExperimentsCompat","experiments","usePageLocation","navigateTo","onNavigation","getHostContainer","window","queryCache","appendModalsToBody","layoutType","_useRelativeSidePanel","useRelativeSidePanel","onSidePanelOpen","closeSidePanel","onBeforeUnload","onLayerStateChange","openMediaManager","i18n","biLoggerFactory","fedopsLogger","internalFedops","internalErrorMonitor","internalExperiments","useSuspense","disableAutoInit","asyncMessagesLoader","locale","messages","initialProps","dsn","process","env","NODE_ENV","fedops","appName","scopes","STORYBOOK_VISUAL_E2E","options","fallbackLng","logger","internalMonitor","WixPatternsMonitor","enableTranslatedKeySuffix","enabled","key","initTask","status","defaultValue","Trans","onlineState","OnlineState","reportBi","createBILogger","makeObservable","init","action","bound","initialFetch","dateFormatters","computed","isPanelLayout","_isMobile","observable","ref","isMobileDevice","setIsAutoPatterns","value","runOnce","Promise","all","ready","catch","e","console","error","promise","medium","Intl","DateTimeFormat","language","dateStyle","mediumTime","timeStyle","time","isMobile","_this$internalExperim","disposers","BeforeUnloadCompatState","forEach","d","exports"],"sources":["../../../src/state/WixPatternsContainer.ts"],"sourcesContent":["import type { Essentials } from '@wix/fe-essentials/core';\nimport type { Trans, useTranslation } from '@wix/fe-essentials/react';\nimport type { ReportProps } from '@wix/fe-essentials/bi';\nimport {\n Environment,\n EnvironmentBi,\n ErrorMonitor,\n fetchTranslations,\n FocusManager,\n History,\n messagesEnImportGlobal,\n ModalLayoutProps,\n OnlineManager,\n PartialLodash,\n PartialWindow,\n ReportBI,\n Translate,\n WixPatternsMonitor,\n} from '../services';\nimport { QueryCache } from 'react-query/core';\nimport {\n CloseSidePanel,\n ContextType,\n GetHostContainer,\n OnNavigation,\n OnSidePanelOpen,\n PatternsErrorHandler,\n ShowToast,\n wixPatternsEnvironment,\n WixPatternsEssentials,\n WixPatternsInitialProps,\n} from '../model';\nimport {\n action,\n computed,\n IObservableArray,\n makeObservable,\n observable,\n} from 'mobx';\nimport { TaskState } from './TaskState';\nimport { OnlineState } from './OnlineState';\nimport { createComponentSettings } from '../services/createComponentSettings';\nimport { OptimisticPatch } from './CollectionOptimisticPatch';\nimport { ConditionalModalState } from './ConditionalModalState';\nimport { EventEmitter } from 'events';\nimport { fixDomainForBI, isMobileDevice, TypedEmitter } from '../util';\nimport { TransitionState } from './TransitionState';\nimport { ReactElement } from 'react';\nimport { createUseExperimentsCompat } from './useExperimentsCompat';\nimport { v4 as uuid } from 'uuid';\nimport { BeforeUnloadCompatState } from './BeforeUnloadCompatState';\nimport type { errorHandler } from '@wix/essentials';\nimport { PatternsLayoutType } from '../model/PatternsLayoutType';\n\ntype WixPatternsContainerEvents = TypedEmitter<{\n navigation: () => ModalLayoutProps | null | undefined;\n}>;\n\nexport interface WixPatternsContainerParams {\n readonly initialProps?: WixPatternsInitialProps;\n readonly createEssentials: WixPatternsEssentials['createEssentials'];\n readonly biLogger?: WixPatternsEssentials['biLogger'];\n readonly messagesEnImport?: () => Promise<{}>;\n readonly fetchTranslations?: (p: {\n readonly errorMonitor: ErrorMonitor;\n }) => (locale: string) => Promise<{}>;\n readonly createComponentSettings?: WixPatternsEssentials['createComponentSettings'];\n readonly errorMonitor: ErrorMonitor;\n readonly httpClient: WixPatternsEssentials['httpClient'];\n readonly onlineManager: OnlineManager;\n readonly focusManager: FocusManager;\n readonly contextType?: ContextType;\n readonly history: History;\n readonly window: PartialWindow;\n readonly useTranslation: typeof useTranslation;\n readonly Trans: typeof Trans;\n readonly useExperiments: WixPatternsEssentials['useExperiments'];\n readonly experiments: WixPatternsEssentials['experiments'];\n readonly environment: WixPatternsEssentials['environment'];\n readonly environmentBI: WixPatternsEssentials['environmentBI'];\n readonly errorHandler?: WixPatternsEssentials['errorHandler'];\n readonly user: WixPatternsEssentials['user'];\n readonly showToast?: ShowToast;\n readonly usePageLocation?: WixPatternsEssentials['usePageLocation'];\n readonly navigateTo?: WixPatternsEssentials['navigateTo'];\n readonly onNavigation?: OnNavigation;\n readonly getHostContainer?: GetHostContainer;\n readonly queryCache: QueryCache;\n readonly patchesCache: Map<string, IObservableArray<OptimisticPatch<any>>>;\n readonly onSidePanelOpen?: OnSidePanelOpen;\n readonly closeSidePanel?: CloseSidePanel;\n readonly lodash: PartialLodash;\n readonly events?: WixPatternsContainerEvents;\n readonly sidePanel?: TransitionState<string>;\n readonly onNavigationModal?: ConditionalModalState<ModalLayoutProps>;\n readonly sidePanelComponents?: Map<string, ReactElement>;\n readonly appendModalsToBody?: boolean;\n readonly layoutType?: PatternsLayoutType;\n readonly useRelativeSidePanel?: boolean;\n readonly onBeforeUnload?: WixPatternsEssentials['onBeforeUnload'];\n readonly onLayerStateChange?: WixPatternsEssentials['onLayerStateChange'];\n readonly openMediaManager?: WixPatternsEssentials['openMediaManager'];\n}\n\nexport class WixPatternsContainer {\n readonly createEssentials;\n readonly errorMonitor: WixPatternsContainerParams['errorMonitor'];\n readonly errorHandler: PatternsErrorHandler;\n readonly internalMonitor: WixPatternsMonitor;\n readonly internalExperiments;\n readonly experiments: WixPatternsContainerParams['experiments'];\n readonly httpClient: WixPatternsContainerParams['httpClient'];\n readonly onlineManager;\n readonly focusManager;\n readonly contextType: ContextType;\n readonly history: WixPatternsContainerParams['history'];\n readonly window: WixPatternsContainerParams['window'];\n readonly useTranslation;\n readonly Trans: typeof Trans;\n readonly useExperiments;\n readonly showToast?;\n readonly usePageLocation?;\n readonly navigateTo?;\n readonly onNavigation;\n readonly onBeforeUnload;\n readonly onLayerStateChange?: WixPatternsEssentials['onLayerStateChange'];\n readonly openMediaManager?: WixPatternsEssentials['openMediaManager'];\n readonly getHostContainer;\n readonly environment: Environment;\n readonly environmentBI: EnvironmentBi;\n readonly appendModalsToBody?: boolean;\n readonly layoutType?: string;\n readonly _useRelativeSidePanel?: boolean;\n\n readonly onSidePanelOpen?: OnSidePanelOpen;\n readonly closeSidePanel?: CloseSidePanel;\n readonly translate: Translate;\n readonly lodash;\n readonly i18n: Essentials['i18n'];\n readonly reportBi: ReportBI;\n readonly _messagesEnImport;\n readonly _fetchTranslations;\n\n queryCache: QueryCache;\n readonly patchesCache;\n\n readonly initTask = new TaskState<void>();\n readonly onlineState: OnlineState;\n\n readonly onNavigationModal;\n\n readonly events: TypedEmitter<{\n navigation: () => ModalLayoutProps | null | undefined;\n }>;\n\n readonly user;\n\n readonly cairoSessionId: string;\n\n readonly biLogger;\n\n readonly createComponentSettings;\n\n readonly enableTranslatedKeySuffix: boolean;\n\n private _isAutoPatterns: boolean = false;\n\n // CAIRO-3582: modify mobile detection to use user agent\n _isMobile = false;\n\n constructor(params: Readonly<WixPatternsContainerParams>) {\n this.createEssentials = params.createEssentials;\n this.lodash = params.lodash;\n this.patchesCache = params.patchesCache;\n this.events =\n params.events ?? (new EventEmitter() as WixPatternsContainerEvents);\n this._messagesEnImport = params.messagesEnImport ?? messagesEnImportGlobal;\n this._fetchTranslations = params.fetchTranslations ?? fetchTranslations;\n\n this.onNavigationModal =\n params.onNavigationModal ?? new ConditionalModalState();\n\n this.environment = wixPatternsEnvironment(params.environment);\n this.environmentBI = params.environmentBI;\n this.user = params.user;\n this.contextType = params.contextType ?? 'SITE';\n\n this.createComponentSettings =\n params.createComponentSettings ?? createComponentSettings;\n\n this.errorMonitor = params.errorMonitor;\n this.errorHandler = params.errorHandler ?? {\n withErrorHandler: (fn) => fn(),\n getResolvedError: <T>() => {\n const { translate: t } = this;\n\n return {\n message: t('cairo.technical.error.text'),\n } as errorHandler.ResolvedError & Partial<T>;\n },\n showError: () => {\n const { translate: t } = this;\n\n this.showToast?.({\n message: t('cairo.technical.error.text'),\n type: 'ERROR',\n });\n },\n };\n this.httpClient = params.httpClient;\n this.onlineManager = params.onlineManager;\n this.focusManager = params.focusManager;\n this.history = params.history;\n this.useTranslation = params.useTranslation;\n this.useExperiments = createUseExperimentsCompat(params.useExperiments);\n this.experiments = params.experiments;\n this.showToast = params.showToast;\n this.usePageLocation = params.usePageLocation;\n this.navigateTo = params.navigateTo;\n this.onNavigation = params.onNavigation;\n this.getHostContainer = params.getHostContainer;\n this.window = params.window;\n this.queryCache = params.queryCache;\n this.appendModalsToBody = params.appendModalsToBody;\n this.layoutType = params.layoutType;\n this._useRelativeSidePanel = params.useRelativeSidePanel;\n this.onSidePanelOpen = params.onSidePanelOpen;\n this.closeSidePanel = params.closeSidePanel;\n this.onBeforeUnload = params.onBeforeUnload;\n this.onLayerStateChange = params.onLayerStateChange;\n this.openMediaManager = params.openMediaManager;\n\n const {\n i18n,\n biLoggerFactory,\n fedopsLogger: internalFedops,\n errorMonitor: internalErrorMonitor,\n experiments: internalExperiments,\n } = this.createEssentials({\n i18n: {\n useSuspense: false,\n disableAutoInit: true,\n asyncMessagesLoader: async (locale) => {\n if (locale === 'en') {\n return this._messagesEnImport();\n }\n return this._fetchTranslations(this)(locale);\n },\n messages: params.initialProps?.messages,\n },\n errorMonitor: {\n dsn:\n process.env.NODE_ENV === 'production'\n ? 'https://9b9586a905eb429cbda9ea49d5d721f6@sentry-next.wixpress.com/8780'\n : '',\n /*\n TODO: not used in sentry-next API, need to be merged from reportError API with tags & extraData\n For Example: errorMonitor.captureException(error, { tags, contexts: { runtime: extraData }})\n beforeSend: (event, hint) => {\n this.internalMonitor.reportErrorThrownOncePerFlow();\n\n if (!event.tags) {\n event.tags = {};\n }\n\n if (!event.extra) {\n event.extra = {};\n }\n\n if (hint && hint.originalException) {\n event.extra.exception = hint.originalException;\n\n if (hint.originalException instanceof Error) {\n event.fingerprint = [\n `${hint.originalException.name}:${hint.originalException.message}`,\n ];\n }\n }\n\n event.tags.componentName = this.environment.componentName;\n event.tags.componentId = this.environment.componentId;\n event.tags.artifactId = this.environment.artifactId;\n event.tags.cairoVersion = this.environment.uiLibVersion;\n\n return event;\n },\n */\n },\n fedops: {\n appName: 'cairo',\n },\n experiments: {\n scopes: ['cairo'],\n },\n });\n\n if (\n typeof process !== 'undefined' &&\n process.env.STORYBOOK_VISUAL_E2E === 'true'\n ) {\n i18n.options.fallbackLng = [];\n }\n\n this.cairoSessionId = uuid();\n this.biLogger = params.biLogger ?? biLoggerFactory?.().logger();\n this.i18n = i18n;\n this.internalMonitor = new WixPatternsMonitor({\n errorMonitor: params.errorMonitor,\n internalErrorMonitor,\n internalFedops,\n environment: this.environment,\n csid: this.cairoSessionId,\n });\n this.internalExperiments = internalExperiments;\n\n this.enableTranslatedKeySuffix =\n this.experiments.enabled('specs.cairo.example-bm.tagsToLabels') ||\n this.experiments.enabled('specs.cairo.contacts.tagsToLabels');\n\n this.translate = (key, params) => {\n void this.initTask.status; // status is observable so reading it here starts mobx reactivity\n if (this.enableTranslatedKeySuffix) {\n return this.i18n.t(`${key}.asLabels`, {\n ...params,\n defaultValue: this.i18n.t(key, params),\n });\n }\n return this.i18n.t(key, params);\n };\n\n this.Trans = params.Trans;\n\n this.onlineState = new OnlineState({\n onlineManager: this.onlineManager,\n focusManager: this.focusManager,\n translate: this.translate,\n showToast: this.showToast,\n });\n\n this.reportBi = this.createBILogger({});\n\n makeObservable(this, {\n init: action.bound,\n initialFetch: action.bound,\n dateFormatters: computed,\n isPanelLayout: computed,\n _isMobile: observable.ref,\n });\n\n this._isMobile = isMobileDevice();\n }\n setIsAutoPatterns(value: boolean) {\n this._isAutoPatterns = value;\n }\n\n _createComponentSettings(options: { namespace: string }) {\n return this.createComponentSettings(this)(options);\n }\n\n createBILogger = <P>(defaultParams: P): ReportBI => {\n return (reportProps: ReportProps) => {\n const { environment, environmentBI, cairoSessionId, biLogger, user } =\n this;\n\n const {\n params: { url, ...rest },\n } = reportProps;\n\n return biLogger?.report({\n ...reportProps,\n params: {\n ...(environment.msid && { msid: environment.msid }),\n ...(user.id && { uuid: user.id }),\n artifactId: environment.artifactId,\n artifactIdNew: environmentBI.artifactId,\n componentName: environment.componentName,\n componentIdNew: environmentBI.componentId,\n cairoVersion: environment.uiLibVersion,\n csid: cairoSessionId,\n ...(environment.providerType === 'bm' && {\n _hostingPlatform: 'business-manager',\n }),\n isAutoPatterns: this._isAutoPatterns,\n ...defaultParams,\n ...(url && { url: fixDomainForBI(url) }),\n ...rest,\n },\n });\n };\n };\n\n async initialFetch() {\n const { initTask, i18n, internalExperiments, experiments } = this;\n\n initTask.runOnce(async () => {\n await Promise.all([\n i18n.init(),\n internalExperiments?.ready().catch((e) => {\n console.error(e);\n }),\n experiments.ready().catch((e: unknown) => {\n console.error(e);\n }),\n this._messagesEnImport(), // not all translation files contain all the keys, so en is required otherwise show error state\n ]);\n });\n\n return initTask.status.promise;\n }\n\n get dateFormatters() {\n return {\n medium: new Intl.DateTimeFormat(this.environment.language, {\n dateStyle: 'medium',\n }),\n mediumTime: new Intl.DateTimeFormat(this.environment.language, {\n dateStyle: 'medium',\n timeStyle: 'short',\n }),\n time: new Intl.DateTimeFormat(this.environment.language, {\n timeStyle: 'short',\n }),\n };\n }\n\n get isPanelLayout() {\n return this.layoutType === 'panel';\n }\n\n get isMobile() {\n return this._isMobile;\n }\n\n get useRelativeSidePanel() {\n return (\n this._useRelativeSidePanel ||\n (this.internalExperiments?.enabled('useRelativeSidePanel') &&\n this.experiments.enabled('bmHarmonyTheme'))\n );\n }\n\n init() {\n const { onlineState } = this;\n\n this.initialFetch().catch((e) => {\n console.error(e);\n });\n\n const disposers = [\n onlineState.init(),\n new BeforeUnloadCompatState(this).init(),\n ];\n\n return () => {\n disposers.forEach((d) => d?.());\n };\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAiBA,IAAAC,MAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AAOA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AAEA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAGA,IAAAS,qBAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,wBAAA,GAAAX,OAAA;AAsDO,MAAMY,oBAAoB,CAAC;EAkEhCC,WAAWA,CAACC,MAA4C,EAAE;IAAA,IAAAC,oBAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAA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_createComponentSettings","_ConditionalModalState","_events","_util","_useExperimentsCompat","_uuid","_BeforeUnloadCompatState","WixPatternsContainer","constructor","params","_params$initialProps","_defineProperty2","default","TaskState","defaultParams","reportProps","environment","environmentBI","cairoSessionId","biLogger","user","url","rest","report","msid","id","uuid","artifactId","artifactIdNew","componentName","componentIdNew","componentId","cairoVersion","uiLibVersion","csid","providerType","_hostingPlatform","isAutoPatterns","_isAutoPatterns","fixDomainForBI","createEssentials","lodash","patchesCache","events","EventEmitter","_messagesEnImport","messagesEnImport","messagesEnImportGlobal","_fetchTranslations","fetchTranslations","onNavigationModal","ConditionalModalState","wixPatternsEnvironment","contextType","createComponentSettings","errorMonitor","errorHandler","withErrorHandler","fn","getResolvedError","translate","t","message","showError","_this$showToast","showToast","call","type","httpClient","onlineManager","focusManager","history","useTranslation","useExperiments","createUseExperimentsCompat","experiments","usePageLocation","navigateTo","onNavigation","getHostContainer","window","queryCache","appendModalsToBody","layoutType","_useRelativeSidePanel","useRelativeSidePanel","onSidePanelOpen","closeSidePanel","onBeforeUnload","onLayerStateChange","openMediaManager","i18n","biLoggerFactory","fedopsLogger","internalFedops","internalErrorMonitor","internalExperiments","useSuspense","disableAutoInit","asyncMessagesLoader","locale","messages","initialProps","dsn","process","env","NODE_ENV","fedops","appName","scopes","STORYBOOK_VISUAL_E2E","options","fallbackLng","logger","internalMonitor","WixPatternsMonitor","enableTranslatedKeySuffix","enabled","key","initTask","status","defaultValue","Trans","onlineState","OnlineState","reportBi","createBILogger","makeObservable","init","action","bound","initialFetch","dateFormatters","computed","isPanelLayout","_isMobile","observable","ref","isMobileDevice","setIsAutoPatterns","value","runOnce","Promise","all","ready","catch","e","console","error","promise","medium","Intl","DateTimeFormat","language","dateStyle","mediumTime","timeStyle","time","isMobile","_this$internalExperim","disposers","BeforeUnloadCompatState","forEach","d","exports"],"sources":["../../../src/state/WixPatternsContainer.ts"],"sourcesContent":["import type { Essentials } from '@wix/fe-essentials/core';\nimport type { Trans, useTranslation } from '@wix/fe-essentials/react';\nimport type { ReportProps } from '@wix/fe-essentials/bi';\nimport {\n Environment,\n EnvironmentBi,\n ErrorMonitor,\n fetchTranslations,\n FocusManager,\n History,\n messagesEnImportGlobal,\n ModalLayoutProps,\n OnlineManager,\n PartialLodash,\n PartialWindow,\n ReportBI,\n Translate,\n WixPatternsMonitor,\n} from '../services';\nimport { QueryCache } from 'react-query/core';\nimport {\n CloseSidePanel,\n ContextType,\n GetHostContainer,\n OnNavigation,\n OnSidePanelOpen,\n PatternsErrorHandler,\n ShowToast,\n wixPatternsEnvironment,\n WixPatternsEssentials,\n WixPatternsInitialProps,\n} from '../model';\nimport {\n action,\n computed,\n IObservableArray,\n makeObservable,\n observable,\n} from 'mobx';\nimport { TaskState } from './TaskState';\nimport { OnlineState } from './OnlineState';\nimport { createComponentSettings } from '../services/createComponentSettings';\nimport { OptimisticPatch } from './CollectionOptimisticPatch';\nimport { ConditionalModalState } from './ConditionalModalState';\nimport { EventEmitter } from 'events';\nimport { fixDomainForBI, isMobileDevice, TypedEmitter } from '../util';\nimport { TransitionState } from './TransitionState';\nimport { ReactElement } from 'react';\nimport { createUseExperimentsCompat } from './useExperimentsCompat';\nimport { v4 as uuid } from 'uuid';\nimport { BeforeUnloadCompatState } from './BeforeUnloadCompatState';\nimport type { errorHandler } from '@wix/essentials';\nimport { PatternsLayoutType } from '../model/PatternsLayoutType';\n\ntype WixPatternsContainerEvents = TypedEmitter<{\n navigation: () => ModalLayoutProps | null | undefined;\n}>;\n\nexport interface WixPatternsContainerParams {\n readonly initialProps?: WixPatternsInitialProps;\n readonly createEssentials: WixPatternsEssentials['createEssentials'];\n readonly biLogger?: WixPatternsEssentials['biLogger'];\n readonly messagesEnImport?: () => Promise<{}>;\n readonly fetchTranslations?: (p: {\n readonly errorMonitor: ErrorMonitor;\n }) => (locale: string) => Promise<{}>;\n readonly createComponentSettings?: WixPatternsEssentials['createComponentSettings'];\n readonly errorMonitor: ErrorMonitor;\n readonly httpClient: WixPatternsEssentials['httpClient'];\n readonly onlineManager: OnlineManager;\n readonly focusManager: FocusManager;\n readonly contextType?: ContextType;\n readonly history: History;\n readonly window: PartialWindow;\n readonly useTranslation: typeof useTranslation;\n readonly Trans: typeof Trans;\n readonly useExperiments: WixPatternsEssentials['useExperiments'];\n readonly experiments: WixPatternsEssentials['experiments'];\n readonly environment: WixPatternsEssentials['environment'];\n readonly environmentBI: WixPatternsEssentials['environmentBI'];\n readonly errorHandler?: WixPatternsEssentials['errorHandler'];\n readonly user: WixPatternsEssentials['user'];\n readonly showToast?: ShowToast;\n readonly usePageLocation?: WixPatternsEssentials['usePageLocation'];\n readonly navigateTo?: WixPatternsEssentials['navigateTo'];\n readonly onNavigation?: OnNavigation;\n readonly getHostContainer?: GetHostContainer;\n readonly queryCache: QueryCache;\n readonly patchesCache: Map<string, IObservableArray<OptimisticPatch<any>>>;\n readonly onSidePanelOpen?: OnSidePanelOpen;\n readonly closeSidePanel?: CloseSidePanel;\n readonly lodash: PartialLodash;\n readonly events?: WixPatternsContainerEvents;\n readonly sidePanel?: TransitionState<string>;\n readonly onNavigationModal?: ConditionalModalState<ModalLayoutProps>;\n readonly sidePanelComponents?: Map<string, ReactElement>;\n readonly appendModalsToBody?: boolean;\n readonly layoutType?: PatternsLayoutType;\n readonly useRelativeSidePanel?: boolean;\n readonly onBeforeUnload?: WixPatternsEssentials['onBeforeUnload'];\n readonly onLayerStateChange?: WixPatternsEssentials['onLayerStateChange'];\n readonly openMediaManager?: WixPatternsEssentials['openMediaManager'];\n}\n\nexport class WixPatternsContainer {\n readonly createEssentials;\n readonly errorMonitor: WixPatternsContainerParams['errorMonitor'];\n readonly errorHandler: PatternsErrorHandler;\n readonly internalMonitor: WixPatternsMonitor;\n readonly internalExperiments;\n readonly experiments: WixPatternsContainerParams['experiments'];\n readonly httpClient: WixPatternsContainerParams['httpClient'];\n readonly onlineManager;\n readonly focusManager;\n readonly contextType: ContextType;\n readonly history: WixPatternsContainerParams['history'];\n readonly window: WixPatternsContainerParams['window'];\n readonly useTranslation;\n readonly Trans: typeof Trans;\n readonly useExperiments;\n readonly showToast?;\n readonly usePageLocation?;\n readonly navigateTo?;\n readonly onNavigation;\n readonly onBeforeUnload;\n readonly onLayerStateChange?: WixPatternsEssentials['onLayerStateChange'];\n readonly openMediaManager?: WixPatternsEssentials['openMediaManager'];\n readonly getHostContainer;\n readonly environment: Environment;\n readonly environmentBI: EnvironmentBi;\n readonly appendModalsToBody?: boolean;\n readonly layoutType?: string;\n readonly _useRelativeSidePanel?: boolean;\n\n readonly onSidePanelOpen?: OnSidePanelOpen;\n readonly closeSidePanel?: CloseSidePanel;\n readonly translate: Translate;\n readonly lodash;\n readonly i18n: Essentials['i18n'];\n readonly reportBi: ReportBI;\n readonly _messagesEnImport;\n readonly _fetchTranslations;\n\n queryCache: QueryCache;\n readonly patchesCache;\n\n readonly initTask = new TaskState<void>();\n readonly onlineState: OnlineState;\n\n readonly onNavigationModal;\n\n readonly events: TypedEmitter<{\n navigation: () => ModalLayoutProps | null | undefined;\n }>;\n\n readonly user;\n\n readonly cairoSessionId: string;\n\n readonly biLogger;\n\n readonly createComponentSettings;\n\n readonly enableTranslatedKeySuffix: boolean;\n\n private _isAutoPatterns: boolean = false;\n\n // CAIRO-3582: modify mobile detection to use user agent\n _isMobile = false;\n\n constructor(params: Readonly<WixPatternsContainerParams>) {\n this.createEssentials = params.createEssentials;\n this.lodash = params.lodash;\n this.patchesCache = params.patchesCache;\n this.events =\n params.events ?? (new EventEmitter() as WixPatternsContainerEvents);\n this._messagesEnImport = params.messagesEnImport ?? messagesEnImportGlobal;\n this._fetchTranslations = params.fetchTranslations ?? fetchTranslations;\n\n this.onNavigationModal =\n params.onNavigationModal ?? new ConditionalModalState();\n\n this.environment = wixPatternsEnvironment(params.environment);\n this.environmentBI = params.environmentBI;\n this.user = params.user;\n this.contextType = params.contextType ?? 'SITE';\n\n this.createComponentSettings =\n params.createComponentSettings ?? createComponentSettings;\n\n this.errorMonitor = params.errorMonitor;\n this.errorHandler = params.errorHandler ?? {\n withErrorHandler: (fn) => fn(),\n getResolvedError: <T>() => {\n const { translate: t } = this;\n\n return {\n message: t('cairo.technical.error.text'),\n } as errorHandler.ResolvedError & Partial<T>;\n },\n showError: () => {\n const { translate: t } = this;\n\n this.showToast?.({\n message: t('cairo.technical.error.text'),\n type: 'ERROR',\n });\n },\n };\n this.httpClient = params.httpClient;\n this.onlineManager = params.onlineManager;\n this.focusManager = params.focusManager;\n this.history = params.history;\n this.useTranslation = params.useTranslation;\n this.useExperiments = createUseExperimentsCompat(params.useExperiments);\n this.experiments = params.experiments;\n this.showToast = params.showToast;\n this.usePageLocation = params.usePageLocation;\n this.navigateTo = params.navigateTo;\n this.onNavigation = params.onNavigation;\n this.getHostContainer = params.getHostContainer;\n this.window = params.window;\n this.queryCache = params.queryCache;\n this.appendModalsToBody = params.appendModalsToBody;\n this.layoutType = params.layoutType;\n this._useRelativeSidePanel = params.useRelativeSidePanel;\n this.onSidePanelOpen = params.onSidePanelOpen;\n this.closeSidePanel = params.closeSidePanel;\n this.onBeforeUnload = params.onBeforeUnload;\n this.onLayerStateChange = params.onLayerStateChange;\n this.openMediaManager = params.openMediaManager;\n\n const {\n i18n,\n biLoggerFactory,\n fedopsLogger: internalFedops,\n errorMonitor: internalErrorMonitor,\n experiments: internalExperiments,\n } = this.createEssentials({\n i18n: {\n useSuspense: false,\n disableAutoInit: true,\n asyncMessagesLoader: async (locale) => {\n if (locale === 'en') {\n return this._messagesEnImport();\n }\n return this._fetchTranslations(this)(locale);\n },\n messages: params.initialProps?.messages,\n },\n errorMonitor: {\n dsn:\n process.env.NODE_ENV === 'production'\n ? 'https://9b9586a905eb429cbda9ea49d5d721f6@sentry-next.wixpress.com/8780'\n : '',\n /*\n TODO: not used in sentry-next API, need to be merged from reportError API with tags & extraData\n For Example: errorMonitor.captureException(error, { tags, contexts: { runtime: extraData }})\n beforeSend: (event, hint) => {\n this.internalMonitor.reportErrorThrownOncePerFlow();\n\n if (!event.tags) {\n event.tags = {};\n }\n\n if (!event.extra) {\n event.extra = {};\n }\n\n if (hint && hint.originalException) {\n event.extra.exception = hint.originalException;\n\n if (hint.originalException instanceof Error) {\n event.fingerprint = [\n `${hint.originalException.name}:${hint.originalException.message}`,\n ];\n }\n }\n\n event.tags.componentName = this.environment.componentName;\n event.tags.componentId = this.environment.componentId;\n event.tags.artifactId = this.environment.artifactId;\n event.tags.cairoVersion = this.environment.uiLibVersion;\n\n return event;\n },\n */\n },\n fedops: {\n appName: 'cairo',\n },\n experiments: {\n scopes: ['cairo'],\n },\n });\n\n if (\n typeof process !== 'undefined' &&\n process.env.STORYBOOK_VISUAL_E2E === 'true'\n ) {\n i18n.options.fallbackLng = [];\n }\n\n this.cairoSessionId = uuid();\n this.biLogger = params.biLogger ?? biLoggerFactory?.().logger();\n this.i18n = i18n;\n this.internalMonitor = new WixPatternsMonitor({\n errorMonitor: params.errorMonitor,\n internalErrorMonitor,\n internalFedops,\n environment: this.environment,\n csid: this.cairoSessionId,\n });\n this.internalExperiments = internalExperiments;\n\n this.enableTranslatedKeySuffix =\n this.experiments.enabled('specs.cairo.example-bm.tagsToLabels') ||\n this.experiments.enabled('specs.cairo.contacts.tagsToLabels');\n\n this.translate = (key, params) => {\n void this.initTask.status; // status is observable so reading it here starts mobx reactivity\n if (this.enableTranslatedKeySuffix) {\n return this.i18n.t(`${key}.asLabels`, {\n ...params,\n defaultValue: this.i18n.t(key, params),\n });\n }\n return this.i18n.t(key, params);\n };\n\n this.Trans = params.Trans;\n\n this.onlineState = new OnlineState({\n onlineManager: this.onlineManager,\n focusManager: this.focusManager,\n translate: this.translate,\n showToast: this.showToast,\n });\n\n this.reportBi = this.createBILogger({});\n\n makeObservable(this, {\n init: action.bound,\n initialFetch: action.bound,\n dateFormatters: computed,\n isPanelLayout: computed,\n _isMobile: observable.ref,\n });\n\n this._isMobile = isMobileDevice();\n }\n setIsAutoPatterns(value: boolean) {\n this._isAutoPatterns = value;\n }\n\n _createComponentSettings(options: { namespace: string }) {\n return this.createComponentSettings(this)(options);\n }\n\n createBILogger = <P>(defaultParams: P): ReportBI => {\n return (reportProps: ReportProps) => {\n const { environment, environmentBI, cairoSessionId, biLogger, user } =\n this;\n\n const {\n params: { url, ...rest },\n } = reportProps;\n\n return biLogger?.report({\n ...reportProps,\n params: {\n ...(environment.msid && { msid: environment.msid }),\n ...(user.id && { uuid: user.id }),\n artifactId: environment.artifactId,\n artifactIdNew: environmentBI.artifactId,\n componentName: environment.componentName,\n componentIdNew: environmentBI.componentId,\n cairoVersion: environment.uiLibVersion,\n csid: cairoSessionId,\n ...(environment.providerType === 'bm' && {\n _hostingPlatform: 'business-manager',\n }),\n isAutoPatterns: this._isAutoPatterns,\n ...defaultParams,\n ...(url && { url: fixDomainForBI(url) }),\n ...rest,\n },\n });\n };\n };\n\n async initialFetch() {\n const { initTask, i18n, internalExperiments, experiments } = this;\n\n initTask.runOnce(async () => {\n await Promise.all([\n i18n.init(),\n internalExperiments?.ready().catch((e) => {\n console.error(e);\n }),\n experiments.ready().catch((e: unknown) => {\n console.error(e);\n }),\n this._messagesEnImport(), // not all translation files contain all the keys, so en is required otherwise show error state\n ]);\n });\n\n return initTask.status.promise;\n }\n\n get dateFormatters() {\n return {\n medium: new Intl.DateTimeFormat(this.environment.language, {\n dateStyle: 'medium',\n }),\n mediumTime: new Intl.DateTimeFormat(this.environment.language, {\n dateStyle: 'medium',\n timeStyle: 'short',\n }),\n time: new Intl.DateTimeFormat(this.environment.language, {\n timeStyle: 'short',\n }),\n };\n }\n\n get isPanelLayout() {\n return this.layoutType === 'panel';\n }\n\n get isMobile() {\n return this._isMobile;\n }\n\n get useRelativeSidePanel() {\n return (\n this._useRelativeSidePanel ||\n this.internalExperiments?.enabled('useRelativeSidePanel')\n );\n }\n\n init() {\n const { onlineState } = this;\n\n this.initialFetch().catch((e) => {\n console.error(e);\n });\n\n const disposers = [\n onlineState.init(),\n new BeforeUnloadCompatState(this).init(),\n ];\n\n return () => {\n disposers.forEach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BE,SAAS,EAAE;MACb,CAAC,CAAC;MACFC,IAAI,EAAE,IAAIN,IAAI,CAACC,cAAc,CAAC,IAAI,CAACxI,WAAW,CAACyI,QAAQ,EAAE;QACvDG,SAAS,EAAE;MACb,CAAC;IACH,CAAC;EACH;EAEA,IAAItB,aAAaA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACnD,UAAU,KAAK,OAAO;EACpC;EAEA,IAAI2E,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI,CAACvB,SAAS;EACvB;EAEA,IAAIlD,oBAAoBA,CAAA,EAAG;IAAA,IAAA0E,qBAAA;IACzB,OACE,IAAI,CAAC3E,qBAAqB,MAAA2E,qBAAA,GAC1B,IAAI,CAAC/D,mBAAmB,qBAAxB+D,qBAAA,CAA0B1C,OAAO,CAAC,sBAAsB,CAAC;EAE7D;EAEAW,IAAIA,CAAA,EAAG;IACL,MAAM;MAAEL;IAAY,CAAC,GAAG,IAAI;IAE5B,IAAI,CAACQ,YAAY,CAAC,CAAC,CAACc,KAAK,CAAEC,CAAC,IAAK;MAC/BC,OAAO,CAACC,KAAK,CAACF,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,MAAMc,SAAS,GAAG,CAChBrC,WAAW,CAACK,IAAI,CAAC,CAAC,EAClB,IAAIiC,gDAAuB,CAAC,IAAI,CAAC,CAACjC,IAAI,CAAC,CAAC,CACzC;IAED,OAAO,MAAM;MACXgC,SAAS,CAACE,OAAO,CAAEC,CAAC,IAAKA,CAAC,oBAADA,CAAC,CAAG,CAAC,CAAC;IACjC,CAAC;EACH;AACF;AAACC,OAAA,CAAA7J,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/types/FieldsSource.ts"],"sourcesContent":["import type { ComponentType } from 'react';\nimport type { Field, PatternsFieldType } from './Field';\nimport type { FieldActions, FieldSettings, Schema } from './Schema';\nimport type {\n FieldTypeDefinition,\n FieldTypeDisplay,\n} from './FieldTypeDefinition';\nimport type { CustomFieldOrigin } from '../services';\n\n/** Presentation for one existing field, without changing its type or behavior. */\nexport interface FieldPresentation {\n typeDisplay?: Partial<FieldTypeDisplay>;\n collectionInputLabel?: string;\n}\n\n/** A field the source has archived. Sources without archiving omit `archive`. */\nexport interface ArchivedFieldItem {\n id: string;\n label: string;\n isPii?: boolean;\n}\n\n/** A `FieldTypeOption` the modal can render: the id and label a source left to\n * the defaults are filled in. */\nexport interface ResolvedFieldTypeOption {\n /** Stored on the draft; the source maps it back to its native type. */\n id: string;\n label: string;\n namePlaceholder?: string;\n /** Fallback field ID base when the name cannot produce a valid ID.\n * Default: the normalized type ID. Numeric suffixes resolve collisions. */\n keyBase?: string;\n subtitle?: string;\n /** Group heading in the type list; types sharing a heading form one group. */\n group?: string;\n /** Whether a field of this type can be marked PII. Absent ⇒ follows the\n * source-wide `supportsPii`. */\n supportsPii?: boolean;\n /** Warning to show while the PII toggle is on. Called on every render.\n * Absent ⇒ none. */\n piiWarning?: () => FieldPiiWarning | undefined;\n /** This type's own part of the collapsible section below the main fields.\n * Absent ⇒ the section holds only what the modal itself puts there. */\n settingsSection?: FieldSettingsSection;\n /** Collection picker shown below the type picker. For built-in reference\n * types, absent copy can use the source's referenceable collection loader. */\n collectionInput?: FieldModalCollectionInput;\n /** Drives the type icon in the modal. */\n patternsType: PatternsFieldType;\n /** Type icons for the picker. Absent ⇒ the icon derives from `patternsType`. */\n icons?: { Small: ComponentType; Medium: ComponentType };\n}\n\n/** Read/write permission defaults a source supports, per audience. */\nexport interface FieldPermissions {\n installedApps?: {\n hide?: boolean;\n defaultRead?: boolean;\n defaultWrite?: boolean;\n };\n siteVisitors?: {\n hide?: boolean;\n defaultRead?: boolean;\n defaultWrite?: boolean;\n };\n}\n\n/** The values the add/edit field modal collects, source-neutral. */\nexport interface FieldDraft {\n type?: string;\n key: string;\n name: string;\n readApps: boolean;\n readUsers: boolean;\n writeApps: boolean;\n writeUsers: boolean;\n containsPii: boolean;\n /** Collection selected by the modal's collection picker, when a type has one. */\n referencedCollectionId?: string;\n /** The field this draft was built from, for the source's settings section to\n * read its own values off. Absent for a new field. */\n field?: Field;\n /** What the source's settings section collected, on its way to that source's\n * `addField`/`editField`. */\n settings?: FieldSettings;\n}\n\n/** The add-modal subtitle: a line of text, an optional second note line, and an\n * optional \"learn more\" link. */\nexport interface FieldModalSubtitle {\n text: string;\n note?: string;\n learnMore?: { label: string; href: string };\n}\n\n/** The text a source supplies for the add/edit field modal. */\nexport interface FieldModalText {\n addTitle: string;\n editTitle: string;\n /** Subtitle for the add modal; omit for none. */\n addSubtitle?: FieldModalSubtitle;\n /** Label of the collapsible section below the main fields. */\n settingsLabel?: string;\n /** Label of the field ID input. Absent ⇒ the standard key label. */\n keyLabel?: string;\n}\n\n/** A warning shown under the PII toggle, with an optional action button. */\nexport interface FieldPiiWarning {\n text: string;\n action?: { label: string; onClick: () => void };\n}\n\nexport interface FieldModalCollectionOption {\n id: string;\n label: string;\n}\n\nexport type FieldModalCollectionOptionsLoader = () => Promise<\n FieldModalCollectionOption[]\n>;\n\nexport interface FieldModalCollectionAction {\n label: string;\n icon?: ComponentType;\n disabled?: boolean;\n /** Return an option to select, or undefined on cancellation. The option may\n * be pending creation; persistence remains the source's responsibility. */\n onClick: () => Promise<FieldModalCollectionOption | undefined>;\n}\n\n/** Extra collection picker a field type can add to the main modal body. */\nexport interface FieldModalCollectionInput {\n label?: string;\n placeholder?: string;\n emptyStateMessage?: string;\n errorMessage?: string;\n required?: boolean;\n loadOptions?: FieldModalCollectionOptionsLoader;\n /** An action below the options, also shown when no options match. */\n dropdownAction?: FieldModalCollectionAction;\n /** Restores the picker value from an existing field. */\n getValue?: (field: Field) => string | undefined;\n /** Adds picker-derived values to the source-owned settings payload. */\n getSettings?: (collectionId: string) => FieldSettings;\n}\n\nexport interface FieldSettingsProps {\n /** The picked field type, or absent before one is picked. */\n fieldType?: string;\n /** Validation rules the section should render as fixed, not user-editable.\n * A section ignores any entry it doesn't recognize. */\n lockedRules?: readonly string[];\n /** When false, hide error styling and messages.\n * `hasError` must still report validity. Omit to show errors immediately. */\n showValidationErrors?: boolean;\n}\n\n/**\n * The collapsible section below the main add/edit field inputs, supplied by the\n * source. The modal renders it, blocks confirm while it has an error, and hands\n * its values to the source's own `addField`/`editField` — it never looks inside.\n */\nexport interface FieldSettingsSection {\n Component: ComponentType<FieldSettingsProps>;\n /** Pure validity check: true blocks confirm even while errors are hidden.\n * The section shows errors according to `showValidationErrors`. */\n hasError(fieldType?: string): boolean;\n /** Passed to `FieldActions.addField`/`editField` as-is. */\n getValues(fieldType?: string): FieldSettings;\n /**\n * Fills the inputs when the modal opens: the field being edited, or nothing\n * for a new field. Pushed in rather than read from a prop, so the values are\n * there whether or not the section has been rendered yet.\n */\n setValues(field?: Field): void;\n /**\n * Prefills a new field's rules from the caller's requested initial values —\n * there is no backing `Field` yet, so this is separate from `setValues`.\n * Absent ⇒ the section doesn't support prefilling any rule this way, and\n * the modal drops that rule from `lockedProperties` rather than locking a\n * control at a value it could never actually apply.\n */\n setInitialValues?(initial: { required?: boolean }): void;\n}\n\n/** Add/edit/delete capability a source exposes. Present ⇒ field management UI shows. */\nexport interface FieldManagement {\n /** False ⇒ the add-field CTA is hidden entirely. */\n canAddFields: boolean;\n /** True ⇒ the add-field CTA renders but is disabled. */\n addFieldDisabled: boolean;\n /** Hint text shown beneath the add-field CTA while it is disabled. */\n addFieldDisabledHint?: string;\n canEditField(field: Field): boolean;\n /** `origin` is the UI surface the delete was triggered from; used for BI. */\n deleteField(fieldId: string, origin: string): Promise<void>;\n\n /** Everything the add/edit field modal shows: its titles, and the field types\n * it offers with what each one brings to it. */\n fieldModal: {\n text: FieldModalText;\n /** Default option loader for built-in reference and multi-reference types. */\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n types: ResolvedFieldTypeOption[];\n /** Defaults for the read/write permissions per audience. Absent ⇒ the modal\n * shows no permissions section. */\n permissions?: FieldPermissions;\n /** Whether a field can be marked PII. A field type option overrides it with\n * its own `supportsPii`. */\n supportsPii?: boolean;\n };\n /** Existing field keys, used by the add modal to reject duplicates. */\n existingFieldKeys: string[];\n /** True when no more fields can be added because a limit is reached. */\n maxReached?: boolean;\n /** Returns the created field's id when the source can identify it, so the\n * modal can report it back to the caller. Absent ⇒ the caller isn't told\n * which field was created. */\n addField(draft: FieldDraft): Promise<string | void>;\n editField(fieldId: string, draft: FieldDraft): Promise<void>;\n /** Current values for an existing field, to prefill the edit modal. */\n getFieldDraft(fieldId: string): FieldDraft | undefined;\n getFieldPresentation?(field: Field): FieldPresentation | undefined;\n}\n\n/** A new-field property `OpenFieldModalOptions` can lock from editing. */\nexport type LockableFieldProperty = 'type' | 'name' | 'required';\n\n/** Options for opening the add/edit field modal. */\nexport interface OpenFieldModalOptions {\n fieldId?: string;\n origin?: CustomFieldOrigin;\n customOrigin?: string;\n /** Fired with the field's id after it's successfully created or edited.\n * Not called for a create when the source can't report which field it\n * created. */\n onSave?: (fieldId: string) => void;\n /** Prefills a new field. Ignored when `fieldId` is set — edit mode prefills\n * from the existing field instead. */\n initialField?: {\n /** Prefilled; locked when included in `lockedProperties`. */\n type?: string;\n /** Prefilled; locked when included in `lockedProperties`. */\n name?: string;\n /** Prefilled; locked when included in `lockedProperties`. Support depends\n * on the picked type's settings section — see `FieldSettingsSection.setInitialValues`. */\n required?: boolean;\n };\n /** Properties the user can't change, on top of being prefilled. A property\n * with no matching `initialField` value is never locked — there is nothing\n * to lock it to. */\n lockedProperties?: readonly LockableFieldProperty[];\n}\n\n/** Archiving capability a source exposes. Present ⇒ archive/restore UI shows. */\nexport interface FieldArchive {\n items: ArchivedFieldItem[];\n shouldDisplay: boolean;\n /** Whether the archived-items panel is currently open. */\n isOpen: boolean;\n openPanel(): void;\n closePanel(): void;\n /** `origin` is the UI surface the action was triggered from; used for BI. */\n archiveField(fieldId: string, origin: string): Promise<void>;\n restoreField(fieldId: string, origin: string): Promise<void>;\n /** Display name for a field, for the confirm-dialog copy. */\n fieldName(fieldId: string): string;\n}\n\n/**\n * The source-neutral fields data a collection reads, implemented by each source\n * adapter. Rendering — field modals, filter elements — is not here; it lives in\n * the collection-page layer.\n */\nexport interface FieldsSource {\n /** Loads the fields (schema/data). The collection runs this once, tracks its\n * status, and shows a retry toast on failure. */\n load(): Promise<void>;\n\n fields: Field[];\n filterableFields: Field[];\n /** The fields the manage-fields panel lists — the source's editable fields. */\n manageableFields: Field[];\n /** Column id for a field. Sources that group fields prefix the group; flat sources use the field key. */\n columnIdForField(field: Field): string;\n /** WQL field path for a filter. Sources that group fields prefix the group; flat sources use the field key. */\n queryFieldId(field: Field): string;\n /** The value to display for a field on a row. */\n getCellValue(row: unknown, field: Field): unknown;\n /** Writes a new value for a field on a row, returning the updated row. Present when cells can be edited in place. */\n setCellValue?(row: unknown, field: Field, value: unknown): unknown;\n\n /** Replaces the source's fields with a freshly-returned map, updating the\n * columns with no refetch. Present when the source holds its fields in a\n * mergeable state (e.g. a loaded schema); used after an import creates fields. */\n mergeFields?(fields: Schema['fields']): void;\n\n /** Field-type definitions the source supports: how a field of that type\n * renders, filters and validates. Built-in types are keyed by their\n * `PatternsFieldType`; consumer-defined types are keyed by the string a field\n * references via `customType`. The add/edit field modal never reads this —\n * see `FieldManagement.fieldModal`. */\n fieldTypes?: FieldTypeDefinition[];\n getFieldPresentation?(field: Field): FieldPresentation | undefined;\n\n /** Present when fields can be added/edited/deleted. */\n fieldManagement?: FieldManagement;\n\n /** The collection's field-mutation actions (delete/makePrimary/duplicate/…),\n * driving the shared FieldActions menu. Absent ⇒ no per-field action menu. */\n fieldActions?: FieldActions;\n\n /** Present when the source supports archiving fields. */\n archive?: FieldArchive;\n\n /** Present when fields are grouped. Absent ⇒ flat list. */\n groups?: {\n all: string[];\n fieldsForGroup(group: string): Field[];\n };\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/FieldsSource.ts"],"sourcesContent":["import type { ComponentType } from 'react';\nimport type { Field, PatternsFieldType } from './Field';\nimport type { FieldActions, FieldSettings, Schema } from './Schema';\nimport type {\n FieldTypeDefinition,\n FieldTypeDisplay,\n} from './FieldTypeDefinition';\nimport type { CustomFieldOrigin } from '../services';\n\n/** Presentation for one existing field, without changing its type or behavior. */\nexport interface FieldPresentation {\n typeDisplay?: Partial<FieldTypeDisplay>;\n collectionInputLabel?: string;\n}\n\n/** A field the source has archived. Sources without archiving omit `archive`. */\nexport interface ArchivedFieldItem {\n id: string;\n label: string;\n isPii?: boolean;\n}\n\n/** A `FieldTypeOption` the modal can render: the id and label a source left to\n * the defaults are filled in. */\nexport interface ResolvedFieldTypeOption {\n /** Stored on the draft; the source maps it back to its native type. */\n id: string;\n label: string;\n namePlaceholder?: string;\n /** Fallback field ID base when the name cannot produce a valid ID.\n * Default: the normalized type ID. Numeric suffixes resolve collisions. */\n keyBase?: string;\n subtitle?: string;\n /** Group heading in the type list; types sharing a heading form one group. */\n group?: string;\n /** Whether a field of this type can be marked PII. Absent ⇒ follows the\n * source-wide `supportsPii`. */\n supportsPii?: boolean;\n /** Warning to show while the PII toggle is on. Called on every render.\n * Absent ⇒ none. */\n piiWarning?: () => FieldPiiWarning | undefined;\n /** This type's own part of the collapsible section below the main fields.\n * Absent ⇒ the section holds only what the modal itself puts there. */\n settingsSection?: FieldSettingsSection;\n /** Collection picker shown below the type picker. For built-in reference\n * types, absent copy can use the source's referenceable collection loader. */\n collectionInput?: FieldModalCollectionInput;\n /** Drives the type icon in the modal. */\n patternsType: PatternsFieldType;\n /** Type icons for the picker. Absent ⇒ the icon derives from `patternsType`. */\n icons?: { Small: ComponentType; Medium: ComponentType };\n}\n\n/** Read/write permission defaults a source supports, per audience. */\nexport interface FieldPermissions {\n installedApps?: {\n hide?: boolean;\n defaultRead?: boolean;\n defaultWrite?: boolean;\n };\n siteVisitors?: {\n hide?: boolean;\n defaultRead?: boolean;\n defaultWrite?: boolean;\n };\n}\n\n/** The values the add/edit field modal collects, source-neutral. */\nexport interface FieldDraft {\n type?: string;\n key: string;\n name: string;\n readApps: boolean;\n readUsers: boolean;\n writeApps: boolean;\n writeUsers: boolean;\n containsPii: boolean;\n /** Collection selected by the modal's collection picker, when a type has one. */\n referencedCollectionId?: string;\n /** The field this draft was built from, for the source's settings section to\n * read its own values off. Absent for a new field. */\n field?: Field;\n /** What the source's settings section collected, on its way to that source's\n * `addField`/`editField`. */\n settings?: FieldSettings;\n}\n\n/** The add-modal subtitle: a line of text, an optional second note line, and an\n * optional \"learn more\" link. */\nexport interface FieldModalSubtitle {\n text: string;\n note?: string;\n learnMore?: { label: string; href: string };\n}\n\n/** The text a source supplies for the add/edit field modal. */\nexport interface FieldModalText {\n addTitle: string;\n editTitle: string;\n /** Subtitle for the add modal; omit for none. */\n addSubtitle?: FieldModalSubtitle;\n /** Label of the collapsible section below the main fields. */\n settingsLabel?: string;\n /** Label of the field ID input. Absent ⇒ the standard key label. */\n keyLabel?: string;\n}\n\n/** A warning shown under the PII toggle, with an optional action button. */\nexport interface FieldPiiWarning {\n text: string;\n action?: { label: string; onClick: () => void };\n}\n\nexport interface FieldModalCollectionOption {\n id: string;\n label: string;\n}\n\nexport type FieldModalCollectionOptionsLoader = () => Promise<\n FieldModalCollectionOption[]\n>;\n\nexport interface FieldModalCollectionAction {\n label: string;\n icon?: ComponentType;\n disabled?: boolean;\n /** Return an option to select, or undefined on cancellation. The option may\n * be pending creation; persistence remains the source's responsibility. */\n onClick: () => Promise<FieldModalCollectionOption | undefined>;\n}\n\n/** Extra collection picker a field type can add to the main modal body. */\nexport interface FieldModalCollectionInput {\n label?: string;\n placeholder?: string;\n emptyStateMessage?: string;\n errorMessage?: string;\n required?: boolean;\n loadOptions?: FieldModalCollectionOptionsLoader;\n /** An action below the options, also shown when no options match. */\n dropdownAction?: FieldModalCollectionAction;\n /** Restores the picker value from an existing field. */\n getValue?: (field: Field) => string | undefined;\n /** Adds picker-derived values to the source-owned settings payload. */\n getSettings?: (collectionId: string) => FieldSettings;\n}\n\nexport interface FieldSettingsProps {\n /** The picked field type, or absent before one is picked. */\n fieldType?: string;\n /** Validation rules the section should render as fixed, not user-editable.\n * A section ignores any entry it doesn't recognize. */\n lockedRules?: readonly string[];\n /** When false, hide error styling and messages.\n * `hasError` must still report validity. Omit to show errors immediately. */\n showValidationErrors?: boolean;\n}\n\n/**\n * The collapsible section below the main add/edit field inputs, supplied by the\n * source. The modal renders it, blocks confirm while it has an error, and hands\n * its values to the source's own `addField`/`editField` — it never looks inside.\n */\nexport interface FieldSettingsSection {\n Component: ComponentType<FieldSettingsProps>;\n /** Pure validity check: true blocks confirm even while errors are hidden.\n * The section shows errors according to `showValidationErrors`. */\n hasError(fieldType?: string): boolean;\n /** Passed to `FieldActions.addField`/`editField` as-is. */\n getValues(fieldType?: string): FieldSettings;\n /**\n * Fills the inputs when the modal opens: the field being edited, or nothing\n * for a new field. Pushed in rather than read from a prop, so the values are\n * there whether or not the section has been rendered yet.\n */\n setValues(field?: Field): void;\n /**\n * Prefills a new field's rules from the caller's requested initial values —\n * there is no backing `Field` yet, so this is separate from `setValues`.\n * Absent ⇒ the section doesn't support prefilling any rule this way, and\n * the modal drops that rule from `lockedProperties` rather than locking a\n * control at a value it could never actually apply.\n */\n setInitialValues?(initial: { required?: boolean }): void;\n}\n\n/** Add/edit/delete capability a source exposes. Present ⇒ field management UI shows. */\nexport interface FieldManagement {\n /** False ⇒ the add-field CTA is hidden entirely. */\n canAddFields: boolean;\n /** True ⇒ the add-field CTA renders but is disabled. */\n addFieldDisabled: boolean;\n /** Hint text shown beneath the add-field CTA while it is disabled. */\n addFieldDisabledHint?: string;\n canEditField(field: Field): boolean;\n /** Allows changing PII on an existing supported field. Default: disabled. */\n canEditFieldPii?(field: Field): boolean;\n /** `origin` is the UI surface the delete was triggered from; used for BI. */\n deleteField(fieldId: string, origin: string): Promise<void>;\n\n /** Everything the add/edit field modal shows: its titles, and the field types\n * it offers with what each one brings to it. */\n fieldModal: {\n text: FieldModalText;\n /** Default option loader for built-in reference and multi-reference types. */\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n types: ResolvedFieldTypeOption[];\n /** Defaults for the read/write permissions per audience. Absent ⇒ the modal\n * shows no permissions section. */\n permissions?: FieldPermissions;\n /** Whether a field can be marked PII. A field type option overrides it with\n * its own `supportsPii`. */\n supportsPii?: boolean;\n };\n /** Existing field keys, used by the add modal to reject duplicates. */\n existingFieldKeys: string[];\n /** True when no more fields can be added because a limit is reached. */\n maxReached?: boolean;\n /** Returns the created field's id when the source can identify it, so the\n * modal can report it back to the caller. Absent ⇒ the caller isn't told\n * which field was created. */\n addField(draft: FieldDraft): Promise<string | void>;\n editField(fieldId: string, draft: FieldDraft): Promise<void>;\n /** Current values for an existing field, to prefill the edit modal. */\n getFieldDraft(fieldId: string): FieldDraft | undefined;\n getFieldPresentation?(field: Field): FieldPresentation | undefined;\n}\n\n/** A new-field property `OpenFieldModalOptions` can lock from editing. */\nexport type LockableFieldProperty = 'type' | 'name' | 'required';\n\n/** Options for opening the add/edit field modal. */\nexport interface OpenFieldModalOptions {\n fieldId?: string;\n origin?: CustomFieldOrigin;\n customOrigin?: string;\n /** Fired with the field's id after it's successfully created or edited.\n * Not called for a create when the source can't report which field it\n * created. */\n onSave?: (fieldId: string) => void;\n /** Prefills a new field. Ignored when `fieldId` is set — edit mode prefills\n * from the existing field instead. */\n initialField?: {\n /** Prefilled; locked when included in `lockedProperties`. */\n type?: string;\n /** Prefilled; locked when included in `lockedProperties`. */\n name?: string;\n /** Prefilled; locked when included in `lockedProperties`. Support depends\n * on the picked type's settings section — see `FieldSettingsSection.setInitialValues`. */\n required?: boolean;\n };\n /** Properties the user can't change, on top of being prefilled. A property\n * with no matching `initialField` value is never locked — there is nothing\n * to lock it to. */\n lockedProperties?: readonly LockableFieldProperty[];\n}\n\n/** Archiving capability a source exposes. Present ⇒ archive/restore UI shows. */\nexport interface FieldArchive {\n items: ArchivedFieldItem[];\n shouldDisplay: boolean;\n /** Whether the archived-items panel is currently open. */\n isOpen: boolean;\n openPanel(): void;\n closePanel(): void;\n /** `origin` is the UI surface the action was triggered from; used for BI. */\n archiveField(fieldId: string, origin: string): Promise<void>;\n restoreField(fieldId: string, origin: string): Promise<void>;\n /** Display name for a field, for the confirm-dialog copy. */\n fieldName(fieldId: string): string;\n}\n\n/**\n * The source-neutral fields data a collection reads, implemented by each source\n * adapter. Rendering — field modals, filter elements — is not here; it lives in\n * the collection-page layer.\n */\nexport interface FieldsSource {\n /** Loads the fields (schema/data). The collection runs this once, tracks its\n * status, and shows a retry toast on failure. */\n load(): Promise<void>;\n\n fields: Field[];\n filterableFields: Field[];\n /** The fields the manage-fields panel lists — the source's editable fields. */\n manageableFields: Field[];\n /** Column id for a field. Sources that group fields prefix the group; flat sources use the field key. */\n columnIdForField(field: Field): string;\n /** WQL field path for a filter. Sources that group fields prefix the group; flat sources use the field key. */\n queryFieldId(field: Field): string;\n /** The value to display for a field on a row. */\n getCellValue(row: unknown, field: Field): unknown;\n /** Writes a new value for a field on a row, returning the updated row. Present when cells can be edited in place. */\n setCellValue?(row: unknown, field: Field, value: unknown): unknown;\n\n /** Replaces the source's fields with a freshly-returned map, updating the\n * columns with no refetch. Present when the source holds its fields in a\n * mergeable state (e.g. a loaded schema); used after an import creates fields. */\n mergeFields?(fields: Schema['fields']): void;\n\n /** Field-type definitions the source supports: how a field of that type\n * renders, filters and validates. Built-in types are keyed by their\n * `PatternsFieldType`; consumer-defined types are keyed by the string a field\n * references via `customType`. The add/edit field modal never reads this —\n * see `FieldManagement.fieldModal`. */\n fieldTypes?: FieldTypeDefinition[];\n getFieldPresentation?(field: Field): FieldPresentation | undefined;\n\n /** Present when fields can be added/edited/deleted. */\n fieldManagement?: FieldManagement;\n\n /** The collection's field-mutation actions (delete/makePrimary/duplicate/…),\n * driving the shared FieldActions menu. Absent ⇒ no per-field action menu. */\n fieldActions?: FieldActions;\n\n /** Present when the source supports archiving fields. */\n archive?: FieldArchive;\n\n /** Present when fields are grouped. Absent ⇒ flat list. */\n groups?: {\n all: string[];\n fieldsForGroup(group: string): Field[];\n };\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sourceFetchData","source","query","backend","schema","loadSchema","visibleColumns","columns","find","searchableFieldIds","length","defineSchemaSource","input","collectionId","paginationMode","fieldModal","fieldTypes","fieldPermissions","supportsPii","references","getReferencedCollectionSource","loaded","resolved","then","result","catch","error","undefined","setLoadedSchema","Promise","resolve","s","displayField","itemKey","item","_resolved","String","idField","itemName","_resolved2","canAddFields","_s$schemaPermissions","schemaPermissions","createField","isLockedField","field","isSystem","id","canEditField","_s$schemaPermissions2","updateField","canDeleteField","_s$schemaPermissions3","deleteField","getFieldValue","setFieldValue","value","schemaParams","_resolved3","_resolved4","_resolved5","tableId","tableName","name","tableType","type","text","loadReferenceableCollectionOptions","types","getFieldPresentation","canMakePrimary","getDeleteFieldConfirmation"],"sources":["../../../src/types/SchemaSource.ts"],"sourcesContent":["import type { Field, PatternsFieldType } from './Field';\nimport type { FieldTypeDefinition } from './FieldTypeDefinition';\nimport type { Schema, LoadedSchema, FindOptions } from './Schema';\nimport type {\n FieldPresentation,\n FieldModalText,\n FieldModalCollectionInput,\n FieldModalCollectionOptionsLoader,\n FieldPermissions,\n FieldPiiWarning,\n FieldSettingsSection,\n} from './FieldsSource';\nimport type {\n OffsetQuery,\n OffsetQueryResult,\n} from '../hooks/paginationModeConfig';\n\n/** A field type the add/edit field modal offers, with everything that type\n * brings to it. Declare one entry per `patternsType` — the type is the entry's\n * identity. Nothing here reaches the table or the filters; that is `fieldTypes`\n * (`FieldTypeDefinition[]`). */\nexport interface FieldTypeOption {\n patternsType: PatternsFieldType;\n /** Custom display name. Absent ⇒ the UI's standard name for this type. */\n label?: string;\n /** Custom name-input placeholder. Absent ⇒ the UI's standard placeholder. */\n namePlaceholder?: string;\n /** Fallback field ID base when the name cannot produce a valid ID.\n * Default: the normalized type ID. Numeric suffixes resolve collisions. */\n keyBase?: string;\n /** A one-line description shown under the type in the add-field menu. */\n subtitle?: string;\n /** The group heading this type is listed under in the add-field menu, in\n * first-seen order. Types sharing a heading form one group. Absent ⇒\n * ungrouped. */\n group?: string;\n /** Whether a field of this type can be marked PII. Absent ⇒ follows the\n * source's `supportsPii`. */\n supportsPii?: boolean;\n /** Warning shown while the PII toggle is on. Read on every render, so it can\n * use data that only exists once the schema has loaded. Default: none. */\n piiWarning?: () => FieldPiiWarning | undefined;\n /** This type's own part of the collapsible section in the add/edit field\n * modal. Default: none. */\n settingsSection?: FieldSettingsSection;\n /** Collection picker shown in the main add/edit field form. */\n collectionInput?: FieldModalCollectionInput;\n}\n\n/** Everything the add/edit field modal shows for this source. */\nexport interface FieldModalInput {\n /** Title and subtitle. Default: generic titles. */\n text?: FieldModalText;\n /** Default option loader for reference-like built-in field types. */\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n /** The types the modal offers, in display order. Default: none. */\n types?: FieldTypeOption[];\n}\n\n/** Copy shown before deleting a field. Strings are translated by the caller. */\nexport interface DeleteFieldConfirmation {\n title: string;\n description: string;\n /** When provided, confirmation requires this checkbox to be checked. */\n confirmationCheckboxLabel?: string;\n}\n\n/** Identifies the collection behind a table on BI events. */\nexport interface SchemaBiParams {\n tableId?: string;\n tableName?: string;\n tableType?: string;\n}\n\n/** What a caller passes. Only `collectionId` and `loadSchema` are required. */\nexport interface SchemaSourceInput<T> {\n collectionId: string;\n loadSchema: () => Promise<LoadedSchema<T>>;\n /** Sources for collections this one references, keyed by the referenced\n * collection id. A renderer resolves a reference field through the matching\n * entry — its `loadSchema` gives the referenced schema and `sourceFetchData`\n * queries the referenced items. Default: none. */\n references?: Record<string, SchemaSource<any>>;\n /** Lazy source lookup for a referenced collection that is not in `references`.\n * Is used when a reference field is created in the add field modal.\n * The returned source owns its own async schema/item loading. */\n getReferencedCollectionSource?: (\n collectionId: string,\n ) => SchemaSource<any> | undefined;\n paginationMode?: 'offset';\n /** Stable row identity. Default: `row[idField]`. */\n itemKey?: (item: T) => string;\n /** Row display label. Default: `row[displayField]`. */\n itemName?: (item: T) => string;\n /** Fields free-text search runs against. Default: `[displayField]`. */\n searchableFieldIds?: (schema: Schema) => string[];\n /** What the add/edit field modal shows. Default: no types, generic titles. */\n fieldModal?: FieldModalInput;\n /** Consumer-defined field types: how a field of that type renders, filters and\n * validates wherever it appears. A field with `type: 'CUSTOM'` resolves its\n * definition here by `customType`. The add/edit field modal never reads this\n * — see `fieldModal`. Default: none. */\n fieldTypes?: FieldTypeDefinition[];\n /** Overrides one existing field's type label, icons and collection-picker\n * label. Does not change its type, values or add-field options. */\n getFieldPresentation?: (field: Field) => FieldPresentation | undefined;\n /** Default: `schemaPermissions.createField`. */\n canAddFields?: (schema: Schema) => boolean;\n /** Default: `schemaPermissions.updateField`, except for system fields and\n * the id field. */\n canEditField?: (field: Field, schema: Schema) => boolean;\n /** Default: `schemaPermissions.deleteField`, except for system fields and\n * the id field. */\n canDeleteField?: (field: Field, schema: Schema) => boolean;\n /** Whether a field can become the primary field. When omitted, only\n * `SHORT_TEXT` and `LONG_TEXT` fields can. When set, its result replaces\n * that rule, so return `false` for non-text fields too. */\n canMakePrimary?: (field: Field, schema: Schema) => boolean;\n /** Resolved when deletion is requested. Undefined keeps the default dialog. */\n getDeleteFieldConfirmation?: (\n field: Field,\n schema: Schema,\n ) => DeleteFieldConfirmation | undefined;\n /** Permission defaults shown in the modal. Absent ⇒ no permissions section. */\n fieldPermissions?: FieldPermissions;\n /** Default: `false`. */\n supportsPii?: boolean;\n /** The value of a field on an item. Default: `item[field.id]`. */\n getFieldValue?: (item: T, field: Field) => unknown;\n /** Writes a field's value on an item, returning the updated item.\n * Default: `{ ...item, [field.id]: value }`. */\n setFieldValue?: (item: T, field: Field, value: unknown) => T;\n}\n\n/** The resolved source: defaults filled, `loadSchema` memoized. */\nexport interface SchemaSource<T> {\n readonly collectionId: string;\n loadSchema: () => Promise<LoadedSchema<T>>;\n readonly paginationMode: 'offset';\n /** Stable row identity. */\n itemKey: (item: T) => string;\n /** Row display label. */\n itemName: (item: T) => string;\n /** Sources for referenced collections, keyed by referenced collection id. */\n readonly references: Record<string, SchemaSource<any>>;\n getReferencedCollectionSource?: (\n collectionId: string,\n ) => SchemaSource<any> | undefined;\n readonly fieldModal: {\n text?: FieldModalText;\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n types: FieldTypeOption[];\n };\n readonly fieldTypes: FieldTypeDefinition[];\n getFieldPresentation?: (field: Field) => FieldPresentation | undefined;\n searchableFieldIds: (schema: Schema) => string[];\n canAddFields: (schema: Schema) => boolean;\n canEditField: (field: Field, schema: Schema) => boolean;\n canDeleteField: (field: Field, schema: Schema) => boolean;\n canMakePrimary?: (field: Field, schema: Schema) => boolean;\n getDeleteFieldConfirmation?: (\n field: Field,\n schema: Schema,\n ) => DeleteFieldConfirmation | undefined;\n readonly fieldPermissions?: FieldPermissions;\n readonly supportsPii: boolean;\n /** The value of a field on an item. */\n getFieldValue: (item: T, field: Field) => unknown;\n /** Writes a field's value on an item, returning the updated item. */\n setFieldValue: (item: T, field: Field, value: unknown) => T;\n schemaParams: () => SchemaBiParams;\n /** Replaces the memoized schema returned by later `loadSchema()` calls.\n * No-op before the first successful load. */\n setLoadedSchema?: (schema: Schema) => void;\n}\n\ntype OffsetFind<T> = (\n query: OffsetQuery,\n options?: FindOptions,\n) => Promise<OffsetQueryResult<T>>;\n\n/** The collection fetch derived from a source: loads once, then queries the\n * backend's `find`.\n *\n * Free-text search covers the columns the page is showing: the table keeps\n * `query.columns` in sync with them, so the scope comes off the query rather\n * than being threaded in. Falls back to the source's own `searchableFieldIds`\n * before any columns are known (or with no table attached). */\nexport function sourceFetchData<T>(\n source: SchemaSource<T>,\n): (query: OffsetQuery) => Promise<OffsetQueryResult<T>> {\n return async (query) => {\n const { backend, schema } = await source.loadSchema();\n // `columns` is the visible-column list; `fields` is the projection, which a\n // source-driven table doesn't set.\n const visibleColumns = query.columns;\n return (backend.find as OffsetFind<T>)(query, {\n searchableFieldIds: visibleColumns?.length\n ? visibleColumns\n : source.searchableFieldIds(schema),\n });\n };\n}\n\n/** Fills source-neutral defaults over `input` and memoizes the load so the collection\n * query and the table columns share a single fetch. */\nexport function defineSchemaSource<T>(\n input: SchemaSourceInput<T>,\n): SchemaSource<T> {\n const {\n collectionId,\n paginationMode = 'offset',\n fieldModal = {},\n fieldTypes = [],\n fieldPermissions,\n supportsPii = false,\n references = {},\n getReferencedCollectionSource,\n } = input;\n\n let loaded: Promise<LoadedSchema<T>> | undefined;\n let resolved: LoadedSchema<T> | undefined;\n\n const loadSchema = () =>\n (loaded ??= input\n .loadSchema()\n .then((result) => {\n resolved = result;\n return result;\n })\n .catch((error) => {\n loaded = undefined;\n throw error;\n }));\n\n const setLoadedSchema = (schema: Schema) => {\n if (!resolved) {\n return;\n }\n resolved = { ...resolved, schema };\n loaded = Promise.resolve(resolved);\n };\n\n const searchableFieldIds =\n input.searchableFieldIds ?? ((s) => [s.displayField]);\n\n const itemKey =\n input.itemKey ??\n ((item) =>\n String(\n (item as Record<string, unknown>)[resolved?.schema.idField ?? '_id'] ??\n '',\n ));\n const itemName =\n input.itemName ??\n ((item) =>\n String(\n (item as Record<string, unknown>)[\n resolved?.schema.displayField ?? '_id'\n ] ?? '',\n ));\n const canAddFields =\n input.canAddFields ?? ((s) => s.schemaPermissions?.createField ?? false);\n const isLockedField = (field: Field, s: Schema) =>\n field.isSystem === true || field.id === s.idField;\n const canEditField =\n input.canEditField ??\n ((field, s) =>\n (s.schemaPermissions?.updateField ?? false) && !isLockedField(field, s));\n const canDeleteField =\n input.canDeleteField ??\n ((field, s) =>\n (s.schemaPermissions?.deleteField ?? false) && !isLockedField(field, s));\n const getFieldValue =\n input.getFieldValue ??\n ((item, field) => (item as Record<string, unknown>)[field.id]);\n const setFieldValue =\n input.setFieldValue ??\n ((item, field, value) => ({ ...item, [field.id]: value } as T));\n\n const schemaParams = (): SchemaBiParams => ({\n tableId: resolved?.schema.id ?? collectionId,\n tableName: resolved?.schema.name,\n tableType: resolved?.schema.type,\n });\n\n return {\n collectionId,\n loadSchema,\n paginationMode,\n itemKey,\n itemName,\n references,\n ...(getReferencedCollectionSource && { getReferencedCollectionSource }),\n fieldModal: {\n text: fieldModal.text,\n loadReferenceableCollectionOptions:\n fieldModal.loadReferenceableCollectionOptions,\n types: fieldModal.types ?? [],\n },\n fieldTypes,\n getFieldPresentation: input.getFieldPresentation,\n searchableFieldIds,\n canAddFields,\n canEditField,\n canDeleteField,\n canMakePrimary: input.canMakePrimary,\n getDeleteFieldConfirmation: input.getDeleteFieldConfirmation,\n fieldPermissions,\n supportsPii,\n getFieldValue,\n setFieldValue,\n schemaParams,\n setLoadedSchema,\n };\n}\n"],"mappings":";;;;;AAiBA;AACA;AACA;AACA;;AA6BA;;AAUA;;AAQA;;AAOA;;AA4DA;;AA+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAC7BC,MAAuB,EACgC;EACvD,OAAO,MAAOC,KAAK,IAAK;IACtB,MAAM;MAAEC,OAAO;MAAEC;IAAO,CAAC,GAAG,MAAMH,MAAM,CAACI,UAAU,CAAC,CAAC;IACrD;IACA;IACA,MAAMC,cAAc,GAAGJ,KAAK,CAACK,OAAO;IACpC,OAAQJ,OAAO,CAACK,IAAI,CAAmBN,KAAK,EAAE;MAC5CO,kBAAkB,EAAEH,cAAc,YAAdA,cAAc,CAAEI,MAAM,GACtCJ,cAAc,GACdL,MAAM,CAACQ,kBAAkB,CAACL,MAAM;IACtC,CAAC,CAAC;EACJ,CAAC;AACH;;AAEA;AACA;AACO,SAASO,kBAAkBA,CAChCC,KAA2B,EACV;EACjB,MAAM;IACJC,YAAY;IACZC,cAAc,GAAG,QAAQ;IACzBC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,EAAE;IACfC,gBAAgB;IAChBC,WAAW,GAAG,KAAK;IACnBC,UAAU,GAAG,CAAC,CAAC;IACfC;EACF,CAA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ARoC,UAAA,CAAUtD,MAAM,CAAC2C,EAAE,KAAIlC,YAAY;MAC5CiD,SAAS,GAAAH,UAAA,GAAErC,QAAQ,qBAARqC,UAAA,CAAUvD,MAAM,CAAC2D,IAAI;MAChCC,SAAS,GAAAJ,UAAA,GAAEtC,QAAQ,qBAARsC,UAAA,CAAUxD,MAAM,CAAC6D;IAC9B,CAAC;EAAA,CAAC;EAEF,OAAO;IACLpD,YAAY;IACZR,UAAU;IACVS,cAAc;IACdmB,OAAO;IACPK,QAAQ;IACRnB,UAAU;IACV,IAAIC,6BAA6B,IAAI;MAAEA;IAA8B,CAAC,CAAC;IACvEL,UAAU,EAAE;MACVmD,IAAI,EAAEnD,UAAU,CAACmD,IAAI;MACrBC,kCAAkC,EAChCpD,UAAU,CAACoD,kCAAkC;MAC/CC,KAAK,EAAErD,UAAU,CAACqD,KAAK,IAAI;IAC7B,CAAC;IACDpD,UAAU;IACVqD,oBAAoB,EAAEzD,KAAK,CAACyD,oBAAoB;IAChD5D,kBAAkB;IAClB+B,YAAY;IACZQ,YAAY;IACZG,cAAc;IACdmB,cAAc,EAAE1D,KAAK,CAAC0D,cAAc;IACpCC,0BAA0B,EAAE3D,KAAK,CAAC2D,0BAA0B;IAC5DtD,gBAAgB;IAChBC,WAAW;IACXoC,aAAa;IACbC,aAAa;IACbE,YAAY;IACZ7B;EACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["sourceFetchData","source","query","backend","schema","loadSchema","visibleColumns","columns","find","searchableFieldIds","length","defineSchemaSource","input","collectionId","paginationMode","fieldModal","fieldTypes","fieldPermissions","supportsPii","references","getReferencedCollectionSource","loaded","resolved","then","result","catch","error","undefined","setLoadedSchema","Promise","resolve","s","displayField","itemKey","item","_resolved","String","idField","itemName","_resolved2","canAddFields","_s$schemaPermissions","schemaPermissions","createField","isLockedField","field","isSystem","id","canEditField","_s$schemaPermissions2","updateField","canDeleteField","_s$schemaPermissions3","deleteField","getFieldValue","setFieldValue","value","schemaParams","_resolved3","_resolved4","_resolved5","tableId","tableName","name","tableType","type","text","loadReferenceableCollectionOptions","types","getFieldPresentation","canMakePrimary","getDeleteFieldConfirmation","canEditFieldPii"],"sources":["../../../src/types/SchemaSource.ts"],"sourcesContent":["import type { Field, PatternsFieldType } from './Field';\nimport type { FieldTypeDefinition } from './FieldTypeDefinition';\nimport type { Schema, LoadedSchema, FindOptions } from './Schema';\nimport type {\n FieldPresentation,\n FieldModalText,\n FieldModalCollectionInput,\n FieldModalCollectionOptionsLoader,\n FieldPermissions,\n FieldPiiWarning,\n FieldSettingsSection,\n} from './FieldsSource';\nimport type {\n OffsetQuery,\n OffsetQueryResult,\n} from '../hooks/paginationModeConfig';\n\n/** A field type the add/edit field modal offers, with everything that type\n * brings to it. Declare one entry per `patternsType` — the type is the entry's\n * identity. Nothing here reaches the table or the filters; that is `fieldTypes`\n * (`FieldTypeDefinition[]`). */\nexport interface FieldTypeOption {\n patternsType: PatternsFieldType;\n /** Custom display name. Absent ⇒ the UI's standard name for this type. */\n label?: string;\n /** Custom name-input placeholder. Absent ⇒ the UI's standard placeholder. */\n namePlaceholder?: string;\n /** Fallback field ID base when the name cannot produce a valid ID.\n * Default: the normalized type ID. Numeric suffixes resolve collisions. */\n keyBase?: string;\n /** A one-line description shown under the type in the add-field menu. */\n subtitle?: string;\n /** The group heading this type is listed under in the add-field menu, in\n * first-seen order. Types sharing a heading form one group. Absent ⇒\n * ungrouped. */\n group?: string;\n /** Whether a field of this type can be marked PII. Absent ⇒ follows the\n * source's `supportsPii`. */\n supportsPii?: boolean;\n /** Warning shown while the PII toggle is on. Read on every render, so it can\n * use data that only exists once the schema has loaded. Default: none. */\n piiWarning?: () => FieldPiiWarning | undefined;\n /** This type's own part of the collapsible section in the add/edit field\n * modal. Default: none. */\n settingsSection?: FieldSettingsSection;\n /** Collection picker shown in the main add/edit field form. */\n collectionInput?: FieldModalCollectionInput;\n}\n\n/** Everything the add/edit field modal shows for this source. */\nexport interface FieldModalInput {\n /** Title and subtitle. Default: generic titles. */\n text?: FieldModalText;\n /** Default option loader for reference-like built-in field types. */\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n /** The types the modal offers, in display order. Default: none. */\n types?: FieldTypeOption[];\n}\n\n/** Copy shown before deleting a field. Strings are translated by the caller. */\nexport interface DeleteFieldConfirmation {\n title: string;\n description: string;\n /** When provided, confirmation requires this checkbox to be checked. */\n confirmationCheckboxLabel?: string;\n}\n\n/** Identifies the collection behind a table on BI events. */\nexport interface SchemaBiParams {\n tableId?: string;\n tableName?: string;\n tableType?: string;\n}\n\n/** What a caller passes. Only `collectionId` and `loadSchema` are required. */\nexport interface SchemaSourceInput<T> {\n collectionId: string;\n loadSchema: () => Promise<LoadedSchema<T>>;\n /** Sources for collections this one references, keyed by the referenced\n * collection id. A renderer resolves a reference field through the matching\n * entry — its `loadSchema` gives the referenced schema and `sourceFetchData`\n * queries the referenced items. Default: none. */\n references?: Record<string, SchemaSource<any>>;\n /** Lazy source lookup for a referenced collection that is not in `references`.\n * Is used when a reference field is created in the add field modal.\n * The returned source owns its own async schema/item loading. */\n getReferencedCollectionSource?: (\n collectionId: string,\n ) => SchemaSource<any> | undefined;\n paginationMode?: 'offset';\n /** Stable row identity. Default: `row[idField]`. */\n itemKey?: (item: T) => string;\n /** Row display label. Default: `row[displayField]`. */\n itemName?: (item: T) => string;\n /** Fields free-text search runs against. Default: `[displayField]`. */\n searchableFieldIds?: (schema: Schema) => string[];\n /** What the add/edit field modal shows. Default: no types, generic titles. */\n fieldModal?: FieldModalInput;\n /** Consumer-defined field types: how a field of that type renders, filters and\n * validates wherever it appears. A field with `type: 'CUSTOM'` resolves its\n * definition here by `customType`. The add/edit field modal never reads this\n * — see `fieldModal`. Default: none. */\n fieldTypes?: FieldTypeDefinition[];\n /** Overrides one existing field's type label, icons and collection-picker\n * label. Does not change its type, values or add-field options. */\n getFieldPresentation?: (field: Field) => FieldPresentation | undefined;\n /** Default: `schemaPermissions.createField`. */\n canAddFields?: (schema: Schema) => boolean;\n /** Default: `schemaPermissions.updateField`, except for system fields and\n * the id field. */\n canEditField?: (field: Field, schema: Schema) => boolean;\n /** Default: `schemaPermissions.deleteField`, except for system fields and\n * the id field. */\n canDeleteField?: (field: Field, schema: Schema) => boolean;\n /** Whether a field can become the primary field. When omitted, only\n * `SHORT_TEXT` and `LONG_TEXT` fields can. When set, its result replaces\n * that rule, so return `false` for non-text fields too. */\n canMakePrimary?: (field: Field, schema: Schema) => boolean;\n /** Resolved when deletion is requested. Undefined keeps the default dialog. */\n getDeleteFieldConfirmation?: (\n field: Field,\n schema: Schema,\n ) => DeleteFieldConfirmation | undefined;\n /** Permission defaults shown in the modal. Absent ⇒ no permissions section. */\n fieldPermissions?: FieldPermissions;\n /** Default: `false`. */\n supportsPii?: boolean;\n /** Allows changing PII on an existing supported field. Default: disabled.\n * Does not override `canEditField` or the field type's PII support. */\n canEditFieldPii?: (field: Field, schema: Schema) => boolean;\n /** The value of a field on an item. Default: `item[field.id]`. */\n getFieldValue?: (item: T, field: Field) => unknown;\n /** Writes a field's value on an item, returning the updated item.\n * Default: `{ ...item, [field.id]: value }`. */\n setFieldValue?: (item: T, field: Field, value: unknown) => T;\n}\n\n/** The resolved source: defaults filled, `loadSchema` memoized. */\nexport interface SchemaSource<T> {\n readonly collectionId: string;\n loadSchema: () => Promise<LoadedSchema<T>>;\n readonly paginationMode: 'offset';\n /** Stable row identity. */\n itemKey: (item: T) => string;\n /** Row display label. */\n itemName: (item: T) => string;\n /** Sources for referenced collections, keyed by referenced collection id. */\n readonly references: Record<string, SchemaSource<any>>;\n getReferencedCollectionSource?: (\n collectionId: string,\n ) => SchemaSource<any> | undefined;\n readonly fieldModal: {\n text?: FieldModalText;\n loadReferenceableCollectionOptions?: FieldModalCollectionOptionsLoader;\n types: FieldTypeOption[];\n };\n readonly fieldTypes: FieldTypeDefinition[];\n getFieldPresentation?: (field: Field) => FieldPresentation | undefined;\n searchableFieldIds: (schema: Schema) => string[];\n canAddFields: (schema: Schema) => boolean;\n canEditField: (field: Field, schema: Schema) => boolean;\n canDeleteField: (field: Field, schema: Schema) => boolean;\n canMakePrimary?: (field: Field, schema: Schema) => boolean;\n getDeleteFieldConfirmation?: (\n field: Field,\n schema: Schema,\n ) => DeleteFieldConfirmation | undefined;\n readonly fieldPermissions?: FieldPermissions;\n readonly supportsPii: boolean;\n canEditFieldPii?: (field: Field, schema: Schema) => boolean;\n /** The value of a field on an item. */\n getFieldValue: (item: T, field: Field) => unknown;\n /** Writes a field's value on an item, returning the updated item. */\n setFieldValue: (item: T, field: Field, value: unknown) => T;\n schemaParams: () => SchemaBiParams;\n /** Replaces the memoized schema returned by later `loadSchema()` calls.\n * No-op before the first successful load. */\n setLoadedSchema?: (schema: Schema) => void;\n}\n\ntype OffsetFind<T> = (\n query: OffsetQuery,\n options?: FindOptions,\n) => Promise<OffsetQueryResult<T>>;\n\n/** The collection fetch derived from a source: loads once, then queries the\n * backend's `find`.\n *\n * Free-text search covers the columns the page is showing: the table keeps\n * `query.columns` in sync with them, so the scope comes off the query rather\n * than being threaded in. Falls back to the source's own `searchableFieldIds`\n * before any columns are known (or with no table attached). */\nexport function sourceFetchData<T>(\n source: SchemaSource<T>,\n): (query: OffsetQuery) => Promise<OffsetQueryResult<T>> {\n return async (query) => {\n const { backend, schema } = await source.loadSchema();\n // `columns` is the visible-column list; `fields` is the projection, which a\n // source-driven table doesn't set.\n const visibleColumns = query.columns;\n return (backend.find as OffsetFind<T>)(query, {\n searchableFieldIds: visibleColumns?.length\n ? visibleColumns\n : source.searchableFieldIds(schema),\n });\n };\n}\n\n/** Fills source-neutral defaults over `input` and memoizes the load so the collection\n * query and the table columns share a single fetch. */\nexport function defineSchemaSource<T>(\n input: SchemaSourceInput<T>,\n): SchemaSource<T> {\n const {\n collectionId,\n paginationMode = 'offset',\n fieldModal = {},\n fieldTypes = [],\n fieldPermissions,\n supportsPii = false,\n references = {},\n getReferencedCollectionSource,\n } = input;\n\n let loaded: Promise<LoadedSchema<T>> | undefined;\n let resolved: LoadedSchema<T> | undefined;\n\n const loadSchema = () =>\n (loaded ??= input\n .loadSchema()\n .then((result) => {\n resolved = result;\n return result;\n })\n .catch((error) => {\n loaded = undefined;\n throw error;\n }));\n\n const setLoadedSchema = (schema: Schema) => {\n if (!resolved) {\n return;\n }\n resolved = { ...resolved, schema };\n loaded = Promise.resolve(resolved);\n };\n\n const searchableFieldIds =\n input.searchableFieldIds ?? ((s) => [s.displayField]);\n\n const itemKey =\n input.itemKey ??\n ((item) =>\n String(\n (item as Record<string, unknown>)[resolved?.schema.idField ?? '_id'] ??\n '',\n ));\n const itemName =\n input.itemName ??\n ((item) =>\n String(\n (item as Record<string, unknown>)[\n resolved?.schema.displayField ?? '_id'\n ] ?? '',\n ));\n const canAddFields =\n input.canAddFields ?? ((s) => s.schemaPermissions?.createField ?? false);\n const isLockedField = (field: Field, s: Schema) =>\n field.isSystem === true || field.id === s.idField;\n const canEditField =\n input.canEditField ??\n ((field, s) =>\n (s.schemaPermissions?.updateField ?? false) && !isLockedField(field, s));\n const canDeleteField =\n input.canDeleteField ??\n ((field, s) =>\n (s.schemaPermissions?.deleteField ?? false) && !isLockedField(field, s));\n const getFieldValue =\n input.getFieldValue ??\n ((item, field) => (item as Record<string, unknown>)[field.id]);\n const setFieldValue =\n input.setFieldValue ??\n ((item, field, value) => ({ ...item, [field.id]: value } as T));\n\n const schemaParams = (): SchemaBiParams => ({\n tableId: resolved?.schema.id ?? collectionId,\n tableName: resolved?.schema.name,\n tableType: resolved?.schema.type,\n });\n\n return {\n collectionId,\n loadSchema,\n paginationMode,\n itemKey,\n itemName,\n references,\n ...(getReferencedCollectionSource && { getReferencedCollectionSource }),\n fieldModal: {\n text: fieldModal.text,\n loadReferenceableCollectionOptions:\n fieldModal.loadReferenceableCollectionOptions,\n types: fieldModal.types ?? [],\n },\n fieldTypes,\n getFieldPresentation: input.getFieldPresentation,\n searchableFieldIds,\n canAddFields,\n canEditField,\n canDeleteField,\n canMakePrimary: input.canMakePrimary,\n getDeleteFieldConfirmation: input.getDeleteFieldConfirmation,\n fieldPermissions,\n supportsPii,\n canEditFieldPii: input.canEditFieldPii,\n getFieldValue,\n setFieldValue,\n schemaParams,\n setLoadedSchema,\n };\n}\n"],"mappings":";;;;;AAiBA;AACA;AACA;AACA;;AA6BA;;AAUA;;AAQA;;AAOA;;AA+DA;;AAgDA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,eAAeA,CAC7BC,MAAuB,EACgC;EACvD,OAAO,MAAOC,KAAK,IAAK;IACtB,MAAM;MAAEC,OAAO;MAAEC;IAAO,CAAC,GAAG,MAAMH,MAAM,CAACI,UAAU,CAAC,CAAC;IACrD;IACA;IACA,MAAMC,cAAc,GAAGJ,KAAK,CAACK,OAAO;IACpC,OAAQJ,OAAO,CAACK,IAAI,CAAmBN,KAAK,EAAE;MAC5CO,kBAAkB,EAAEH,cAAc,YAAdA,cAAc,CAAEI,MAAM,GACtCJ,cAAc,GACdL,MAAM,CAACQ,kBAAkB,CAACL,MAAM;IACtC,CAAC,CAAC;EACJ,CAAC;AACH;;AAEA;AACA;AACO,SAASO,kBAAkBA,CAChCC,KAA2B,EACV;EACjB,MAAM;IACJC,YAAY;IACZC,cAAc,GAAG,QAAQ;IACzBC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,EAAE;IACfC,gBAAgB;IAChBC,WAAW,GAAG,KAAK;IACnBC,UAAU,GAAG,CAAC,CAAC;IACfC;EACF,CAAC,GAAGR,KAAK;EAET,IAAIS,MAA4C;EAChD,IAAIC,QAAqC;EAEzC,MAAMjB,UAAU,GAAGA,CAAA,KAChBgB,MAAM,KAANA,MAAM,GAAKT,KAAK,CACdP,UAAU,CAAC,CAAC,CACZkB,IAAI,CAAEC,MAAM,IAAK;IAChBF,QAAQ,GAAGE,MAAM;IACjB,OAAOA,MAAM;EACf,CAAC,CAAC,CACDC,KAAK,CAAEC,KAAK,IAAK;IAChBL,MAAM,GAAGM,SAAS;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;IACPK,QAAQ;IACRnB,UAAU;IACV,IAAIC,6BAA6B,IAAI;MAAEA;IAA8B,CAAC,CAAC;IACvEL,UAAU,EAAE;MACVmD,IAAI,EAAEnD,UAAU,CAACmD,IAAI;MACrBC,kCAAkC,EAChCpD,UAAU,CAACoD,kCAAkC;MAC/CC,KAAK,EAAErD,UAAU,CAACqD,KAAK,IAAI;IAC7B,CAAC;IACDpD,UAAU;IACVqD,oBAAoB,EAAEzD,KAAK,CAACyD,oBAAoB;IAChD5D,kBAAkB;IAClB+B,YAAY;IACZQ,YAAY;IACZG,cAAc;IACdmB,cAAc,EAAE1D,KAAK,CAAC0D,cAAc;IACpCC,0BAA0B,EAAE3D,KAAK,CAAC2D,0BAA0B;IAC5DtD,gBAAgB;IAChBC,WAAW;IACXsD,eAAe,EAAE5D,KAAK,CAAC4D,eAAe;IACtClB,aAAa;IACbC,aAAa;IACbE,YAAY;IACZ7B;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"cairo.setupWidget.allComplete.title": "You’re all set",
|
|
193
193
|
"cairo.customFields.booleanValue.true": "Yes",
|
|
194
194
|
"cairo.tags.manageTags.modal.list.action.delete.CTA": "Delete",
|
|
195
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This
|
|
195
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This is used in your code and can’t be changed later.",
|
|
196
196
|
"cairo.filtersPanel.dateRange.title": "Date range",
|
|
197
197
|
"section.header.folders": "Folders",
|
|
198
198
|
"cairo.tags.manageTags.modal.list.input.save.CTA": "Save",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"cairo.entityPage.saveError-technical.toast.description": "Changes weren’t saved due to a technical issue on our side. ",
|
|
383
383
|
"cairo.import.summaryFailedHint": "Download the CSV to see error reasons for each item.",
|
|
384
384
|
"cairo.import.startImport": "Import",
|
|
385
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "
|
|
385
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "Field ID",
|
|
386
386
|
"cairo.customFields.addCustomField.modal.PII-setting.toggle.editNote": "PII can’t be changed after creation. To change it, create a new field.",
|
|
387
387
|
"section.header.items": "Items",
|
|
388
388
|
"cairo.fieldValidation.requiredField": "This field is required. ",
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
"cairo.tags.collectionPage.popover.emptyState.search.placeholder.asLabels": "Enter new label name",
|
|
490
490
|
"cairo.search.nothingMatches.title": "No results for “{term}”",
|
|
491
491
|
"cairo.custom-columns.more-actions.tooltip": "More actions",
|
|
492
|
-
"cairo.customFields.editCustomField.fieldKey.tooltip": "This
|
|
492
|
+
"cairo.customFields.editCustomField.fieldKey.tooltip": "This is used in your code and can’t be changed.",
|
|
493
493
|
"cairo.tags.manageTags.modal.toast.create.success.asLabels": "Label created.",
|
|
494
494
|
"cairo.table.advanced-sorting.dragAndDrop.tooltip": "Change the sort order of the columns. This won’t affect the order in which the columns appear in the table.",
|
|
495
495
|
"cairo.editableTable.deleteItem.success.toast": "{count, plural, one {Item deleted} other {# items deleted}}",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"cairo.setupWidget.allComplete.title": "You’re all set",
|
|
193
193
|
"cairo.customFields.booleanValue.true": "Yes",
|
|
194
194
|
"cairo.tags.manageTags.modal.list.action.delete.CTA": "Delete",
|
|
195
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This
|
|
195
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This is used in your code and can’t be changed later.",
|
|
196
196
|
"cairo.filtersPanel.dateRange.title": "Date range",
|
|
197
197
|
"section.header.folders": "Folders",
|
|
198
198
|
"cairo.tags.manageTags.modal.list.input.save.CTA": "Save",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"cairo.entityPage.saveError-technical.toast.description": "Changes weren’t saved due to a technical issue on our side. ",
|
|
383
383
|
"cairo.import.summaryFailedHint": "Download the CSV to see error reasons for each item.",
|
|
384
384
|
"cairo.import.startImport": "Import",
|
|
385
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "
|
|
385
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "Field ID",
|
|
386
386
|
"cairo.customFields.addCustomField.modal.PII-setting.toggle.editNote": "PII can’t be changed after creation. To change it, create a new field.",
|
|
387
387
|
"section.header.items": "Items",
|
|
388
388
|
"cairo.fieldValidation.requiredField": "This field is required. ",
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
"cairo.tags.collectionPage.popover.emptyState.search.placeholder.asLabels": "Enter new label name",
|
|
490
490
|
"cairo.search.nothingMatches.title": "No results for “{term}”",
|
|
491
491
|
"cairo.custom-columns.more-actions.tooltip": "More actions",
|
|
492
|
-
"cairo.customFields.editCustomField.fieldKey.tooltip": "This
|
|
492
|
+
"cairo.customFields.editCustomField.fieldKey.tooltip": "This is used in your code and can’t be changed.",
|
|
493
493
|
"cairo.tags.manageTags.modal.toast.create.success.asLabels": "Label created.",
|
|
494
494
|
"cairo.table.advanced-sorting.dragAndDrop.tooltip": "Change the sort order of the columns. This won’t affect the order in which the columns appear in the table.",
|
|
495
495
|
"cairo.editableTable.deleteItem.success.toast": "{count, plural, one {Item deleted} other {# items deleted}}",
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"cairo.setupWidget.allComplete.title": "You’re all set",
|
|
193
193
|
"cairo.customFields.booleanValue.true": "Yes",
|
|
194
194
|
"cairo.tags.manageTags.modal.list.action.delete.CTA": "Delete",
|
|
195
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This
|
|
195
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "This is used in your code and can’t be changed later.",
|
|
196
196
|
"cairo.filtersPanel.dateRange.title": "Date range",
|
|
197
197
|
"section.header.folders": "Folders",
|
|
198
198
|
"cairo.tags.manageTags.modal.list.input.save.CTA": "Save",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"cairo.entityPage.saveError-technical.toast.description": "Changes weren’t saved due to a technical issue on our side. ",
|
|
383
383
|
"cairo.import.summaryFailedHint": "Download the CSV to see error reasons for each item.",
|
|
384
384
|
"cairo.import.startImport": "Import",
|
|
385
|
-
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "
|
|
385
|
+
"cairo.customFields.addCustomField.modal.advancedSettings.key.title": "Field ID",
|
|
386
386
|
"cairo.customFields.addCustomField.modal.PII-setting.toggle.editNote": "PII can’t be changed after creation. To change it, create a new field.",
|
|
387
387
|
"section.header.items": "Items",
|
|
388
388
|
"cairo.fieldValidation.requiredField": "This field is required. ",
|
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
"cairo.tags.collectionPage.popover.emptyState.search.placeholder.asLabels": "Enter new label name",
|
|
490
490
|
"cairo.search.nothingMatches.title": "No results for “{term}”",
|
|
491
491
|
"cairo.custom-columns.more-actions.tooltip": "More actions",
|
|
492
|
-
"cairo.customFields.editCustomField.fieldKey.tooltip": "This
|
|
492
|
+
"cairo.customFields.editCustomField.fieldKey.tooltip": "This is used in your code and can’t be changed.",
|
|
493
493
|
"cairo.tags.manageTags.modal.toast.create.success.asLabels": "Label created.",
|
|
494
494
|
"cairo.table.advanced-sorting.dragAndDrop.tooltip": "Change the sort order of the columns. This won’t affect the order in which the columns appear in the table.",
|
|
495
495
|
"cairo.editableTable.deleteItem.success.toast": "{count, plural, one {Item deleted} other {# items deleted}}",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"cairo.import.editField": "Edit field",
|
|
41
41
|
"cairo.export.cancelTheExportGoBack": "Zpět",
|
|
42
42
|
"cairo.viewDropdown.category.info": "Jakékoli změny přednastavených zobrazení lze uložit jako nové zobrazení.",
|
|
43
|
-
"cairo.setupWidget.error.subtitle": "
|
|
43
|
+
"cairo.setupWidget.error.subtitle": "Došlo k technickým potížím. Zkuste to znovu za chvíli.",
|
|
44
44
|
"cairo.editableTable.contextMenu.selectAll.CTA": "Select all",
|
|
45
45
|
"cairo.customFields.addCustomField.modal.emptyFieldName.error": "Zadejte název pole.",
|
|
46
46
|
"cairo.table.custom-columns.indication.app.tooltip": "This field is managed by an app",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"cairo.emptyState.title": "Nic k zobrazení",
|
|
59
59
|
"cairo.sortableColumns.modal.cancel": "Zpět",
|
|
60
60
|
"cairo.customFields.writePermission.tooltip": "Tato možnost je k dispozici pouze pro vlastníky a spoluvlastníky.",
|
|
61
|
-
"cairo.setupWidget.progress.label": "{completed}/{total}
|
|
61
|
+
"cairo.setupWidget.progress.label": "Dokončeno {completed}/{total}",
|
|
62
62
|
"cairo.customFields.manageFields.subtitle": "Přidávejte, upravujte nebo archivujte vlastní pole.",
|
|
63
63
|
"cairo.tags.bulkItemUpdate.toast.error.CTA.asLabels": "Zkusit znovu",
|
|
64
64
|
"cairo.customFields.emptyStatePassive.subtitle": "Zde uvidíte pole, která přidáte",
|
|
65
65
|
"cairo.table.custom-columns.indication.system.tooltip": "This field is managed by the system",
|
|
66
66
|
"cairo.manageView.saveChanges.disabled.predefinedView.tooltip": "Toto je přednastavené zobrazení. Pokud chcete uložit změny, uložte jej jako nové zobrazení.",
|
|
67
67
|
"cairo.entityPage.header.subscribe.CTA": "Přihlásit odběr",
|
|
68
|
-
"cairo.setupWidget.error.cta": "
|
|
68
|
+
"cairo.setupWidget.error.cta": "Zkusit znovu",
|
|
69
69
|
"cairo.fieldValidation.required.label": "Make this a required field",
|
|
70
70
|
"cairo.customFields.fieldType.date": "Datum",
|
|
71
71
|
"cairo.search.Tab.noresults.title": "V záložce „{tabName}“ nebyly nalezeny žádné výsledky",
|
|
@@ -106,17 +106,17 @@
|
|
|
106
106
|
"cairo.editableTable.dateTime.placeholder": "Choose a date and time",
|
|
107
107
|
"cairo.filtersPanel.numRange.maxRange.error": "Hodnota „Do“ musí být větší než hodnota „Od“.",
|
|
108
108
|
"cairo.import.fileReadFailed": "Couldn’t read this file. Check your internet connection and that the file hasn’t been moved or deleted.",
|
|
109
|
-
"cairo.setupWidget.step.inProgress": "
|
|
109
|
+
"cairo.setupWidget.step.inProgress": "Probíhá",
|
|
110
110
|
"cairo.import.idCollisionLabel": "When items share the same ID",
|
|
111
111
|
"cairo.errorHandler.requestID.tooltip.cta": "Kopírovat ID",
|
|
112
112
|
"cairo.tags.manageTags.modal.deleteModal.cancel.CTA": "Zpět",
|
|
113
113
|
"cairo.dragAndDrop.discardChanges.CTA": "Zahodit",
|
|
114
|
-
"cairo.setupWidget.title": "
|
|
114
|
+
"cairo.setupWidget.title": "Nastavení",
|
|
115
115
|
"cairo.table.manage-fields.subtitle": "Choose which fields to show.",
|
|
116
116
|
"cairo.customFields.fieldType.dateAndTime.invalid.value": "Zadejte čas v tomto formátu: h:mm",
|
|
117
117
|
"cairo.export.overloadErrorMessage": "Z důvodu dočasného přetížení nemůže server export dokončit. Zkuste to prosím za chvíli znovu.",
|
|
118
118
|
"cairo.import.discardChanges.cancel": "Keep editing",
|
|
119
|
-
"cairo.setupWidget.allComplete.subtitle": "
|
|
119
|
+
"cairo.setupWidget.allComplete.subtitle": "Web je připravený ke spuštění – podívejte se, co můžete udělat dál.",
|
|
120
120
|
"cairo.table.custom-columns.dragAndDrop.subtitle": "Vyberte, které sloupce chcete zobrazit, nebo přetažením změňte jejich pořadí.",
|
|
121
121
|
"cairo.customFields.addCustomField.modal.emptyFieldType.error": "Vyberte typ pole.",
|
|
122
122
|
"cairo.filterOperator.notContains.tag": "does not contain",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"cairo.tags.creationLimitReached.error.asLabels": "{count, plural, one {Nelze vytvořit více než {limit} štítek. Odstraňte {count,number} štítek pro pokračování.} few {Nelze vytvořit více než {limit} štítky. Odstraňte {count,number} štítků pro pokračování.} many {Nelze vytvořit více než {limit} štítků. Odstraňte {count,number} štítků pro pokračování.} other {Nelze vytvořit více než {limit} štítků. Odstraňte {count,number} štítků pro pokračování.}}",
|
|
190
190
|
"cairo.deleteModal.title": "Opravdu to chcete odstranit?",
|
|
191
191
|
"cairo.customFields.fieldType.checkbox.Selected.notChecked": "Nezaškrtnuto",
|
|
192
|
-
"cairo.setupWidget.allComplete.title": "
|
|
192
|
+
"cairo.setupWidget.allComplete.title": "Vše je připraveno",
|
|
193
193
|
"cairo.customFields.booleanValue.true": "Ano",
|
|
194
194
|
"cairo.tags.manageTags.modal.list.action.delete.CTA": "Odstranit",
|
|
195
195
|
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "Tento klíč se použije ve vašem kódu. Později jej nelze změnit.",
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
"cairo.customFields.delete.modal.description": "Pole <bold>{selectedField}</bold> a související informace budou trvale odstraněny a nebude možné je obnovit.",
|
|
278
278
|
"cairo.tags.applyChanges.toast.success": "Tagy byly aktualizovány.",
|
|
279
279
|
"cairo.editableTable.contextMenu.editRow.noPermission.tooltip": "Nemáte oprávnění upravovat řádky",
|
|
280
|
-
"cairo.setupWidget.allComplete.cta": "
|
|
280
|
+
"cairo.setupWidget.allComplete.cta": "Přejít na ovládací panel",
|
|
281
281
|
"cairo.import.noMappingsTooltip": "Map at least one column to import",
|
|
282
282
|
"cairo.import.noRowsWarningTitle": "No rows found inside the CSV file",
|
|
283
283
|
"cairo.bulkSelected": "{num, plural, one {Vybráno {num,number}} few {Vybrány {num,number}} many {Vybráno {num,number}} other {Vybráno {num,number}}}",
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"cairo.import.noRowsWarningDescription": "The file was uploaded successfully, but no data was found inside the mapped columns. If it's intentional, continue as planned.",
|
|
347
347
|
"cairo.export.offlineMessage": "Export bude pokračovat, jakmile bude obnoveno připojení k internetu.",
|
|
348
348
|
"cairo.editableTable.email.validation.invalid": "Neplatný formát e‑mailu",
|
|
349
|
-
"cairo.setupWidget.error.title": "
|
|
349
|
+
"cairo.setupWidget.error.title": "Nastavení se nepodařilo načíst",
|
|
350
350
|
"cairo.confirm.button": "Potvrdit",
|
|
351
351
|
"cairo.filtersPanel.numRange.minRange.error": "Hodnota „Od“ musí být menší než hodnota „Do“.",
|
|
352
352
|
"cairo.table.custom-columns.indication.pii.tooltip": "This field contains personally identifiable information",
|
|
@@ -795,7 +795,7 @@
|
|
|
795
795
|
"cairo.tags.fqdn-not-found.manageTagsModal.error": "Tuto akci nelze dokončit",
|
|
796
796
|
"cairo.editableTable.deleteItem.error.toast": "Položky se nepodařilo odstranit",
|
|
797
797
|
"cairo.tags.tagsWidget.options.add.CTA.asLabels": "Vytvořit „{tagName}“",
|
|
798
|
-
"cairo.setupWidget.step.lockedTooltip": "
|
|
798
|
+
"cairo.setupWidget.step.lockedTooltip": "K tomuto úkolu nemáte přístup. Požádejte majitele webu o oprávnění.",
|
|
799
799
|
"cairo.import.title": "Import items from CSV",
|
|
800
800
|
"cairo.dragAndDrop.note": "Poznámka: Jakékoli provedené změny v pořadí položek se objeví na vašem zveřejněném webu.",
|
|
801
801
|
"cairo.tags.tagsWidget.add.CTA.asLabels": "Přiřadit štítky",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"cairo.import.editField": "Edit field",
|
|
41
41
|
"cairo.export.cancelTheExportGoBack": "Gå tilbage",
|
|
42
42
|
"cairo.viewDropdown.category.info": "Ændringer i forudindstillede visninger kan gemmes som en ny visning.",
|
|
43
|
-
"cairo.setupWidget.error.subtitle": "
|
|
43
|
+
"cairo.setupWidget.error.subtitle": "Der opstod et teknisk problem. Prøv igen om lidt.",
|
|
44
44
|
"cairo.editableTable.contextMenu.selectAll.CTA": "Select all",
|
|
45
45
|
"cairo.customFields.addCustomField.modal.emptyFieldName.error": "Indtast et feltnavn.",
|
|
46
46
|
"cairo.table.custom-columns.indication.app.tooltip": "This field is managed by an app",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"cairo.emptyState.title": "Intet at vise",
|
|
59
59
|
"cairo.sortableColumns.modal.cancel": "Annuller",
|
|
60
60
|
"cairo.customFields.writePermission.tooltip": "Denne evne er kun tilgængelig for ejere og medejere.",
|
|
61
|
-
"cairo.setupWidget.progress.label": "{completed}/{total}
|
|
61
|
+
"cairo.setupWidget.progress.label": "{completed}/{total} fuldført",
|
|
62
62
|
"cairo.customFields.manageFields.subtitle": "Tilføj, rediger eller arkiver dine tilpassede felter.",
|
|
63
63
|
"cairo.tags.bulkItemUpdate.toast.error.CTA.asLabels": "Prøv igen",
|
|
64
64
|
"cairo.customFields.emptyStatePassive.subtitle": "Når der er felter, kan du se dem her.",
|
|
65
65
|
"cairo.table.custom-columns.indication.system.tooltip": "This field is managed by the system",
|
|
66
66
|
"cairo.manageView.saveChanges.disabled.predefinedView.tooltip": "Dette er en forudindstillet visning. Hvis du vil gemme ændringerne, skal du gemme som en ny visning.",
|
|
67
67
|
"cairo.entityPage.header.subscribe.CTA": "Abonnér",
|
|
68
|
-
"cairo.setupWidget.error.cta": "
|
|
68
|
+
"cairo.setupWidget.error.cta": "Prøv igen",
|
|
69
69
|
"cairo.fieldValidation.required.label": "Make this a required field",
|
|
70
70
|
"cairo.customFields.fieldType.date": "Dato",
|
|
71
71
|
"cairo.search.Tab.noresults.title": "Ingen resultater fundet i \"{tabName}\"",
|
|
@@ -106,17 +106,17 @@
|
|
|
106
106
|
"cairo.editableTable.dateTime.placeholder": "Choose a date and time",
|
|
107
107
|
"cairo.filtersPanel.numRange.maxRange.error": "'Til'-værdien skal være højere end 'Fra'-værdien.",
|
|
108
108
|
"cairo.import.fileReadFailed": "Couldn’t read this file. Check your internet connection and that the file hasn’t been moved or deleted.",
|
|
109
|
-
"cairo.setupWidget.step.inProgress": "
|
|
109
|
+
"cairo.setupWidget.step.inProgress": "I gang",
|
|
110
110
|
"cairo.import.idCollisionLabel": "When items share the same ID",
|
|
111
111
|
"cairo.errorHandler.requestID.tooltip.cta": "Kopiér ID",
|
|
112
112
|
"cairo.tags.manageTags.modal.deleteModal.cancel.CTA": "Annuller",
|
|
113
113
|
"cairo.dragAndDrop.discardChanges.CTA": "Kassér",
|
|
114
|
-
"cairo.setupWidget.title": "
|
|
114
|
+
"cairo.setupWidget.title": "Opsætning",
|
|
115
115
|
"cairo.table.manage-fields.subtitle": "Choose which fields to show.",
|
|
116
116
|
"cairo.customFields.fieldType.dateAndTime.invalid.value": "Indtast et tidspunkt, der følger dette format: hh:mm",
|
|
117
117
|
"cairo.export.overloadErrorMessage": "På grund af en midlertidig overbelastning kan serveren ikke fuldføre eksporten. Prøv igen om et øjeblik.",
|
|
118
118
|
"cairo.import.discardChanges.cancel": "Keep editing",
|
|
119
|
-
"cairo.setupWidget.allComplete.subtitle": "
|
|
119
|
+
"cairo.setupWidget.allComplete.subtitle": "Din hjemmeside er klar til lancering – se, hvad du kan gøre nu.",
|
|
120
120
|
"cairo.table.custom-columns.dragAndDrop.subtitle": "Vælg, hvilke kolonner der skal vises, eller træk i dem for at ændre rækkefølgen.",
|
|
121
121
|
"cairo.customFields.addCustomField.modal.emptyFieldType.error": "Vælg en felttype.",
|
|
122
122
|
"cairo.filterOperator.notContains.tag": "does not contain",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"cairo.tags.creationLimitReached.error.asLabels": "{count, plural, one {Der kan ikke oprettes mere end {limit} etiket. Slet {count,number} etiket for at fortsætte.} other {Der kan ikke oprettes mere end {limit} etiketter. Slet {count,number} etiketter for at fortsætte.}}",
|
|
190
190
|
"cairo.deleteModal.title": "Er du sikker på, du ønsker at slette denne?",
|
|
191
191
|
"cairo.customFields.fieldType.checkbox.Selected.notChecked": "Ikke kontrolleret",
|
|
192
|
-
"cairo.setupWidget.allComplete.title": "
|
|
192
|
+
"cairo.setupWidget.allComplete.title": "Du er klar",
|
|
193
193
|
"cairo.customFields.booleanValue.true": "Ja",
|
|
194
194
|
"cairo.tags.manageTags.modal.list.action.delete.CTA": "Slet",
|
|
195
195
|
"cairo.customFields.addCustomField.modal.advancedSettings.key.tooltip": "Denne nøgle bruges i din kode. Den kan ikke ændres senere.",
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
"cairo.customFields.delete.modal.description": "<bold>{selectedField}</bold> og oplysningerne vil blive slettet permanent og kan ikke gendannes.",
|
|
278
278
|
"cairo.tags.applyChanges.toast.success": "Tags er opdateret.",
|
|
279
279
|
"cairo.editableTable.contextMenu.editRow.noPermission.tooltip": "Du har ikke tilladelse til at redigere rækker",
|
|
280
|
-
"cairo.setupWidget.allComplete.cta": "
|
|
280
|
+
"cairo.setupWidget.allComplete.cta": "Gå til oversigt",
|
|
281
281
|
"cairo.import.noMappingsTooltip": "Map at least one column to import",
|
|
282
282
|
"cairo.import.noRowsWarningTitle": "No rows found inside the CSV file",
|
|
283
283
|
"cairo.bulkSelected": "{num, plural, one {1 valgt} other {{num,number} valgt}}",
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
"cairo.import.noRowsWarningDescription": "The file was uploaded successfully, but no data was found inside the mapped columns. If it's intentional, continue as planned.",
|
|
347
347
|
"cairo.export.offlineMessage": "Eksporten fortsætter, når internetforbindelsen er genoprettet.",
|
|
348
348
|
"cairo.editableTable.email.validation.invalid": "Ugyldigt e-mailformat",
|
|
349
|
-
"cairo.setupWidget.error.title": "
|
|
349
|
+
"cairo.setupWidget.error.title": "Din opsætning kunne ikke indlæses",
|
|
350
350
|
"cairo.confirm.button": "Bekræft",
|
|
351
351
|
"cairo.filtersPanel.numRange.minRange.error": "'Fra'-værdien skal være lavere end 'Til'-værdien.",
|
|
352
352
|
"cairo.table.custom-columns.indication.pii.tooltip": "This field contains personally identifiable information",
|
|
@@ -795,7 +795,7 @@
|
|
|
795
795
|
"cairo.tags.fqdn-not-found.manageTagsModal.error": "Denne handling kunne ikke fuldføres.",
|
|
796
796
|
"cairo.editableTable.deleteItem.error.toast": "Varerne kunne ikke slettes",
|
|
797
797
|
"cairo.tags.tagsWidget.options.add.CTA.asLabels": "Opret \"{tagName}\"",
|
|
798
|
-
"cairo.setupWidget.step.lockedTooltip": "
|
|
798
|
+
"cairo.setupWidget.step.lockedTooltip": "Du har ikke adgang til dette trin. Bed hjemmesideejeren om tilladelse.",
|
|
799
799
|
"cairo.import.title": "Import items from CSV",
|
|
800
800
|
"cairo.dragAndDrop.note": "Bemærk: Eventuelle ændringer i rækkefølgen af dine elementer vises på din offentliggjorte hjemmeside.",
|
|
801
801
|
"cairo.tags.tagsWidget.add.CTA.asLabels": "Tildel etiketter",
|