From bb9e16a2c423fd4d1ec62f21280fb992ba1f866a Mon Sep 17 00:00:00 2001 From: zdrawku Date: Fri, 15 May 2026 16:16:07 +0300 Subject: [PATCH 01/13] Upgrade Guide 2.0 --- docs/web/upgrade-guide-v2.0.0.md | 218 +++++++++++++++-- .../current.json | 2 +- .../current/web/upgrade-guide-v2.0.0.md | 227 ++++++++++++++++++ 3 files changed, 426 insertions(+), 21 deletions(-) create mode 100644 i18n/ja/docusaurus-plugin-content-docs/current/web/upgrade-guide-v2.0.0.md diff --git a/docs/web/upgrade-guide-v2.0.0.md b/docs/web/upgrade-guide-v2.0.0.md index b482a9c1..d32e1ddb 100644 --- a/docs/web/upgrade-guide-v2.0.0.md +++ b/docs/web/upgrade-guide-v2.0.0.md @@ -11,39 +11,217 @@ First follow the [1.x upgrade guides in the 1.8.4 documentation](/1.8.4/web/upgr ## Overview of Breaking Changes - +- **jQuery and Day.js removed** — the SDK no longer depends on jQuery or Day.js. +- **NPM delivery** — the client SDK is now delivered as an npm package; legacy script-tag delivery is no longer the recommended approach. +- **`$.ig` and `RevealApi` namespaces removed** — all types are now imported directly from the `reveal-sdk` npm package. Replace `$.ig.ClassName` and `RevealApi.ClassName` with direct imports (e.g. `import { ClassName } from "reveal-sdk"`). +- **Renamed and removed APIs** + - `DateFilter` - _removed_ deprecated property from `RevealView`, `RVDashboard` and `ExportOptionsBase` + - `Reveal.Sdk.Dashboard.ToJsonStringAsync` - _renamed_ to `ToJsonString`. +- **Deprecated types** — `RVDashboardThumbnailView` has been deprecated, in favor of `RVThumbnail`. ## Step-by-Step Upgrade -### 1. Update package versions +### 1. Remove jQuery - +The Reveal SDK no longer requires jQuery. Remove the jQuery script tag that was loaded for the SDK: -### 2. Update API usage +```html + + +``` - +:::info +If your own application code depends on jQuery you can keep it — the Reveal SDK simply no longer requires it. +::: + +Also remove **Day.js**, **Quill.js** and **Spectrum.js** if they are still present from older versions: + +```html + + + + + + +``` + +### 2. Switch client SDK to NPM + +Replace the legacy script-tag installation with the npm package. + + + + +```html + + + +``` + + + + +```bash +npm install reveal-sdk +``` + +```typescript +import { RevealSdkSettings, RevealView } from "reveal-sdk"; +``` + + + + +:::tip Still need script tags? +The SDK distribution zip is still available for non-bundler setups — jQuery and Day.js are no longer needed: + +```html + +``` +::: + +:::info Full installation guides +For a deeper dive into all client SDK installation options — including CDN with ES modules, npm with Angular, and npm with React — see the [Installation Guide](installation/installation.md). +::: + +### 3. Update server SDK packages + + + + +Update the `Reveal.Sdk.*` NuGet packages to version **2.0.0** or later. + +```xml + +``` + + + + +Update your Maven/Gradle dependency to version **2.0.0** or later. + +```xml + + com.infragistics.reveal.sdk + reveal-sdk + 2.0.0 + +``` + + + + +```bash +npm install reveal-sdk-node@2.0.0 +``` - - - ```csharp - // before - ``` - - - ```csharp - // after - ``` - + -### 3. Update configuration +### 4. Update API usage + +#### `$.ig` / `RevealApi` → Direct imports + +The `$.ig` and `RevealApi` global namespaces have been removed. All types are now imported directly from the `reveal-sdk` npm package. If you were using TypeScript with `infragistics.reveal.d.ts` for IntelliSense (e.g. `new $.ig.RevealView`), update all references to use direct imports instead. + + + + +```javascript +$.ig.RevealSdkSettings.setBaseUrl("https://localhost:5111/"); +var revealView = new $.ig.RevealView("#revealView"); +``` + + + + +```typescript +import { RevealSdkSettings, RevealView } from "reveal-sdk"; + +RevealSdkSettings.setBaseUrl("https://localhost:5111/"); +const revealView = new RevealView("#revealView"); +``` + + + + +#### `DateFilter` → `filters` + `RVDateRule` + +The deprecated `DateFilter` property has been removed. Use the `filters` collection instead. DateFilter was eliminated from `RevealView`, `RVDashboard`, `RVDateDashboardFilter`, `IExportOptions`, `RevealSettings`, `ExportOptionsBase` and child classes. + + + + +```javascript +var myRule = new $.ig.RVDateRule($.ig.RVPeriodRelation.Last, 3, $.ig.RVPeriodType.Month); +dashboard.dateFilter = new $.ig.RVDateDashboardFilter(myRule); +``` + + + + +```typescript +import { RVDateRule, RVPeriodRelation, RVPeriodType } from "reveal-sdk"; + +const myRule = new RVDateRule(RVPeriodRelation.Last, 3, RVPeriodType.Month); +const myDateFilter = dashboard.filters.findByTitle("My Date Filter"); +myDateFilter.rule = myRule; +``` + + + + +#### `RVDashboardThumbnailView` → `RVThumbnail` + + + + +```javascript +var thumbnailView = new $.ig.RevealDashboardThumbnailView("#thumbnail"); +$.ig.RevealUtility.getDashboardInfo("Sales", function (info) { + thumbnailView.dashboardInfo = info.info; +}); +``` + + + + +```typescript +import { RVThumbnail } from "reveal-sdk"; + +RVThumbnail.fromDashboard("#thumbnail", "Sales"); +``` + + + - +The new `RVThumbnail` API also supports runtime theme changes. ## Removed APIs - +| API | Replacement | +|---|---| +| `$.ig` namespace | Direct imports from `reveal-sdk` | +| `RevealApi` namespace | Direct imports from `reveal-sdk` | +| `DateFilter` property | `filters` collection | +| `RVDashboardThumbnailView` | `RVThumbnail` | +| `Reveal.Sdk.Dashboard.ToJsonStringAsync` | `ToJsonString` | +| Legacy chart types (previously deprecated) | Use current [Chart Types](/web/chart-types) | +| Legacy Java engine | Java SDK (Spring Boot) | + +## Summary Checklist + +- [ ] Remove jQuery ` +``` + +:::info +アプリケーション自体のコードが jQuery に依存している場合はそのまま使用できます — Reveal SDK が jQuery を必要としなくなっただけです。 +::: + +また、古いバージョンから残っている **Day.js**、**Quill.js**、**Spectrum.js** も削除してください: + +```html + + + + + + +``` + +### 2. クライアント SDK を NPM に切り替える + +レガシーなスクリプトタグによるインストールを npm パッケージに置き換えます。 + + + + +```html + + + +``` + + + + +```bash +npm install reveal-sdk +``` + +```typescript +import { RevealSdkSettings, RevealView } from "reveal-sdk"; +``` + + + + +:::tip スクリプトタグが必要ですか? +バンドラーを使用しない環境向けに SDK 配布 zip は引き続き利用可能ですが、jQuery と Day.js は不要になりました: + +```html + +``` +::: + +:::info インストール ガイド +CDN + ES Modules、Angular での npm、React での npm など、クライアント SDK のインストール方法を詳しく確認する場合は、[インストール ガイド](installation/installation.md) を参照してください。 +::: + +### 3. サーバー SDK パッケージを更新する + + + + +`Reveal.Sdk.*` NuGet パッケージをバージョン **2.0.0** 以降に更新します。 + +```xml + +``` + + + + +Maven/Gradle の依存関係をバージョン **2.0.0** 以降に更新します。 + +```xml + + com.infragistics.reveal.sdk + reveal-sdk + 2.0.0 + +``` + + + + +```bash +npm install reveal-sdk-node@2.0.0 +``` + + + + +### 4. API の使用方法を更新する + +#### `$.ig` / `RevealApi` → 直接インポート + +`$.ig` と `RevealApi` のグローバル名前空間は削除されました。すべての型は `reveal-sdk` npm パッケージから直接インポートするようになりました。TypeScript で `infragistics.reveal.d.ts` を使用して IntelliSense を利用していた場合 (例: `new $.ig.RevealView`)、すべての参照を直接インポートに更新してください。 + + + + +```javascript +$.ig.RevealSdkSettings.setBaseUrl("https://localhost:5111/"); +var revealView = new $.ig.RevealView("#revealView"); +``` + + + + +```typescript +import { RevealSdkSettings, RevealView } from "reveal-sdk"; + +RevealSdkSettings.setBaseUrl("https://localhost:5111/"); +const revealView = new RevealView("#revealView"); +``` + + + + +#### `DateFilter` → `filters` + `RVDateRule` + +非推奨の `DateFilter` プロパティは削除されました。代わりに `filters` コレクションを使用してください。 DateFilter は `RevealView`、`RVDashboard`、`RVDateDashboardFilter`、`IExportOptions`、`RevealSettings`、`ExportOptionsBase` およびその子クラスから削除されました。 + + + + +```javascript +var myRule = new $.ig.RVDateRule($.ig.RVPeriodRelation.Last, 3, $.ig.RVPeriodType.Month); +dashboard.dateFilter = new $.ig.RVDateDashboardFilter(myRule); +``` + + + + +```typescript +import { RVDateRule, RVPeriodRelation, RVPeriodType } from "reveal-sdk"; + +const myRule = new RVDateRule(RVPeriodRelation.Last, 3, RVPeriodType.Month); +const myDateFilter = dashboard.filters.findByTitle("My Date Filter"); +myDateFilter.rule = myRule; +``` + + + + +#### `RVDashboardThumbnailView` → `RVThumbnail` + + + + +```javascript +var thumbnailView = new $.ig.RevealDashboardThumbnailView("#thumbnail"); +$.ig.RevealUtility.getDashboardInfo("Sales", function (info) { + thumbnailView.dashboardInfo = info.info; +}); +``` + + + + +```typescript +import { RVThumbnail } from "reveal-sdk"; + +RVThumbnail.fromDashboard("#thumbnail", "Sales"); +``` + + + + +新しい `RVThumbnail` API はランタイムでのテーマ変更もサポートしています。 + +## 削除された API + +| API | 代替 | +|---|---| +| `$.ig` 名前空間 | `reveal-sdk` からの直接インポート | +| `RevealApi` 名前空間 | `reveal-sdk` からの直接インポート | +| `DateFilter` プロパティ | `filters` コレクション | +| `RVDashboardThumbnailView` | `RVThumbnail` | +| `Reveal.Sdk.Dashboard.ToJsonStringAsync` | `ToJsonString` | +| レガシー チャート タイプ (以前に非推奨) | 現在の[チャート タイプ](/web/chart-types)を使用 | +| レガシー Java エンジン | Java SDK (Spring Boot) | + +## チェックリスト + +- [ ] jQuery の `