diff --git a/.circleci/config.yml b/.circleci/config.yml index 5a571a3b..ce669f50 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ jobs: workflows: # Used to protect the main branch: it should block merging into main when failing. - # See https://github.com/activeviam/activeui-migration/settings/branch_protection_rules/15886613 + # See https://github.com/activeviam/atoti-ui-migration/settings/branch_protection_rules/15886613 check-pull-request: jobs: - build-and-test: diff --git a/jest.config.js b/jest.config.js index 9d876662..9c7df2e8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,7 +5,7 @@ const extensions = ["js", "jsx", "ts", "tsx", "mjs", "json"]; const esmPackages = ["@activeviam/*", "lodash-es", "monaco-editor"]; // Note that in addition to the config below, there are several mocked modules under the __mocks__ folder. -// They correspond to modules that are UI/browser-related and are transitively pulled by @activeviam dependencies, but are not necessary for `activeui-migration` to work in a Node environment. +// They correspond to modules that are UI/browser-related and are transitively pulled by @activeviam dependencies, but are not necessary for `atoti-ui-migration` to work in a Node environment. const config = { // TODO manually mock globals such as window and use the default "node" test environment instead. testEnvironment: "jsdom", diff --git a/package.json b/package.json index da272cc3..ec2b8193 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { - "name": "activeui-migration", + "name": "atoti-ui-migration", "version": "5.1.1-SNAPSHOT", - "description": "Functions useful to migrate content, in order to make it usable with a more recent version of ActiveUI than the one it was saved with.", + "description": "Functions useful to migrate content, in order to make it usable with a more recent version of Atoti UI than the one it was saved with.", "bugs": { - "url": "https://github.com/activeviam/activeui-migration/issues" + "url": "https://github.com/activeviam/atoti-ui-migration/issues" }, "repository": { "type": "git", - "url": "https://github.com/activeviam/activeui-migration" + "url": "https://github.com/activeviam/atoti-ui-migration" }, "license": "Apache-2.0", "author": "ActiveViam", diff --git a/release.md b/release.md index f4f708b4..432ca332 100644 --- a/release.md +++ b/release.md @@ -11,10 +11,10 @@ To perform a new release, perform the following steps: ## Versioning -`activeui-migration` major and minor version numbers should be aligned on `activeui-sdk`, but the patch versions are independent. +`atoti-ui-migration` major and minor version numbers should be aligned on `activeui-sdk`, but the patch versions are independent. Examples: -1. `activeui-migration` and `activeui-sdk` are currently both on 5.0.7, but an internal bugfix is needed on `activeui-migration` => `activeui-migration` 5.0.8 can be released while staying on `activeui-sdk` 5.0.7. +1. `atoti-ui-migration` and `activeui-sdk` are currently both on 5.0.7, but an internal bugfix is needed on `atoti-ui-migration` => `atoti-ui-migration` 5.0.8 can be released while staying on `activeui-sdk` 5.0.7. 2. Same as 1. but vice-versa. 3. `activeui-sdk` 5.1.0 is about to be released. It comes with breaking changes (follows romantic versioning). -To migrate from `activeui-sdk` 5.0.x to `activeui-sdk` 5.1.0, `activeui-migration` 5.1.0 should be released. \ No newline at end of file +To migrate from `activeui-sdk` 5.0.x to `activeui-sdk` 5.1.0, `atoti-ui-migration` 5.1.0 should be released. \ No newline at end of file diff --git a/src/4.3_to_5.0/__snapshots__/migrateSettingsFolder.test.ts.snap b/src/4.3_to_5.0/__snapshots__/migrateSettingsFolder.test.ts.snap index 7136cc4e..e076b7a1 100644 --- a/src/4.3_to_5.0/__snapshots__/migrateSettingsFolder.test.ts.snap +++ b/src/4.3_to_5.0/__snapshots__/migrateSettingsFolder.test.ts.snap @@ -28,7 +28,7 @@ exports[`migrateSettingsFolder returns an empty 'organization_settings' file and } `; -exports[`migrateSettingsFolder returns the folders corresponding to the converted ActiveUI 4 settings folder, ready to be used by ActiveUI 5 1`] = ` +exports[`migrateSettingsFolder returns the folders corresponding to the converted Atoti UI 4 settings folder, ready to be used by Atoti UI 5 1`] = ` { "organization_settings": { "entry": { diff --git a/src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap b/src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap index c164e542..0f2a12b3 100644 --- a/src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap +++ b/src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life input 1`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder on a real life input 1`] = ` { "children": { "calculated_measures": { @@ -2072,7 +2072,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life in } `; -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life input 2`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder on a real life input 2`] = ` { "dashboards": { "eef": { @@ -2109,7 +2109,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life in } `; -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life input 3`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder on a real life input 3`] = ` { "dashboards": { "failed": 0, @@ -2138,7 +2138,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life in } `; -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input 1`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder on a small input 1`] = ` { "children": { "calculated_measures": { @@ -2490,7 +2490,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input } `; -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input 2`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder on a small input 2`] = ` { "dashboards": { "failed": 0, @@ -2519,7 +2519,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input } `; -exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder that includes calculated measures when the input includes a pivotFolder 1`] = ` +exports[`migrate_43_to_50 returns a valid Atoti UI 5 /ui folder that includes calculated measures when the input includes a pivotFolder 1`] = ` { "children": { "content": { diff --git a/src/4.3_to_5.0/_doesCrossjoinYieldAllCombinationsOfMembers.test.ts b/src/4.3_to_5.0/_doesCrossjoinYieldAllCombinationsOfMembers.test.ts index e77bd644..86184a8c 100644 --- a/src/4.3_to_5.0/_doesCrossjoinYieldAllCombinationsOfMembers.test.ts +++ b/src/4.3_to_5.0/_doesCrossjoinYieldAllCombinationsOfMembers.test.ts @@ -136,7 +136,7 @@ describe("_doesCrossjoinYieldAllCombinationsOfMembers", () => { ).toBe(true); }); - it("returns true when `crossjoin` represents all combinations of members from several levels, even if polluted by a useless dangling member compound identifier, yielded by a user collapsing then re-expanding it in ActiveUI 4", () => { + it("returns true when `crossjoin` represents all combinations of members from several levels, even if polluted by a useless dangling member compound identifier, yielded by a user collapsing then re-expanding it in Atoti UI 4", () => { expect( _doesCrossjoinYieldAllCombinationsOfMembers( parse(` diff --git a/src/4.3_to_5.0/_fixErroneousExpansionMdx.test.ts b/src/4.3_to_5.0/_fixErroneousExpansionMdx.test.ts index 0c033b1b..78e569f9 100644 --- a/src/4.3_to_5.0/_fixErroneousExpansionMdx.test.ts +++ b/src/4.3_to_5.0/_fixErroneousExpansionMdx.test.ts @@ -7,7 +7,7 @@ import { dataModelsForTests } from "@activeviam/data-model-5.0"; const cube = dataModelsForTests.sandbox.catalogs[0].cubes[0]; describe("_fixErroneousExpansionMdx", () => { - it("removes the problematic part of the Mdx of a widget where a user collapsed and then re-expanded a member in ActiveUI 4", () => { + it("removes the problematic part of the Mdx of a widget where a user collapsed and then re-expanded a member in Atoti UI 4", () => { const mdx = parse(`SELECT NON EMPTY Hierarchize( Union( @@ -60,7 +60,7 @@ describe("_fixErroneousExpansionMdx", () => { `); }); - it("removes the problematic part of the Mdx of a widget where a user collapsed and then re-expanded a member in ActiveUI 4 - even if one of the involved hierarchies is slicing", () => { + it("removes the problematic part of the Mdx of a widget where a user collapsed and then re-expanded a member in Atoti UI 4 - even if one of the involved hierarchies is slicing", () => { const mdx = parse(`SELECT NON EMPTY Hierarchize( Union( @@ -109,7 +109,7 @@ describe("_fixErroneousExpansionMdx", () => { `); }); - it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 2 different members in ActiveUI 4 (collapsing all of them, then re-expanding all of them)", () => { + it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 2 different members in Atoti UI 4 (collapsing all of them, then re-expanding all of them)", () => { const mdx = parse(`SELECT NON EMPTY Hierarchize( Union( @@ -181,7 +181,7 @@ describe("_fixErroneousExpansionMdx", () => { `); }); - it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 2 different members in ActiveUI 4 (collapsing and re-expanding each one before moving to the next)", () => { + it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 2 different members in Atoti UI 4 (collapsing and re-expanding each one before moving to the next)", () => { const mdx = parse(`SELECT NON EMPTY Hierarchize( Union( @@ -253,7 +253,7 @@ describe("_fixErroneousExpansionMdx", () => { `); }); - it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 3 different members in ActiveUI 4 (collapsing and re-expanding each one before moving to the next)", () => { + it("removes the problematic parts of the Mdx of a widget where a user collapsed and then re-expanded 3 different members in Atoti UI 4 (collapsing and re-expanding each one before moving to the next)", () => { const mdx = parse(`SELECT NON EMPTY Hierarchize( Union( diff --git a/src/4.3_to_5.0/_fixErroneousExpansionMdx.ts b/src/4.3_to_5.0/_fixErroneousExpansionMdx.ts index 8abcb34e..d575261d 100644 --- a/src/4.3_to_5.0/_fixErroneousExpansionMdx.ts +++ b/src/4.3_to_5.0/_fixErroneousExpansionMdx.ts @@ -17,7 +17,7 @@ import { /** * Returns an Mdx which yields the same results as the input `mdx`. - * But the returned mdx does not have the typical useless (and dangerous) parts of queries created by collapsing then re-expanding a member in ActiveUI 4. + * But the returned mdx does not have the typical useless (and dangerous) parts of queries created by collapsing then re-expanding a member in Atoti UI 4. * See https://support.activeviam.com/jira/browse/UI-6692 */ export function _fixErroneousExpansionMdx( diff --git a/src/4.3_to_5.0/_getLegacyWidgetPluginKey.ts b/src/4.3_to_5.0/_getLegacyWidgetPluginKey.ts index 16346ba3..7853f331 100644 --- a/src/4.3_to_5.0/_getLegacyWidgetPluginKey.ts +++ b/src/4.3_to_5.0/_getLegacyWidgetPluginKey.ts @@ -1,7 +1,7 @@ import { LegacyWidgetState } from "./migration.types"; /** - * Returns the widget plugin key from an ActiveUI 4 widget state. + * Returns the widget plugin key from an Atoti UI 4 widget state. */ export function _getLegacyWidgetPluginKey( legacyWidgetState: LegacyWidgetState, diff --git a/src/4.3_to_5.0/_migrateQuery.test.ts b/src/4.3_to_5.0/_migrateQuery.test.ts index 2dda5135..ab6149a7 100644 --- a/src/4.3_to_5.0/_migrateQuery.test.ts +++ b/src/4.3_to_5.0/_migrateQuery.test.ts @@ -63,7 +63,7 @@ describe("_migrateQuery", () => { ); }); - it("removes the useless (and dangerous) parts of the queries created when users collapse and re-expand a member in ActiveUI 4", () => { + it("removes the useless (and dangerous) parts of the queries created when users collapse and re-expand a member in Atoti UI 4", () => { const legacyQuery = { mdx: `SELECT NON EMPTY Hierarchize( diff --git a/src/4.3_to_5.0/_migrateTableColumnWidths.ts b/src/4.3_to_5.0/_migrateTableColumnWidths.ts index 7d62f5be..595a5b03 100644 --- a/src/4.3_to_5.0/_migrateTableColumnWidths.ts +++ b/src/4.3_to_5.0/_migrateTableColumnWidths.ts @@ -16,7 +16,7 @@ interface LegacyColumn { } /** - * Returns the converted table column widths, ready to be used in the widget state of a {@link TableWidgetPlugin} in ActiveUI 5. + * Returns the converted table column widths, ready to be used in the widget state of a {@link TableWidgetPlugin} in Atoti UI 5. */ export function _migrateTableColumnWidths({ legacyColumns, @@ -39,7 +39,7 @@ export function _migrateTableColumnWidths({ columnKey = "[Measures].[Measures]"; } else if (key === "c-treeCells-member" && mapping?.rows?.[0]) { // Special handling for the tree table column corresponding to all fields mapped on rows. - // In ActiveUI 5, its column key is the unique id of the first field. + // In Atoti UI 5, its column key is the unique id of the first field. switch (mapping.rows[0].type) { case "allMeasures": { columnKey = "[Measures].[Measures]"; @@ -82,14 +82,14 @@ export function _migrateTableColumnWidths({ ) ) { // The column key is a tuple. - // In ActiveUI 5, it is stripped from its wrapping parentheses. + // In Atoti UI 5, it is stripped from its wrapping parentheses. columnKey = key.slice(1, key.length - 1); } } catch { // The column key is not an MDX expression. // This means that the column does not hold data coming from the widget's MDX query. - // E.g., the ActiveUI 4 line numbers column. - // These columns have no equivalent in ActiveUI 5, so they are ignored. + // E.g., the Atoti UI 4 line numbers column. + // These columns have no equivalent in Atoti UI 5, so they are ignored. } } diff --git a/src/4.3_to_5.0/errors/TextEditorWidgetMigrationError.ts b/src/4.3_to_5.0/errors/TextEditorWidgetMigrationError.ts index 9f7bf1e6..865f4921 100644 --- a/src/4.3_to_5.0/errors/TextEditorWidgetMigrationError.ts +++ b/src/4.3_to_5.0/errors/TextEditorWidgetMigrationError.ts @@ -3,12 +3,12 @@ import { PartialMigrationError } from "../../PartialMigrationError"; /** * Thrown after migrating a `rich-text-editor` widget. - * Indicates that for the migrated widget to work in ActiveUI 5, the `text-editor` plugin must be added to the plugin registry. + * Indicates that for the migrated widget to work in Atoti UI 5, the `text-editor` plugin must be added to the plugin registry. */ export class TextEditorWidgetMigrationError extends PartialMigrationError { constructor(migratedWidgetState: TextEditorWidgetState<"serialized">) { super( - "The `text-editor` widget is not part of the plugin registry in the ActiveUI 5 starter. Make sure to add it in your project, see https://activeviam.com/activeui/documentation/latest/docs/tutorial/your-first-custom-widget#extend-activeui.", + "The `text-editor` widget is not part of the plugin registry in the Atoti UI 5 starter. Make sure to add it in your project, see https://activeviam.com/activeui/documentation/latest/docs/tutorial/your-first-custom-widget#extend-activeui.", migratedWidgetState, ); } diff --git a/src/4.3_to_5.0/errors/UnsupportedLegacyChartTypeError.ts b/src/4.3_to_5.0/errors/UnsupportedLegacyChartTypeError.ts index 6d67ef80..6d9e2087 100644 --- a/src/4.3_to_5.0/errors/UnsupportedLegacyChartTypeError.ts +++ b/src/4.3_to_5.0/errors/UnsupportedLegacyChartTypeError.ts @@ -1,5 +1,5 @@ /** - * Thrown when `legacyChartType` cannot be converted to a chart type supported in ActiveUI 5. + * Thrown when `legacyChartType` cannot be converted to a chart type supported in Atoti UI 5. */ export class UnsupportedLegacyChartTypeError extends Error { constructor(legacyChartType: string) { diff --git a/src/4.3_to_5.0/errors/UnsupportedLegacyQueryUpdateModeError.ts b/src/4.3_to_5.0/errors/UnsupportedLegacyQueryUpdateModeError.ts index 8551918b..ae719425 100644 --- a/src/4.3_to_5.0/errors/UnsupportedLegacyQueryUpdateModeError.ts +++ b/src/4.3_to_5.0/errors/UnsupportedLegacyQueryUpdateModeError.ts @@ -7,7 +7,7 @@ import { PartialMigrationError } from "../../PartialMigrationError"; export class UnsupportedLegacyQueryUpdateModeError extends PartialMigrationError { constructor(migratedWidgetState: AWidgetState<"serialized">) { super( - "The 'refresh-periodically' mode for query updates is not supported in ActiveUI 5, falling back to 'once'.", + "The 'refresh-periodically' mode for query updates is not supported in Atoti UI 5, falling back to 'once'.", migratedWidgetState, ); } diff --git a/src/4.3_to_5.0/getCalculatedMeasures.ts b/src/4.3_to_5.0/getCalculatedMeasures.ts index 50a57dc9..3475a930 100644 --- a/src/4.3_to_5.0/getCalculatedMeasures.ts +++ b/src/4.3_to_5.0/getCalculatedMeasures.ts @@ -15,7 +15,7 @@ export const getCalculatedMeasures = async ( if (calculatedMeasuresFolder?.children) { await Promise.all( - // Legacy calculated measures are grouped by cube in `/pivot/entitlements/cm`. But they are flattened in ActiveUI 5. + // Legacy calculated measures are grouped by cube in `/pivot/entitlements/cm`. But they are flattened in Atoti UI 5. _flatMap(calculatedMeasuresFolder.children, async ({ children }) => { if (children) { const measures = await Promise.all( diff --git a/src/4.3_to_5.0/migrateCalculatedMeasures.ts b/src/4.3_to_5.0/migrateCalculatedMeasures.ts index f2cd61cd..77132ba3 100644 --- a/src/4.3_to_5.0/migrateCalculatedMeasures.ts +++ b/src/4.3_to_5.0/migrateCalculatedMeasures.ts @@ -11,7 +11,7 @@ export interface LegacyCalculatedMeasure { } /** - * Returns the converted content record tree for the calculted measures, ready to be used in ActiveUI 5. + * Returns the converted content record tree for the calculated measures, ready to be used in Atoti UI 5. */ export async function migrateCalculatedMeasures( legacyPivotFolder: ContentRecord, diff --git a/src/4.3_to_5.0/migrateChart.test.ts b/src/4.3_to_5.0/migrateChart.test.ts index a2065cc2..a0937c47 100644 --- a/src/4.3_to_5.0/migrateChart.test.ts +++ b/src/4.3_to_5.0/migrateChart.test.ts @@ -11,7 +11,7 @@ import { legacyScatterPlot } from "./__test_resources__/legacyScatterPlot"; import { servers } from "./__test_resources__/servers"; describe("migrateChart", () => { - it("returns the ActiveUI5 chart widget state corresponding to the given ActiveUI4 chart widget state", () => { + it("returns the Atoti UI5 chart widget state corresponding to the given Atoti UI4 chart widget state", () => { expect(migrateChart(legacyChart, servers)).toMatchInlineSnapshot(` { "filters": [], @@ -284,12 +284,12 @@ describe("migrateChart", () => { `); }); - it("replaces undefined attributes in the ActiveUI 4 mapping by empty arrays of fields", () => { - // ActiveUI 5 needs every single attribute to be present in the widget's mapping, even if it does not contain any field. + it("replaces undefined attributes in the Atoti UI 4 mapping by empty arrays of fields", () => { + // Atoti UI 5 needs every single attribute to be present in the widget's mapping, even if it does not contain any field. const partialLegacyChartState = _cloneDeep(legacyChart); // In this test, the following attributes are omitted instead of having an empty array of fields. - // This type of partial mapping works in ActiveUI 4, but not 5. + // This type of partial mapping works in Atoti UI 4, but not 5. ["splitBy", "horizontalSubplots", "verticalSubplots"].forEach( (attributeName) => { delete partialLegacyChartState.value.body.configuration.mapping[ @@ -327,8 +327,8 @@ describe("migrateChart", () => { // Some widgets do not support it. // For instance, the scatter plot does not: each measure on it is dedicated to a specific attribute (x, y or size). // - // ActiveUI 4 charts did not have this capability: "all measures" could never be moved. - // For this ActiveUI 5 feature to work, charts supporting measures redirection in ActiveUI 5 should see the "ALL_MEASURES" tile added to their mapping during the migration. + // Atoti UI 4 charts did not have this capability: "all measures" could never be moved. + // For this Atoti UI 5 feature to work, charts supporting measures redirection in Atoti UI 5 should see the "ALL_MEASURES" tile added to their mapping during the migration. const migratedChartState = migrateChart(legacyChart, servers); diff --git a/src/4.3_to_5.0/migrateChart.ts b/src/4.3_to_5.0/migrateChart.ts index c686c40a..f37e2a74 100644 --- a/src/4.3_to_5.0/migrateChart.ts +++ b/src/4.3_to_5.0/migrateChart.ts @@ -65,8 +65,8 @@ const chartPlugins: { [widgetKey: string]: WidgetPlugin } = _keyBy( ); /** - * Returns the key of the ActiveUI 5 widget corresponding to the ActiveUI 4 chart identified by `legacyChartType`. - * Returns undefined if the migration script is not able to determine which ActiveUI 5 widget the legacy chart should be migrated to. + * Returns the key of the Atoti UI 5 widget corresponding to the Atoti UI 4 chart identified by `legacyChartType`. + * Returns undefined if the migration script is not able to determine which Atoti UI 5 widget the legacy chart should be migrated to. */ function _getMigratedWidgetKey(legacyChartType: string): string | undefined { if (legacyChartType.startsWith("plotly-")) { @@ -93,8 +93,8 @@ function _getMigratedWidgetKey(legacyChartType: string): string | undefined { } /** - * Returns the mapping of the ActiveUI 5 widget, corresponding to `legacyMapping`. - * Returns undefined if the migration script is not able to determine which ActiveUI 5 widget the legacy chart should be migrated to. + * Returns the mapping of the Atoti UI 5 widget, corresponding to `legacyMapping`. + * Returns undefined if the migration script is not able to determine which Atoti UI 5 widget the legacy chart should be migrated to. * Does not cater for the potentially missing ALL_MEASURES tile. */ function _getMigratedChartMapping( @@ -225,7 +225,7 @@ function _addAllMeasuresToMapping( } /** - * Returns the converted chart widget state, ready to be used by ActiveUI 5. + * Returns the converted chart widget state, ready to be used by Atoti UI 5. */ export function migrateChart( // Legacy widget states are not typed. diff --git a/src/4.3_to_5.0/migrateDashboard.ts b/src/4.3_to_5.0/migrateDashboard.ts index 6e999c85..51fc6a71 100644 --- a/src/4.3_to_5.0/migrateDashboard.ts +++ b/src/4.3_to_5.0/migrateDashboard.ts @@ -29,13 +29,13 @@ import { WidgetFlaggedForRemovalError } from "../WidgetFlaggedForRemovalError"; import { _addWidgetErrorToReport } from "../_addWidgetErrorToReport"; /** - * Returns the converted dashboard state, ready to be used in ActiveUI 5, and an optional error report if any occured on any of the dashboard's widgets. + * Returns the converted dashboard state, ready to be used in Atoti UI 5, and an optional error report if any occurred on any of the dashboard's widgets. * Specifically: * Flattens value and value.body. * Transforms pages contents from arrays to map, to make access to pages and pages state faster. * Transform the pages layouts from a binary tree into a tree of minimal depth, making widgets resizing more natural. * - * Widgets with keys in `keysOfWidgetPluginsToRemove` are not migrated: they are removed from the output ActiveUI 5 dashboard, and the layout is adapted so that siblings take the remaining space. + * Widgets with keys in `keysOfWidgetPluginsToRemove` are not migrated: they are removed from the output Atoti UI 5 dashboard, and the layout is adapted so that siblings take the remaining space. * * The error report omits `folderId` and `folderName`: these are populated by the caller. */ @@ -115,8 +115,8 @@ export function migrateDashboard( const legacyLayout = legacyPage.layout; let pageLayout: Layout; - // In ActiveUI 4, the root of a dashboard can be a leaf. - // This does not happen in ActiveUI 5. + // In Atoti UI 4, the root of a dashboard can be a leaf. + // This does not happen in Atoti UI 5. if (isLegacyLayoutLeaf(legacyLayout)) { pageLayout = { children: [ diff --git a/src/4.3_to_5.0/migrateDrillthrough.test.ts b/src/4.3_to_5.0/migrateDrillthrough.test.ts index ad5e41bf..47b499a1 100644 --- a/src/4.3_to_5.0/migrateDrillthrough.test.ts +++ b/src/4.3_to_5.0/migrateDrillthrough.test.ts @@ -4,7 +4,7 @@ import { legacyDrillthrough } from "./__test_resources__/legacyDrillthrough"; import { servers } from "./__test_resources__/servers"; describe("migrateDrillthrough", () => { - it("returns the ActiveUI5 drillthrough-table widget state corresponding to the given ActiveUI4 drillthrough widget state", () => { + it("returns the Atoti UI 5 drillthrough-table widget state corresponding to the given Atoti UI 4 drillthrough widget state", () => { expect(migrateDrillthrough(legacyDrillthrough, servers)) .toMatchInlineSnapshot(` { diff --git a/src/4.3_to_5.0/migrateDrillthrough.ts b/src/4.3_to_5.0/migrateDrillthrough.ts index cd1a389a..dce6859a 100644 --- a/src/4.3_to_5.0/migrateDrillthrough.ts +++ b/src/4.3_to_5.0/migrateDrillthrough.ts @@ -11,7 +11,7 @@ import { _getTargetCubeFromServerUrl } from "./_getTargetCubeFromServerUrl"; import { _migrateQuery } from "./_migrateQuery"; /** - * Returns the converted drillthrough widget state, ready to be used by ActiveUI 5. + * Returns the converted drillthrough widget state, ready to be used by Atoti UI 5. */ export function migrateDrillthrough( // Legacy widget states are not typed. diff --git a/src/4.3_to_5.0/migrateFilter.test.ts b/src/4.3_to_5.0/migrateFilter.test.ts index 8daf5f8f..05fdf8f6 100644 --- a/src/4.3_to_5.0/migrateFilter.test.ts +++ b/src/4.3_to_5.0/migrateFilter.test.ts @@ -1,7 +1,7 @@ import { migrateFilter } from "./migrateFilter"; describe("migrateFilter", () => { - it("returns the converted filter, ready to be used in ActiveUI 5", () => { + it("returns the converted filter, ready to be used in Atoti UI 5", () => { const legacyFilter = { name: "My filter", type: "mdx" as const, diff --git a/src/4.3_to_5.0/migrateFilter.ts b/src/4.3_to_5.0/migrateFilter.ts index c77bf5fa..fd360372 100644 --- a/src/4.3_to_5.0/migrateFilter.ts +++ b/src/4.3_to_5.0/migrateFilter.ts @@ -11,7 +11,7 @@ interface LegacyFilter { } /** - * Returns the converted filter, ready to be used in ActiveUI 5. + * Returns the converted filter, ready to be used in Atoti UI 5. */ export function migrateFilter(legacyFilter: LegacyFilter): { content: { mdx: MdxString }; diff --git a/src/4.3_to_5.0/migrateKpi.test.ts b/src/4.3_to_5.0/migrateKpi.test.ts index 06446326..0dba4de4 100644 --- a/src/4.3_to_5.0/migrateKpi.test.ts +++ b/src/4.3_to_5.0/migrateKpi.test.ts @@ -5,7 +5,7 @@ import { legacyKpi } from "./__test_resources__/legacyKpi"; import { servers } from "./__test_resources__/servers"; describe("migrateKpi", () => { - it("returns the ActiveUI5 KPI widget state corresponding to the given ActiveUI4 KPI widget state", () => { + it("returns the Atoti UI 5 KPI widget state corresponding to the given Atoti UI 4 KPI widget state", () => { expect(migrateKpi(legacyKpi, servers)).toMatchInlineSnapshot(` { "filters": [], diff --git a/src/4.3_to_5.0/migrateKpi.ts b/src/4.3_to_5.0/migrateKpi.ts index f6224ff4..0e30a2fc 100644 --- a/src/4.3_to_5.0/migrateKpi.ts +++ b/src/4.3_to_5.0/migrateKpi.ts @@ -21,7 +21,7 @@ import { _getTargetCubeFromServerUrl } from "./_getTargetCubeFromServerUrl"; import { _migrateQuery } from "./_migrateQuery"; /** - * Returns the converted KPI (= Featured values) widget state, ready to be used by ActiveUI 5. + * Returns the converted KPI (= Featured values) widget state, ready to be used by Atoti UI 5. */ export function migrateKpi( // Legacy widget states are not typed. diff --git a/src/4.3_to_5.0/migrateQuickFilter.test.ts b/src/4.3_to_5.0/migrateQuickFilter.test.ts index ddd1191d..1d3dd3b4 100644 --- a/src/4.3_to_5.0/migrateQuickFilter.test.ts +++ b/src/4.3_to_5.0/migrateQuickFilter.test.ts @@ -4,7 +4,7 @@ import { servers } from "./__test_resources__/servers"; import { produce } from "immer"; describe("migrateQuickFilter", () => { - it("returns the ActiveUI5 quick filter widget state corresponding to the given ActiveUI4 quick filter widget state in checkbox mode", () => { + it("returns the Atoti UI 5 quick filter widget state corresponding to the given Atoti UI 4 quick filter widget state in checkbox mode", () => { const legacyQuickFilterInCheckboxMode = produce( legacyQuickFilter, (draft) => { @@ -29,7 +29,7 @@ describe("migrateQuickFilter", () => { `); }); - it("returns the ActiveUI5 quick filter widget state corresponding to the given ActiveUI4 quick filter widget state in radio mode", () => { + it("returns the Atoti UI 5 quick filter widget state corresponding to the given Atoti UI 4 quick filter widget state in radio mode", () => { const legacyQuickFilterInRadioMode = produce(legacyQuickFilter, (draft) => { draft.value.body.configuration.displayedAsSelect = false; draft.value.body.configuration.multipleSelection = false; @@ -51,7 +51,7 @@ describe("migrateQuickFilter", () => { `); }); - it("returns the ActiveUI5 quick filter widget state corresponding to the given ActiveUI4 quick filter in multi-select mode", () => { + it("returns the Atoti UI 5 quick filter widget state corresponding to the given Atoti UI 4 quick filter in multi-select mode", () => { const legacyQuickFilterInMultiSelectMode = produce( legacyQuickFilter, (draft) => { @@ -76,7 +76,7 @@ describe("migrateQuickFilter", () => { `); }); - it("returns the ActiveUI5 quick filter widget state corresponding to the given ActiveUI4 quick filter in single-select mode", () => { + it("returns the Atoti UI 5 quick filter widget state corresponding to the given Atoti UI 4 quick filter in single-select mode", () => { const legacyQuickFilterInSingleSelectMode = produce( legacyQuickFilter, (draft) => { diff --git a/src/4.3_to_5.0/migrateQuickFilter.ts b/src/4.3_to_5.0/migrateQuickFilter.ts index ca13062b..821026ee 100644 --- a/src/4.3_to_5.0/migrateQuickFilter.ts +++ b/src/4.3_to_5.0/migrateQuickFilter.ts @@ -45,7 +45,7 @@ const _getMode = ({ }; /** - * Returns the converted quick filter widget state, ready to be used by ActiveUI 5. + * Returns the converted quick filter widget state, ready to be used by Atoti UI 5. */ export function migrateQuickFilter( // Legacy widget states are not typed. diff --git a/src/4.3_to_5.0/migrateSettingsFolder.test.ts b/src/4.3_to_5.0/migrateSettingsFolder.test.ts index a3a1aca7..89d34b6e 100644 --- a/src/4.3_to_5.0/migrateSettingsFolder.test.ts +++ b/src/4.3_to_5.0/migrateSettingsFolder.test.ts @@ -2,7 +2,7 @@ import { legacySettingsFolder } from "./legacySettingsFolder"; import { migrateSettingsFolder } from "./migrateSettingsFolder"; describe("migrateSettingsFolder", () => { - it("returns the folders corresponding to the converted ActiveUI 4 settings folder, ready to be used by ActiveUI 5", () => { + it("returns the folders corresponding to the converted Atoti UI 4 settings folder, ready to be used by Atoti UI 5", () => { expect(migrateSettingsFolder(legacySettingsFolder)).toMatchSnapshot(); }); diff --git a/src/4.3_to_5.0/migrateSettingsFolder.ts b/src/4.3_to_5.0/migrateSettingsFolder.ts index 82b7ec79..2f439193 100644 --- a/src/4.3_to_5.0/migrateSettingsFolder.ts +++ b/src/4.3_to_5.0/migrateSettingsFolder.ts @@ -16,7 +16,7 @@ const emptySettingsFolders = _pick( ); /** - * Returns the converted settings map, ready to be used by ActiveUI 5. + * Returns the converted settings map, ready to be used by Atoti UI 5. */ function migrateSettingsMap(legacySettingsMap: { [settingKey: string]: any; @@ -57,7 +57,7 @@ function getLegacySettingsMap(legacySettingsSubfolder: ContentRecord): { } /** - * Returns the folders corresponding to the converted ActiveUI 4 settings folder, ready to be used by ActiveUI 5. + * Returns the folders corresponding to the converted Atoti UI 4 settings folder, ready to be used by Atoti UI 5. */ export function migrateSettingsFolder(legacySettingsFolder?: ContentRecord): { organization_settings: ContentRecord; diff --git a/src/4.3_to_5.0/migrateTable.test.ts b/src/4.3_to_5.0/migrateTable.test.ts index d2c2f5bc..d4bd55ed 100644 --- a/src/4.3_to_5.0/migrateTable.test.ts +++ b/src/4.3_to_5.0/migrateTable.test.ts @@ -179,7 +179,7 @@ describe("migrateTable", () => { `); }); - it("fixes erroneous mdx mistakenly generated by ActiveUI 4 when the user collapses a member and then re-expands it", () => { + it("fixes erroneous mdx mistakenly generated by Atoti UI 4 when the user collapses a member and then re-expands it", () => { // Cloning in order to avoid impacting other tests with undesired mutations. const legacyPivotTableState = _cloneDeep(legacyPivotTable); diff --git a/src/4.3_to_5.0/migrateTable.ts b/src/4.3_to_5.0/migrateTable.ts index 90bcb1f9..0288aba8 100644 --- a/src/4.3_to_5.0/migrateTable.ts +++ b/src/4.3_to_5.0/migrateTable.ts @@ -19,7 +19,7 @@ import { _migrateQuery } from "./_migrateQuery"; import { _migrateTableColumnWidths } from "./_migrateTableColumnWidths"; /** - * Returns the converted table widget state, ready to be used by ActiveUI 5. + * Returns the converted table widget state, ready to be used by Atoti UI 5. */ export function migrateTable( // Legacy widget states are not typed. diff --git a/src/4.3_to_5.0/migrateTextEditor.test.ts b/src/4.3_to_5.0/migrateTextEditor.test.ts index 82875b91..89a5f8c2 100644 --- a/src/4.3_to_5.0/migrateTextEditor.test.ts +++ b/src/4.3_to_5.0/migrateTextEditor.test.ts @@ -2,7 +2,7 @@ import { migrateTextEditor } from "./migrateTextEditor"; import { legacyTextEditor } from "./__test_resources__/legacyTextEditor"; describe("migrateTextEditor", () => { - it("returns the ActiveUI5 Text Editor widget state corresponding to the given ActiveUI4 Rich Text Editor widget state", () => { + it("returns the Atoti UI 5 Text Editor widget state corresponding to the given Atoti UI 4 Rich Text Editor widget state", () => { const migratedTextEditor = migrateTextEditor(legacyTextEditor); expect(migratedTextEditor).toMatchInlineSnapshot(` { diff --git a/src/4.3_to_5.0/migrateTextEditor.ts b/src/4.3_to_5.0/migrateTextEditor.ts index 5a396cd1..49171162 100644 --- a/src/4.3_to_5.0/migrateTextEditor.ts +++ b/src/4.3_to_5.0/migrateTextEditor.ts @@ -2,7 +2,7 @@ import type { TextEditorWidgetState } from "@activeviam/activeui-sdk-5.0"; import type { LegacyWidgetState } from "./migration.types"; /** - * Returns the converted Text Editor widget state, ready to be used by ActiveUI 5. + * Returns the converted Text Editor widget state, ready to be used by Atoti UI 5. */ export function migrateTextEditor( legacyTextEditorState: LegacyWidgetState, diff --git a/src/4.3_to_5.0/migrateWidget.test.ts b/src/4.3_to_5.0/migrateWidget.test.ts index 3c07b65f..d35fcc2e 100644 --- a/src/4.3_to_5.0/migrateWidget.test.ts +++ b/src/4.3_to_5.0/migrateWidget.test.ts @@ -4,7 +4,7 @@ import { LegacyWidgetState } from "./migration.types"; import { servers } from "./__test_resources__/servers"; describe("migrateWidget", () => { - it("converts a widget saved with ActiveUI 4 into one usable with ActiveUI 5", () => { + it("converts a widget saved with Atoti UI 4 into one usable with Atoti UI 5", () => { const legacyWidgetState: LegacyWidgetState = { name: "Untitled chart", type: "container", @@ -60,7 +60,7 @@ describe("migrateWidget", () => { `); }); - it("warns if the widget has no core equivalent in ActiveUI 5", () => { + it("warns if the widget has no core equivalent in Atoti UI 5", () => { const legacyWidgetState: LegacyWidgetState = { name: "Untitled page context values", type: "container", diff --git a/src/4.3_to_5.0/migrateWidget.ts b/src/4.3_to_5.0/migrateWidget.ts index 487a7e1d..c9efec7c 100644 --- a/src/4.3_to_5.0/migrateWidget.ts +++ b/src/4.3_to_5.0/migrateWidget.ts @@ -12,9 +12,9 @@ import { UnsupportedWidgetKeyError } from "../UnsupportedWidgetKeyError"; import { TextEditorWidgetMigrationError } from "./errors/TextEditorWidgetMigrationError"; /** - * Returns the converted widget state, ready to be used in ActiveUI 5. + * Returns the converted widget state, ready to be used in Atoti UI 5. * Throws a {@link UnsupportedWidgetKeyError} if the legacy widget is not recognized. - * Throws a {@link TextEditorWidgetMigrationError} if the legacy widget is a text editor, as this widget is supported by ActiveUI 5 but has to be manually added by developers as an extension. + * Throws a {@link TextEditorWidgetMigrationError} if the legacy widget is a text editor, as this widget is supported by Atoti UI 5 but has to be manually added by developers as an extension. */ export function migrateWidget( legacyWidgetState: LegacyWidgetState, diff --git a/src/4.3_to_5.0/migrate_43_to_50.test.ts b/src/4.3_to_5.0/migrate_43_to_50.test.ts index a8c8f620..51e9a838 100644 --- a/src/4.3_to_5.0/migrate_43_to_50.test.ts +++ b/src/4.3_to_5.0/migrate_43_to_50.test.ts @@ -65,7 +65,7 @@ describe("migrate_43_to_50", () => { ) as OutcomeCounters; }); - it("returns a valid ActiveUI5 /ui folder on a small input", async () => { + it("returns a valid Atoti UI 5 /ui folder on a small input", async () => { const contentServer = getRootContentRecord(smallLegacyUIFolder); await migrate_43_to_50(contentServer, { errorReport, @@ -79,7 +79,7 @@ describe("migrate_43_to_50", () => { expect(counters).toMatchSnapshot(); }); - it("returns a valid ActiveUI5 /ui folder on a real life input", async () => { + it("returns a valid Atoti UI 5 /ui folder on a real life input", async () => { const contentServer = getRootContentRecord(legacyUIFolder); await migrate_43_to_50(contentServer, { errorReport, @@ -93,7 +93,7 @@ describe("migrate_43_to_50", () => { expect(counters).toMatchSnapshot(); }); - it("returns a valid ActiveUI5 /ui folder that includes calculated measures when the input includes a pivotFolder", async () => { + it("returns a valid Atoti UI 5 /ui folder that includes calculated measures when the input includes a pivotFolder", async () => { const contentServer = getRootContentRecord( legacyUIFolder, smallLegacyPivotFolder, @@ -123,8 +123,8 @@ describe("migrate_43_to_50", () => { doesReportIncludeStacks: false, }); - // In the ActiveUI 4 folder, the file with id `0xb` represents a saved Page Filters widget. - // It is removed from the ActiveUI 5 UI folder. + // In the Atoti UI 4 folder, the file with id `0xb` represents a saved Page Filters widget. + // It is removed from the Atoti UI 5 UI folder. const savedContentInLegacyUIFolder: ContentRecord = legacyUIFolder.children!.bookmarks; const migratedUIFolder = contentServer.children?.ui; @@ -132,8 +132,8 @@ describe("migrate_43_to_50", () => { expect(hasRecord(savedContentInLegacyUIFolder, "0xb")).toBe(true); expect(hasRecord(savedWidgets, "0xb")).toBe(false); - // In the ActiveUI 4 UI folder, the file with id `eef` represents a saved dashboard which includes a Page Filters widget. - // This widget is removed from the migrated dashboard in the ActiveUI 5 folder. + // In the Atoti UI 4 UI folder, the file with id `eef` represents a saved dashboard which includes a Page Filters widget. + // This widget is removed from the migrated dashboard in the Atoti UI 5 folder. const legacyDashboard: LegacyDashboardState = JSON.parse( legacyUIFolder.children!.bookmarks.children!.content.children!.eef.entry .content, diff --git a/src/4.3_to_5.0/migrate_43_to_50.ts b/src/4.3_to_5.0/migrate_43_to_50.ts index ccd22ef4..b81e96ec 100644 --- a/src/4.3_to_5.0/migrate_43_to_50.ts +++ b/src/4.3_to_5.0/migrate_43_to_50.ts @@ -197,12 +197,12 @@ const accumulateStructure = ({ }; /** - * Migrates `contentServer` from a version usable by ActiveUI 4.3 to one usable by ActiveUI 5.0. + * Migrates `contentServer` from a version usable by Atoti UI 4.3 to one usable by Atoti UI 5.0. * Also keeps track of the number of migration successes and failures in `counters` and a detailed `errorReport`. * * Widgets with keys in `keysOfWidgetPluginsToRemove` are not migrated: - * - for a matching saved ActiveUI 4.3 widget, no ActiveUI 5.0 file is created. - * - for a saved ActiveUI 4.3 dashboard including a matching widget, the widget is removed from the output ActiveUI 5.0 dashboard, and the layout is adapted so that siblings take the remaining space. + * - for a matching saved Atoti UI 4.3 widget, no Atoti UI 5.0 file is created. + * - for a saved Atoti UI 4.3 dashboard including a matching widget, the widget is removed from the output Atoti UI 5.0 dashboard, and the layout is adapted so that siblings take the remaining space. * * Mutates `contentServer`, `errorReport` and `counters`. */ diff --git a/src/4.3_to_5.0/migration.types.ts b/src/4.3_to_5.0/migration.types.ts index 67501add..23a8184b 100644 --- a/src/4.3_to_5.0/migration.types.ts +++ b/src/4.3_to_5.0/migration.types.ts @@ -19,7 +19,7 @@ export interface LegacyWidgetState { } /** - * Legacy dashboard page, supported for compatibility with ActiveUI 4. + * Legacy dashboard page, supported for compatibility with Atoti UI 4. * The legacy part is that the content is an array and not a map (whereas we need to access the widgets it contains all the time). */ export interface LegacyDashboardPage { @@ -31,7 +31,7 @@ export interface LegacyDashboardPage { } /** - * ActiveUI 4 dashboard page layout. + * Atoti UI 4 dashboard page layout. * The legacy part is that the tree is binary, leading to an unexpected resizing behaviour. */ export interface LegacyLayout { @@ -43,7 +43,7 @@ export interface LegacyLayout { } /** - * ActiveUI 4 dashboard state. + * Atoti UI 4 dashboard state. */ export interface LegacyDashboardState { name: string; diff --git a/src/5.0_to_5.1/__test_resources__/uiCalculatedMeasuresFolder.ts b/src/5.0_to_5.1/__test_resources__/uiCalculatedMeasuresFolder.ts index c0a02559..bfb67dd8 100644 --- a/src/5.0_to_5.1/__test_resources__/uiCalculatedMeasuresFolder.ts +++ b/src/5.0_to_5.1/__test_resources__/uiCalculatedMeasuresFolder.ts @@ -8,7 +8,7 @@ // 585 - "Log pv.SUM" /** - * A `ui/calculated_measures` folder on the content server created in ActiveUI 5.0. + * A `ui/calculated_measures` folder on the content server created in Atoti UI 5.0. */ export const uiCalculatedMeasuresFolder = { entry: { diff --git a/src/5.0_to_5.1/calculated-measures/getNamesOfCalculatedMeasuresToMigrate.test.ts b/src/5.0_to_5.1/calculated-measures/getNamesOfCalculatedMeasuresToMigrate.test.ts index b71894c0..cd01b81f 100644 --- a/src/5.0_to_5.1/calculated-measures/getNamesOfCalculatedMeasuresToMigrate.test.ts +++ b/src/5.0_to_5.1/calculated-measures/getNamesOfCalculatedMeasuresToMigrate.test.ts @@ -2,7 +2,7 @@ import { contentServer } from "../__test_resources__/contentServer"; import { getNamesOfCalculatedMeasuresToMigrate } from "./getNamesOfCalculatedMeasuresToMigrate"; describe("getNamesOfCalculatedMeasuresToMigrate", () => { - it("returns the names of the calculated measures created and saved with ActiveUI 5.0", () => { + it("returns the names of the calculated measures created and saved with Atoti UI 5.0", () => { expect(getNamesOfCalculatedMeasuresToMigrate(contentServer)).toStrictEqual([ "CM in 2 cubes", "Log pv.SUM", diff --git a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.test.ts b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.test.ts index 8d93a09a..c5c7f2f0 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.test.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.test.ts @@ -88,7 +88,6 @@ const namesOfCalculatedMeasuresToMigrate = [ "Distinct count city", "Exp gamma sum", "Log pv.SUM", - "activeui5 calculated measure", "Test calculated measure", "One", ]; @@ -97,7 +96,7 @@ const dataModels = { "Ranch 6.0": sandboxDataModel }; describe("migrateCalculatedMeasuresInMdx", () => { it("returns `namesOfCalculatedMeasuresToMigrateInWidget` as an empty array and does not modify the MDX when there are no calculated measures", () => { - const { cubeName, namesOfMigratedCalulatedMeasures, migratedMdx } = + const { cubeName, namesOfMigratedCalculatedMeasures, migratedMdx } = migrateCalculatedMeasuresInMdx({ mdx: mdxSelectWithNoCalculatedMeasures, namesOfCalculatedMeasuresToMigrate, @@ -106,12 +105,12 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); expect(cubeName).toStrictEqual("EquityDerivativesCube"); - expect(namesOfMigratedCalulatedMeasures).toStrictEqual([]); + expect(namesOfMigratedCalculatedMeasures).toStrictEqual([]); expect(migratedMdx).toStrictEqual(mdxSelectWithNoCalculatedMeasures); }); it("removes matching calculated measure definitions from MDX when the widget contains a single calculated measure", () => { - const { cubeName, namesOfMigratedCalulatedMeasures, migratedMdx } = + const { cubeName, namesOfMigratedCalculatedMeasures, migratedMdx } = migrateCalculatedMeasuresInMdx({ mdx: mdxSelectWithOneCalculatedMeasure, namesOfCalculatedMeasuresToMigrate, @@ -120,7 +119,7 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); expect(cubeName).toStrictEqual("EquityDerivativesCube"); - expect(namesOfMigratedCalulatedMeasures).toStrictEqual([ + expect(namesOfMigratedCalculatedMeasures).toStrictEqual([ "Distinct count city", ]); @@ -146,7 +145,7 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); it("removes matching calculated measure definitions from MDX when the widget contains several calculated measures", () => { - const { cubeName, namesOfMigratedCalulatedMeasures, migratedMdx } = + const { cubeName, namesOfMigratedCalculatedMeasures, migratedMdx } = migrateCalculatedMeasuresInMdx({ mdx: mdxSelectWithThreeCalculatedMeasures, namesOfCalculatedMeasuresToMigrate, @@ -155,7 +154,7 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); expect(cubeName).toStrictEqual("EquityDerivativesCube"); - expect(namesOfMigratedCalulatedMeasures).toStrictEqual([ + expect(namesOfMigratedCalculatedMeasures).toStrictEqual([ "Log pv.SUM", "Distinct count city", "One", @@ -183,7 +182,7 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); it("does not remove the definitions of calculated measures that do not match `namesOfCalculatedMeasuresToMigrate`", () => { - const { cubeName, namesOfMigratedCalulatedMeasures, migratedMdx } = + const { cubeName, namesOfMigratedCalculatedMeasures, migratedMdx } = migrateCalculatedMeasuresInMdx({ // mdxSelectWithCalculatedMeasureNotOnList contains [Measures].[pvSum ^ 2], which is not on the list of `namesOfCalculatedMeasuresToMigrate`. mdx: mdxSelectWithCalculatedMeasureNotOnList, @@ -193,7 +192,7 @@ describe("migrateCalculatedMeasuresInMdx", () => { }); expect(cubeName).toStrictEqual("EquityDerivativesCubeDist"); - expect(namesOfMigratedCalulatedMeasures).toStrictEqual([]); + expect(namesOfMigratedCalculatedMeasures).toStrictEqual([]); expect(migratedMdx).toStrictEqual(mdxSelectWithCalculatedMeasureNotOnList); }); diff --git a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.ts b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.ts index fc52f9b6..350ef327 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInMdx.ts @@ -28,7 +28,7 @@ export const migrateCalculatedMeasuresInMdx = ({ namesOfCalculatedMeasuresToMigrate: string[]; }): { cubeName: CubeName; - namesOfMigratedCalulatedMeasures: string[]; + namesOfMigratedCalculatedMeasures: string[]; migratedMdx: MdxSelect | MdxDrillthrough; } => { const namesOfMatchingCalculatedMeasures = _intersection( @@ -54,7 +54,7 @@ export const migrateCalculatedMeasuresInMdx = ({ return { cubeName, - namesOfMigratedCalulatedMeasures: namesOfMatchingCalculatedMeasures, + namesOfMigratedCalculatedMeasures: namesOfMatchingCalculatedMeasures, migratedMdx: isMdxDrillthrough(mdx) ? { ...mdx, select: updatedMdx } : updatedMdx, diff --git a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInWidget.ts b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInWidget.ts index d0c64d22..3efb27e8 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInWidget.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateCalculatedMeasuresInWidget.ts @@ -10,10 +10,10 @@ import { migrateCalculatedMeasuresInMdx } from "./migrateCalculatedMeasuresInMdx import _uniq from "lodash/uniq"; /** - * In ActiveUI 5.0, saved calculated measures live under /ui/calculated_measures, and ActivePivot is not aware of them. + * In Atoti UI 5.0, saved calculated measures live under /ui/calculated_measures, and ActivePivot is not aware of them. * In particular, they don't appear in the data model, and they must be added as query-scoped measures to each individual widget referring to them. * - * In ActiveUI 5.1, saved calculated measures are grouped by cube and live under /pivot/entitlements/cm. + * In Atoti UI 5.1, saved calculated measures are grouped by cube and live under /pivot/entitlements/cm. * ActivePivot proxies them and makes them accessible in the data model. * So they can be referred to just like any other measure in an MDX query, without the need to add a query-scoped calculated measure definition. * @@ -40,7 +40,7 @@ export function migrateCalculatedMeasuresInWidget( return; } - const { migratedMdx, namesOfMigratedCalulatedMeasures, cubeName } = + const { migratedMdx, namesOfMigratedCalculatedMeasures, cubeName } = migrateCalculatedMeasuresInMdx({ mdx, serverKey: widgetState.serverKey, @@ -48,7 +48,7 @@ export function migrateCalculatedMeasuresInWidget( namesOfCalculatedMeasuresToMigrate, }); - namesOfMigratedCalulatedMeasures.forEach((calculatedMeasureName) => { + namesOfMigratedCalculatedMeasures.forEach((calculatedMeasureName) => { measureToCubeMapping[calculatedMeasureName] = measureToCubeMapping[ calculatedMeasureName ] diff --git a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.test.ts b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.test.ts index fbf91679..dd86e060 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.test.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.test.ts @@ -9,7 +9,7 @@ const expGammaSumContent = JSON.parse( ); describe("migrateSavedCalculatedMeasureContent", () => { - it("transforms the content of a calculated measure created with ActiveUI 5.0 which contains a `FORMAT_STRING` property and an `additionalProperty`, into one that is natively supported by ActivePivot", () => { + it("transforms the content of a calculated measure created with Atoti UI 5.0 which contains a `FORMAT_STRING` property and an `additionalProperty`, into one that is natively supported by ActivePivot", () => { const migratedContent = migrateSavedCalculatedMeasureContent( distinctCountCityContent, "Distinct count city", @@ -28,7 +28,7 @@ describe("migrateSavedCalculatedMeasureContent", () => { }); }); - it("transforms the content of a calculated measure created with ActiveUI 5.0 which doesn't contain a `FORMAT_STRING` property or any `additionalProperties`, into one that is natively supported by ActivePivot", () => { + it("transforms the content of a calculated measure created with Atoti UI 5.0 which doesn't contain a `FORMAT_STRING` property or any `additionalProperties`, into one that is natively supported by ActivePivot", () => { const migratedContent = migrateSavedCalculatedMeasureContent( expGammaSumContent, "Exp gamma sum", diff --git a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.ts b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.ts index 9a95689e..2494494e 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasureContent.ts @@ -1,5 +1,5 @@ /** - * Transforms the content of a calculated measure created with ActiveUI 5.0, into one that is natively supported by ActivePivot. + * Transforms the content of a calculated measure created with Atoti UI 5.0, into one that is natively supported by ActivePivot. */ export const migrateSavedCalculatedMeasureContent = ( legacyCalculatedMeasureContent: { expression: string; properties: string[] }, diff --git a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.test.ts b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.test.ts index 64e0a4cd..0bcb0cc1 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.test.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.test.ts @@ -48,7 +48,7 @@ migrateSavedCalculatedMeasures({ }); describe("migrateSavedCalculatedMeasures", () => { - it("migrates the serialized definitions of all calculated measures created with ActiveUI 5.0 and used in a saved dashboard or saved widget, into ones that are natively supported by ActivePivot", () => { + it("migrates the serialized definitions of all calculated measures created with Atoti UI 5.0 and used in a saved dashboard or saved widget, into ones that are natively supported by ActivePivot", () => { // `uiCalculatedMeasuresFolder` contains 5 calculated measures. // "Exp gamma sum" is not used in any saved widgets or dashboards, it is not migrated. expect(counters.calculated_measures.success).toEqual(4); diff --git a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.ts b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.ts index e52827f9..b55685ea 100644 --- a/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.ts +++ b/src/5.0_to_5.1/calculated-measures/migrateSavedCalculatedMeasures.ts @@ -61,7 +61,7 @@ const contentServerWithEmptyPivotCalculatedMeasuresFolder = { }; /** - * Transforms the serialized definitions of all calculated measures created with ActiveUI 5.0 and used in a saved dashboard or saved widget, into ones that are natively supported by ActivePivot. + * Transforms the serialized definitions of all calculated measures created with Atoti UI 5.0 and used in a saved dashboard or saved widget, into ones that are natively supported by ActivePivot. * Mutates `contentServer`. */ export function migrateSavedCalculatedMeasures({ diff --git a/src/5.0_to_5.1/migrateSavedFilter.test.ts b/src/5.0_to_5.1/migrateSavedFilter.test.ts index 838e3e4f..48e62adb 100644 --- a/src/5.0_to_5.1/migrateSavedFilter.test.ts +++ b/src/5.0_to_5.1/migrateSavedFilter.test.ts @@ -7,7 +7,7 @@ const dataModels = { sandbox: sandboxDataModel }; const euro = "[Currency].[Currency].[ALL].[AllMember].[EUR]"; describe("migrateSavedFilter", () => { - it("migrates a 5.0 saved filter into one usable by ActiveUI 5.1", () => { + it("migrates a 5.0 saved filter into one usable by Atoti UI 5.1", () => { expect( migrateSavedFilter( { mdx: parse(euro) }, diff --git a/src/_getMetaData.test.ts b/src/_getMetaData.test.ts index 7989ca7f..1296a1d5 100644 --- a/src/_getMetaData.test.ts +++ b/src/_getMetaData.test.ts @@ -2,7 +2,7 @@ import { contentServer } from "./5.0_to_5.1/__test_resources__/contentServer"; import { _getMetaData } from "./_getMetaData"; describe("_getMetaData", () => { - it("returns the parsed metadata of an ActiveUI 5 content file", () => { + it("returns the parsed metadata of an Atoti UI 5 content file", () => { const dashboardsStructure = contentServer.children!.ui.children!.dashboards.children!.structure; const pathToParentFolder = ["346"]; diff --git a/src/cli/bin.ts b/src/cli/bin.ts index b7a53e7f..6a885177 100644 --- a/src/cli/bin.ts +++ b/src/cli/bin.ts @@ -47,7 +47,7 @@ const summaryMessages: { "had errors occurring during their migration. They were tentatively migrated to the desired version, but very likely have issues and won't work well in the UI.", }, removed: - "were cleaned up because they could not be found in the ui/dashboards/structure folder. They were already not visible in your version of ActiveUI.", + "were cleaned up because they could not be found in the ui/dashboards/structure folder. They were already not visible in your version of Atoti UI.", }, filters: { success: "were successfully migrated.", @@ -60,7 +60,7 @@ const summaryMessages: { "had errors occurring during their migration. They were tentatively migrated to the desired version, but very likely have issues and won't work well in the UI.", }, removed: - "were cleaned up because they could not be found in the ui/filters/structure folder. They were already not visible in your version of ActiveUI.", + "were cleaned up because they could not be found in the ui/filters/structure folder. They were already not visible in your version of Atoti UI.", }, widgets: { success: "were successfully migrated.", @@ -78,7 +78,7 @@ const summaryMessages: { }, folders: { removed: - "were cleaned up because they could not be found in their structure folder. They were already not visible in your version of ActiveUI.", + "were cleaned up because they could not be found in their structure folder. They were already not visible in your version of Atoti UI.", }, calculated_measures: { success: "were successfully migrated.", @@ -100,7 +100,7 @@ yargs onError: BehaviorOnError; }>( "$0", - "Migrates a JSON export of a Content Server saved with ActiveUI version `--from-version` to be usable in ActiveUI version `--to-version`.", + "Migrates a JSON export of a Content Server saved with Atoti UI version `--from-version` to be usable in Atoti UI version `--to-version`.", (args) => { args.option("input-path", { alias: "i", @@ -112,7 +112,7 @@ yargs alias: "o", type: "string", demandOption: true, - desc: "The path to the migrated file, ready to be imported into the Content Server and used in the ActiveUI version to migrate to.", + desc: "The path to the migrated file, ready to be imported into the Content Server and used in the Atoti UI version to migrate to.", }); args.option("servers-path", { alias: "s", diff --git a/src/getContent.ts b/src/getContent.ts index 70566993..e9070435 100644 --- a/src/getContent.ts +++ b/src/getContent.ts @@ -2,16 +2,15 @@ import _cloneDeep from "lodash/cloneDeep"; import { ContentRecord, ContentType } from "@activeviam/activeui-sdk-5.0"; /** - * Returns a copy of the content of type `contentType` created with ActiveUI version `activeUIVersion` on `contentServer`. + * Returns a copy of the content of type `contentType` created with Atoti UI version `atotiUIVersion` on `contentServer`. */ export const getContent = ( contentServer: ContentRecord, contentType: ContentType, - activeUIVersion: string, + atotiUIVersion: string, ): ContentRecord | undefined => { // In 4.3, all the types of contents are saved in the same flat "/ui/bookmarks/content" folder. - const folderName = - activeUIVersion === "4.3" ? "bookmarks" : `${contentType}s`; + const folderName = atotiUIVersion === "4.3" ? "bookmarks" : `${contentType}s`; const content = contentServer.children?.ui?.children?.[folderName].children?.content; return _cloneDeep(content); diff --git a/src/getMigrateDashboards.ts b/src/getMigrateDashboards.ts index 26da6a21..9556cd30 100644 --- a/src/getMigrateDashboards.ts +++ b/src/getMigrateDashboards.ts @@ -18,7 +18,7 @@ import { _getMetaData } from "./_getMetaData"; import { _serializeError } from "./_serializeError"; /** - * Returns a function which can be called to migrate ActiveUI 5+ dashboards. + * Returns a function which can be called to migrate Atoti UI 5+ dashboards. * The content of each dashboard is transformed using the `callback` argument. * * Some pieces of logic are encapsulated in order to make it easier for the caller: diff --git a/src/getMigrateSavedFilters.ts b/src/getMigrateSavedFilters.ts index 1b5d1de3..2ba0d667 100644 --- a/src/getMigrateSavedFilters.ts +++ b/src/getMigrateSavedFilters.ts @@ -14,7 +14,7 @@ import { _getMetaData } from "./_getMetaData"; import { _serializeError } from "./_serializeError"; /** - * Returns a function which can be called to migrate ActiveUI 5+ filters. + * Returns a function which can be called to migrate Atoti UI 5+ filters. * The content of each filter is transformed using the `callback` argument. * * Some pieces of logic are encapsulated in order to make it easier for the caller: diff --git a/src/getMigrateSavedWidgets.ts b/src/getMigrateSavedWidgets.ts index 79a79d1e..129e7791 100644 --- a/src/getMigrateSavedWidgets.ts +++ b/src/getMigrateSavedWidgets.ts @@ -15,7 +15,7 @@ import { produce } from "immer"; import { _addCorruptFileErrorToReport } from "./_addCorruptFileErrorToReport"; /** - * Returns a function which can be called to migrate ActiveUI 5+ widgets. + * Returns a function which can be called to migrate Atoti UI 5+ widgets. * The content of each widget is transformed using the `callback` argument. * * Some pieces of logic are encapsulated in order to make it easier for the caller: