@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 6.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`830f0495777fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/830f0495777fd) -
|
|
8
|
+
Gate the unit-compliant `accessible-products` endpoint on the org's units rollout settings.
|
|
9
|
+
`getAccessibleProducts` now reads `boundaryEnforced` and `endUsersLaunched` from AGG's
|
|
10
|
+
`Query.unitsRolloutSettings` and only switches to the unit-compliant endpoint when the units GA
|
|
11
|
+
master gate `cc-units-ga` is on (killswitch), the org has launched units with boundary
|
|
12
|
+
enforcement, and either the existing `linking_platform_link_datasource_unit_compliant` gate (org
|
|
13
|
+
id) or the new `linking_platform_link_datasource_unit_compliant_cloud_id` gate (cloud id) passes.
|
|
14
|
+
|
|
15
|
+
The settings are read from `Query.admin_unitSettings`, which is keyed by org id, so the org id is
|
|
16
|
+
first resolved from the current host with `Query.tenantContexts`. Both calls are made once per
|
|
17
|
+
page load and only when a rollout gate passes, and any failure falls back to the current,
|
|
18
|
+
non-isolated behaviour.
|
|
19
|
+
|
|
20
|
+
## 6.13.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
26
|
+
## 6.13.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- [`b2b9a6ccc8b79`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b2b9a6ccc8b79) -
|
|
31
|
+
Preserve datasource Suspense boundaries across equivalent renderer props behind
|
|
32
|
+
platform_datasource_hydration_stability. Add the platform experiment runtime dependency.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
3
38
|
## 6.12.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ exports.useDatasourceCrossProductAttribution = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _useCrossProductUrlWrapper = require("@atlaskit/analytics-cross-product/useCrossProductUrlWrapper");
|
|
11
|
-
var
|
|
11
|
+
var _useSmartCardContext2 = require("@atlaskit/link-provider/use-smart-card-context");
|
|
12
12
|
var _functionWithFg = require("@atlaskit/platform-feature-flags-react/function-with-fg");
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -37,7 +37,7 @@ var useDatasourceCrossProductAttributionFallback = function useDatasourceCrossPr
|
|
|
37
37
|
*/
|
|
38
38
|
var useDatasourceCrossProductAttributionUngated = function useDatasourceCrossProductAttributionUngated() {
|
|
39
39
|
var _effectiveProduct$toL;
|
|
40
|
-
var _useSmartCardContext = (0,
|
|
40
|
+
var _useSmartCardContext = (0, _useSmartCardContext2.useSmartCardContext)(),
|
|
41
41
|
smartLinkContext = _useSmartCardContext.value;
|
|
42
42
|
var _ref = smartLinkContext !== null && smartLinkContext !== void 0 ? smartLinkContext : {},
|
|
43
43
|
product = _ref.product,
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
11
|
-
var
|
|
11
|
+
var _getTraceId = require("@atlaskit/linking-common/utils/get-trace-id");
|
|
12
12
|
var _analytics = require("../analytics");
|
|
13
13
|
var _logToSentry = require("./logToSentry");
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -17,7 +17,7 @@ var getNetworkFields = function getNetworkFields(error) {
|
|
|
17
17
|
switch (true) {
|
|
18
18
|
case error instanceof Response:
|
|
19
19
|
return {
|
|
20
|
-
traceId: (0,
|
|
20
|
+
traceId: (0, _getTraceId.getTraceId)(error),
|
|
21
21
|
status: error.status,
|
|
22
22
|
reason: 'response'
|
|
23
23
|
};
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useIsInPDFRender = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _useSmartCardContext = require("@atlaskit/link-provider/use-smart-card-context");
|
|
9
9
|
var useIsInPDFRender = exports.useIsInPDFRender = function useIsInPDFRender() {
|
|
10
|
-
var smartCardContext = (0,
|
|
10
|
+
var smartCardContext = (0, _useSmartCardContext.useSmartCardContext)();
|
|
11
11
|
return (0, _react.useMemo)(function () {
|
|
12
12
|
var _smartCardContext$val;
|
|
13
13
|
return !!(smartCardContext !== null && smartCardContext !== void 0 && (_smartCardContext$val = smartCardContext.value) !== null && _smartCardContext$val !== void 0 && _smartCardContext$val.shouldControlDataExport);
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -14,7 +12,7 @@ Object.defineProperty(exports, "ASSETS_LIST_OF_LINKS_DATASOURCE_ID", {
|
|
|
14
12
|
Object.defineProperty(exports, "AssetsConfigModal", {
|
|
15
13
|
enumerable: true,
|
|
16
14
|
get: function get() {
|
|
17
|
-
return
|
|
15
|
+
return _AssetsConfigModalWithWrappers.AssetsConfigModalWithWrappers;
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
18
|
Object.defineProperty(exports, "CONFLUENCE_SEARCH_DATASOURCE_ID", {
|
|
@@ -26,13 +24,13 @@ Object.defineProperty(exports, "CONFLUENCE_SEARCH_DATASOURCE_ID", {
|
|
|
26
24
|
Object.defineProperty(exports, "ConfluenceSearchConfigModal", {
|
|
27
25
|
enumerable: true,
|
|
28
26
|
get: function get() {
|
|
29
|
-
return
|
|
27
|
+
return _ConfluenceSearchConfigModalWithWrappers.ConfluenceSearchConfigModalWithWrappers;
|
|
30
28
|
}
|
|
31
29
|
});
|
|
32
30
|
Object.defineProperty(exports, "DatasourceTableView", {
|
|
33
31
|
enumerable: true,
|
|
34
32
|
get: function get() {
|
|
35
|
-
return
|
|
33
|
+
return _DatasourceTableViewWithWrappers.DatasourceTableViewWithWrappers;
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
36
|
Object.defineProperty(exports, "JIRA_LIST_OF_LINKS_DATASOURCE_ID", {
|
|
@@ -44,13 +42,13 @@ Object.defineProperty(exports, "JIRA_LIST_OF_LINKS_DATASOURCE_ID", {
|
|
|
44
42
|
Object.defineProperty(exports, "JSMAssetsConfigModal", {
|
|
45
43
|
enumerable: true,
|
|
46
44
|
get: function get() {
|
|
47
|
-
return
|
|
45
|
+
return _AssetsConfigModalWithWrappers.AssetsConfigModalWithWrappers;
|
|
48
46
|
}
|
|
49
47
|
});
|
|
50
48
|
Object.defineProperty(exports, "JiraIssuesConfigModal", {
|
|
51
49
|
enumerable: true,
|
|
52
50
|
get: function get() {
|
|
53
|
-
return
|
|
51
|
+
return _JiraIssuesConfigModalWithWrappers.JiraIssuesConfigModalWithWrappers;
|
|
54
52
|
}
|
|
55
53
|
});
|
|
56
54
|
Object.defineProperty(exports, "LazyLoadedDatasourceRenderFailedAnalyticsWrapper", {
|
|
@@ -65,10 +63,12 @@ Object.defineProperty(exports, "buildDatasourceAdf", {
|
|
|
65
63
|
return _schemaUtils.buildDatasourceAdf;
|
|
66
64
|
}
|
|
67
65
|
});
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
66
|
+
var _ConfluenceSearchConfigModalWithWrappers = require("./ui/confluence-search-modal/ConfluenceSearchConfigModalWithWrappers");
|
|
67
|
+
var _JiraIssuesConfigModalWithWrappers = require("./ui/jira-issues-modal/JiraIssuesConfigModalWithWrappers");
|
|
68
|
+
var _AssetsConfigModalWithWrappers = require("./ui/assets-modal/AssetsConfigModalWithWrappers");
|
|
69
|
+
var _DatasourceTableViewWithWrappers = require("./ui/datasource-table-view/DatasourceTableViewWithWrappers");
|
|
72
70
|
var _schemaUtils = require("./common/utils/schema-utils");
|
|
73
|
-
var
|
|
74
|
-
|
|
71
|
+
var _jiraIssuesModal = require("./ui/jira-issues-modal");
|
|
72
|
+
var _assetsModal = require("./ui/assets-modal");
|
|
73
|
+
var _confluenceSearchModal = require("./ui/confluence-search-modal");
|
|
74
|
+
var _renderFailed = require("./analytics/wrappers/render-failed");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.__clearUnitsRolloutSettingsCacheForTests = void 0;
|
|
7
|
+
var _getUnitsRolloutSettings = require("./getUnitsRolloutSettings");
|
|
8
|
+
/**
|
|
9
|
+
* Test-only: clear the cached units rollout settings so each test starts with a clean slate.
|
|
10
|
+
*/
|
|
11
|
+
var __clearUnitsRolloutSettingsCacheForTests = exports.__clearUnitsRolloutSettingsCacheForTests = function __clearUnitsRolloutSettingsCacheForTests() {
|
|
12
|
+
_getUnitsRolloutSettings.cache.promise = undefined;
|
|
13
|
+
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.fetchObjectSchema = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
11
11
|
var _FetchError = require("./FetchError");
|
|
12
12
|
var _PermissionError = require("./PermissionError");
|
|
13
13
|
var _getStatusCodeGroup = require("./getStatusCodeGroup");
|
|
@@ -21,7 +21,7 @@ var fetchObjectSchema = exports.fetchObjectSchema = /*#__PURE__*/function () {
|
|
|
21
21
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/objectschema/").concat(schemaId);
|
|
22
22
|
_context.prev = 1;
|
|
23
23
|
_context.next = 2;
|
|
24
|
-
return (0,
|
|
24
|
+
return (0, _api.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
25
25
|
case 2:
|
|
26
26
|
response = _context.sent;
|
|
27
27
|
fireEvent && fireEvent('operational.objectSchema.success', {});
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.fetchObjectSchemas = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
11
11
|
var _FetchError = require("./FetchError");
|
|
12
12
|
var _PermissionError = require("./PermissionError");
|
|
13
13
|
var _getStatusCodeGroup = require("./getStatusCodeGroup");
|
|
@@ -25,7 +25,7 @@ var fetchObjectSchemas = exports.fetchObjectSchemas = /*#__PURE__*/function () {
|
|
|
25
25
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/objectschema/list?").concat(queryParams);
|
|
26
26
|
_context.prev = 1;
|
|
27
27
|
_context.next = 2;
|
|
28
|
-
return (0,
|
|
28
|
+
return (0, _api.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
29
29
|
case 2:
|
|
30
30
|
response = _context.sent;
|
|
31
31
|
fireEvent && fireEvent('operational.objectSchemas.success', {});
|
|
@@ -8,10 +8,10 @@ exports.getAccessibleProducts = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _hooks = require("@atlaskit/linking-common/hooks");
|
|
11
|
-
var
|
|
11
|
+
var _isUnitsIsolationEnabled = require("./isUnitsIsolationEnabled");
|
|
12
12
|
var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/function () {
|
|
13
13
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(product) {
|
|
14
|
-
var requestConfig, endpoint, response, res, _t, _t2, _t3;
|
|
14
|
+
var requestConfig, endpoint, response, res, _t, _t2, _t3, _t4;
|
|
15
15
|
return _regenerator.default.wrap(function (_context) {
|
|
16
16
|
while (1) switch (_context.prev = _context.next) {
|
|
17
17
|
case 0:
|
|
@@ -27,35 +27,48 @@ var getAccessibleProducts = exports.getAccessibleProducts = /*#__PURE__*/functio
|
|
|
27
27
|
productIds: product === 'confluence' ? ['confluence.ondemand'] : ['jira-software.ondemand', 'jira-core.ondemand', 'jira-incident-manager.ondemand', 'jira-product-discovery', 'jira-servicedesk.ondemand']
|
|
28
28
|
})
|
|
29
29
|
};
|
|
30
|
-
endpoint = (0, _fg.fg)('linking_platform_link_datasource_unit_compliant') ? '/gateway/api/experimental/v2/accessible-products' : '/gateway/api/v2/accessible-products';
|
|
31
30
|
_context.next = 1;
|
|
32
|
-
return
|
|
31
|
+
return (0, _isUnitsIsolationEnabled.isUnitsIsolationEnabled)();
|
|
33
32
|
case 1:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_context.next = 3;
|
|
33
|
+
if (!_context.sent) {
|
|
34
|
+
_context.next = 2;
|
|
37
35
|
break;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
_t = '/gateway/api/experimental/v2/accessible-products';
|
|
38
|
+
_context.next = 3;
|
|
39
|
+
break;
|
|
41
40
|
case 2:
|
|
42
|
-
|
|
43
|
-
return _context.abrupt("return", (0, _hooks.mapAccessibleProductsToAvailableSites)(res.data));
|
|
41
|
+
_t = '/gateway/api/v2/accessible-products';
|
|
44
42
|
case 3:
|
|
45
|
-
|
|
43
|
+
endpoint = _t;
|
|
46
44
|
_context.next = 4;
|
|
47
|
-
return
|
|
45
|
+
return fetch(endpoint, requestConfig);
|
|
48
46
|
case 4:
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
_context.next =
|
|
47
|
+
response = _context.sent;
|
|
48
|
+
if (!response.ok) {
|
|
49
|
+
_context.next = 6;
|
|
52
50
|
break;
|
|
53
51
|
}
|
|
54
|
-
|
|
52
|
+
_context.next = 5;
|
|
53
|
+
return response.json();
|
|
55
54
|
case 5:
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
res = _context.sent;
|
|
56
|
+
return _context.abrupt("return", (0, _hooks.mapAccessibleProductsToAvailableSites)(res.data));
|
|
58
57
|
case 6:
|
|
58
|
+
_t2 = Error;
|
|
59
|
+
_context.next = 7;
|
|
60
|
+
return response.text();
|
|
61
|
+
case 7:
|
|
62
|
+
_t3 = _context.sent;
|
|
63
|
+
if (_t3) {
|
|
64
|
+
_context.next = 8;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
_t3 = 'Something went wrong';
|
|
68
|
+
case 8:
|
|
69
|
+
_t4 = _t3;
|
|
70
|
+
throw new _t2(_t4);
|
|
71
|
+
case 9:
|
|
59
72
|
case "end":
|
|
60
73
|
return _context.stop();
|
|
61
74
|
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.unitsRolloutSettingsQuery = exports.tenantContextQuery = exports.getUnitsRolloutSettings = exports.cache = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _linkingCommon = require("@atlaskit/linking-common");
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
var AGG_URL = '/gateway/api/graphql';
|
|
15
|
+
var TENANT_CONTEXT_OPERATION_NAME = 'link_datasource_tenantContext';
|
|
16
|
+
var UNITS_ROLLOUT_SETTINGS_OPERATION_NAME = 'link_datasource_unitSettings';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `Query.admin_unitSettings` is keyed by org id, which the browser does not know, so the org id
|
|
20
|
+
* is resolved from the host the product is currently served from.
|
|
21
|
+
*/
|
|
22
|
+
var tenantContextQuery = exports.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");
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* `admin_unitSettings` exposes both flags of the rollout and is callable with the session of the
|
|
26
|
+
* end user, so no opt-in directive or admin OAuth scope is needed from the browser.
|
|
27
|
+
*/
|
|
28
|
+
var unitsRolloutSettingsQuery = exports.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");
|
|
29
|
+
/**
|
|
30
|
+
* When the rollout settings cannot be resolved we keep the pre-isolation behaviour, which is
|
|
31
|
+
* what every org gets today while the unit settings are unset. The settings are only
|
|
32
|
+
* written when an org is activated - they are not backfilled - so `null` is expected for orgs
|
|
33
|
+
* that have not been activated yet and must be read as `false`.
|
|
34
|
+
*/
|
|
35
|
+
var DEFAULT_SETTINGS = {
|
|
36
|
+
boundaryEnforced: false,
|
|
37
|
+
endUsersLaunched: false
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Holds the in-flight/resolved request so that the settings are only fetched once per page load.
|
|
42
|
+
*/
|
|
43
|
+
var cache = exports.cache = {};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* AGG answers with a 200 and an `errors` array for query level failures, so those have to be
|
|
47
|
+
* turned into a rejection explicitly rather than being read as an empty response.
|
|
48
|
+
*/
|
|
49
|
+
var requestGraphQL = /*#__PURE__*/function () {
|
|
50
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(operationName, query, variables) {
|
|
51
|
+
var _response$errors, _response$data;
|
|
52
|
+
var response, messages;
|
|
53
|
+
return _regenerator.default.wrap(function (_context) {
|
|
54
|
+
while (1) switch (_context.prev = _context.next) {
|
|
55
|
+
case 0:
|
|
56
|
+
_context.next = 1;
|
|
57
|
+
return (0, _linkingCommon.request)('post', AGG_URL, {
|
|
58
|
+
operationName: operationName,
|
|
59
|
+
query: query,
|
|
60
|
+
variables: variables
|
|
61
|
+
});
|
|
62
|
+
case 1:
|
|
63
|
+
response = _context.sent;
|
|
64
|
+
if (!(response !== null && response !== void 0 && (_response$errors = response.errors) !== null && _response$errors !== void 0 && _response$errors.length)) {
|
|
65
|
+
_context.next = 2;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
messages = response.errors.map(function (error) {
|
|
69
|
+
return error === null || error === void 0 ? void 0 : error.message;
|
|
70
|
+
}).filter(Boolean).join(', ');
|
|
71
|
+
throw new Error("".concat(operationName, " failed: ").concat(messages || 'unknown error'));
|
|
72
|
+
case 2:
|
|
73
|
+
return _context.abrupt("return", (_response$data = response === null || response === void 0 ? void 0 : response.data) !== null && _response$data !== void 0 ? _response$data : undefined);
|
|
74
|
+
case 3:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}, _callee);
|
|
79
|
+
}));
|
|
80
|
+
return function requestGraphQL(_x, _x2, _x3) {
|
|
81
|
+
return _ref.apply(this, arguments);
|
|
82
|
+
};
|
|
83
|
+
}();
|
|
84
|
+
var fetchOrgId = /*#__PURE__*/function () {
|
|
85
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
86
|
+
var _window$location, _data$tenantContexts;
|
|
87
|
+
var hostName, data, _iterator, _step, tenantContext, _t;
|
|
88
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
89
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
90
|
+
case 0:
|
|
91
|
+
hostName = typeof window !== 'undefined' ? (_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname : undefined;
|
|
92
|
+
if (hostName) {
|
|
93
|
+
_context2.next = 1;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
return _context2.abrupt("return", undefined);
|
|
97
|
+
case 1:
|
|
98
|
+
_context2.next = 2;
|
|
99
|
+
return requestGraphQL(TENANT_CONTEXT_OPERATION_NAME, tenantContextQuery, {
|
|
100
|
+
hostNames: [hostName]
|
|
101
|
+
});
|
|
102
|
+
case 2:
|
|
103
|
+
data = _context2.sent;
|
|
104
|
+
_iterator = _createForOfIteratorHelper((_data$tenantContexts = data === null || data === void 0 ? void 0 : data.tenantContexts) !== null && _data$tenantContexts !== void 0 ? _data$tenantContexts : []);
|
|
105
|
+
_context2.prev = 3;
|
|
106
|
+
_iterator.s();
|
|
107
|
+
case 4:
|
|
108
|
+
if ((_step = _iterator.n()).done) {
|
|
109
|
+
_context2.next = 6;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
tenantContext = _step.value;
|
|
113
|
+
if (!(tenantContext !== null && tenantContext !== void 0 && tenantContext.orgId)) {
|
|
114
|
+
_context2.next = 5;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
return _context2.abrupt("return", tenantContext.orgId);
|
|
118
|
+
case 5:
|
|
119
|
+
_context2.next = 4;
|
|
120
|
+
break;
|
|
121
|
+
case 6:
|
|
122
|
+
_context2.next = 8;
|
|
123
|
+
break;
|
|
124
|
+
case 7:
|
|
125
|
+
_context2.prev = 7;
|
|
126
|
+
_t = _context2["catch"](3);
|
|
127
|
+
_iterator.e(_t);
|
|
128
|
+
case 8:
|
|
129
|
+
_context2.prev = 8;
|
|
130
|
+
_iterator.f();
|
|
131
|
+
return _context2.finish(8);
|
|
132
|
+
case 9:
|
|
133
|
+
return _context2.abrupt("return", undefined);
|
|
134
|
+
case 10:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context2.stop();
|
|
137
|
+
}
|
|
138
|
+
}, _callee2, null, [[3, 7, 8, 9]]);
|
|
139
|
+
}));
|
|
140
|
+
return function fetchOrgId() {
|
|
141
|
+
return _ref2.apply(this, arguments);
|
|
142
|
+
};
|
|
143
|
+
}();
|
|
144
|
+
var fetchUnitsRolloutSettings = /*#__PURE__*/function () {
|
|
145
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
146
|
+
var _settings$boundaryEnf, _settings$endUsersLau;
|
|
147
|
+
var orgId, data, settings;
|
|
148
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
149
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
150
|
+
case 0:
|
|
151
|
+
_context3.next = 1;
|
|
152
|
+
return fetchOrgId();
|
|
153
|
+
case 1:
|
|
154
|
+
orgId = _context3.sent;
|
|
155
|
+
if (orgId) {
|
|
156
|
+
_context3.next = 2;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
return _context3.abrupt("return", DEFAULT_SETTINGS);
|
|
160
|
+
case 2:
|
|
161
|
+
_context3.next = 3;
|
|
162
|
+
return requestGraphQL(UNITS_ROLLOUT_SETTINGS_OPERATION_NAME, unitsRolloutSettingsQuery, {
|
|
163
|
+
orgId: orgId
|
|
164
|
+
});
|
|
165
|
+
case 3:
|
|
166
|
+
data = _context3.sent;
|
|
167
|
+
settings = data === null || data === void 0 ? void 0 : data.admin_unitSettings;
|
|
168
|
+
return _context3.abrupt("return", {
|
|
169
|
+
boundaryEnforced: (_settings$boundaryEnf = settings === null || settings === void 0 ? void 0 : settings.boundaryEnforced) !== null && _settings$boundaryEnf !== void 0 ? _settings$boundaryEnf : false,
|
|
170
|
+
endUsersLaunched: (_settings$endUsersLau = settings === null || settings === void 0 ? void 0 : settings.endUsersLaunched) !== null && _settings$endUsersLau !== void 0 ? _settings$endUsersLau : false
|
|
171
|
+
});
|
|
172
|
+
case 4:
|
|
173
|
+
case "end":
|
|
174
|
+
return _context3.stop();
|
|
175
|
+
}
|
|
176
|
+
}, _callee3);
|
|
177
|
+
}));
|
|
178
|
+
return function fetchUnitsRolloutSettings() {
|
|
179
|
+
return _ref3.apply(this, arguments);
|
|
180
|
+
};
|
|
181
|
+
}();
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Reads the org's units rollout settings (`boundaryEnforced` and `endUsersLaunched`) from the
|
|
185
|
+
* TCS key exposed by AGG's `Query.admin_unitSettings`.
|
|
186
|
+
*
|
|
187
|
+
* The result is cached for the lifetime of the page because the settings only change when an
|
|
188
|
+
* admin activates or launches units, which requires a reload to be picked up anyway. A failed
|
|
189
|
+
* request is not cached so that a later call can retry.
|
|
190
|
+
*/
|
|
191
|
+
var getUnitsRolloutSettings = exports.getUnitsRolloutSettings = function getUnitsRolloutSettings() {
|
|
192
|
+
if (!cache.promise) {
|
|
193
|
+
cache.promise = fetchUnitsRolloutSettings().catch(function () {
|
|
194
|
+
cache.promise = undefined;
|
|
195
|
+
return DEFAULT_SETTINGS;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return cache.promise;
|
|
199
|
+
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getWorkspaceId = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
11
11
|
var _FetchError = require("./FetchError");
|
|
12
12
|
var _PermissionError = require("./PermissionError");
|
|
13
13
|
var _getStatusCodeGroup = require("./getStatusCodeGroup");
|
|
@@ -21,7 +21,7 @@ var getWorkspaceId = exports.getWorkspaceId = /*#__PURE__*/function () {
|
|
|
21
21
|
url = '/rest/servicedesk/cmdb/latest/workspace';
|
|
22
22
|
_context.prev = 1;
|
|
23
23
|
_context.next = 2;
|
|
24
|
-
return (0,
|
|
24
|
+
return (0, _api.request)('get', url, undefined, undefined, [200, 201, 202, 203, 204]);
|
|
25
25
|
case 2:
|
|
26
26
|
workspaceDetailsResponse = _context.sent;
|
|
27
27
|
if ((_workspaceDetailsResp = workspaceDetailsResponse.results) !== null && _workspaceDetailsResp !== void 0 && _workspaceDetailsResp.length) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.isUnitsIsolationEnabled = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
|
+
var _getUnitsRolloutSettings = require("./getUnitsRolloutSettings");
|
|
12
|
+
/**
|
|
13
|
+
* Whether unit isolation behaviour should be applied for the current org.
|
|
14
|
+
*
|
|
15
|
+
* An org is isolated when units GA is on, the org has been opted in to the rollout - either by
|
|
16
|
+
* org id or by cloud id - *and* the org has actually launched units with boundary enforcement
|
|
17
|
+
* turned on:
|
|
18
|
+
*
|
|
19
|
+
* `cc-units-ga on -> (orgId gate on || cloudId gate on) -> endUsersLaunched && boundaryEnforced -> isolate`
|
|
20
|
+
*
|
|
21
|
+
* `cc-units-ga` is the units GA master gate and acts as the killswitch: while it is off nothing
|
|
22
|
+
* else is evaluated and the current, non-isolated behaviour is kept. The AGG call is only made
|
|
23
|
+
* when one of the rollout gates passes, so orgs outside of the rollout do not pay for an extra
|
|
24
|
+
* request.
|
|
25
|
+
*/
|
|
26
|
+
var isUnitsIsolationEnabled = exports.isUnitsIsolationEnabled = /*#__PURE__*/function () {
|
|
27
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
28
|
+
var isOrgInRollout, isCloudInRollout, _yield$getUnitsRollou, boundaryEnforced, endUsersLaunched;
|
|
29
|
+
return _regenerator.default.wrap(function (_context) {
|
|
30
|
+
while (1) switch (_context.prev = _context.next) {
|
|
31
|
+
case 0:
|
|
32
|
+
if ((0, _fg.fg)('cc-units-ga')) {
|
|
33
|
+
_context.next = 1;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
return _context.abrupt("return", false);
|
|
37
|
+
case 1:
|
|
38
|
+
// Both rollout gates are always evaluated so that exposure is recorded consistently.
|
|
39
|
+
isOrgInRollout = (0, _fg.fg)('linking_platform_link_datasource_unit_compliant');
|
|
40
|
+
isCloudInRollout = (0, _fg.fg)('linking_platform_link_datasource_unit_compliant_cloud_id');
|
|
41
|
+
if (!(!isOrgInRollout && !isCloudInRollout)) {
|
|
42
|
+
_context.next = 2;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
return _context.abrupt("return", false);
|
|
46
|
+
case 2:
|
|
47
|
+
_context.next = 3;
|
|
48
|
+
return (0, _getUnitsRolloutSettings.getUnitsRolloutSettings)();
|
|
49
|
+
case 3:
|
|
50
|
+
_yield$getUnitsRollou = _context.sent;
|
|
51
|
+
boundaryEnforced = _yield$getUnitsRollou.boundaryEnforced;
|
|
52
|
+
endUsersLaunched = _yield$getUnitsRollou.endUsersLaunched;
|
|
53
|
+
return _context.abrupt("return", boundaryEnforced && endUsersLaunched);
|
|
54
|
+
case 4:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee);
|
|
59
|
+
}));
|
|
60
|
+
return function isUnitsIsolationEnabled() {
|
|
61
|
+
return _ref.apply(this, arguments);
|
|
62
|
+
};
|
|
63
|
+
}();
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.resolvePrimaryWorkspace = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
11
11
|
// Resolves the primary Unit workspace via the unit-aware resolver, keyed by the
|
|
12
12
|
// current-site cloudId. Gated at the call-site behind
|
|
13
13
|
// `astral_units_workspace_host_resolver`.
|
|
@@ -19,7 +19,7 @@ var resolvePrimaryWorkspace = exports.resolvePrimaryWorkspace = /*#__PURE__*/fun
|
|
|
19
19
|
case 0:
|
|
20
20
|
url = '/assets/internal/workspace?productContext=confluence';
|
|
21
21
|
_context.next = 1;
|
|
22
|
-
return (0,
|
|
22
|
+
return (0, _api.request)('get', url, undefined, {
|
|
23
23
|
'x-atlassian-cloud-id': cloudId
|
|
24
24
|
}, [200]);
|
|
25
25
|
case 1:
|
|
@@ -8,7 +8,7 @@ exports.useBasicFilterAGG = void 0;
|
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _react = require("react");
|
|
11
|
-
var
|
|
11
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
12
12
|
var _utils = require("./utils");
|
|
13
13
|
var AGG_BASE_URL = '/gateway/api/graphql';
|
|
14
14
|
var useBasicFilterAGG = exports.useBasicFilterAGG = function useBasicFilterAGG() {
|
|
@@ -17,7 +17,7 @@ var useBasicFilterAGG = exports.useBasicFilterAGG = function useBasicFilterAGG()
|
|
|
17
17
|
return _regenerator.default.wrap(function (_context) {
|
|
18
18
|
while (1) switch (_context.prev = _context.next) {
|
|
19
19
|
case 0:
|
|
20
|
-
return _context.abrupt("return", (0,
|
|
20
|
+
return _context.abrupt("return", (0, _api.request)('post', AGG_BASE_URL, body, headers, [200, 201, 202, 203, 204]));
|
|
21
21
|
case 1:
|
|
22
22
|
case "end":
|
|
23
23
|
return _context.stop();
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.validateAql = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var
|
|
10
|
+
var _api = require("@atlaskit/linking-common/api");
|
|
11
11
|
var _FetchError = require("./FetchError");
|
|
12
12
|
var _PermissionError = require("./PermissionError");
|
|
13
13
|
var _getStatusCodeGroup = require("./getStatusCodeGroup");
|
|
@@ -21,7 +21,7 @@ var validateAql = exports.validateAql = /*#__PURE__*/function () {
|
|
|
21
21
|
url = "/gateway/api/jsm/assets/workspace/".concat(workspaceId, "/v1/aql/validate");
|
|
22
22
|
_context.prev = 1;
|
|
23
23
|
_context.next = 2;
|
|
24
|
-
return (0,
|
|
24
|
+
return (0, _api.request)('post', url, {
|
|
25
25
|
qlQuery: data.qlQuery,
|
|
26
26
|
context: 'SMART_LINKS'
|
|
27
27
|
}, undefined, [200, 201, 202, 203, 204]);
|