@atlaskit/link-datasource 6.12.1 → 6.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/cjs/analytics/xpc/useDatasourceCrossProductAttribution.js +2 -2
- package/dist/cjs/common/ui/common/render-svg.js +1 -1
- package/dist/cjs/hooks/useErrorLogger.js +2 -2
- package/dist/cjs/hooks/useIsInPDFRender.js +2 -2
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/services/__clearUnitsRolloutSettingsCacheForTests.js +13 -0
- package/dist/cjs/services/fetchObjectSchema.js +2 -2
- package/dist/cjs/services/fetchObjectSchemas.js +2 -2
- package/dist/cjs/services/getAvailableSites.js +32 -19
- package/dist/cjs/services/getUnitsRolloutSettings.js +199 -0
- package/dist/cjs/services/getWorkspaceId.js +2 -2
- package/dist/cjs/services/isUnitsIsolationEnabled.js +63 -0
- package/dist/cjs/services/resolvePrimaryWorkspace.js +2 -2
- package/dist/cjs/services/useBasicFilterAGG.js +2 -2
- package/dist/cjs/services/validateAql.js +2 -2
- package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/loading-state.js +2 -2
- package/dist/cjs/ui/assets-modal/search-container/index.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/loading-state.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/loading-state.js +2 -2
- package/dist/cjs/ui/assets-modal/search-container/styled.js +1 -1
- package/dist/cjs/ui/common/error-state/access-required.js +1 -1
- package/dist/cjs/ui/common/error-state/loading-error.js +1 -1
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/cjs/ui/common/error-state/no-instances.js +1 -1
- package/dist/cjs/ui/common/error-state/no-results.js +1 -1
- package/dist/cjs/ui/common/error-state/provider-auth-required-svg.js +1 -1
- package/dist/cjs/ui/common/error-state/provider-auth-required.js +1 -1
- package/dist/cjs/ui/common/initial-state-view/index.js +1 -1
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +1 -1
- package/dist/cjs/ui/common/modal/content-container/index.js +1 -1
- package/dist/cjs/ui/common/modal/count-view-smart-link/smart-card-placeholder.js +1 -1
- package/dist/cjs/ui/common/modal/count-view-smart-link/smart-link.js +1 -1
- package/dist/cjs/ui/common/modal/display-view-dropdown/display-view-drop-down.js +1 -1
- package/dist/cjs/ui/common/modal/mode-switcher/DatasourceViewModeDropDown.js +1 -1
- package/dist/cjs/ui/common/modal/mode-switcher/ModeSwitcher.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/CustomControl.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/custom-checkbox-option.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/dropdownIndicator.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/footer.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/index.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/menu-list/index.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +1 -1
- package/dist/cjs/ui/common/modal/search-count/ItemCountWrapper.js +1 -1
- package/dist/cjs/ui/common/modal/site-selector/index.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +2 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/index.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/modal/PlainConfluenceSearchConfigModal.js +1 -1
- package/dist/cjs/ui/datasource-table-view/DatasourceTableViewWithWrappers.js +14 -0
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +1 -1
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +1 -1
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/column-picker/menu-item.js +1 -1
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +1 -1
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +4 -4
- package/dist/cjs/ui/issue-like-table/empty-state/type.js +1 -1
- package/dist/cjs/ui/issue-like-table/issue-like-data-table-view.js +3 -3
- package/dist/cjs/ui/issue-like-table/render-type/richtext/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/render-type/user/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/shared-components/avatar/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/shared-components/icon/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/cjs/ui/issue-like-table/table-cell-content/table-cell-content.js +1 -1
- package/dist/cjs/ui/issue-like-table/table-settings-menu/TableSettingsMenu.js +1 -1
- package/dist/cjs/ui/issue-like-table/truncate-text-tag/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/jql-editor/index.js +3 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +1 -1
- package/dist/cjs/ui/table-footer/index.js +1 -1
- package/dist/cjs/ui/table-footer/powered-by-jsm-assets/index.js +1 -1
- package/dist/cjs/ui/table-footer/provider-link/index.js +1 -1
- package/dist/es2019/analytics/xpc/useDatasourceCrossProductAttribution.js +1 -1
- package/dist/es2019/common/ui/common/render-svg.js +1 -1
- package/dist/es2019/hooks/useErrorLogger.js +1 -1
- package/dist/es2019/hooks/useIsInPDFRender.js +1 -1
- package/dist/es2019/index.js +5 -5
- package/dist/es2019/services/__clearUnitsRolloutSettingsCacheForTests.js +8 -0
- package/dist/es2019/services/fetchObjectSchema.js +1 -1
- package/dist/es2019/services/fetchObjectSchemas.js +1 -1
- package/dist/es2019/services/getAvailableSites.js +2 -2
- package/dist/es2019/services/getUnitsRolloutSettings.js +112 -0
- package/dist/es2019/services/getWorkspaceId.js +1 -1
- package/dist/es2019/services/isUnitsIsolationEnabled.js +34 -0
- package/dist/es2019/services/resolvePrimaryWorkspace.js +1 -1
- package/dist/es2019/services/useBasicFilterAGG.js +1 -1
- package/dist/es2019/services/validateAql.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/loading-state.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/index.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/loading-state.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/loading-state.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/styled.js +1 -1
- package/dist/es2019/ui/common/error-state/access-required.js +1 -1
- package/dist/es2019/ui/common/error-state/loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/no-instances.js +1 -1
- package/dist/es2019/ui/common/error-state/no-results.js +1 -1
- package/dist/es2019/ui/common/error-state/provider-auth-required-svg.js +1 -1
- package/dist/es2019/ui/common/error-state/provider-auth-required.js +1 -1
- package/dist/es2019/ui/common/initial-state-view/index.js +1 -1
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +1 -1
- package/dist/es2019/ui/common/modal/content-container/index.js +1 -1
- package/dist/es2019/ui/common/modal/count-view-smart-link/smart-card-placeholder.js +1 -1
- package/dist/es2019/ui/common/modal/count-view-smart-link/smart-link.js +1 -1
- package/dist/es2019/ui/common/modal/display-view-dropdown/display-view-drop-down.js +1 -1
- package/dist/es2019/ui/common/modal/mode-switcher/DatasourceViewModeDropDown.js +1 -1
- package/dist/es2019/ui/common/modal/mode-switcher/ModeSwitcher.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/CustomControl.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/custom-checkbox-option.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/dropdownIndicator.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/footer.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/index.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/index.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +1 -1
- package/dist/es2019/ui/common/modal/search-count/ItemCountWrapper.js +1 -1
- package/dist/es2019/ui/common/modal/site-selector/index.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/index.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/modal/PlainConfluenceSearchConfigModal.js +1 -1
- package/dist/es2019/ui/datasource-table-view/DatasourceTableViewWithWrappers.js +15 -1
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +1 -1
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +1 -1
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/column-picker/menu-item.js +1 -1
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +1 -1
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +2 -2
- package/dist/es2019/ui/issue-like-table/empty-state/type.js +1 -1
- package/dist/es2019/ui/issue-like-table/issue-like-data-table-view.js +2 -2
- package/dist/es2019/ui/issue-like-table/render-type/richtext/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/render-type/user/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/shared-components/avatar/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/shared-components/icon/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/es2019/ui/issue-like-table/table-cell-content/table-cell-content.js +1 -1
- package/dist/es2019/ui/issue-like-table/table-settings-menu/TableSettingsMenu.js +1 -1
- package/dist/es2019/ui/issue-like-table/truncate-text-tag/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/jql-editor/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +1 -1
- package/dist/es2019/ui/table-footer/index.js +1 -1
- package/dist/es2019/ui/table-footer/powered-by-jsm-assets/index.js +1 -1
- package/dist/es2019/ui/table-footer/provider-link/index.js +1 -1
- package/dist/esm/analytics/xpc/useDatasourceCrossProductAttribution.js +1 -1
- package/dist/esm/common/ui/common/render-svg.js +1 -1
- package/dist/esm/hooks/useErrorLogger.js +1 -1
- package/dist/esm/hooks/useIsInPDFRender.js +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/services/__clearUnitsRolloutSettingsCacheForTests.js +8 -0
- package/dist/esm/services/fetchObjectSchema.js +1 -1
- package/dist/esm/services/fetchObjectSchemas.js +1 -1
- package/dist/esm/services/getAvailableSites.js +32 -19
- package/dist/esm/services/getUnitsRolloutSettings.js +192 -0
- package/dist/esm/services/getWorkspaceId.js +1 -1
- package/dist/esm/services/isUnitsIsolationEnabled.js +57 -0
- package/dist/esm/services/resolvePrimaryWorkspace.js +1 -1
- package/dist/esm/services/useBasicFilterAGG.js +1 -1
- package/dist/esm/services/validateAql.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +1 -1
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/loading-state.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/index.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/loading-state.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/loading-state.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/styled.js +1 -1
- package/dist/esm/ui/common/error-state/access-required.js +1 -1
- package/dist/esm/ui/common/error-state/loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/no-instances.js +1 -1
- package/dist/esm/ui/common/error-state/no-results.js +1 -1
- package/dist/esm/ui/common/error-state/provider-auth-required-svg.js +1 -1
- package/dist/esm/ui/common/error-state/provider-auth-required.js +1 -1
- package/dist/esm/ui/common/initial-state-view/index.js +1 -1
- package/dist/esm/ui/common/modal/basic-search-input/index.js +1 -1
- package/dist/esm/ui/common/modal/content-container/index.js +1 -1
- package/dist/esm/ui/common/modal/count-view-smart-link/smart-card-placeholder.js +1 -1
- package/dist/esm/ui/common/modal/count-view-smart-link/smart-link.js +1 -1
- package/dist/esm/ui/common/modal/display-view-dropdown/display-view-drop-down.js +1 -1
- package/dist/esm/ui/common/modal/mode-switcher/DatasourceViewModeDropDown.js +1 -1
- package/dist/esm/ui/common/modal/mode-switcher/ModeSwitcher.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/CustomControl.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/custom-checkbox-option.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/dropdownIndicator.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/footer.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/index.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/index.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/trigger.js +1 -1
- package/dist/esm/ui/common/modal/search-count/ItemCountWrapper.js +1 -1
- package/dist/esm/ui/common/modal/site-selector/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/modal/PlainConfluenceSearchConfigModal.js +1 -1
- package/dist/esm/ui/datasource-table-view/DatasourceTableViewWithWrappers.js +15 -1
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +1 -1
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +1 -1
- package/dist/esm/ui/issue-like-table/column-picker/index.js +1 -1
- package/dist/esm/ui/issue-like-table/column-picker/menu-item.js +1 -1
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +1 -1
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +1 -1
- package/dist/esm/ui/issue-like-table/empty-state/index.js +2 -2
- package/dist/esm/ui/issue-like-table/empty-state/type.js +1 -1
- package/dist/esm/ui/issue-like-table/issue-like-data-table-view.js +2 -2
- package/dist/esm/ui/issue-like-table/render-type/richtext/index.js +1 -1
- package/dist/esm/ui/issue-like-table/render-type/user/index.js +1 -1
- package/dist/esm/ui/issue-like-table/shared-components/avatar/index.js +1 -1
- package/dist/esm/ui/issue-like-table/shared-components/icon/index.js +1 -1
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/esm/ui/issue-like-table/table-cell-content/table-cell-content.js +1 -1
- package/dist/esm/ui/issue-like-table/table-settings-menu/TableSettingsMenu.js +1 -1
- package/dist/esm/ui/issue-like-table/truncate-text-tag/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/jql-editor/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +1 -1
- package/dist/esm/ui/table-footer/index.js +1 -1
- package/dist/esm/ui/table-footer/powered-by-jsm-assets/index.js +1 -1
- package/dist/esm/ui/table-footer/provider-link/index.js +1 -1
- package/dist/types/common/utils/locale/fetch-messages-for-locale.d.ts +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/services/__clearUnitsRolloutSettingsCacheForTests.d.ts +4 -0
- package/dist/types/services/getUnitsRolloutSettings.d.ts +29 -0
- package/dist/types/services/isUnitsIsolationEnabled.d.ts +15 -0
- package/dist/types/ui/common/modal/datasource-context/DatasourceContextProviderProps.d.ts +1 -1
- package/dist/types/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +1 -1
- package/examples-helpers/buildAssetsIssuesTable.tsx +2 -2
- package/examples-helpers/buildConfluenceSearchTable.tsx +2 -2
- package/examples-helpers/buildIssueLikeTable.tsx +1 -1
- package/examples-helpers/buildIssueLikeTableLoadingError.tsx +1 -1
- package/examples-helpers/buildJiraIssuesTable.tsx +3 -2
- package/examples-helpers/smartLinkCustomClient.ts +1 -1
- package/package.json +20 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PlainConfluenceSearchConfigModal.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* PlainConfluenceSearchConfigModal.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./PlainConfluenceSearchConfigModal.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import React, { lazy, Suspense } from 'react';
|
|
1
|
+
import React, { lazy, memo, Suspense } from 'react';
|
|
2
|
+
import isEqual from 'lodash/isEqual';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
4
|
const LazyDatasourceTableView = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "@atlaskit-internal_linkdatasource-tableview" */'./datasourceTableView').then(module => ({
|
|
3
5
|
default: module.DatasourceTableView
|
|
4
6
|
})));
|
|
7
|
+
|
|
8
|
+
// Equivalent renderer props must not update a Suspense boundary that is still hydrating.
|
|
9
|
+
const StableDatasourceTableView = /*#__PURE__*/memo(function StableDatasourceTableView(props) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
11
|
+
fallback: /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
"data-testid": 'datasource-table-view-suspense'
|
|
13
|
+
})
|
|
14
|
+
}, /*#__PURE__*/React.createElement(LazyDatasourceTableView, props));
|
|
15
|
+
}, isEqual);
|
|
5
16
|
export const DatasourceTableViewWithWrappers = props => {
|
|
17
|
+
if (isExperimentEnabled('platform_datasource_hydration_stability')) {
|
|
18
|
+
return /*#__PURE__*/React.createElement(StableDatasourceTableView, props);
|
|
19
|
+
}
|
|
6
20
|
return /*#__PURE__*/React.createElement(Suspense, {
|
|
7
21
|
fallback: /*#__PURE__*/React.createElement("div", {
|
|
8
22
|
"data-testid": 'datasource-table-view-suspense'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* datasourceTableView.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* datasourceTableView.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./datasourceTableView.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* concatenated-menu-list.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* concatenated-menu-list.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./concatenated-menu-list.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* drag-column-preview.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* drag-column-preview.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./drag-column-preview.compiled.css";
|
|
4
4
|
import { forwardRef } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* draggable-table-heading.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* draggable-table-heading.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./draggable-table-heading.compiled.css";
|
|
4
4
|
import { forwardRef } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { forwardRef } from 'react';
|
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
8
8
|
|
|
9
|
-
import { Skeleton } from '@atlaskit/linking-common';
|
|
9
|
+
import { Skeleton } from '@atlaskit/linking-common/skeleton';
|
|
10
10
|
const SkeletonComponent = ({
|
|
11
11
|
width,
|
|
12
12
|
itemName
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* issue-like-data-table-view.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* issue-like-data-table-view.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./issue-like-data-table-view.compiled.css";
|
|
4
4
|
import { forwardRef } from 'react';
|
|
@@ -13,7 +13,7 @@ import Button from '@atlaskit/button/default/button';
|
|
|
13
13
|
import { FlagsProvider } from '@atlaskit/flag/flags-provider';
|
|
14
14
|
import SortAscendingIcon from '@atlaskit/icon/core/sort-ascending';
|
|
15
15
|
import SortDescendingIcon from '@atlaskit/icon/core/sort-descending';
|
|
16
|
-
import { Skeleton } from '@atlaskit/linking-common';
|
|
16
|
+
import { Skeleton } from '@atlaskit/linking-common/skeleton';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
18
|
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge';
|
|
19
19
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* inline-edit.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* inline-edit.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./inline-edit.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* table-cell-content.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* table-cell-content.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./table-cell-content.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* TableSettingsMenu.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* TableSettingsMenu.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./TableSettingsMenu.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import
|
|
3
|
+
import JQLEditor from '@atlaskit/jql-editor/ui';
|
|
4
4
|
import { useAutocompleteProvider } from '@atlaskit/jql-editor-autocomplete-rest/use-autocomplete-provider';
|
|
5
5
|
import { makeGetJqlAutocompleteData } from '../../../services/makeGetJqlAutocompleteData';
|
|
6
6
|
import { makeGetJqlSuggestionsData } from '../../../services/makeGetJqlSuggestionsData';
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
5
|
import { useCrossProductUrlWrapper } from '@atlaskit/analytics-cross-product/useCrossProductUrlWrapper';
|
|
6
|
-
import { useSmartCardContext } from '@atlaskit/link-provider/context';
|
|
6
|
+
import { useSmartCardContext } from '@atlaskit/link-provider/use-smart-card-context';
|
|
7
7
|
import { functionWithFG } from '@atlaskit/platform-feature-flags-react/function-with-fg';
|
|
8
8
|
var DATASOURCE_XPC_BRIDGE = 'linkDatasource';
|
|
9
9
|
var XPC_QUERY_PARAM = 'xpis';
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
5
|
import { NetworkError } from '@atlaskit/linking-common';
|
|
6
|
-
import { getTraceId } from '@atlaskit/linking-common/utils';
|
|
6
|
+
import { getTraceId } from '@atlaskit/linking-common/utils/get-trace-id';
|
|
7
7
|
import { useDatasourceAnalyticsEvents } from '../analytics';
|
|
8
8
|
import { logToSentry } from './logToSentry';
|
|
9
9
|
var getNetworkFields = function getNetworkFields(error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
2
|
+
import { useSmartCardContext } from '@atlaskit/link-provider/use-smart-card-context';
|
|
3
3
|
export var useIsInPDFRender = function useIsInPDFRender() {
|
|
4
4
|
var smartCardContext = useSmartCardContext();
|
|
5
5
|
return useMemo(function () {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/** @deprecated Use @atlaskit/link-datasource/confluence-search-modal */
|
|
2
|
-
export {
|
|
2
|
+
export { ConfluenceSearchConfigModalWithWrappers as ConfluenceSearchConfigModal } from './ui/confluence-search-modal/ConfluenceSearchConfigModalWithWrappers';
|
|
3
3
|
|
|
4
4
|
/** @deprecated Use @atlaskit/link-datasource/jira-issues-modal */
|
|
5
|
-
export {
|
|
5
|
+
export { JiraIssuesConfigModalWithWrappers as JiraIssuesConfigModal } from './ui/jira-issues-modal/JiraIssuesConfigModalWithWrappers';
|
|
6
6
|
|
|
7
7
|
/** @deprecated Use @atlaskit/link-datasource/assets-modal */
|
|
8
|
-
export {
|
|
8
|
+
export { AssetsConfigModalWithWrappers as AssetsConfigModal } from './ui/assets-modal/AssetsConfigModalWithWrappers';
|
|
9
9
|
|
|
10
10
|
/** @deprecated Use @atlaskit/link-datasource/datasource-table-view */
|
|
11
|
-
export {
|
|
11
|
+
export { DatasourceTableViewWithWrappers as DatasourceTableView } from './ui/datasource-table-view/DatasourceTableViewWithWrappers';
|
|
12
12
|
|
|
13
13
|
/** @deprecated Use @atlaskit/link-datasource/assets-modal (AssetsConfigModal) */
|
|
14
|
-
export {
|
|
14
|
+
export { AssetsConfigModalWithWrappers as JSMAssetsConfigModal } from './ui/assets-modal/AssetsConfigModalWithWrappers';
|
|
15
15
|
|
|
16
16
|
/** @deprecated Use @atlaskit/link-datasource/utils/schema */
|
|
17
17
|
export { buildDatasourceAdf } from './common/utils/schema-utils';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { cache } from './getUnitsRolloutSettings';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test-only: clear the cached units rollout settings so each test starts with a clean slate.
|
|
5
|
+
*/
|
|
6
|
+
export var __clearUnitsRolloutSettingsCacheForTests = function __clearUnitsRolloutSettingsCacheForTests() {
|
|
7
|
+
cache.promise = undefined;
|
|
8
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { request } from '@atlaskit/linking-common';
|
|
3
|
+
import { request } from '@atlaskit/linking-common/api';
|
|
4
4
|
import { FetchError } from './FetchError';
|
|
5
5
|
import { PermissionError } from './PermissionError';
|
|
6
6
|
import { getStatusCodeGroup } from './getStatusCodeGroup';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { request } from '@atlaskit/linking-common';
|
|
3
|
+
import { request } from '@atlaskit/linking-common/api';
|
|
4
4
|
import { FetchError } from './FetchError';
|
|
5
5
|
import { PermissionError } from './PermissionError';
|
|
6
6
|
import { getStatusCodeGroup } from './getStatusCodeGroup';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { mapAccessibleProductsToAvailableSites } from '@atlaskit/linking-common/hooks';
|
|
4
|
-
import {
|
|
4
|
+
import { isUnitsIsolationEnabled } from './isUnitsIsolationEnabled';
|
|
5
5
|
export var getAccessibleProducts = /*#__PURE__*/function () {
|
|
6
6
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(product) {
|
|
7
|
-
var requestConfig, endpoint, response, res, _t, _t2, _t3;
|
|
7
|
+
var requestConfig, endpoint, response, res, _t, _t2, _t3, _t4;
|
|
8
8
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
9
9
|
while (1) switch (_context.prev = _context.next) {
|
|
10
10
|
case 0:
|
|
@@ -20,35 +20,48 @@ export var getAccessibleProducts = /*#__PURE__*/function () {
|
|
|
20
20
|
productIds: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
|
|
21
21
|
})
|
|
22
22
|
};
|
|
23
|
-
endpoint = fg('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
|
|
24
23
|
_context.next = 1;
|
|
25
|
-
return
|
|
24
|
+
return isUnitsIsolationEnabled();
|
|
26
25
|
case 1:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_context.next = 3;
|
|
26
|
+
if (!_context.sent) {
|
|
27
|
+
_context.next = 2;
|
|
30
28
|
break;
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
_t = '/gateway/api/experimental/v2/accessible-products';
|
|
31
|
+
_context.next = 3;
|
|
32
|
+
break;
|
|
34
33
|
case 2:
|
|
35
|
-
|
|
36
|
-
return _context.abrupt("return", mapAccessibleProductsToAvailableSites(res.data));
|
|
34
|
+
_t = '/gateway/api/v2/accessible-products';
|
|
37
35
|
case 3:
|
|
38
|
-
|
|
36
|
+
endpoint = _t;
|
|
39
37
|
_context.next = 4;
|
|
40
|
-
return
|
|
38
|
+
return fetch(endpoint, requestConfig);
|
|
41
39
|
case 4:
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
_context.next =
|
|
40
|
+
response = _context.sent;
|
|
41
|
+
if (!response.ok) {
|
|
42
|
+
_context.next = 6;
|
|
45
43
|
break;
|
|
46
44
|
}
|
|
47
|
-
|
|
45
|
+
_context.next = 5;
|
|
46
|
+
return response.json();
|
|
48
47
|
case 5:
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
res = _context.sent;
|
|
49
|
+
return _context.abrupt("return", mapAccessibleProductsToAvailableSites(res.data));
|
|
51
50
|
case 6:
|
|
51
|
+
_t2 = Error;
|
|
52
|
+
_context.next = 7;
|
|
53
|
+
return response.text();
|
|
54
|
+
case 7:
|
|
55
|
+
_t3 = _context.sent;
|
|
56
|
+
if (_t3) {
|
|
57
|
+
_context.next = 8;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
_t3 = 'Something went wrong';
|
|
61
|
+
case 8:
|
|
62
|
+
_t4 = _t3;
|
|
63
|
+
throw new _t2(_t4);
|
|
64
|
+
case 9:
|
|
52
65
|
case "end":
|
|
53
66
|
return _context.stop();
|
|
54
67
|
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
+
import { request } from '@atlaskit/linking-common';
|
|
7
|
+
var AGG_URL = '/gateway/api/graphql';
|
|
8
|
+
var TENANT_CONTEXT_OPERATION_NAME = 'link_datasource_tenantContext';
|
|
9
|
+
var UNITS_ROLLOUT_SETTINGS_OPERATION_NAME = 'link_datasource_unitSettings';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `Query.admin_unitSettings` is keyed by org id, which the browser does not know, so the org id
|
|
13
|
+
* is resolved from the host the product is currently served from.
|
|
14
|
+
*/
|
|
15
|
+
export var tenantContextQuery = "\n\tquery ".concat(TENANT_CONTEXT_OPERATION_NAME, "($hostNames: [String!]) {\n\t\ttenantContexts(hostNames: $hostNames) {\n\t\t\torgId\n\t\t}\n\t}\n");
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* `admin_unitSettings` exposes both flags of the rollout and is callable with the session of the
|
|
19
|
+
* end user, so no opt-in directive or admin OAuth scope is needed from the browser.
|
|
20
|
+
*/
|
|
21
|
+
export var unitsRolloutSettingsQuery = "\n\tquery ".concat(UNITS_ROLLOUT_SETTINGS_OPERATION_NAME, "($orgId: ID!) {\n\t\tadmin_unitSettings(orgId: $orgId) {\n\t\t\tboundaryEnforced\n\t\t\tendUsersLaunched\n\t\t}\n\t}\n");
|
|
22
|
+
/**
|
|
23
|
+
* When the rollout settings cannot be resolved we keep the pre-isolation behaviour, which is
|
|
24
|
+
* what every org gets today while the unit settings are unset. The settings are only
|
|
25
|
+
* written when an org is activated - they are not backfilled - so `null` is expected for orgs
|
|
26
|
+
* that have not been activated yet and must be read as `false`.
|
|
27
|
+
*/
|
|
28
|
+
var DEFAULT_SETTINGS = {
|
|
29
|
+
boundaryEnforced: false,
|
|
30
|
+
endUsersLaunched: false
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Holds the in-flight/resolved request so that the settings are only fetched once per page load.
|
|
35
|
+
*/
|
|
36
|
+
export var cache = {};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* AGG answers with a 200 and an `errors` array for query level failures, so those have to be
|
|
40
|
+
* turned into a rejection explicitly rather than being read as an empty response.
|
|
41
|
+
*/
|
|
42
|
+
var requestGraphQL = /*#__PURE__*/function () {
|
|
43
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(operationName, query, variables) {
|
|
44
|
+
var _response$errors, _response$data;
|
|
45
|
+
var response, messages;
|
|
46
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
47
|
+
while (1) switch (_context.prev = _context.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
_context.next = 1;
|
|
50
|
+
return request('post', AGG_URL, {
|
|
51
|
+
operationName: operationName,
|
|
52
|
+
query: query,
|
|
53
|
+
variables: variables
|
|
54
|
+
});
|
|
55
|
+
case 1:
|
|
56
|
+
response = _context.sent;
|
|
57
|
+
if (!(response !== null && response !== void 0 && (_response$errors = response.errors) !== null && _response$errors !== void 0 && _response$errors.length)) {
|
|
58
|
+
_context.next = 2;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
messages = response.errors.map(function (error) {
|
|
62
|
+
return error === null || error === void 0 ? void 0 : error.message;
|
|
63
|
+
}).filter(Boolean).join(', ');
|
|
64
|
+
throw new Error("".concat(operationName, " failed: ").concat(messages || 'unknown error'));
|
|
65
|
+
case 2:
|
|
66
|
+
return _context.abrupt("return", (_response$data = response === null || response === void 0 ? void 0 : response.data) !== null && _response$data !== void 0 ? _response$data : undefined);
|
|
67
|
+
case 3:
|
|
68
|
+
case "end":
|
|
69
|
+
return _context.stop();
|
|
70
|
+
}
|
|
71
|
+
}, _callee);
|
|
72
|
+
}));
|
|
73
|
+
return function requestGraphQL(_x, _x2, _x3) {
|
|
74
|
+
return _ref.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
var fetchOrgId = /*#__PURE__*/function () {
|
|
78
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
79
|
+
var _window$location, _data$tenantContexts;
|
|
80
|
+
var hostName, data, _iterator, _step, tenantContext, _t;
|
|
81
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
82
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
hostName = typeof window !== 'undefined' ? (_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname : undefined;
|
|
85
|
+
if (hostName) {
|
|
86
|
+
_context2.next = 1;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return _context2.abrupt("return", undefined);
|
|
90
|
+
case 1:
|
|
91
|
+
_context2.next = 2;
|
|
92
|
+
return requestGraphQL(TENANT_CONTEXT_OPERATION_NAME, tenantContextQuery, {
|
|
93
|
+
hostNames: [hostName]
|
|
94
|
+
});
|
|
95
|
+
case 2:
|
|
96
|
+
data = _context2.sent;
|
|
97
|
+
_iterator = _createForOfIteratorHelper((_data$tenantContexts = data === null || data === void 0 ? void 0 : data.tenantContexts) !== null && _data$tenantContexts !== void 0 ? _data$tenantContexts : []);
|
|
98
|
+
_context2.prev = 3;
|
|
99
|
+
_iterator.s();
|
|
100
|
+
case 4:
|
|
101
|
+
if ((_step = _iterator.n()).done) {
|
|
102
|
+
_context2.next = 6;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
tenantContext = _step.value;
|
|
106
|
+
if (!(tenantContext !== null && tenantContext !== void 0 && tenantContext.orgId)) {
|
|
107
|
+
_context2.next = 5;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
return _context2.abrupt("return", tenantContext.orgId);
|
|
111
|
+
case 5:
|
|
112
|
+
_context2.next = 4;
|
|
113
|
+
break;
|
|
114
|
+
case 6:
|
|
115
|
+
_context2.next = 8;
|
|
116
|
+
break;
|
|
117
|
+
case 7:
|
|
118
|
+
_context2.prev = 7;
|
|
119
|
+
_t = _context2["catch"](3);
|
|
120
|
+
_iterator.e(_t);
|
|
121
|
+
case 8:
|
|
122
|
+
_context2.prev = 8;
|
|
123
|
+
_iterator.f();
|
|
124
|
+
return _context2.finish(8);
|
|
125
|
+
case 9:
|
|
126
|
+
return _context2.abrupt("return", undefined);
|
|
127
|
+
case 10:
|
|
128
|
+
case "end":
|
|
129
|
+
return _context2.stop();
|
|
130
|
+
}
|
|
131
|
+
}, _callee2, null, [[3, 7, 8, 9]]);
|
|
132
|
+
}));
|
|
133
|
+
return function fetchOrgId() {
|
|
134
|
+
return _ref2.apply(this, arguments);
|
|
135
|
+
};
|
|
136
|
+
}();
|
|
137
|
+
var fetchUnitsRolloutSettings = /*#__PURE__*/function () {
|
|
138
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
139
|
+
var _settings$boundaryEnf, _settings$endUsersLau;
|
|
140
|
+
var orgId, data, settings;
|
|
141
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
142
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
143
|
+
case 0:
|
|
144
|
+
_context3.next = 1;
|
|
145
|
+
return fetchOrgId();
|
|
146
|
+
case 1:
|
|
147
|
+
orgId = _context3.sent;
|
|
148
|
+
if (orgId) {
|
|
149
|
+
_context3.next = 2;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
return _context3.abrupt("return", DEFAULT_SETTINGS);
|
|
153
|
+
case 2:
|
|
154
|
+
_context3.next = 3;
|
|
155
|
+
return requestGraphQL(UNITS_ROLLOUT_SETTINGS_OPERATION_NAME, unitsRolloutSettingsQuery, {
|
|
156
|
+
orgId: orgId
|
|
157
|
+
});
|
|
158
|
+
case 3:
|
|
159
|
+
data = _context3.sent;
|
|
160
|
+
settings = data === null || data === void 0 ? void 0 : data.admin_unitSettings;
|
|
161
|
+
return _context3.abrupt("return", {
|
|
162
|
+
boundaryEnforced: (_settings$boundaryEnf = settings === null || settings === void 0 ? void 0 : settings.boundaryEnforced) !== null && _settings$boundaryEnf !== void 0 ? _settings$boundaryEnf : false,
|
|
163
|
+
endUsersLaunched: (_settings$endUsersLau = settings === null || settings === void 0 ? void 0 : settings.endUsersLaunched) !== null && _settings$endUsersLau !== void 0 ? _settings$endUsersLau : false
|
|
164
|
+
});
|
|
165
|
+
case 4:
|
|
166
|
+
case "end":
|
|
167
|
+
return _context3.stop();
|
|
168
|
+
}
|
|
169
|
+
}, _callee3);
|
|
170
|
+
}));
|
|
171
|
+
return function fetchUnitsRolloutSettings() {
|
|
172
|
+
return _ref3.apply(this, arguments);
|
|
173
|
+
};
|
|
174
|
+
}();
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Reads the org's units rollout settings (`boundaryEnforced` and `endUsersLaunched`) from the
|
|
178
|
+
* TCS key exposed by AGG's `Query.admin_unitSettings`.
|
|
179
|
+
*
|
|
180
|
+
* The result is cached for the lifetime of the page because the settings only change when an
|
|
181
|
+
* admin activates or launches units, which requires a reload to be picked up anyway. A failed
|
|
182
|
+
* request is not cached so that a later call can retry.
|
|
183
|
+
*/
|
|
184
|
+
export var getUnitsRolloutSettings = function getUnitsRolloutSettings() {
|
|
185
|
+
if (!cache.promise) {
|
|
186
|
+
cache.promise = fetchUnitsRolloutSettings().catch(function () {
|
|
187
|
+
cache.promise = undefined;
|
|
188
|
+
return DEFAULT_SETTINGS;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return cache.promise;
|
|
192
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { request } from '@atlaskit/linking-common';
|
|
3
|
+
import { request } from '@atlaskit/linking-common/api';
|
|
4
4
|
import { FetchError } from './FetchError';
|
|
5
5
|
import { PermissionError } from './PermissionError';
|
|
6
6
|
import { getStatusCodeGroup } from './getStatusCodeGroup';
|