@gooddata/sdk-ui 8.13.0-alpha.35 → 8.13.0-alpha.37
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/base/constants/bucketNames.d.ts +24 -16
- package/dist/base/constants/bucketNames.d.ts.map +1 -1
- package/dist/base/constants/bucketNames.js +1 -1
- package/dist/base/constants/bucketNames.js.map +1 -1
- package/dist/base/errors/GoodDataSdkError.d.ts +1 -1
- package/dist/base/errors/GoodDataSdkError.d.ts.map +1 -1
- package/dist/base/errors/GoodDataSdkError.js +14 -14
- package/dist/base/errors/GoodDataSdkError.js.map +1 -1
- package/dist/base/errors/errorHandling.js +4 -4
- package/dist/base/errors/errorHandling.js.map +1 -1
- package/dist/base/headerMatching/HeaderPredicate.d.ts +1 -1
- package/dist/base/headerMatching/HeaderPredicate.d.ts.map +1 -1
- package/dist/base/headerMatching/HeaderPredicateFactory.js +29 -29
- package/dist/base/headerMatching/HeaderPredicateFactory.js.map +1 -1
- package/dist/base/headerMatching/MappingHeader.d.ts +1 -1
- package/dist/base/headerMatching/MappingHeader.d.ts.map +1 -1
- package/dist/base/headerMatching/MappingHeader.js +13 -13
- package/dist/base/headerMatching/MappingHeader.js.map +1 -1
- package/dist/base/helpers/CatalogHelper.js.map +1 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.js +4 -2
- package/dist/base/index.js.map +1 -1
- package/dist/base/interfaces/OverTimeComparison.d.ts +1 -1
- package/dist/base/interfaces/OverTimeComparison.d.ts.map +1 -1
- package/dist/base/localization/IntlStore.d.ts +2 -4
- package/dist/base/localization/IntlStore.d.ts.map +1 -1
- package/dist/base/localization/IntlStore.js +3 -3
- package/dist/base/localization/IntlStore.js.map +1 -1
- package/dist/base/localization/IntlWrapper.js +3 -2
- package/dist/base/localization/IntlWrapper.js.map +1 -1
- package/dist/base/localization/Locale.d.ts +1 -1
- package/dist/base/localization/Locale.d.ts.map +1 -1
- package/dist/base/localization/Locale.js +2 -1
- package/dist/base/localization/Locale.js.map +1 -1
- package/dist/base/localization/TranslationsCustomizationProvider/Context.js +5 -4
- package/dist/base/localization/TranslationsCustomizationProvider/Context.js.map +1 -1
- package/dist/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.js +7 -6
- package/dist/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.js.map +1 -1
- package/dist/base/localization/TranslationsCustomizationProvider/utils.d.ts +3 -3
- package/dist/base/localization/TranslationsCustomizationProvider/utils.d.ts.map +1 -1
- package/dist/base/localization/TranslationsCustomizationProvider/utils.js +13 -8
- package/dist/base/localization/TranslationsCustomizationProvider/utils.js.map +1 -1
- package/dist/base/localization/TranslationsProvider.d.ts +1 -1
- package/dist/base/localization/TranslationsProvider.d.ts.map +1 -1
- package/dist/base/localization/TranslationsProvider.js +2 -2
- package/dist/base/localization/TranslationsProvider.js.map +1 -1
- package/dist/base/localization/intlUtils.js +5 -4
- package/dist/base/localization/intlUtils.js.map +1 -1
- package/dist/base/measureFormats/fillMissingFormat.js +4 -4
- package/dist/base/measureFormats/fillMissingFormat.js.map +1 -1
- package/dist/base/measureFormats/fillMissingFormats.js +1 -1
- package/dist/base/measureFormats/fillMissingFormats.js.map +1 -1
- package/dist/base/measureTitles/ArithmeticMeasureTitleFactory.d.ts.map +1 -1
- package/dist/base/measureTitles/ArithmeticMeasureTitleFactory.js +2 -2
- package/dist/base/measureTitles/ArithmeticMeasureTitleFactory.js.map +1 -1
- package/dist/base/measureTitles/DerivedMeasureTitleSuffixFactory.d.ts.map +1 -1
- package/dist/base/measureTitles/DerivedMeasureTitleSuffixFactory.js +2 -2
- package/dist/base/measureTitles/DerivedMeasureTitleSuffixFactory.js.map +1 -1
- package/dist/base/measureTitles/fillMissingTitles.js +22 -22
- package/dist/base/measureTitles/fillMissingTitles.js.map +1 -1
- package/dist/base/measureTitles/ignoreTitlesForSimpleMeasures.js +4 -4
- package/dist/base/measureTitles/ignoreTitlesForSimpleMeasures.js.map +1 -1
- package/dist/base/react/BackendContext.d.ts +2 -2
- package/dist/base/react/BackendContext.d.ts.map +1 -1
- package/dist/base/react/BackendContext.js +8 -5
- package/dist/base/react/BackendContext.js.map +1 -1
- package/dist/base/react/CancelablePromise.js +3 -2
- package/dist/base/react/CancelablePromise.js.map +1 -1
- package/dist/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts +2 -2
- package/dist/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts.map +1 -1
- package/dist/base/react/ClientWorkspaceContext/ClientWorkspaceContext.js +21 -15
- package/dist/base/react/ClientWorkspaceContext/ClientWorkspaceContext.js.map +1 -1
- package/dist/base/react/ClientWorkspaceContext/resolveLCMWorkspaceIdentifiers.js +2 -2
- package/dist/base/react/ClientWorkspaceContext/resolveLCMWorkspaceIdentifiers.js.map +1 -1
- package/dist/base/react/ErrorComponent.js +1 -1
- package/dist/base/react/ErrorComponent.js.map +1 -1
- package/dist/base/react/LoadingComponent.js +1 -1
- package/dist/base/react/LoadingComponent.js.map +1 -1
- package/dist/base/react/PromiseCache.js +2 -2
- package/dist/base/react/PromiseCache.js.map +1 -1
- package/dist/base/react/WorkspaceContext.d.ts +2 -2
- package/dist/base/react/WorkspaceContext.d.ts.map +1 -1
- package/dist/base/react/WorkspaceContext.js +8 -5
- package/dist/base/react/WorkspaceContext.js.map +1 -1
- package/dist/base/react/legacy/availableDrillTargets.js +2 -2
- package/dist/base/react/legacy/availableDrillTargets.js.map +1 -1
- package/dist/base/react/legacy/withEntireDataView.js +14 -14
- package/dist/base/react/legacy/withEntireDataView.js.map +1 -1
- package/dist/base/react/placeholders/aliases.d.ts +15 -15
- package/dist/base/react/placeholders/aliases.d.ts.map +1 -1
- package/dist/base/react/placeholders/base.d.ts +20 -20
- package/dist/base/react/placeholders/base.d.ts.map +1 -1
- package/dist/base/react/placeholders/base.js +2 -2
- package/dist/base/react/placeholders/base.js.map +1 -1
- package/dist/base/react/placeholders/context.d.ts +1 -1
- package/dist/base/react/placeholders/context.d.ts.map +1 -1
- package/dist/base/react/placeholders/context.js +8 -6
- package/dist/base/react/placeholders/context.js.map +1 -1
- package/dist/base/react/placeholders/factory.js +3 -3
- package/dist/base/react/placeholders/factory.js.map +1 -1
- package/dist/base/react/placeholders/hooks.js +25 -25
- package/dist/base/react/placeholders/hooks.js.map +1 -1
- package/dist/base/react/placeholders/resolve.js +6 -6
- package/dist/base/react/placeholders/resolve.js.map +1 -1
- package/dist/base/react/useCancelablePromise.d.ts +8 -8
- package/dist/base/react/useCancelablePromise.d.ts.map +1 -1
- package/dist/base/react/useCancelablePromise.js +6 -6
- package/dist/base/react/useCancelablePromise.js.map +1 -1
- package/dist/base/react/useCancelablePromiseUtils.js.map +1 -1
- package/dist/base/react/usePagedResource.js +4 -4
- package/dist/base/react/usePagedResource.js.map +1 -1
- package/dist/base/react/usePrevious.js +4 -3
- package/dist/base/react/usePrevious.js.map +1 -1
- package/dist/base/react/usePromiseCache.js +4 -4
- package/dist/base/react/usePromiseCache.js.map +1 -1
- package/dist/base/react/withContexts.js +1 -1
- package/dist/base/react/withContexts.js.map +1 -1
- package/dist/base/react/wrapDisplayName.d.ts +1 -1
- package/dist/base/react/wrapDisplayName.d.ts.map +1 -1
- package/dist/base/react/wrapDisplayName.js +2 -1
- package/dist/base/react/wrapDisplayName.js.map +1 -1
- package/dist/base/results/dataAccess.d.ts +10 -10
- package/dist/base/results/dataAccess.d.ts.map +1 -1
- package/dist/base/results/dataAccessConfig.d.ts +3 -3
- package/dist/base/results/dataAccessConfig.d.ts.map +1 -1
- package/dist/base/results/dataAccessConfig.js +4 -4
- package/dist/base/results/dataAccessConfig.js.map +1 -1
- package/dist/base/results/facade.js +6 -6
- package/dist/base/results/facade.js.map +1 -1
- package/dist/base/results/internal/dataAccessDigest.d.ts +6 -6
- package/dist/base/results/internal/dataAccessDigest.d.ts.map +1 -1
- package/dist/base/results/internal/dataAccessDigest.js +11 -10
- package/dist/base/results/internal/dataAccessDigest.js.map +1 -1
- package/dist/base/results/internal/dataAccessImpl.js +23 -20
- package/dist/base/results/internal/dataAccessImpl.js.map +1 -1
- package/dist/base/results/internal/dataAccessMethods.js +7 -4
- package/dist/base/results/internal/dataAccessMethods.js.map +1 -1
- package/dist/base/results/internal/definitionMethods.js +5 -5
- package/dist/base/results/internal/definitionMethods.js.map +1 -1
- package/dist/base/results/internal/lazyInitArray.d.ts +1 -1
- package/dist/base/results/internal/lazyInitArray.d.ts.map +1 -1
- package/dist/base/results/internal/lazyInitArray.js +5 -3
- package/dist/base/results/internal/lazyInitArray.js.map +1 -1
- package/dist/base/results/internal/resultDataMethods.js +2 -2
- package/dist/base/results/internal/resultDataMethods.js.map +1 -1
- package/dist/base/results/internal/resultMetaMethods.js +13 -13
- package/dist/base/results/internal/resultMetaMethods.js.map +1 -1
- package/dist/base/results/internal/utils.js.map +1 -1
- package/dist/base/vis/DrillEvents.d.ts +5 -5
- package/dist/base/vis/DrillEvents.d.ts.map +1 -1
- package/dist/base/vis/DrillEvents.js +3 -3
- package/dist/base/vis/DrillEvents.js.map +1 -1
- package/dist/base/vis/Events.d.ts +5 -5
- package/dist/base/vis/Events.d.ts.map +1 -1
- package/dist/base/vis/drilling.js +8 -8
- package/dist/base/vis/drilling.js.map +1 -1
- package/dist/base/vis/visualizationTypes.d.ts +10 -10
- package/dist/base/vis/visualizationTypes.d.ts.map +1 -1
- package/dist/execution/DataViewLoader.js +2 -2
- package/dist/execution/DataViewLoader.js.map +1 -1
- package/dist/execution/Execute.js +6 -5
- package/dist/execution/Execute.js.map +1 -1
- package/dist/execution/ExecuteInsight.js +4 -4
- package/dist/execution/ExecuteInsight.js.map +1 -1
- package/dist/execution/RawExecute.js +2 -2
- package/dist/execution/RawExecute.js.map +1 -1
- package/dist/execution/createExecution.d.ts +1 -1
- package/dist/execution/createExecution.d.ts.map +1 -1
- package/dist/execution/createExecution.js +4 -4
- package/dist/execution/createExecution.js.map +1 -1
- package/dist/execution/interfaces.d.ts +2 -2
- package/dist/execution/interfaces.d.ts.map +1 -1
- package/dist/execution/useDataExport.d.ts +2 -2
- package/dist/execution/useDataExport.d.ts.map +1 -1
- package/dist/execution/useDataExport.js +2 -2
- package/dist/execution/useDataExport.js.map +1 -1
- package/dist/execution/useDataView.d.ts +2 -2
- package/dist/execution/useDataView.d.ts.map +1 -1
- package/dist/execution/useDataView.js +2 -2
- package/dist/execution/useDataView.js.map +1 -1
- package/dist/execution/useExecution.js +4 -4
- package/dist/execution/useExecution.js.map +1 -1
- package/dist/execution/useExecutionDataView.d.ts +1 -1
- package/dist/execution/useExecutionDataView.d.ts.map +1 -1
- package/dist/execution/useExecutionDataView.js +6 -7
- package/dist/execution/useExecutionDataView.js.map +1 -1
- package/dist/execution/useInsight.js +4 -4
- package/dist/execution/useInsight.js.map +1 -1
- package/dist/execution/useInsightDataView.d.ts +1 -1
- package/dist/execution/useInsightDataView.d.ts.map +1 -1
- package/dist/execution/useInsightDataView.js +6 -6
- package/dist/execution/useInsightDataView.js.map +1 -1
- package/dist/execution/withExecution.js +2 -2
- package/dist/execution/withExecution.js.map +1 -1
- package/dist/execution/withExecutionLoading.d.ts +2 -2
- package/dist/execution/withExecutionLoading.d.ts.map +1 -1
- package/dist/execution/withExecutionLoading.js +6 -6
- package/dist/execution/withExecutionLoading.js.map +1 -1
- package/dist/kpi/FormattedNumber.js +4 -3
- package/dist/kpi/FormattedNumber.js.map +1 -1
- package/dist/kpi/Kpi.d.ts.map +1 -1
- package/dist/kpi/Kpi.js +8 -7
- package/dist/kpi/Kpi.js.map +1 -1
- package/dist/kpi/KpiError.js +2 -1
- package/dist/kpi/KpiError.js.map +1 -1
- package/dist/locales.d.ts +2 -41
- package/dist/locales.d.ts.map +1 -1
- package/dist/locales.js +2 -2
- package/dist/locales.js.map +1 -1
- package/dist/sdk-ui.d.ts +37 -30
- package/esm/base/constants/bucketNames.d.ts +24 -16
- package/esm/base/constants/bucketNames.d.ts.map +1 -1
- package/esm/base/constants/bucketNames.js +1 -1
- package/esm/base/constants/bucketNames.js.map +1 -1
- package/esm/base/errors/GoodDataSdkError.d.ts +1 -1
- package/esm/base/errors/GoodDataSdkError.d.ts.map +1 -1
- package/esm/base/headerMatching/HeaderPredicate.d.ts +1 -1
- package/esm/base/headerMatching/HeaderPredicate.d.ts.map +1 -1
- package/esm/base/headerMatching/MappingHeader.d.ts +1 -1
- package/esm/base/headerMatching/MappingHeader.d.ts.map +1 -1
- package/esm/base/headerMatching/MappingHeader.js.map +1 -1
- package/esm/base/helpers/CatalogHelper.js.map +1 -1
- package/esm/base/index.d.ts +1 -1
- package/esm/base/index.d.ts.map +1 -1
- package/esm/base/index.js +1 -1
- package/esm/base/index.js.map +1 -1
- package/esm/base/interfaces/OverTimeComparison.d.ts +1 -1
- package/esm/base/interfaces/OverTimeComparison.d.ts.map +1 -1
- package/esm/base/localization/IntlStore.d.ts +2 -4
- package/esm/base/localization/IntlStore.d.ts.map +1 -1
- package/esm/base/localization/IntlStore.js +1 -1
- package/esm/base/localization/IntlStore.js.map +1 -1
- package/esm/base/localization/Locale.d.ts +1 -1
- package/esm/base/localization/Locale.d.ts.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/utils.d.ts +3 -3
- package/esm/base/localization/TranslationsCustomizationProvider/utils.d.ts.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/utils.js +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/utils.js.map +1 -1
- package/esm/base/localization/TranslationsProvider.d.ts +1 -1
- package/esm/base/localization/TranslationsProvider.d.ts.map +1 -1
- package/esm/base/measureTitles/ArithmeticMeasureTitleFactory.d.ts.map +1 -1
- package/esm/base/measureTitles/ArithmeticMeasureTitleFactory.js +1 -1
- package/esm/base/measureTitles/ArithmeticMeasureTitleFactory.js.map +1 -1
- package/esm/base/measureTitles/DerivedMeasureTitleSuffixFactory.d.ts.map +1 -1
- package/esm/base/measureTitles/DerivedMeasureTitleSuffixFactory.js +1 -1
- package/esm/base/measureTitles/DerivedMeasureTitleSuffixFactory.js.map +1 -1
- package/esm/base/measureTitles/ignoreTitlesForSimpleMeasures.js.map +1 -1
- package/esm/base/react/BackendContext.d.ts +2 -2
- package/esm/base/react/BackendContext.d.ts.map +1 -1
- package/esm/base/react/BackendContext.js.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts +2 -2
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.js.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/resolveLCMWorkspaceIdentifiers.js.map +1 -1
- package/esm/base/react/ErrorComponent.js +2 -1
- package/esm/base/react/ErrorComponent.js.map +1 -1
- package/esm/base/react/LoadingComponent.js +2 -1
- package/esm/base/react/LoadingComponent.js.map +1 -1
- package/esm/base/react/WorkspaceContext.d.ts +2 -2
- package/esm/base/react/WorkspaceContext.d.ts.map +1 -1
- package/esm/base/react/WorkspaceContext.js.map +1 -1
- package/esm/base/react/legacy/withEntireDataView.js.map +1 -1
- package/esm/base/react/placeholders/aliases.d.ts +15 -15
- package/esm/base/react/placeholders/aliases.d.ts.map +1 -1
- package/esm/base/react/placeholders/base.d.ts +20 -20
- package/esm/base/react/placeholders/base.d.ts.map +1 -1
- package/esm/base/react/placeholders/context.d.ts +1 -1
- package/esm/base/react/placeholders/context.d.ts.map +1 -1
- package/esm/base/react/placeholders/context.js +3 -2
- package/esm/base/react/placeholders/context.js.map +1 -1
- package/esm/base/react/placeholders/hooks.js.map +1 -1
- package/esm/base/react/placeholders/resolve.js.map +1 -1
- package/esm/base/react/useCancelablePromise.d.ts +8 -8
- package/esm/base/react/useCancelablePromise.d.ts.map +1 -1
- package/esm/base/react/useCancelablePromise.js.map +1 -1
- package/esm/base/react/useCancelablePromiseUtils.js.map +1 -1
- package/esm/base/react/wrapDisplayName.d.ts +1 -1
- package/esm/base/react/wrapDisplayName.d.ts.map +1 -1
- package/esm/base/results/dataAccess.d.ts +10 -10
- package/esm/base/results/dataAccess.d.ts.map +1 -1
- package/esm/base/results/dataAccessConfig.d.ts +3 -3
- package/esm/base/results/dataAccessConfig.d.ts.map +1 -1
- package/esm/base/results/facade.js +2 -1
- package/esm/base/results/facade.js.map +1 -1
- package/esm/base/results/internal/dataAccessDigest.d.ts +6 -6
- package/esm/base/results/internal/dataAccessDigest.d.ts.map +1 -1
- package/esm/base/results/internal/dataAccessDigest.js +2 -1
- package/esm/base/results/internal/dataAccessDigest.js.map +1 -1
- package/esm/base/results/internal/dataAccessImpl.js +8 -5
- package/esm/base/results/internal/dataAccessImpl.js.map +1 -1
- package/esm/base/results/internal/dataAccessMethods.js +5 -2
- package/esm/base/results/internal/dataAccessMethods.js.map +1 -1
- package/esm/base/results/internal/lazyInitArray.d.ts +1 -1
- package/esm/base/results/internal/lazyInitArray.d.ts.map +1 -1
- package/esm/base/results/internal/lazyInitArray.js +3 -1
- package/esm/base/results/internal/lazyInitArray.js.map +1 -1
- package/esm/base/results/internal/resultMetaMethods.js.map +1 -1
- package/esm/base/results/internal/utils.js.map +1 -1
- package/esm/base/vis/DrillEvents.d.ts +5 -5
- package/esm/base/vis/DrillEvents.d.ts.map +1 -1
- package/esm/base/vis/Events.d.ts +5 -5
- package/esm/base/vis/Events.d.ts.map +1 -1
- package/esm/base/vis/drilling.js.map +1 -1
- package/esm/base/vis/visualizationTypes.d.ts +10 -10
- package/esm/base/vis/visualizationTypes.d.ts.map +1 -1
- package/esm/execution/Execute.js.map +1 -1
- package/esm/execution/createExecution.d.ts +1 -1
- package/esm/execution/createExecution.d.ts.map +1 -1
- package/esm/execution/interfaces.d.ts +2 -2
- package/esm/execution/interfaces.d.ts.map +1 -1
- package/esm/execution/useDataExport.d.ts +2 -2
- package/esm/execution/useDataExport.d.ts.map +1 -1
- package/esm/execution/useDataView.d.ts +2 -2
- package/esm/execution/useDataView.d.ts.map +1 -1
- package/esm/execution/useExecutionDataView.d.ts +1 -1
- package/esm/execution/useExecutionDataView.d.ts.map +1 -1
- package/esm/execution/useExecutionDataView.js +1 -2
- package/esm/execution/useExecutionDataView.js.map +1 -1
- package/esm/execution/useInsightDataView.d.ts +1 -1
- package/esm/execution/useInsightDataView.d.ts.map +1 -1
- package/esm/execution/withExecutionLoading.d.ts +2 -2
- package/esm/execution/withExecutionLoading.d.ts.map +1 -1
- package/esm/kpi/Kpi.d.ts.map +1 -1
- package/esm/kpi/Kpi.js +4 -3
- package/esm/kpi/Kpi.js.map +1 -1
- package/esm/locales.d.ts +2 -41
- package/esm/locales.d.ts.map +1 -1
- package/esm/locales.js +1 -1
- package/esm/locales.js.map +1 -1
- package/package.json +13 -13
|
@@ -13,9 +13,10 @@ WorkspaceContext.displayName = "WorkspaceContext";
|
|
|
13
13
|
*
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
const WorkspaceProvider = ({ children, workspace }) => {
|
|
17
17
|
return react_1.default.createElement(WorkspaceContext.Provider, { value: workspace }, children);
|
|
18
18
|
};
|
|
19
|
+
exports.WorkspaceProvider = WorkspaceProvider;
|
|
19
20
|
/**
|
|
20
21
|
* Hook to get workspace instance provided to {@link WorkspaceProvider}.
|
|
21
22
|
*
|
|
@@ -37,10 +38,11 @@ exports.WorkspaceProvider = ({ children, workspace }) => {
|
|
|
37
38
|
* @param workspace - workspace to use instead of context value. If undefined, the context value is used.
|
|
38
39
|
* @public
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
+
const useWorkspace = (workspace) => {
|
|
41
42
|
const workspaceFromContext = react_1.default.useContext(WorkspaceContext);
|
|
42
43
|
return workspace !== null && workspace !== void 0 ? workspace : workspaceFromContext;
|
|
43
44
|
};
|
|
45
|
+
exports.useWorkspace = useWorkspace;
|
|
44
46
|
/**
|
|
45
47
|
* Hook to get workspace instance provided to {@link WorkspaceProvider}.
|
|
46
48
|
*
|
|
@@ -64,12 +66,13 @@ exports.useWorkspace = (workspace) => {
|
|
|
64
66
|
* @param context - provide context to improve error message in raised invariant (e.g. parent hook name).
|
|
65
67
|
* @public
|
|
66
68
|
*/
|
|
67
|
-
|
|
69
|
+
const useWorkspaceStrict = (workspace, context = "useWorkspaceStrict") => {
|
|
68
70
|
const workspaceFromContext = react_1.default.useContext(WorkspaceContext);
|
|
69
71
|
const effectiveWorkspace = workspace !== null && workspace !== void 0 ? workspace : workspaceFromContext;
|
|
70
|
-
ts_invariant_1.default(effectiveWorkspace, `${context}: workspace must be defined. Either pass it as a parameter or make sure there is a WorkspaceProvider up the component tree.`);
|
|
72
|
+
(0, ts_invariant_1.default)(effectiveWorkspace, `${context}: workspace must be defined. Either pass it as a parameter or make sure there is a WorkspaceProvider up the component tree.`);
|
|
71
73
|
return effectiveWorkspace;
|
|
72
74
|
};
|
|
75
|
+
exports.useWorkspaceStrict = useWorkspaceStrict;
|
|
73
76
|
/**
|
|
74
77
|
* Wraps component into a WorkspaceContext consumer - injecting an instance of workspace from context into the
|
|
75
78
|
* workspace prop.
|
|
@@ -80,7 +83,7 @@ function withWorkspace(Component) {
|
|
|
80
83
|
const ComponentWithInjectedWorkspace = (props) => {
|
|
81
84
|
return (react_1.default.createElement(WorkspaceContext.Consumer, null, (workspace) => { var _a; return react_1.default.createElement(Component, Object.assign({}, props, { workspace: (_a = props.workspace) !== null && _a !== void 0 ? _a : workspace })); }));
|
|
82
85
|
};
|
|
83
|
-
return wrapDisplayName_1.wrapDisplayName("withWorkspace", Component)(ComponentWithInjectedWorkspace);
|
|
86
|
+
return (0, wrapDisplayName_1.wrapDisplayName)("withWorkspace", Component)(ComponentWithInjectedWorkspace);
|
|
84
87
|
}
|
|
85
88
|
exports.withWorkspace = withWorkspace;
|
|
86
89
|
//# sourceMappingURL=WorkspaceContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceContext.js","sourceRoot":"","sources":["../../../src/base/react/WorkspaceContext.tsx"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,0DAA0B;AAC1B,uDAAo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,OAAO,6HAA6H,CAC1I,CAAC;IACF,OAAO,kBAAkB,CAAC;AAC9B,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEF;;;;;GAKG;AACH,SAAgB,aAAa,CACzB,SAAiC;IAEjC,MAAM,8BAA8B,GAAgB,CAAC,KAAK,EAAE,EAAE;QAC1D,OAAO,CACH,8BAAC,gBAAgB,CAAC,QAAQ,QACrB,CAAC,SAAS,EAAE,EAAE,WAAC,OAAA,8BAAC,SAAS,oBAAK,KAAK,IAAE,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,SAAS,IAAI,CAAA,EAAA,CACzD,CAC/B,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,IAAA,iCAAe,EAAC,eAAe,EAAE,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACvF,CAAC;AAZD,sCAYC"}
|
|
@@ -19,7 +19,7 @@ function getIntersectionAttributes(fromAttribute, attributes) {
|
|
|
19
19
|
}
|
|
20
20
|
exports.getIntersectionAttributes = getIntersectionAttributes;
|
|
21
21
|
function getAvailableDrillAttributes(dv) {
|
|
22
|
-
return flatten_1.default(dv
|
|
22
|
+
return (0, flatten_1.default)(dv
|
|
23
23
|
.meta()
|
|
24
24
|
.dimensions()
|
|
25
25
|
.map((_dimension, index) => {
|
|
@@ -33,7 +33,7 @@ function getAvailableDrillAttributes(dv) {
|
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
35
|
function getAvailableDrillTargets(dv) {
|
|
36
|
-
const attributes = uniqBy_1.default((attributeDescriptor) => attributeDescriptor.attributeHeader.formOf.identifier, dv.meta().attributeDescriptors());
|
|
36
|
+
const attributes = (0, uniqBy_1.default)((attributeDescriptor) => attributeDescriptor.attributeHeader.formOf.identifier, dv.meta().attributeDescriptors());
|
|
37
37
|
return {
|
|
38
38
|
measures: dv
|
|
39
39
|
.meta()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"availableDrillTargets.js","sourceRoot":"","sources":["../../../../src/base/react/legacy/availableDrillTargets.ts"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,sEAAsC;AACtC,qEAAqC;AASrC;;;;;GAKG;AACH,SAAgB,yBAAyB,CACrC,aAAmC,EACnC,UAAkC;IAElC,MAAM,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAC7C,CAAC,SAAS,EAAE,EAAE;IACV,wDAAwD;IACxD,SAAS,CAAC,eAAe,CAAC,eAAe,KAAK,aAAa,CAAC,eAAe,CAAC,eAAe,CAClG,CAAC;IAEF,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC;AAXD,8DAWC;AAED,SAAS,2BAA2B,CAAC,EAAkB;IACnD,OAAO,iBAAO,
|
|
1
|
+
{"version":3,"file":"availableDrillTargets.js","sourceRoot":"","sources":["../../../../src/base/react/legacy/availableDrillTargets.ts"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,sEAAsC;AACtC,qEAAqC;AASrC;;;;;GAKG;AACH,SAAgB,yBAAyB,CACrC,aAAmC,EACnC,UAAkC;IAElC,MAAM,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAC7C,CAAC,SAAS,EAAE,EAAE;IACV,wDAAwD;IACxD,SAAS,CAAC,eAAe,CAAC,eAAe,KAAK,aAAa,CAAC,eAAe,CAAC,eAAe,CAClG,CAAC;IAEF,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC;AAXD,8DAWC;AAED,SAAS,2BAA2B,CAAC,EAAkB;IACnD,OAAO,IAAA,iBAAO,EACV,EAAE;SACG,IAAI,EAAE;SACN,UAAU,EAAE;SACZ,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;QACvB,OAAO,EAAE;aACJ,IAAI,EAAE;aACN,0BAA0B,CAAC,KAAK,CAAC;aACjC,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;YACrC,SAAS;YACT,sBAAsB,EAAE,yBAAyB,CAAC,SAAS,EAAE,UAAU,CAAC;SAC3E,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,CACT,CAAC;AACN,CAAC;AAED,SAAgB,wBAAwB,CAAC,EAAkB;IACvD,MAAM,UAAU,GAAG,IAAA,gBAAM,EACrB,CAAC,mBAAmB,EAAE,EAAE,CAAC,mBAAmB,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,EAC9E,EAAE,CAAC,IAAI,EAAE,CAAC,oBAAoB,EAAE,CACnC,CAAC;IACF,OAAO;QACH,QAAQ,EAAE,EAAE;aACP,IAAI,EAAE;aACN,kBAAkB,EAAE;aACpB,GAAG,CACA,CAAC,OAA2B,EAAgC,EAAE,CAAC,CAAC;YAC5D,OAAO;YACP,UAAU;SACb,CAAC,CACL;QACL,UAAU,EAAE,2BAA2B,CAAC,EAAE,CAAC;KAC9C,CAAC;AACN,CAAC;AAjBD,4DAiBC"}
|
|
@@ -35,7 +35,7 @@ function withEntireDataView(InnerComponent) {
|
|
|
35
35
|
*/
|
|
36
36
|
this.lastInitRequestFingerprint = null;
|
|
37
37
|
this.stripWorkspace = (props) => {
|
|
38
|
-
return omit_1.default(props, ["workspace"]);
|
|
38
|
+
return (0, omit_1.default)(props, ["workspace"]);
|
|
39
39
|
};
|
|
40
40
|
this.state = {
|
|
41
41
|
isLoading: false,
|
|
@@ -84,7 +84,7 @@ function withEntireDataView(InnerComponent) {
|
|
|
84
84
|
this.setState({ error: error.getMessage(), dataView: null });
|
|
85
85
|
this.onLoadingChanged({ isLoading: false });
|
|
86
86
|
if (onExportReady) {
|
|
87
|
-
onExportReady(export_1.createExportErrorFunction(error));
|
|
87
|
+
onExportReady((0, export_1.createExportErrorFunction)(error));
|
|
88
88
|
}
|
|
89
89
|
(_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, error);
|
|
90
90
|
}
|
|
@@ -98,10 +98,10 @@ function withEntireDataView(InnerComponent) {
|
|
|
98
98
|
const { onExportReady, pushData, exportTitle } = this.props;
|
|
99
99
|
this.onLoadingChanged({ isLoading: true });
|
|
100
100
|
this.setState({ dataView: null });
|
|
101
|
-
this.lastInitRequestFingerprint = sdk_model_1.defFingerprint(execution.definition);
|
|
101
|
+
this.lastInitRequestFingerprint = (0, sdk_model_1.defFingerprint)(execution.definition);
|
|
102
102
|
try {
|
|
103
103
|
const executionResult = await execution.execute();
|
|
104
|
-
if (this.lastInitRequestFingerprint !== sdk_model_1.defFingerprint(execution.definition)) {
|
|
104
|
+
if (this.lastInitRequestFingerprint !== (0, sdk_model_1.defFingerprint)(execution.definition)) {
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
if (this.hasUnmounted) {
|
|
@@ -113,8 +113,8 @@ function withEntireDataView(InnerComponent) {
|
|
|
113
113
|
* but data load fails with unexpected http response,
|
|
114
114
|
* we still want to push availableDrillTargets
|
|
115
115
|
*/
|
|
116
|
-
if (sdk_backend_spi_1.isUnexpectedResponseError(err) && pushData) {
|
|
117
|
-
const availableDrillTargets = availableDrillTargets_1.getAvailableDrillTargets(facade_1.DataViewFacade.forResult(executionResult));
|
|
116
|
+
if ((0, sdk_backend_spi_1.isUnexpectedResponseError)(err) && pushData) {
|
|
117
|
+
const availableDrillTargets = (0, availableDrillTargets_1.getAvailableDrillTargets)(facade_1.DataViewFacade.forResult(executionResult));
|
|
118
118
|
pushData({ availableDrillTargets });
|
|
119
119
|
}
|
|
120
120
|
throw err;
|
|
@@ -122,7 +122,7 @@ function withEntireDataView(InnerComponent) {
|
|
|
122
122
|
if (this.hasUnmounted) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
if (this.lastInitRequestFingerprint !== sdk_model_1.defFingerprint(dataView.definition)) {
|
|
125
|
+
if (this.lastInitRequestFingerprint !== (0, sdk_model_1.defFingerprint)(dataView.definition)) {
|
|
126
126
|
/*
|
|
127
127
|
* Stop right now if the data are not relevant anymore because there was another
|
|
128
128
|
* initialize request in the meantime.
|
|
@@ -132,15 +132,15 @@ function withEntireDataView(InnerComponent) {
|
|
|
132
132
|
this.setState({ dataView, error: null, executionResult });
|
|
133
133
|
this.onLoadingChanged({ isLoading: false });
|
|
134
134
|
if (onExportReady) {
|
|
135
|
-
onExportReady(export_1.createExportFunction(dataView.result, exportTitle));
|
|
135
|
+
onExportReady((0, export_1.createExportFunction)(dataView.result, exportTitle));
|
|
136
136
|
}
|
|
137
137
|
if (pushData) {
|
|
138
|
-
const availableDrillTargets = availableDrillTargets_1.getAvailableDrillTargets(facade_1.DataViewFacade.for(dataView));
|
|
138
|
+
const availableDrillTargets = (0, availableDrillTargets_1.getAvailableDrillTargets)(facade_1.DataViewFacade.for(dataView));
|
|
139
139
|
pushData({ dataView, availableDrillTargets });
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
catch (error) {
|
|
143
|
-
if (this.lastInitRequestFingerprint !== sdk_model_1.defFingerprint(execution.definition)) {
|
|
143
|
+
if (this.lastInitRequestFingerprint !== (0, sdk_model_1.defFingerprint)(execution.definition)) {
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
if (this.hasUnmounted) {
|
|
@@ -150,16 +150,16 @@ function withEntireDataView(InnerComponent) {
|
|
|
150
150
|
* There can be situations, where there is no data to visualize but the result / dataView contains
|
|
151
151
|
* metadata essential for setup of drilling. Look for that and if available push up.
|
|
152
152
|
*/
|
|
153
|
-
if (sdk_backend_spi_1.isNoDataError(error) && error.dataView && pushData) {
|
|
154
|
-
const availableDrillTargets = availableDrillTargets_1.getAvailableDrillTargets(facade_1.DataViewFacade.for(error.dataView));
|
|
153
|
+
if ((0, sdk_backend_spi_1.isNoDataError)(error) && error.dataView && pushData) {
|
|
154
|
+
const availableDrillTargets = (0, availableDrillTargets_1.getAvailableDrillTargets)(facade_1.DataViewFacade.for(error.dataView));
|
|
155
155
|
pushData({ availableDrillTargets });
|
|
156
156
|
}
|
|
157
|
-
this.onError(errorHandling_1.convertError(error));
|
|
157
|
+
this.onError((0, errorHandling_1.convertError)(error));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
LoadingHOCWrapped.defaultProps = InnerComponent.defaultProps || {};
|
|
162
|
-
const IntlLoadingHOC = react_intl_1.injectIntl(LoadingHOCWrapped);
|
|
162
|
+
const IntlLoadingHOC = (0, react_intl_1.injectIntl)(LoadingHOCWrapped);
|
|
163
163
|
return class LoadingHOC extends react_1.default.Component {
|
|
164
164
|
render() {
|
|
165
165
|
return (react_1.default.createElement(IntlWrapper_1.IntlWrapper, { locale: this.props.locale },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withEntireDataView.js","sourceRoot":"","sources":["../../../../src/base/react/legacy/withEntireDataView.tsx"],"names":[],"mappings":";AAAA,gCAAgC;;;;AAEhC,+DAMmC;AACnC,mDAAqD;AACrD,0DAA0B;AAC1B,2CAAmD;AACnD,+DAA+B;AAC/B,+DAA+B;AAG/B,oEAIuC;AACvC,6CAAmF;AACnF,iDAAsD;AACtD,8DAA0D;AAC1D,gEAA6D;AAE7D,mEAAmE;AAmDnE;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAC9B,cAA+D;IAE/D,MAAM,iBAAkB,SAAQ,eAAK,CAAC,SAAwD;QAU1F,YAAY,KAAgC;YACxC,KAAK,CAAC,KAAK,CAAC,CAAC;YART,iBAAY,GAAY,KAAK,CAAC;YAEtC;;eAEG;YACK,+BAA0B,GAAkB,IAAI,CAAC;YA4KjD,mBAAc,GAAG,CAAC,KAAgC,EAA6B,EAAE;gBACrF,OAAO,cAAI,
|
|
1
|
+
{"version":3,"file":"withEntireDataView.js","sourceRoot":"","sources":["../../../../src/base/react/legacy/withEntireDataView.tsx"],"names":[],"mappings":";AAAA,gCAAgC;;;;AAEhC,+DAMmC;AACnC,mDAAqD;AACrD,0DAA0B;AAC1B,2CAAmD;AACnD,+DAA+B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G,CAAC,KAAK,CAAC,QAAQ,CAAC,CACrC,CAAC;oBAEF,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC;iBACvC;gBAED,IAAI,CAAC,OAAO,CAAC,IAAA,4BAAY,EAAC,KAAK,CAAC,CAAC,CAAC;aACrC;QACL,CAAC;;IAjLa,8BAAY,GAAG,cAAc,CAAC,YAAY,IAAI,EAAE,AAApC,CAAqC;IAwLnE,MAAM,cAAc,GAAG,IAAA,uBAAU,EAAoC,iBAAiB,CAAC,CAAC;IAExF,OAAO,MAAM,UAAW,SAAQ,eAAK,CAAC,SAAY;QACvC,MAAM;YACT,OAAO,CACH,8BAAC,yBAAW,IAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBAClC,8BAAC,cAAc,oBAAM,IAAI,CAAC,KAAa,EAAI,CACjC,CACjB,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC;AAvMD,gDAuMC"}
|
|
@@ -5,88 +5,88 @@ import { ValueOrPlaceholder, ValuesOrPlaceholders, AnyMeasure, ValueOrMultiValue
|
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type FilterOrPlaceholder = ValueOrPlaceholder<IFilter> | ValueOrPlaceholder<IDateFilter> | ValueOrPlaceholder<IMeasureFilter> | ValueOrPlaceholder<IAttributeFilter> | ValueOrPlaceholder<IAbsoluteDateFilter> | ValueOrPlaceholder<IRelativeDateFilter> | ValueOrPlaceholder<IPositiveAttributeFilter> | ValueOrPlaceholder<INegativeAttributeFilter> | ValueOrPlaceholder<IMeasureValueFilter> | ValueOrPlaceholder<IRankingFilter>;
|
|
9
9
|
/**
|
|
10
10
|
* Alias for all possible nullable filter or placeholder signatures.
|
|
11
11
|
*
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type NullableFilterOrPlaceholder = FilterOrPlaceholder | ValueOrPlaceholder<INullableFilter> | ValueOrPlaceholder<IFilter | null> | ValueOrPlaceholder<IDateFilter | null> | ValueOrPlaceholder<IMeasureFilter | null> | ValueOrPlaceholder<IAttributeFilter | null> | ValueOrPlaceholder<IAbsoluteDateFilter | null> | ValueOrPlaceholder<IRelativeDateFilter | null> | ValueOrPlaceholder<IPositiveAttributeFilter | null> | ValueOrPlaceholder<INegativeAttributeFilter | null> | ValueOrPlaceholder<IMeasureValueFilter | null> | ValueOrPlaceholder<IRankingFilter | null>;
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type FilterOrMultiValuePlaceholder = ValueOrMultiValuePlaceholder<IFilter> | ValueOrMultiValuePlaceholder<IDateFilter> | ValueOrMultiValuePlaceholder<IMeasureFilter> | ValueOrMultiValuePlaceholder<IAttributeFilter> | ValueOrMultiValuePlaceholder<IAbsoluteDateFilter> | ValueOrMultiValuePlaceholder<IRelativeDateFilter> | ValueOrMultiValuePlaceholder<IPositiveAttributeFilter> | ValueOrMultiValuePlaceholder<INegativeAttributeFilter> | ValueOrMultiValuePlaceholder<IMeasureValueFilter> | ValueOrMultiValuePlaceholder<IRankingFilter>;
|
|
20
20
|
/**
|
|
21
21
|
* Alias for all possible filters or their placeholder signatures.
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export
|
|
25
|
+
export type FiltersOrPlaceholders = Array<FilterOrMultiValuePlaceholder>;
|
|
26
26
|
/**
|
|
27
27
|
* Alias for all possible nullable filters or their placeholder signatures.
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type NullableFiltersOrPlaceholders = Array<FilterOrMultiValuePlaceholder | ValueOrMultiValuePlaceholder<INullableFilter> | ValueOrMultiValuePlaceholder<IFilter | null> | ValueOrMultiValuePlaceholder<IDateFilter | null> | ValueOrMultiValuePlaceholder<IMeasureFilter | null> | ValueOrMultiValuePlaceholder<IAttributeFilter | null> | ValueOrMultiValuePlaceholder<IAbsoluteDateFilter | null> | ValueOrMultiValuePlaceholder<IRelativeDateFilter | null> | ValueOrMultiValuePlaceholder<IPositiveAttributeFilter | null> | ValueOrMultiValuePlaceholder<INegativeAttributeFilter | null> | ValueOrMultiValuePlaceholder<IMeasureValueFilter | null> | ValueOrMultiValuePlaceholder<IRankingFilter | null>>;
|
|
32
32
|
/**
|
|
33
33
|
* Alias for all possible attribute filter or placeholder signatures.
|
|
34
34
|
*
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
export
|
|
37
|
+
export type AttributeFilterOrPlaceholder = ValueOrPlaceholder<IAttributeFilter> | ValueOrPlaceholder<IPositiveAttributeFilter> | ValueOrPlaceholder<INegativeAttributeFilter>;
|
|
38
38
|
/**
|
|
39
39
|
* Alias for all possible attribute filters or their placeholder signatures.
|
|
40
40
|
*
|
|
41
41
|
* @public
|
|
42
42
|
*/
|
|
43
|
-
export
|
|
43
|
+
export type AttributeFiltersOrPlaceholders = Array<ValueOrMultiValuePlaceholder<IAttributeFilter> | ValueOrMultiValuePlaceholder<IPositiveAttributeFilter> | ValueOrMultiValuePlaceholder<INegativeAttributeFilter>>;
|
|
44
44
|
/**
|
|
45
45
|
* Alias for all possible attribute or placeholder signatures.
|
|
46
46
|
*
|
|
47
47
|
* @public
|
|
48
48
|
*/
|
|
49
|
-
export
|
|
49
|
+
export type AttributeOrPlaceholder = ValueOrPlaceholder<IAttribute>;
|
|
50
50
|
/**
|
|
51
51
|
* Alias for all possible attributes or their placeholder signatures.
|
|
52
52
|
*
|
|
53
53
|
* @public
|
|
54
54
|
*/
|
|
55
|
-
export
|
|
55
|
+
export type AttributesOrPlaceholders = ValuesOrPlaceholders<IAttribute>;
|
|
56
56
|
/**
|
|
57
57
|
* Alias for all possible measure or placeholder signatures.
|
|
58
58
|
*
|
|
59
59
|
* @public
|
|
60
60
|
*/
|
|
61
|
-
export
|
|
61
|
+
export type MeasureOrPlaceholder = ValueOrPlaceholder<AnyMeasure>;
|
|
62
62
|
/**
|
|
63
63
|
* Alias for all possible measures or their placeholder signatures.
|
|
64
64
|
*
|
|
65
65
|
* @public
|
|
66
66
|
*/
|
|
67
|
-
export
|
|
67
|
+
export type MeasuresOrPlaceholders = ValuesOrPlaceholders<AnyMeasure>;
|
|
68
68
|
/**
|
|
69
69
|
* Alias for all possible attribute, measure or placeholder signatures.
|
|
70
70
|
*
|
|
71
71
|
* @public
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type AttributeMeasureOrPlaceholder = ValueOrPlaceholder<IAttribute | AnyMeasure> | ValueOrPlaceholder<IAttribute> | ValueOrPlaceholder<AnyMeasure>;
|
|
74
74
|
/**
|
|
75
75
|
* Alias for all possible attributes, measures or their placeholders signatures.
|
|
76
76
|
*
|
|
77
77
|
* @public
|
|
78
78
|
*/
|
|
79
|
-
export
|
|
79
|
+
export type AttributesMeasuresOrPlaceholders = Array<ValueOrMultiValuePlaceholder<IAttribute | AnyMeasure> | ValueOrMultiValuePlaceholder<IAttribute> | ValueOrMultiValuePlaceholder<AnyMeasure>>;
|
|
80
80
|
/**
|
|
81
81
|
* Alias for all possible sorts or their placeholders signatures.
|
|
82
82
|
*
|
|
83
83
|
* @public
|
|
84
84
|
*/
|
|
85
|
-
export
|
|
85
|
+
export type SortsOrPlaceholders = ValuesOrPlaceholders<ISortItem>;
|
|
86
86
|
/**
|
|
87
87
|
* Alias for all possible totals or their placeholders signatures.
|
|
88
88
|
*
|
|
89
89
|
* @public
|
|
90
90
|
*/
|
|
91
|
-
export
|
|
91
|
+
export type TotalsOrPlaceholders = ValuesOrPlaceholders<ITotal>;
|
|
92
92
|
//# sourceMappingURL=aliases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EACH,OAAO,EACP,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,UAAU,EACV,SAAS,EACT,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAY5G;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/aliases.ts"],"names":[],"mappings":"AACA,OAAO,EACH,OAAO,EACP,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,UAAU,EACV,SAAS,EACT,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAY5G;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GACzB,kBAAkB,CAAC,OAAO,CAAC,GAC3B,kBAAkB,CAAC,WAAW,CAAC,GAC/B,kBAAkB,CAAC,cAAc,CAAC,GAClC,kBAAkB,CAAC,gBAAgB,CAAC,GAEpC,kBAAkB,CAAC,mBAAmB,CAAC,GACvC,kBAAkB,CAAC,mBAAmB,CAAC,GACvC,kBAAkB,CAAC,wBAAwB,CAAC,GAC5C,kBAAkB,CAAC,wBAAwB,CAAC,GAC5C,kBAAkB,CAAC,mBAAmB,CAAC,GACvC,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAIzC;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GACjC,mBAAmB,GACnB,kBAAkB,CAAC,eAAe,CAAC,GACnC,kBAAkB,CAAC,OAAO,GAAG,IAAI,CAAC,GAClC,kBAAkB,CAAC,WAAW,GAAG,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B,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAIlE;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { IMeasure, IMeasureDefinitionType } from "@gooddata/sdk-model";
|
|
|
4
4
|
* Any placeholder type - placeholder or composed placeholder.
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type AnyPlaceholder<T = any> = IPlaceholder<T> | IComposedPlaceholder<T, any, any>;
|
|
8
8
|
/**
|
|
9
9
|
* Type-guard testing whether the provided object is an instance of {@link AnyPlaceholder}.
|
|
10
10
|
* @public
|
|
@@ -41,7 +41,7 @@ export declare function isAnyPlaceholder<T>(obj: unknown): obj is AnyPlaceholder
|
|
|
41
41
|
*
|
|
42
42
|
* @public
|
|
43
43
|
*/
|
|
44
|
-
export
|
|
44
|
+
export type IPlaceholder<T> = {
|
|
45
45
|
type: "IPlaceholder";
|
|
46
46
|
id: string;
|
|
47
47
|
defaultValue?: T;
|
|
@@ -83,7 +83,7 @@ export declare function isComposedPlaceholder<TReturn, TValue extends any[], TCo
|
|
|
83
83
|
* React hook to obtain and set {@link IPlaceholder} value.
|
|
84
84
|
* @public
|
|
85
85
|
*/
|
|
86
|
-
export
|
|
86
|
+
export type IUsePlaceholderHook<T extends IPlaceholder<any>> = () => [
|
|
87
87
|
PlaceholderValue<T> | undefined,
|
|
88
88
|
(valueOrUpdateCallback: ValueOrUpdateCallback<PlaceholderValue<T> | undefined>) => void
|
|
89
89
|
];
|
|
@@ -91,7 +91,7 @@ export declare type IUsePlaceholderHook<T extends IPlaceholder<any>> = () => [
|
|
|
91
91
|
* React hook to obtain {@link IComposedPlaceholder} value.
|
|
92
92
|
* @public
|
|
93
93
|
*/
|
|
94
|
-
export
|
|
94
|
+
export type IUseComposedPlaceholderHook<T extends IComposedPlaceholder<any, any, any>> = (resolutionContext: ComposedPlaceholderResolutionContext<T>) => PlaceholderResolvedValue<T>;
|
|
95
95
|
/**
|
|
96
96
|
* Get composed placeholder resolution context type.
|
|
97
97
|
*
|
|
@@ -102,7 +102,7 @@ export declare type IUseComposedPlaceholderHook<T extends IComposedPlaceholder<a
|
|
|
102
102
|
*
|
|
103
103
|
* @public
|
|
104
104
|
*/
|
|
105
|
-
export
|
|
105
|
+
export type ComposedPlaceholderResolutionContext<T> = T extends IComposedPlaceholder<any, any, infer TContext> ? TContext : any;
|
|
106
106
|
/**
|
|
107
107
|
* Convert union type to intersection type.
|
|
108
108
|
*
|
|
@@ -114,7 +114,7 @@ export declare type ComposedPlaceholderResolutionContext<T> = T extends ICompose
|
|
|
114
114
|
*
|
|
115
115
|
* @public
|
|
116
116
|
*/
|
|
117
|
-
export
|
|
117
|
+
export type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
|
|
118
118
|
/**
|
|
119
119
|
* Flatten array type.
|
|
120
120
|
*
|
|
@@ -130,7 +130,7 @@ export declare type UnionToIntersection<T> = (T extends any ? (x: T) => any : ne
|
|
|
130
130
|
* ```
|
|
131
131
|
* @public
|
|
132
132
|
*/
|
|
133
|
-
export
|
|
133
|
+
export type Flatten<T> = T extends Array<infer A> ? A : T;
|
|
134
134
|
/**
|
|
135
135
|
* Get placeholder value type.
|
|
136
136
|
*
|
|
@@ -147,7 +147,7 @@ export declare type Flatten<T> = T extends Array<infer A> ? A : T;
|
|
|
147
147
|
*
|
|
148
148
|
* @public
|
|
149
149
|
*/
|
|
150
|
-
export
|
|
150
|
+
export type PlaceholderValue<T> = T extends IPlaceholder<infer A> ? A : T extends IComposedPlaceholder<infer B, any, any> ? B : T;
|
|
151
151
|
/**
|
|
152
152
|
* Convert tuple of placeholders to tuple of their respective value types.
|
|
153
153
|
*
|
|
@@ -160,7 +160,7 @@ export declare type PlaceholderValue<T> = T extends IPlaceholder<infer A> ? A :
|
|
|
160
160
|
*
|
|
161
161
|
* @public
|
|
162
162
|
*/
|
|
163
|
-
export
|
|
163
|
+
export type PlaceholdersValues<Tuple extends [...any[]]> = {
|
|
164
164
|
[Index in keyof Tuple]: PlaceholderValue<Tuple[Index]>;
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
@@ -181,7 +181,7 @@ export declare type PlaceholdersValues<Tuple extends [...any[]]> = {
|
|
|
181
181
|
*
|
|
182
182
|
* @public
|
|
183
183
|
*/
|
|
184
|
-
export
|
|
184
|
+
export type PlaceholderResolvedValue<T> = T extends Array<infer A> ? Flatten<PlaceholderResolvedValue<A>>[] : T extends IPlaceholder<infer B> ? B : T extends IComposedPlaceholder<infer C, any, any> ? C : T;
|
|
185
185
|
/**
|
|
186
186
|
* Convert tuple of values that may contain placeholders to tuple of their respective resolved value types.
|
|
187
187
|
*
|
|
@@ -197,7 +197,7 @@ export declare type PlaceholderResolvedValue<T> = T extends Array<infer A> ? Fla
|
|
|
197
197
|
*
|
|
198
198
|
* @public
|
|
199
199
|
*/
|
|
200
|
-
export
|
|
200
|
+
export type PlaceholdersResolvedValues<Tuple extends any[]> = {
|
|
201
201
|
[Index in keyof Tuple]: PlaceholderResolvedValue<Tuple[Index]>;
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -209,7 +209,7 @@ export declare type PlaceholdersResolvedValues<Tuple extends any[]> = {
|
|
|
209
209
|
* ```
|
|
210
210
|
* @public
|
|
211
211
|
*/
|
|
212
|
-
export
|
|
212
|
+
export type ArrayOf<T> = T extends any ? T[] : never;
|
|
213
213
|
/**
|
|
214
214
|
* Generate all possible combinations of arrays signatures for the union type.
|
|
215
215
|
*
|
|
@@ -220,7 +220,7 @@ export declare type ArrayOf<T> = T extends any ? T[] : never;
|
|
|
220
220
|
*
|
|
221
221
|
* @public
|
|
222
222
|
*/
|
|
223
|
-
export
|
|
223
|
+
export type AnyArrayOf<T> = T[] | ArrayOf<T>;
|
|
224
224
|
/**
|
|
225
225
|
* Wrap each member of the union type in AnyPlaceholder.
|
|
226
226
|
*
|
|
@@ -231,7 +231,7 @@ export declare type AnyArrayOf<T> = T[] | ArrayOf<T>;
|
|
|
231
231
|
*
|
|
232
232
|
* @public
|
|
233
233
|
*/
|
|
234
|
-
export
|
|
234
|
+
export type PlaceholderOf<T> = T extends any ? AnyPlaceholder<T> : never;
|
|
235
235
|
/**
|
|
236
236
|
* Generate all possible combinations of placeholder signatures for the union type.
|
|
237
237
|
*
|
|
@@ -243,19 +243,19 @@ export declare type PlaceholderOf<T> = T extends any ? AnyPlaceholder<T> : never
|
|
|
243
243
|
* ```
|
|
244
244
|
* @public
|
|
245
245
|
*/
|
|
246
|
-
export
|
|
246
|
+
export type AnyPlaceholderOf<T> = AnyPlaceholder<T> | PlaceholderOf<T>;
|
|
247
247
|
/**
|
|
248
248
|
* Represents value of type T or any placeholder that may hold value T.
|
|
249
249
|
*
|
|
250
250
|
* @public
|
|
251
251
|
*/
|
|
252
|
-
export
|
|
252
|
+
export type ValueOrPlaceholder<T> = T | AnyPlaceholderOf<T>;
|
|
253
253
|
/**
|
|
254
254
|
* Represents array of values T or placeholders that may hold value T.
|
|
255
255
|
*
|
|
256
256
|
* @public
|
|
257
257
|
*/
|
|
258
|
-
export
|
|
258
|
+
export type ValuesOrPlaceholders<T> = AnyArrayOf<ValueOrMultiValuePlaceholder<T>>;
|
|
259
259
|
/**
|
|
260
260
|
* Generate union of measures from union of measure definitions.
|
|
261
261
|
*
|
|
@@ -265,15 +265,15 @@ export declare type ValuesOrPlaceholders<T> = AnyArrayOf<ValueOrMultiValuePlaceh
|
|
|
265
265
|
*
|
|
266
266
|
* @public
|
|
267
267
|
*/
|
|
268
|
-
export
|
|
268
|
+
export type MeasureOf<T extends IMeasureDefinitionType> = T extends any ? IMeasure<T> : never;
|
|
269
269
|
/**
|
|
270
270
|
* Represents all possible measure signatures.
|
|
271
271
|
*
|
|
272
272
|
* @public
|
|
273
273
|
*/
|
|
274
|
-
export
|
|
274
|
+
export type AnyMeasure = IMeasure | MeasureOf<IMeasureDefinitionType>;
|
|
275
275
|
/**
|
|
276
276
|
* @public
|
|
277
277
|
*/
|
|
278
|
-
export
|
|
278
|
+
export type ValueOrMultiValuePlaceholder<T> = ValueOrPlaceholder<T> | AnyPlaceholderOf<T[]>;
|
|
279
279
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1F;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAI1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC1B,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,GAAG,EAAE,mBAAmB,CAAC,YAAY,CAAC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,EAAE,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ exports.isAnyPlaceholder = isAnyPlaceholder;
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
function isPlaceholder(obj) {
|
|
21
|
-
return !isEmpty_1.default(obj) && obj.type === "IPlaceholder";
|
|
21
|
+
return !(0, isEmpty_1.default)(obj) && obj.type === "IPlaceholder";
|
|
22
22
|
}
|
|
23
23
|
exports.isPlaceholder = isPlaceholder;
|
|
24
24
|
/**
|
|
@@ -26,7 +26,7 @@ exports.isPlaceholder = isPlaceholder;
|
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
28
|
function isComposedPlaceholder(obj) {
|
|
29
|
-
return (!isEmpty_1.default(obj) &&
|
|
29
|
+
return (!(0, isEmpty_1.default)(obj) &&
|
|
30
30
|
obj.type === "IComposedPlaceholder");
|
|
31
31
|
}
|
|
32
32
|
exports.isComposedPlaceholder = isComposedPlaceholder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/base/react/placeholders/base.ts"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,qEAAqC;AAUrC;;;GAGG;AACH,SAAgB,gBAAgB,CAAI,GAAY;IAC5C,MAAM,MAAM,GAAkC,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAErF,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAJD,4CAIC;AA0CD;;;GAGG;AACH,SAAgB,aAAa,CAAI,GAAY;IACzC,OAAO,CAAC,iBAAO,
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/base/react/placeholders/base.ts"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,qEAAqC;AAUrC;;;GAGG;AACH,SAAgB,gBAAgB,CAAI,GAAY;IAC5C,MAAM,MAAM,GAAkC,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAErF,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAJD,4CAIC;AA0CD;;;GAGG;AACH,SAAgB,aAAa,CAAI,GAAY;IACzC,OAAO,CAAC,IAAA,iBAAO,EAAC,GAAG,CAAC,IAAK,GAAuB,CAAC,IAAI,KAAK,cAAc,CAAC;AAC7E,CAAC;AAFD,sCAEC;AAuBD;;;GAGG;AACH,SAAgB,qBAAqB,CACjC,GAAY;IAEZ,OAAO,CACH,CAAC,IAAA,iBAAO,EAAC,GAAG,CAAC;QACZ,GAAuD,CAAC,IAAI,KAAK,sBAAsB,CAC3F,CAAC;AACN,CAAC;AAPD,sDAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/base/react/placeholders/context.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAC/B,KAAK,EAAE,iBAAiB,CAAC;IACzB,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,iBAAiB,KAAK,IAAI,CAAC;CACpF;AAaD;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,yBAA4D,CAAC;AAEvG;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CA2BnF"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlaceholdersProvider = exports.usePlaceholdersContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
// (C) 2019 GoodData Corporation
|
|
5
|
+
// (C) 2019-2023 GoodData Corporation
|
|
6
6
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
7
|
const noop_1 = tslib_1.__importDefault(require("lodash/noop"));
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
const PlaceholdersContext = react_1.createContext({
|
|
11
|
+
const PlaceholdersContext = (0, react_1.createContext)({
|
|
12
12
|
state: {
|
|
13
13
|
placeholders: {},
|
|
14
14
|
},
|
|
@@ -18,7 +18,8 @@ PlaceholdersContext.displayName = "PlaceholdersContext";
|
|
|
18
18
|
/**
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
const usePlaceholdersContext = () => (0, react_1.useContext)(PlaceholdersContext);
|
|
22
|
+
exports.usePlaceholdersContext = usePlaceholdersContext;
|
|
22
23
|
/**
|
|
23
24
|
* Wraps component into a PlaceholdersContext consumer enabling the children of this to access the current
|
|
24
25
|
* placeholders state.
|
|
@@ -28,14 +29,15 @@ exports.usePlaceholdersContext = () => react_1.useContext(PlaceholdersContext);
|
|
|
28
29
|
function PlaceholdersProvider(props) {
|
|
29
30
|
var _a;
|
|
30
31
|
const { children, initialValues } = props;
|
|
32
|
+
const accumulator = {};
|
|
31
33
|
const initialPlaceholdersState = (_a = initialValues === null || initialValues === void 0 ? void 0 : initialValues.reduce((acc, [placeholder, value]) => {
|
|
32
34
|
acc[placeholder.id] = Object.assign(Object.assign({}, placeholder), { value });
|
|
33
35
|
return acc;
|
|
34
|
-
},
|
|
35
|
-
const [state, updateState] = react_1.useState({
|
|
36
|
+
}, accumulator)) !== null && _a !== void 0 ? _a : {};
|
|
37
|
+
const [state, updateState] = (0, react_1.useState)({
|
|
36
38
|
placeholders: initialPlaceholdersState,
|
|
37
39
|
});
|
|
38
|
-
react_1.useDebugValue(state);
|
|
40
|
+
(0, react_1.useDebugValue)(state);
|
|
39
41
|
return (react_1.default.createElement(PlaceholdersContext.Provider, { value: {
|
|
40
42
|
state,
|
|
41
43
|
updateState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/base/react/placeholders/context.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/base/react/placeholders/context.tsx"],"names":[],"mappings":";;;;AAAA,qCAAqC;AACrC,uDAAkF;AAClF,+DAA+B;AAkB/B;;GAEG;AACH,MAAM,mBAAmB,GAAG,IAAA,qBAAa,EAA4B;IACjE,KAAK,EAAE;QACH,YAAY,EAAE,EAAE;KACnB;IACD,WAAW,EAAE,cAAI;CACpB,CAAC,CAAC;AACH,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAExD;;GAEG;AACI,MAAM,sBAAsB,GAAG,GAA8B,EAAE,CAAC,IAAA,kBAAU,EAAC,mBAAmB,CAAC,CAAC;AAA1F,QAAA,sBAAsB,0BAAoE;AAWvG;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,KAAiC;;IAClE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAC1C,MAAM,WAAW,GAAsC,EAAE,CAAC;IAC1D,MAAM,wBAAwB,GAC1B,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,EAAE;QAChD,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,mCACZ,WAAW,KACd,KAAK,GACR,CAAC;QACF,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,WAAW,CAAC,mCAAI,EAAE,CAAC;IAE1B,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAoB;QACrD,YAAY,EAAE,wBAAwB;KACzC,CAAC,CAAC;IACH,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;IAErB,OAAO,CACH,8BAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,KAAK;YACL,WAAW;SACd,IAEA,QAAQ,CACkB,CAClC,CAAC;AACN,CAAC;AA3BD,oDA2BC"}
|