@mescius/wijmo.grid.pdf 5.20232.939

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/README.md ADDED
@@ -0,0 +1,363 @@
1
+ [English](#wijmo) | [日本語](#wijmo-jp) | [中文](#wijmo-cn) | [한국어](#wijmo-kr)
2
+
3
+ # Wijmo
4
+
5
+ Wijmo is a complete set of [JavaScript UI components](https://developer.mescius.com/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) for enterprise development. It includes a powerful data grid, charts, pivot tools, inputs, and much more and is available in your favorite framework, including [Angular](https://developer.mescius.com/wijmo/angular-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm), [React](https://developer.mescius.com/wijmo/react-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm), and [Vue](https://developer.mescius.com/wijmo/vue-ui-components?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm).
6
+
7
+ Cut your development time in half with Wijmo's lightweight, high-performance JavaScript UI components.
8
+
9
+ Check out our popular [FlexGrid data grid](https://developer.mescius.com/wijmo/flexgrid-javascript-data-grid?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) control.
10
+
11
+ Read more about [Wijmo NPM Packages](https://developer.mescius.com/wijmo/docs/GettingStarted/Referencing-Wijmo-NPM?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
12
+
13
+ ---
14
+
15
+ ## The BEST DataGrid for JavaScript, Angular, React and Vue
16
+
17
+ A great datagrid starts with a fundamentally sound grid. FlexGrid includes only the essential vital features and offers everything else through an extensibility model. Basic Excel-like features like sorting, grouping, and editing are built-in, while the bells and whistles are optional.
18
+
19
+ ![FlexGrid features include Row Selection, Dyanmic Cell Images, Gauges, Conditional Styling and much more](https://global-cdn.grapecity.com/external/wijmo/npm/best-grids-opt.png "FlexGrid features include Row Selection, Dyanmic Cell Images, Gauges, Conditional Styling and much more")
20
+
21
+ The result is a small, fast, familiar, flexible grid. Learn more about FlexGrid for your favorite framework:
22
+
23
+ - [JavaScript datagrid](https://developer.mescius.com/wijmo/flexgrid-javascript-data-grid?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
24
+ - [Angular datagrid](https://developer.mescius.com/wijmo/angular-ui-components/flexgrid-angular-data-grid?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
25
+ - [React datagrid](https://developer.mescius.com/wijmo/react-ui-components/flexgrid-react-data-grid?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
26
+ - [Vue datagrid](https://developer.mescius.com/wijmo/vue-ui-components/flexgrid-vue-data-grid?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
27
+
28
+ ---
29
+
30
+ ## Get What You're Missing From NPM!
31
+
32
+ Make sure to download Wijmo to get the full developer pack. NPM only includes our JS components, but our developer pack includes hundreds of samples with source code for every JS framework, real-world reference applications, and much more!
33
+
34
+ **[Download the Wijmo Developer Pack](https://developer.mescius.com/wijmo/npm?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) to jump-start your project.**
35
+
36
+ ---
37
+
38
+ ## Samples
39
+
40
+ Over 450 feature samples available in any JavaScript framework
41
+
42
+ - [JavaScript Samples](https://developer.mescius.com/wijmo/demos/Grid/Overview/purejs?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
43
+ - [Angular Samples](https://developer.mescius.com/wijmo/demos/Grid/Overview/angular?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
44
+ - [React Samples](https://developer.mescius.com/wijmo/demos/Grid/Overview/react?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
45
+ - [Vue Samples](https://developer.mescius.com/wijmo/demos/Grid/Overview/vue?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
46
+
47
+ We also have real-world reference applications available in any JavaScript framework
48
+
49
+ - [JavaScript Reference Applications](https://developer.mescius.com/wijmo/demos/reference-samples/fw-purejs?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
50
+ - [Angular Reference Applications](https://developer.mescius.com/wijmo/demos/reference-samples/fw-angular?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
51
+ - [React Reference Applications](https://developer.mescius.com/wijmo/demos/reference-samples/fw-react?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
52
+ - [React Redux Reference Applications](https://developer.mescius.com/wijmo/demos/reference-samples/fw-react-redux?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
53
+ - [Vue Reference Applications](https://developer.mescius.com/wijmo/demos/reference-samples/fw-vue?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
54
+
55
+ Sample source code available with our [Wijmo Developer Pack](https://developer.mescius.com/wijmo/npm?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm).
56
+
57
+ ## Installation
58
+
59
+ ### To install latest release version:
60
+
61
+ ```sh
62
+ npm install @grapecity/wijmo.all
63
+ ```
64
+
65
+ ### To install latest nightly build:
66
+
67
+ ```sh
68
+ npm install @grapecity/wijmo.all@nightly
69
+ ```
70
+
71
+ ### To install latest RC build:
72
+
73
+ ```sh
74
+ npm install @grapecity/wijmo.all@rc
75
+ ```
76
+
77
+ ## Documentation
78
+
79
+ On-line documentation is available here:
80
+
81
+ - [API Reference](https://developer.mescius.com/wijmo/api/?utm_source=wijmonpm&utm_medium=npm&utm_campaign=wijmonpm&utm_content=api)
82
+ - [Documentation Guides](https://developer.mescius.com/wijmo/docs/?utm_source=wijmonpm&utm_medium=npm&utm_campaign=wijmonpm&utm_content=docs)
83
+
84
+ ## Licensing
85
+
86
+ Wijmo is commercially licensed per developer.
87
+
88
+ Read more about [Wijmo Licensing](https://developer.mescius.com/licensing/wijmo?utm_source=wijmonpm&utm_medium=npm&utm_campaign=wijmonpm&utm_content=licensing).
89
+
90
+ ## Resources
91
+
92
+ - [Quick Start Guide](https://developer.mescius.com/wijmo/docs/GettingStarted/QuickStart/QuickStart-PureJS?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
93
+ - [About Wijmo](https://developer.mescius.com/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
94
+ - [Blogs](https://developer.mescius.com/blogs/tags/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
95
+ - [Knowledge Base](https://developer.mescius.com/kb/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
96
+
97
+ Wijmo Exclusive [Developer Pack Available Here](https://developer.mescius.com/wijmo/npm?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
98
+
99
+ ## Support
100
+
101
+ **Wijmo Support You Need, When You Need It**
102
+
103
+ Whether it is through documentation and how-tos, support tickets, or phone assistance, we have one mission: to help you be even more successful.
104
+ With our Customer Engagement Team, you get direct access to the developers building Wijmo, who will work with you to resolve any issue. You will be in good hands: our current customer satisfaction rating is 85%.
105
+
106
+ - 24 hour response time in our [ticketing system](https://developer.mescius.com/support/contact?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
107
+ - Access to our US-based [phone support](https://developer.mescius.com/contact?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) team (9AM-5PM EST)
108
+ - Elevated priority in the support queue
109
+
110
+ Support plans available with a [MESCIUS Wijmo](https://developer.mescius.com/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm) license
111
+
112
+ Product support is available through the following mediums:
113
+
114
+ - [Submit a Ticket](https://developer.mescius.com/support/contact?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
115
+ - [Wijmo Forum](https://developer.mescius.com/forums/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
116
+
117
+ ## Questions and Feedback
118
+
119
+ We value your feedback and utilize suggestions to help create product roadmaps. Tell us what you think.
120
+
121
+ Submit questions to our team of [Wijmo Experts](https://developer.mescius.com/forums/wijmo?utm_source=npmwebsite&utm_medium=prospects&utm_campaign=wijmo_npm)
122
+
123
+ ## Wijmo JP
124
+
125
+ [Wijmo](https://developer.mescius.jp/wijmo)は、Webアプリケーション開発に最適な数多くのUIを搭載するJavaScriptコンポーネントセットです。高速・軽量であり、開発工数の削減に大きく寄与します。データグリッド、チャート、ピボットテーブル、入力など、業務アプリケーション開発に必要となるコントロールを多数収録し、またAngularやReact、Vue.jsといったJavaScriptフレームワークにも対応しています。
126
+
127
+ なお、日本語版での動作保証は日本語版サイトで公開しているバージョンのみとなります。
128
+ また、日本語版を使用する場合は、日本語版のソフトウェア使用許諾契約書が適用されます。日本語版のソフトウェア使用許諾契約書は以下をご覧ください。
129
+
130
+ - [ソフトウェア使用許諾契約書](https://download.mescius.jp/license/wijmo/wijmo-userlicense.pdf)
131
+
132
+ ## サンプル
133
+
134
+ [オンラインデモ](https://developer.mescius.jp/wijmo#demo)では、Wijmoの各コントロールの基本機能や使い方をご紹介しています。
135
+
136
+ また、[トライアル版](https://developer.mescius.jp/download#javascript)をダウンロードして、実際の機能や動作をご確認いただけます。
137
+
138
+ ## インストール方法
139
+
140
+ [npmによるWijmoの参照](https://demo.mescius.jp/wijmo/docs/GettingStarted/Referencing-Wijmo-NPM)をご覧ください。
141
+
142
+ ## ドキュメント
143
+
144
+ 製品の各種ドキュメントは、下記をご参照ください。
145
+
146
+ - [製品ヘルプ](https://demo.mescius.jp/wijmo/docs/GettingStarted/Introduction)
147
+ - [APIリファレンス](https://demo.mescius.jp/wijmo/api/)
148
+
149
+ ## 製品情報
150
+
151
+ 製品の詳細や価格、ライセンスについては、下記をご参照ください。
152
+
153
+ - [製品情報](https://developer.mescius.jp/wijmo)
154
+
155
+ ## サポート
156
+
157
+ ヘルプやデモに加え、ナレッジベースでは製品の技術情報を公開しております。また、サブスクリプションをご契約中のお客様は、E-mailによる技術サポートをご利用いただけます。
158
+
159
+ - [サポート&サービス](https://developer.mescius.jp/support)
160
+ - [サブスクリプションサービス利用規約](https://download.mescius.jp/license/other/componentone-subscriptionservice.pdf)
161
+
162
+ ## Wijmo CN
163
+
164
+ Wijmo 是一套完整的企业级 JavaScript UI 开发组件。 它包括强大的表格、图表、数据透视、输入等组件,并且可以支持各类主流前端框架,包括 Angular、React 和 Vue。
165
+
166
+ Wijmo 的轻量级、高性能 JavaScript UI 组件可以将您的开发时间缩短一半。
167
+
168
+ 查看我们 [FlexGrid 表格](https://demo.grapecity.com.cn/wijmo/demos/Grid/Overview/purejs) 组件.
169
+
170
+
171
+ ---
172
+
173
+ ## 从 NPM 获取您所缺少的开发包!
174
+
175
+ 请务必下载 Wijmo 以获得完整的开发包。 NPM 仅包含我们的 JS 组件,但我们的开发包包含数百个示例,其中包含每个 JS 框架的源代码、实际参考应用程序等等!
176
+
177
+ **[下载 Wijmo 开发包](https://www.grapecity.com.cn/developer/wijmojs/download) 以启动您的项目。**
178
+
179
+ ---
180
+
181
+ ## 示例
182
+
183
+ 每种 JavaScript 框架中都提供超过 450 个功能示例
184
+
185
+ - [JavaScript 示例](https://demo.grapecity.com.cn/wijmo/demos/Grid/Overview/purejs)
186
+ - [Vue 示例](https://demo.grapecity.com.cn/wijmo/demos/Grid/Overview/vue)
187
+ - [Angular 示例](https://demo.grapecity.com.cn/wijmo/demos/Grid/Overview/angular)
188
+ - [React 示例](https://demo.grapecity.com.cn/wijmo/demos/Grid/Overview/react)
189
+
190
+ 我们还提供了 JavaScript 框架中可用的实际应用示例
191
+
192
+
193
+ - [Vue 参考应用](https://www.grapecity.com/wijmo/demos/reference-samples/#GeoDashboard)
194
+ - [Angular 参考应用](https://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/WealthHealth)
195
+ - [React 参考应用](https://www.grapecity.com/wijmo/demos/reference-samples/#GeoDashboard)
196
+ - [React Redux 参考应用](https://www.grapecity.com/wijmo/demos/reference-samples/#CryptoCurrencyTracking)
197
+
198
+ [Wijmo 开发包](https://www.grapecity.com.cn/developer/wijmojs/download) 中提供了示例源代码。
199
+
200
+ ## 安装
201
+
202
+ ### 安装最新版本:
203
+
204
+ ```sh
205
+ npm install @grapecity/wijmo.all
206
+ ```
207
+
208
+ ### 安装最新的 nightly 版本:
209
+ ```sh
210
+ npm install @grapecity/wijmo.all@nightly
211
+ ```
212
+
213
+ ### 安装最新的 RC 版本:
214
+
215
+ ```sh
216
+ npm install @grapecity/wijmo.all@rc
217
+ ```
218
+
219
+ ## 文档
220
+
221
+ 在线文档可在此处获取:
222
+
223
+ - [API Reference](https://demo.grapecity.com.cn/wijmo/api/)
224
+ - [Documentation Guides](https://demo.grapecity.com.cn/wijmo/docs/GettingStarted/Introduction)
225
+
226
+ ## 许可
227
+
228
+ Wijmo授权由开发授权和部署授权组成
229
+
230
+ 了解 [WijmoJS 价格与授权方式](https://www.grapecity.com.cn/developer/wijmojs#price).
231
+
232
+ ## 资源
233
+
234
+ - [快速入门指南](https://demo.grapecity.com.cn/wijmo/docs/GettingStarted/QuickStart/QuickStart-PureJS)
235
+ - [Wijmo 产品介绍](https://www.grapecity.com.cn/developer/wijmojs)
236
+ - [博客](https://www.grapecity.com.cn/blogs/tags/wijmo)
237
+ - [论坛](https://gcdn.grapecity.com.cn/showforum-140-1.html)
238
+
239
+ Wijmo 开发包可以从 [这里](https://www.grapecity.com.cn/developer/wijmojs/download) 下载
240
+
241
+ ## 支持
242
+
243
+ **Wijmo 随时为您提供支持**
244
+
245
+ 提供多种售前支持方式。您可以通过电话热线、邮件、售前顾问、在线咨询、添加企业微信等方式获取获取售前咨询、产品解决方案、产品选型等1V1服务。帮您快速了解产品特性,助您POC验证成功,节省时间成本。
246
+
247
+ - [联系我们](https://www.grapecity.com.cn/support#goumaizixun)
248
+
249
+
250
+ ## 问题反馈
251
+
252
+ 我们重视您的反馈并利用建议来帮助创建产品路线图。 告诉我们你的想法。
253
+
254
+ [提交您的问题和反馈建议](https://gcdn.grapecity.com.cn/showforum-173-1.html)
255
+
256
+ # Wijmo KR
257
+
258
+ Wijmo(위즈모)는 고성능의 Web App 개발을 위한 완전한 JavaScript UI 컴포넌트 세트입니다. 강력한 데이터 그리드(DataGrid), 차트(Chart), 피벗 도구(OLAP/Pivop), 입력(Input) 등 개발에 필요한 100+의 다양한 컨트롤이 포함되어 있습니다.
259
+
260
+ 또한, Wijmo는 Angular, React 및 Vue 등 개발자가 빠른 웹 개발과 효율적인 코드 유지 관리를 쉽게 할 수 있도록 JavaScript 프레임워크에 대한 지원을 제공합니다.
261
+
262
+ Wijmo의 경량 고성능 JavaScript UI 컴포넌트로 개발 시간을 절반으로 줄이십시오.
263
+
264
+ **[한국 Wijmo 공식 홈페이지 방문하기](https://mescius.co.kr/wijmo)**
265
+
266
+ ## 개발자 패키지를 다운받아 보세요.
267
+
268
+ Wijmo 개발자 패키지를 아래 링크를 통해서 다운받아 보세요. NPM은 JS 라이브러리만 제공하지만, 개발자 패키지는 인기 있는 JS 프레임워크(Angular, React, Vue..)를 위한, 수백개의 샘플과 소스코드를 제공합니다.
269
+
270
+ **[Wijmo 개발자 패키지](https://mescius.co.kr/wijmo/download)를 다운로드하여 여러분의 개발 프로젝트를 시작해보세요.**
271
+
272
+ ## 튜토리얼 | Demo & Sample
273
+
274
+ 450가지 이상의 다양한 기능 샘플을 통해, 직접 사용해보고 소스코드를 보면서 Wijmo의 모든 기능을 여러분의 App에 쉽고 빠르게 적용해볼 수 있습니다.
275
+
276
+ 모든 샘플은 한국어가 지원됩니다.
277
+
278
+ **[Wijmo 튜토리얼 페이지 바로가기](https://mescius.co.kr/wijmo/tutorial)**
279
+
280
+ 아래의 링크를 통해 원하시는 JS 프레임워크의 튜토리얼 사이트로 바로 이동할 수 있습니다.
281
+
282
+ - [JavaScript 샘플](https://wijmo-js-demo.web.app/)
283
+ - [JavaScript 샘플 (SystemJS/CommonJS 모듈 기반)](https://demo.mescius.co.kr/wijmo/learn-wijmo/Grid/Overview/purejs)
284
+ - [Angular 샘플](https://demo.mescius.co.kr/wijmo/learn-wijmo/Grid/Overview/angular)
285
+ - [React 샘플](https://demo.mescius.co.kr/wijmo/learn-wijmo/Grid/Overview/react)
286
+ - [Vue 샘플](https://demo.mescius.co.kr/wijmo/learn-wijmo/Grid/Overview/vue)
287
+
288
+ JavaScript(SystemJS/CommonJS 모듈 기반), Angular, React, Vue 샘플은 모두 [Wijmo 개발자 패키지](https://mescius.co.kr/wijmo/download)에 포함되어 있습니다.
289
+
290
+ ## 설치하기
291
+
292
+ Wijmo 라이브러리를 사용하기 위해서는 아래와 같이 2가지 방법을 통해 JS 라이브러리를 얻으실 수 있습니다.
293
+
294
+ #### 개발자 패키지
295
+
296
+ 가장 권장 드리는 방법으로, 홈페이지에서 한국 정식 버전의 [개발자 패키지를 다운로드](https://mescius.co.kr/wijmo/download)하여, 필요하신 Wijmo의 JS 라이브러리를 여러분의 어플리케이션으로 가져오시면 됩니다.
297
+
298
+ #### WIJMO NPM
299
+
300
+ Wijmo는 또한 NPM을 지원합니다. 이를 통해 최신 버전의 Wijmo 라이브러리를 사용하실 수 있습니다.
301
+
302
+ **[최신 정식 버전]**
303
+
304
+ ```sh
305
+ npm install @grapecity/wijmo.all
306
+ ```
307
+
308
+ **[Nightly 버전]**
309
+
310
+ ```sh
311
+ npm install @grapecity/wijmo.all@nightly
312
+ ```
313
+
314
+ **[RC 버전]**
315
+
316
+ ```sh
317
+ npm install @grapecity/wijmo.all@rc
318
+ ```
319
+
320
+ ## 빠른시작 가이드
321
+
322
+ 개발자 패키지 또는 NPM을 통해 Wijmo 라이브러리를 가져오셨다면, 아래의 가이드를 통해서 Wijmo 개발을 시작할 수 있습니다.
323
+
324
+ - [PureJS](https://wijmo-js-demo.web.app/00-QuickStart)
325
+ - [PureJS (JS 모듈 로더 사용시)](https://demo.mescius.co.kr/wijmo/docs/GettingStarted/QuickStart/QuickStart-PureJS)
326
+ - [Angular](https://demo.mescius.co.kr/wijmo/docs/GettingStarted/QuickStart/QuickStart-Angular)
327
+ - [React](https://demo.mescius.co.kr/wijmo/docs/GettingStarted/QuickStart/QuickStart-React)
328
+ - [Vue](https://demo.mescius.co.kr/wijmo/docs/GettingStarted/QuickStart/QuickStart-Vue)
329
+
330
+ ## 라이선싱
331
+
332
+ Wijmo 라이브러리를 상업용으로 개발하고 배포하기 위해서는 **개발자 라이선스**와 **배포 라이선스**를 반드시 구매하셔야 합니다.
333
+
334
+ - [가격 및 라이선스](https://www.mescius.co.kr/wijmo#price)
335
+ - [배포 라이선싱 등록 방법](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_faq&wr_id=1)
336
+
337
+ ## 개발자 문서
338
+
339
+ 개발 시에 온라인 개발자 문서를 참고할 수 있습니다.
340
+
341
+ - [개발자 도움말](https://demo.mescius.co.kr/wijmo/docs/GettingStarted/Introduction)
342
+ - [API 참조](https://demo.mescius.co.kr/wijmo/api/)
343
+
344
+ ## 기술 지원
345
+
346
+ Wijmo를 사용하시다가 어려움이 있으실 경우, 언제든지 아래의 개발자 포럼을 통해 질문을 남겨주세요.
347
+
348
+ 한국 지사의 전문 기술팀의 지원을 받아 보실 수 있습니다.
349
+
350
+ - [Wijmo 질문하기](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_qna)
351
+
352
+ ## 더 많은 소식을 받아 보세요.
353
+
354
+ MESCIUS KOREA 개발자 포럼에서 Wijmo에 대한 신규 버전 출시 소식 및 다양한 블로그 컨텐츠를 확인해보세요.
355
+
356
+ - [새로운 소식](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_news)
357
+ - [블로그 & Tips](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_bntips)
358
+ - [온라인 스터디](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_o_study)
359
+ - [FAQ](https://dev.mescius.co.kr/bbs/board.php?bo_table=wijmo_faq)
360
+
361
+ MESCIUS KOREA 카카오톡 친구 추가를 하시면, 더욱 빠르게 최신 소식, 이벤트 및 세미나 정보를 받아보실 수 있습니다
362
+
363
+ - [카카오톡 친구 추가하기](https://pf.kakao.com/_ClxiWxb)
@@ -0,0 +1,14 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+
14
+ "use strict";var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const wijmo_1=require("@mescius/wijmo"),pdf=__importStar(require("@mescius/wijmo.pdf")),selfModule=__importStar(require("@mescius/wijmo.grid.pdf"));function softGrid(){return wijmo_1._getModule("wijmo.grid")}exports.softGrid=softGrid;function softDetail(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softDetail=softDetail;function softMultiRow(){return wijmo_1._getModule("wijmo.grid.multirow")}exports.softMultiRow=softMultiRow;function softSheet(){return wijmo_1._getModule("wijmo.grid.sheet")}exports.softSheet=softSheet;function softOlap(){return wijmo_1._getModule("wijmo.olap")}exports.softOlap=softOlap;function softTransposed(){return wijmo_1._getModule("wijmo.grid.transposed")}exports.softTransposed=softTransposed;function softTransposedMultiRow(){return wijmo_1._getModule("wijmo.grid.transposedmultirow")}exports.softTransposedMultiRow=softTransposedMultiRow;var ScaleMode,ExportMode,_CellType,_fc;!function(e){e[e.ActualSize=0]="ActualSize";e[e.PageWidth=1]="PageWidth";e[e.SinglePage=2]="SinglePage"}(ScaleMode=exports.ScaleMode||(exports.ScaleMode={}));!function(e){e[e.All=0]="All";e[e.Selection=1]="Selection"}(ExportMode=exports.ExportMode||(exports.ExportMode={}));!function(e){e[e.None=0]="None";e[e.Cell=1]="Cell";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.TopLeft=4]="TopLeft";e[e.ColumnFooter=5]="ColumnFooter";e[e.BottomLeft=6]="BottomLeft"}(_CellType=exports._CellType||(exports._CellType={}));function _merge(e,t,r=!1){!e&&t&&(e={});if(t&&e)for(var o in t){var l=t[o],i=e[o];if(wijmo_1.isObject(l)){if(void 0===i||!wijmo_1.isObject(i)&&r){if(wijmo_1.isFunction(l.clone)){e[o]=i=l.clone();continue}e[o]=i={}}wijmo_1.isObject(i)&&_merge(e[o],l,r)}else(void 0===i||r&&void 0!==l)&&(e[o]=l)}return e}exports._merge=_merge;function _combineColumns(e,t){return{aggregate:t.aggregate,binding:t.binding,name:t.name,dataType:t.dataType,wordWrap:t.wordWrap,multiLine:t.multiLine,getAlignment:e=>{if("getAlignment"in t)return t.getAlignment(e)},index:e.index,visibleIndex:e.visibleIndex,isVisible:e.isVisible,renderWidth:e.renderWidth}}exports._combineColumns=_combineColumns;function _cloneStyle(e){if(!e)return null;var t={},toCamel=e=>e.replace(/\-([a-z])/g,(e,t,r)=>r>0?t.toUpperCase():t);for(let r=0,o=e.length;r<o;r++){let o=e[r];t[toCamel(o)]=e.getPropertyValue(o)}return t}exports._cloneStyle=_cloneStyle;class PdfFormatItemEventArgs extends wijmo_1.CancelEventArgs{constructor(e,t,r,o,l,i,s,n,a){super();this.cancelBorders=!1;this._p=e;this._rng=t;"undefined"!=typeof HTMLElement&&(this._cell=wijmo_1.asType(r,HTMLElement,!0));this._canvas=o;this._clientRect=l;this._contentRect=i;this._style=s;this._getFormattedCell=n;this._getTextRect=a}get panel(){return this._p}get range(){return this._rng.clone()}get row(){return this._rng.row}get col(){return this._rng.col}get data(){return this._data}set data(e){this._data=e}get canvas(){return this._canvas}get cell(){return this._cell}get clientRect(){return this._clientRect}get contentRect(){return this._contentRect}drawBackground(e){let t=this.clientRect;e&&t.width>0&&t.height>0&&this.canvas.paths.rect(t.left,t.top,t.width,t.height).fill(e||this.style.backgroundColor)}getFormattedCell(){return wijmo_1.asFunction(this._getFormattedCell)()}get tagContent(){return this._tagContent}set tagContent(e){this._tagContent=e}get style(){return this._style}get textTop(){!this._textRect&&wijmo_1.isFunction(this._getTextRect)&&(this._textRect=this._getTextRect());return this._textRect?this._textRect.top:this._contentRect.top}}exports.PdfFormatItemEventArgs=PdfFormatItemEventArgs;class _FlexGridPdfCoreConverter{static draw(e,t,r,o,l,i){wijmo_1.assert(!!e,"The flex argument cannot be null.");wijmo_1.assert(!!t,"The doc argument cannot be null.");null==(i=this._applyDefaultDrawSettings(i)).scaleMode&&(i.scaleMode=null==o?ScaleMode.ActualSize:null==l?ScaleMode.PageWidth:ScaleMode.SinglePage);this._drawInternal(e,t,r,o,l,i)}static _applyDefaultDrawSettings(e){return _merge(_merge({},e),_FlexGridPdfCoreConverter.DefaultDrawSettings)}static _drawInternal(e,t,r,o,l,i){var s=null!=r,n=new wijmo_1.Size(t.width,t.height);r||(r=new wijmo_1.Point(0,t.y));wijmo_1.isArray(i.embeddedFonts)&&i.embeddedFonts.forEach(e=>{t.registerFont(e)});var a=this._getRowsToRender(e,i),d=new FlexGridRenderer(e,i,a,this.BorderWidth,!0),h=new wijmo_1.Rect(r.x||0,r.y||0,o||n.width,l||n.height),g=this._getScaleFactor(d,i.scaleMode,h);if(r.y>0&&this._canBreakRows(i.scaleMode)){var u=a.find(e.cells,e=>d.isRenderableRow(e));if(u){var c=(h.height-h.top)*(1/g);if((d.showColumnHeader?pdf.pxToPt(e.columnHeaders.height):0)+pdf.pxToPt(u.renderHeight)-this.BorderWidth>c){t.addPage();h=new wijmo_1.Rect(r.x||0,0,o||n.width,l||n.height)}}}var f=this._getPages(d,a,h,i,s,g),p=(i.progress?this._getCellsCount(e,i,f):0)/i._progressMax,_=0,w=0,m=i.progress?()=>{if(++_-w>=50){w=_;i.progress(_/p)}}:null;i.progress&&i.progress(0);for(var C=0;C<f.length;C++){C>0&&t.addPage();var R=f[C],x=0===R.pageCol?h.left:0,b=0===R.pageRow?h.top:0;t.saveState();t.paths.rect(0,0,t._widthCtm,t._heightCtm).clip();t.scale(g,g,new wijmo_1.Point(x,b));t.translate(x,b);var S=new FlexGridRenderer(e,i,R.range,this.BorderWidth,C===f.length-1);S.render(t,m);t.restoreState();t.x=x;t.y=b+S.renderSize.height*g}i.progress&&0<i._progressMax&&i.progress(i._progressMax)}static _getCellsCount(e,t,r){for(var o=0,l=0;l<r.length;l++){o+=new FlexGridRenderer(e,t,r[l].range,0,!1).getCellsCount()}return o}static _getRowsToRender(e,t){var r=[];t.exportMode==ExportMode.All?r.push(new _CellRange(0,0,e.rows.length-1,e.columns.length-1)):r=e.getSelection();var o=new RowRange(r);if(o.isValid&&!t.drawDetailRows){var l=[];o.forEach(e.cells,(t,r,o)=>{if(!e.isDetailRow(t)){var i=l.length;i&&l[i-1].bottomRow+1===o?l[i-1].row2++:l.push(new _CellRange(o,r.col,o,r.col2))}});o=new RowRange(l)}return o}static _getScaleFactor(e,t,r){var o=1;if(t==ScaleMode.ActualSize)return o;var l=e.renderSize;if(t==ScaleMode.SinglePage){(i=Math.min(r.width/l.width,r.height/l.height))<1&&(o=i)}else{var i;(i=r.width/l.width)<1&&(o=i)}return o}static _canBreakRows(e){return e==ScaleMode.ActualSize||e==ScaleMode.PageWidth}static _getPages(e,t,r,o,l,i){let s=[],n=[],a=pdf.pxToPt,d=e.flex,h=e.showColumnHeader,g=e.showColumnFooter,u=e.showRowHeader,c=h?a(d.columnHeaders.height):0,f=g?a(d.columnFooters.height):0,p=u?a(d.rowHeaders.width):0,_=this._canBreakRows(o.scaleMode),w=o.scaleMode==ScaleMode.ActualSize,m=(r.width-r.left)*(1/i),C=(r.height-r.top)*(1/i),R=r.width*(1/i),x=r.height*(1/i),b=c,S=p,T=l&&o.scaleMode==ScaleMode.ActualSize,y=C;if(_){let r=0,o=0;t.forEach(d.cells,(t,l,i,n)=>{y=s.length?x:C;if(e.isRenderableRow(t)){let e=a(t.renderHeight);r++;b+=e;(h||r>1)&&(b-=this.BorderWidth);if(b>y){if(T||c+e>y&&0===o){s.push(n);b=c}else{s.push(n-1);b=c+e}o=0;h&&(b-=this.BorderWidth)}else o++}})}let v=Math.max(t.length()-1,0);s.length&&s[s.length-1]===v||s.push(v);g&&b+f>y&&s.push(-1);if(w){let r=0;for(let o=t.leftCol;o<=t.rightCol;o++){let t=d.columns[o];if(e.isRenderableColumn(t)){let e=a(t.renderWidth),l=n.length?R:m;r++;S+=e;(u||r>1)&&(S-=this.BorderWidth);if(S>l){if(p+e>l||T){n.push(o);S=p}else{n.push(o-1);S=p+e}u&&(S-=this.BorderWidth)}}}}n.length&&n[n.length-1]===t.rightCol||n.push(t.rightCol);let P=[],G=!1,M=1,F=l&&o.maxPages>0?1:o.maxPages;for(let e=0;e<s.length&&!G;e++)for(let r=0;r<n.length&&!G;r++,M++)if(!(G=M>F)){let o=0===e?0:s[e-1]+1,l=0===r?t.leftCol:n[r-1]+1,i=-1===s[e]?new RowRange([new _CellRange(-1,l,-1,n[r])]):t.subrange(o,s[e]-o+1,l,n[r]);P.push(new PdfPageRowRange(i,r,e))}return P}}_FlexGridPdfCoreConverter.BorderWidth=1;_FlexGridPdfCoreConverter.DefFont=new pdf.PdfFont;_FlexGridPdfCoreConverter.DefaultDrawSettings={customCellContent:!1,drawDetailRows:!1,exportMode:ExportMode.All,maxPages:Number.MAX_VALUE,repeatMergedValuesAcrossPages:!0,recalculateStarWidths:!0,styles:{cellStyle:{font:{family:_FlexGridPdfCoreConverter.DefFont.family,size:_FlexGridPdfCoreConverter.DefFont.size,style:_FlexGridPdfCoreConverter.DefFont.style,weight:_FlexGridPdfCoreConverter.DefFont.weight},padding:1.5,verticalAlign:"middle"},headerCellStyle:{font:{weight:"bold"}}},quickCellStyles:!0,_progressMax:1};exports._FlexGridPdfCoreConverter=_FlexGridPdfCoreConverter;class FlexGridRenderer{constructor(e,t,r,o,l){this._flex=e;this._borderWidth=o;this._lastPage=l;this._settings=t||{};this._topLeft=new PanelSectionRenderer(this,e.topLeftCells,this.showRowHeader&&this.showColumnHeader?new RowRange([new _CellRange(0,0,e.topLeftCells.rows.length-1,e.topLeftCells.columns.length-1)]):new RowRange([]),o);this._rowHeader=new PanelSectionRenderer(this,e.rowHeaders,this.showRowHeader?r.clone(0,e.rowHeaders.columns.length-1):new RowRange([]),o);this._columnHeader=new PanelSectionRenderer(this,e.columnHeaders,this.showColumnHeader?new RowRange([new _CellRange(0,r.leftCol,e.columnHeaders.rows.length-1,r.rightCol)]):new RowRange([]),o);this._cells=new PanelSectionRenderer(this,e.cells,r,o);this._bottomLeft=new PanelSectionRenderer(this,e.bottomLeftCells,this.showRowHeader&&this.showColumnFooter?new RowRange([new _CellRange(0,0,e.bottomLeftCells.rows.length-1,e.bottomLeftCells.columns.length-1)]):new RowRange([]),o);this._columnFooter=new PanelSectionRenderer(this,e.columnFooters,this.showColumnFooter?new RowRange([new _CellRange(0,r.leftCol,e.columnFooters.rows.length-1,r.rightCol)]):new RowRange([]),o)}get settings(){return this._settings}isRenderableRow(e){return this._flex.isRenderableRow(e)}isRenderableColumn(e){return this._flex.isRenderableColumn(e)}getCellsCount(){return this._topLeft.getCellsCount()+this._rowHeader.getCellsCount()+this._columnHeader.getCellsCount()+this._cells.getCellsCount()+this._bottomLeft.getCellsCount()+this._columnFooter.getCellsCount()}render(e,t){let r,o,l,i;if(e.tagged){r=o=l=i=new TrStructCache(e,e.tag(pdf.PdfTagType.Table));e.addTag(r.el);if(e.version>=pdf.PdfVersion.v1_5){r.el.add((o=new TrStructCache(e,e.tag(pdf.PdfTagType.THead))).el);r.el.add((l=new TrStructCache(e,e.tag(pdf.PdfTagType.TBody))).el);r.el.add((i=new TrStructCache(e,e.tag(pdf.PdfTagType.TFoot))).el)}}let s=Math.max(0,Math.max(this._topLeft.renderSize.width,this._rowHeader.renderSize.width)-this._borderWidth),n=Math.max(0,Math.max(this._topLeft.renderSize.height,this._columnHeader.renderSize.height)-this._borderWidth);this._topLeft.render(e,0,0,t,o);this._rowHeader.render(e,0,n,t,l);this._columnHeader.render(e,s,0,t,o);this._cells.render(e,s,n,t,l);n+=Math.max(0,this._cells.renderSize.height-this._borderWidth);this._bottomLeft.render(e,0,n,t,i);this._columnFooter.render(e,s,n,t,i)}get flex(){return this._flex}get renderSize(){var e=Math.max(this._topLeft.renderSize.height,this._columnHeader.renderSize.height)+Math.max(this._rowHeader.renderSize.height,this._cells.renderSize.height)+Math.max(this._bottomLeft.renderSize.height,this._columnFooter.renderSize.height),t=Math.max(this._topLeft.renderSize.width,this._rowHeader.renderSize.width)+Math.max(this._columnHeader.renderSize.width,this._cells.renderSize.width);this._columnHeader.renderableRowsCount>0&&(e-=this._borderWidth);this._columnFooter.renderableRowsCount>0&&(e-=this._borderWidth);this._rowHeader.renderableColumnsCount>0&&(t-=this._borderWidth);return new wijmo_1.Size(t,e)}get showColumnHeader(){return this._flex.showColumnHeader}get showRowHeader(){return this._flex.showRowHeader}get showColumnFooter(){return this._lastPage&&this._flex.showColumnFooter}alignMergedTextToTheTopRow(e){return this._flex.alignMergedTextToTheTopRow(e)}getColumn(e,t,r){return this._flex.getColumn(e,t,r)}isAlternatingRow(e){return this._flex.isAlternatingRow(e)}isGroupRow(e){return this._flex.isGroupRow(e)}isNewRow(e){return this._flex.isNewRow(e)}isExpandableGroupRow(e){return this._flex.isExpandableGroupRow(e)}isBooleanCell(e,t,r){return this._flex.isBooleanCell(e,t,r)}getCellStyle(e,t,r){return this._flex.getCellStyle(e,t,r)}}class PanelSection{constructor(e,t,r){this._flex=e;this._panel=t;this._range=r.clone()}get renderableRowsCount(){if(null==this._renderableRowsCnt){this._renderableRowsCnt=0;this._range.forEach(this._panel,e=>{this._flex.isRenderableRow(e)&&this._renderableRowsCnt++})}return this._renderableRowsCnt}get renderableColumnsCount(){if(null==this._renderableColumnsCnt){this._renderableColumnsCnt=0;if(this._range.isValid)for(var e=this._range.leftCol;e<=this._range.rightCol;e++)this._flex.isRenderableColumn(this._panel.columns[e])&&this._renderableColumnsCnt++}return this._renderableColumnsCnt}get size(){if(null==this._size){var e=this._range.getRenderSize(this._flex,this._panel);this._size=new wijmo_1.Size(pdf.pxToPt(e.width),pdf.pxToPt(e.height))}return this._size}get range(){return this._range}get panel(){return this._panel}}class PanelSectionRenderer extends PanelSection{constructor(e,t,r,o){super(e.flex,t,r);this._gr=e;this._borderWidth=o}get gr(){return this._gr}get renderSize(){if(null==this._renderSize){this._renderSize=this.size.clone();this.renderableColumnsCount>1&&(this._renderSize.width-=this._borderWidth*(this.renderableColumnsCount-1));this.renderableRowsCount>1&&(this._renderSize.height-=this._borderWidth*(this.renderableRowsCount-1))}return this._renderSize}_getRangeWidth(e,t){for(var r=0,o=0,l=this.panel,i=e;i<=t;i++){var s=l.columns[i];if(this._gr.isRenderableColumn(s)){o++;r+=s.renderWidth}}r=pdf.pxToPt(r);o>1&&(r-=this._borderWidth*(o-1));return r}_getRangeHeight(e,t){for(var r=0,o=0,l=this.panel,i=e;i<=t;i++){var s=l.rows[i];if(this._gr.isRenderableRow(s)){o++;r+=s.renderHeight}}r=pdf.pxToPt(r);o>1&&(r-=this._borderWidth*(o-1));return r}getCellsCount(){var e=0,t=this.range,r=this.panel,o=new GetMergedRangeProxy(this._gr.flex);if(!t.isValid)return e;t.forEach(r,(l,i,s)=>{if(this._gr.isRenderableRow(l))for(var n=t.leftCol;n<=t.rightCol;n++)if(this._gr.isRenderableColumn(r.columns[n])){var a=!1,d=void 0,h=o.getMergedRange(r,s,n);if(h){let e=s===h.firstVisibleRow,r=n===h.leftCol,o=s===i.topRow,l=n===i.leftCol,g=h.rowSpan>1,u=h.columnSpan>1;if(g&&u&&(e&&r||o&&l)||g&&!u&&(e||o)||!g&&u&&(r||l)){a=!0;u&&(d=Math.min(t.rightCol,h.rightCol))}}else a=!0;a&&e++;d&&(n=d)}});return e}render(e,t,r,o,l){var i=this.range;if(i.isValid){for(var s={},n=this.panel,a=new GetMergedRangeProxy(this._gr.flex),d=new _CellRangeExt(n,0,0,0,0),h=new _CellRenderer(this,e,this._borderWidth),g=i.leftCol;g<=i.rightCol;g++)s[g]=r;i.forEach(n,(r,g,u)=>{if(this._gr.isRenderableRow(r))for(var c=l?l.getTR(u,n.cellType):null,f=t,p=i.leftCol;p<=i.rightCol;p++){var _=this.gr.getColumn(n,u,p);if(this._gr.isRenderableColumn(_)){var w,m=void 0,C=void 0,R=!1,x=void 0,b=this._gr.flex.getCellContent(this.panel,r,_,p),S=a.getMergedRange(n,u,p);if(S){if(u>=S.topRow){d.copyFrom(S);let e=u===S.firstVisibleRow,t=p===S.leftCol,r=u===g.topRow,o=p===g.leftCol,l=S.rowSpan>1,n=S.columnSpan>1;if(l&&n&&(e&&t||r&&o)||l&&!n&&(e||r)||!l&&n&&(t||o)){R=!0;w=e&&t||this.gr.settings.repeatMergedValuesAcrossPages?b:"";m=l?this._getRangeHeight(u,Math.min(S.bottomRow,g.bottomRow)):this._getRangeHeight(u,u);if(n){C=this._getRangeWidth(Math.max(i.leftCol,S.leftCol),Math.min(i.rightCol,S.rightCol));x=Math.min(i.rightCol,S.rightCol);for(var T=p+1;T<=x;T++)s[T]+=m-this._borderWidth}}}else m=this._getRangeHeight(u,u);null==C&&(C=this._getRangeWidth(p,p))}else{d.setRange(u,p,u,p);R=!0;w=b;m=this._getRangeHeight(u,u);C=this._getRangeWidth(p,p)}if(R&&C>0&&m>0){let t=h.renderCell(w,r,_,d,new wijmo_1.Rect(f,s[p],C,m));if(c){let r=e.tag(n.cellType===_CellType.ColumnHeader||n.cellType==_CellType.TopLeft?pdf.PdfTagType.TH:pdf.PdfTagType.TD);t&&r.add(t);c.add(r)}o&&o()}m&&(s[p]+=m-this._borderWidth);C&&(f+=C-this._borderWidth);x&&(p=x)}}})}}}class TrStructCache{constructor(e,t){this.doc=e;this.tableSection=t;this._trh=[];this._trb=[];this._trf=[]}get el(){return this.tableSection}getTR(e,t){let r=t===_CellType.TopLeft||t===_CellType.ColumnHeader?this._trh:t===_CellType.RowHeader||t===_CellType.Cell?this._trb:this._trf,o=r[e];o||this.tableSection.add(r[e]=o=this.doc.tag(pdf.PdfTagType.TR));return o}}class _CellRenderer{constructor(e,t,r){this.InvisiblePen=new pdf.PdfPen(wijmo_1.Color.fromRgba(0,0,0,0),0);this._pr=e;this._area=t;this._borderWidth=r}renderCell(e,t,r,o,l){var i,s=this._pr.gr.flex,n=this._pr.panel,getGridCell=e=>s.getCell(n,o.topRow,o.leftCol,e),a=null,d=this._pr.gr.getCellStyle(n,t,r),h=this._pr.gr.settings.customCellContent,g=wijmo_1.isFunction(this._pr.gr.settings.formatItem);if(h){var u=s.getComputedStyle(n,a=getGridCell(g));d.color=u.color;d.backgroundColor=u.backgroundColor;var c=s.getComputedDefBorderColor();d.borderLeftColor="none"!=u.borderLeftStyle?u.borderLeftColor:c;d.borderRightColor="none"!=u.borderRightStyle?u.borderRightColor:c;d.borderTopColor="none"!=u.borderTopStyle?u.borderTopColor:c;d.borderBottomColor="none"!=u.borderBottomStyle?u.borderBottomColor:c;d.font=new pdf.PdfFont(u.fontFamily,pdf._asPt(u.fontSize,!0,void 0),u.fontStyle,u.fontWeight);d.textAlign=u.textAlign}if(d.font&&!(d.font instanceof pdf.PdfFont)){let e=d.font;d.font=new pdf.PdfFont(e.family,e.size,e.style,e.weight)}d.boxSizing="border-box";d.borderWidth=this._borderWidth;d.borderStyle="solid";h||this._pr.gr.isExpandableGroupRow(t)&&0===r.visibleIndex||(d.textAlign=r.getAlignment(t));if(n.cellType===_CellType.Cell&&s.rows.maxGroupLevel>=0&&o.leftCol===s.columns.firstVisibleIndex){var f=s.isGroupRow(t)?Math.max(t.level,0):s.rows.maxGroupLevel+1,p=pdf._asPt(d.paddingLeft||d.padding),_=pdf.pxToPt(f*s.treeIndent);d.paddingLeft=p+_}var w=this._measureCell(e,n,t,r,d,l);let m,C=o.rowSpan>1&&o.visibleRowsCount>1&&this._pr.gr.alignMergedTextToTheTopRow(n)?new wijmo_1.Rect(w.contentRect.left,w.contentRect.top,w.contentRect.width,w.contentRect.height/(o.visibleRowsCount||1)):w.contentRect,R=!0,x=!0;if(g){(i=new PdfFormatItemEventArgs(n,o,a,this._area,w.rect,w.contentRect,d,()=>a||getGridCell(!0),()=>w.textRect=this._calculateTextRect(e,n,t,r,C,d))).data=e;this._pr.gr.settings.formatItem(i);if(i.data!==e){e=wijmo_1.asString(i.data);w.textRect=null}R=!i.cancel;x=!i.cancelBorders;m=i.tagContent}R&&!w.textRect&&(w.textRect=this._calculateTextRect(e,n,t,r,C,d));return this._renderCell(e,t,r,o,w,d,R,x,null==m)||m}_renderCell(e,t,r,o,l,i,s,n,a){if(!s&&!n)return;let d,h=this._area.document.tagged,g=this._area.document;h&&g.beginArtifact({type:pdf.PdfArtifactType.Layout});this._renderEmptyCell(l,i,s,n);h&&g.endArtifact();if(s){a=!0===h&&!0===a;let o;if(this._isBooleanCellAndValue(e,this._pr.panel,t,r)){if(a){d=g.tag(pdf.PdfTagType.Span,null,{actual:e.toString()});o=g.beginTagContent(pdf.PdfTagType.Span)}this._renderBooleanCell(e,l,i)}else{if(a){d=g.tag(pdf.PdfTagType.P);o=g.beginTagContent(pdf.PdfTagType.P)}this._renderTextCell(e,l,i)}if(a){g.endTagContent();d.add(o)}}return d}_isBooleanCellAndValue(e,t,r,o){return this._pr.gr.isBooleanCell(t,r,o)&&this._isBoolean(e)}_isBoolean(e){var t=wijmo_1.isString(e)&&e.toLowerCase();return"true"===t||"false"===t||!0===e||!1===e}_measureCell(e,t,r,o,l,i){this._decompositeStyle(l);var s=i.left,n=i.top,a=i.height,d=i.width,h=this._parseBorder(l),g=h.left.width,u=h.top.width,c=h.bottom.width,f=h.right.width,p=this._parsePadding(l),_=0,w=0,m=0,C=0;if("content-box"===l.boxSizing||void 0===l.boxSizing){_=p.top+a+p.bottom;w=p.left+d+p.right;m=a;C=d}else{if("border-box"!==l.boxSizing)throw"Invalid value: "+l.boxSizing;if(pdf._IE&&l instanceof CSSStyleDeclaration){_=p.top+p.bottom+a;w=p.left+p.right+d}else{_=Math.max(a-u-c,0);w=Math.max(d-g-f,0)}m=Math.max(_-p.top-p.bottom,0);C=Math.max(w-p.left-p.right,0)}return{rect:i=new wijmo_1.Rect(s,n,d,a),clientRect:new wijmo_1.Rect(s+g,n+u,w,_),contentRect:new wijmo_1.Rect(s+g+p.left,n+u+p.top,C,m),textRect:null}}_decompositeStyle(e){if(e){var t;if(t=e.borderColor){e.borderLeftColor||(e.borderLeftColor=t);e.borderRightColor||(e.borderRightColor=t);e.borderTopColor||(e.borderTopColor=t);e.borderBottomColor||(e.borderBottomColor=t)}if(t=e.borderWidth){e.borderLeftWidth||(e.borderLeftWidth=t);e.borderRightWidth||(e.borderRightWidth=t);e.borderTopWidth||(e.borderTopWidth=t);e.borderBottomWidth||(e.borderBottomWidth=t)}if(t=e.borderStyle){e.borderLeftStyle||(e.borderLeftStyle=t);e.borderRightStyle||(e.borderRightStyle=t);e.borderTopStyle||(e.borderTopStyle=t);e.borderBottomStyle||(e.borderBottomStyle=t)}if(t=e.padding){e.paddingLeft||(e.paddingLeft=t);e.paddingRight||(e.paddingRight=t);e.paddingTop||(e.paddingTop=t);e.paddingBottom||(e.paddingBottom=t)}}}_parseBorder(e){var t={left:{width:0},top:{width:0},bottom:{width:0},right:{width:0}};"none"!==e.borderLeftStyle&&(t.left={width:pdf._asPt(e.borderLeftWidth),style:e.borderLeftStyle,color:e.borderLeftColor});"none"!==e.borderTopStyle&&(t.top={width:pdf._asPt(e.borderTopWidth),style:e.borderTopStyle,color:e.borderTopColor});"none"!==e.borderBottomStyle&&(t.bottom={width:pdf._asPt(e.borderBottomWidth),style:e.borderBottomStyle,color:e.borderBottomColor});"none"!==e.borderRightStyle&&(t.right={width:pdf._asPt(e.borderRightWidth),style:e.borderRightStyle,color:e.borderRightColor});return t}_parsePadding(e){return{left:pdf._asPt(e.paddingLeft),top:pdf._asPt(e.paddingTop),bottom:pdf._asPt(e.paddingBottom),right:pdf._asPt(e.paddingRight)}}_renderEmptyCell(e,t,r,o){var l=e.rect.left,i=e.rect.top,s=e.clientRect.width,n=e.clientRect.height,a=e.clientRect.left-e.rect.left,d=e.clientRect.top-e.rect.top,h=e.rect.top+e.rect.height-(e.clientRect.top+e.clientRect.height),g=e.rect.left+e.rect.width-(e.clientRect.left+e.clientRect.width);r=r&&t.backgroundColor&&s>0&&n>0;if(o&&(a||g||h||d)){var u=t.borderLeftColor||t.borderColor,c=t.borderRightColor||t.borderColor,f=t.borderTopColor||t.borderColor,p=t.borderBottomColor||t.borderColor;if(a&&d&&h&&g&&a===g&&a===h&&a===d&&u===c&&u===p&&u===f){var _=a,w=_/2,m=this._area.paths.rect(l+w,i+w,s+_,n+_);if(r){m.fillAndStroke(t.backgroundColor,new pdf.PdfPen(u,_));return}m.stroke(new pdf.PdfPen(u,_))}else{a&&this._area.paths.polygon([[l,i],[l+a,i+d],[l+a,i+d+n],[l,i+d+n+h]]).fill(u);d&&this._area.paths.polygon([[l,i],[l+a,i+d],[l+a+s,i+d],[l+a+s+g,i]]).fill(f);g&&this._area.paths.polygon([[l+a+s+g,i],[l+a+s,i+d],[l+a+s,i+d+n],[l+a+s+g,i+d+n+h]]).fill(c);h&&this._area.paths.polygon([[l,i+d+n+h],[l+a,i+d+n],[l+a+s,i+d+n],[l+a+s+g,i+d+n+h]]).fill(p)}}r&&this._area.paths.rect(e.clientRect.left,e.clientRect.top,e.clientRect.width,e.clientRect.height).fillAndStroke(t.backgroundColor,this.InvisiblePen)}_renderBooleanCell(e,t,r){if(!(!t.textRect||t.textRect.height<=0||t.textRect.width<=0)){var o=t.textRect.left,l=t.textRect.top,i=t.textRect.height;this._area.paths.rect(o,l,i,i).fillAndStroke(wijmo_1.Color.fromRgba(255,255,255),new pdf.PdfPen(void 0,.5));if(!0===wijmo_1.changeType(e,wijmo_1.DataType.Boolean,"")){var s=i/20,n=i-.5-2*s,a=i/8;this._area.document.saveState();this._area.translate(o+.25+s,l+.25+s).paths.moveTo(a/2,.6*n).lineTo(n-.6*n,n-a).lineTo(n-a/2,a/2).stroke(new pdf.PdfPen(void 0,a));this._area.document.restoreState()}}}_renderTextCell(e,t,r){!e||!t.textRect||t.textRect.height<=0||t.textRect.width<=0||this._area.drawText(e,t.textRect.left,t.textRect.top,{brush:r.color,font:r.font,height:t.textRect.height,width:t.textRect.width,align:"center"===r.textAlign?pdf.PdfTextHorizontalAlign.Center:"right"===r.textAlign?pdf.PdfTextHorizontalAlign.Right:"justify"===r.textAlign?pdf.PdfTextHorizontalAlign.Justify:pdf.PdfTextHorizontalAlign.Left})}_calculateTextRect(e,t,r,o,l,i){if(null!=e&&!wijmo_1.isString(e))return null;var s=l.clone();if(this._isBooleanCellAndValue(e,t,r,o)){var n=this._getTextLineHeight(i.font);switch(i.verticalAlign){case"middle":s.top=l.top+l.height/2-n/2;break;case"bottom":s.top=l.top+l.height-n}switch(i.textAlign){case"justify":case"center":s.left=l.left+l.width/2-n/2;break;case"right":s.left=l.left+l.width-n}s.height=s.width=n}else if(s.height>0&&s.width>0)switch(i.verticalAlign){case"bottom":if((d=this._area.measureText(e,i.font,{height:s.height,width:s.width})).size.height<s.height){var a=(h=this._area.document._document).currentLineHeight(!0)-h.currentLineHeight(!1);s.top+=s.height-d.size.height-a;s.height=d.size.height}break;case"middle":var d;if((d=this._area.measureText(e,i.font,{height:s.height,width:s.width})).size.height<s.height){var h;a=(h=this._area.document._document).currentLineHeight(!0)-h.currentLineHeight(!1);s.top+=s.height/2-(d.size.height-a)/2;s.height=d.size.height}}return s}_getTextLineHeight(e){return this._area.lineHeight(e)}}exports._CellRenderer=_CellRenderer;class GetMergedRangeProxy{constructor(e){this._columns={};this._flex=e}getMergedRange(e,t,r){let o=this._columns[r];if(o&&t>=o.topRow&&t<=o.bottomRow)return o;{let o=this._flex.getMergedRange(e,t,r),l=e.columns,i=e.rows;if(o&&!o.isSingleCell&&(!l[o.col].isVisible||!l[o.col2].isVisible||!i[o.row].isVisible||!i[o.row2].isVisible)){o=o.clone();for(;o.col<o.col2&&!l[o.col].isVisible;)o.col++;for(;o.col2>o.col&&!l[o.col2].isVisible;)o.col2--;for(;o.row<o.row2&&!i[o.row].isVisible;)o.row++;for(;o.row2>o.row&&!i[o.row2].isVisible;)o.row2--}o&&o.isSingleCell&&(o=null);return this._columns[r]=o?new _CellRangeExt(e,o):null}}}class _CellRange{constructor(e,t,r,o){if("number"==typeof e){this._row=e;this._col=t;this._row2=r;this._col2=o}else{this._row=e.row;this._col=e.col;this._row2=e.row2;this._col2=e.col2}(this._row<0||this._row2<0)&&(this._row=this._row2=-1);(this._col<0||this._col2<0)&&(this._col=this._col2=-1)}get row(){return this._row}set row(e){this._row=e}get col(){return this._col}set col(e){this._col=e}get row2(){return this._row2}set row2(e){this._row2=e}get col2(){return this._col2}set col2(e){this._col2=e}get topRow(){return Math.min(this._row,this._row2)}get bottomRow(){return Math.max(this._row,this._row2)}get leftCol(){return Math.min(this._col,this._col2)}get rightCol(){return Math.max(this._col,this._col2)}get columnSpan(){return Math.abs(this._col2-this._col)+1}get rowSpan(){return Math.abs(this._row2-this._row)+1}get isValid(){return this._row>-1&&this._col>-1&&this._row2>-1&&this._col2>-1}get isSingleCell(){return this._row===this._row2&&this._col===this._col2}copyFrom(e){this.setRange(e.row,e.col,e.row2,e.col2)}clone(){return new _CellRange(this._row,this._col,this._row2,this._col2)}getRenderSize(e,t){let r=new wijmo_1.Size(0,0);if(this.isValid){for(let o=this.topRow;o<=this.bottomRow;o++){let l=t.rows[o];e.isRenderableRow(l)&&(r.height+=l.renderHeight)}for(let o=this.leftCol;o<=this.rightCol;o++){let l=t.columns[o];e.isRenderableColumn(l)&&(r.width+=l.renderWidth)}}return r}setRange(e=-1,t=-1,r=e,o=t){this._row=wijmo_1.asInt(e);this._col=wijmo_1.asInt(t);this._row2=wijmo_1.asInt(r);this._col2=wijmo_1.asInt(o)}}exports._CellRange=_CellRange;class _CellRangeExt extends _CellRange{constructor(e,t,r,o,l){super(t,r,o,l);this.firstVisibleRow=-1;this.visibleRowsCount=0;if(e){var i=this.topRow,s=this.bottomRow,n=e.rows.length;if(n>0)for(var a=i;a<=s&&a<n;a++)if(e.rows[a].isVisible){this.firstVisibleRow<0&&(this.firstVisibleRow=a);this.visibleRowsCount++}}}copyFrom(e){super.copyFrom(e);this.firstVisibleRow=e.firstVisibleRow;this.visibleRowsCount=e.visibleRowsCount}clone(){return new _CellRangeExt(null,this.row,this.col,this.row2,this.col2)}}exports._CellRangeExt=_CellRangeExt;class RowRange{constructor(e){this._ranges=e||[]}length(){for(var e=0,t=0;t<this._ranges.length;t++){var r=this._ranges[t];r.isValid&&(e+=r.bottomRow-r.topRow+1)}return e}get isValid(){return this._ranges.length&&this._ranges[0].isValid}get leftCol(){return this._ranges.length?this._ranges[0].leftCol:-1}get rightCol(){return this._ranges.length?this._ranges[0].rightCol:-1}clone(e,t){for(var r=[],o=0;o<this._ranges.length;o++){var l=this._ranges[o].clone();arguments.length>0&&(l.col=e);arguments.length>1&&(l.col2=t);r.push(l)}return new RowRange(r)}getRenderSize(e,t){for(var r=new wijmo_1.Size(0,0),o=0;o<this._ranges.length;o++){var l=this._ranges[o].getRenderSize(e,t);r.width=Math.max(r.width,l.width);r.height+=l.height}return r}find(e,t){var r=null;this.forEach(e,e=>{if(!0===t(e)){r=e;return!1}});return r}forEach(e,t){for(var r=0,o=!1,l=0;l<this._ranges.length&&!o;l++){var i=this._ranges[l];if(i.isValid)for(var s=i.topRow;s<=i.bottomRow&&!o;s++)o=!1===t(e.rows[s],i,s,r++)}}subrange(e,t,r,o){var l=[];if(e>=0&&t>0)for(var i=0,s=0,n=0;n<this._ranges.length&&t>0;n++,i=s+1){var a=this._ranges[n];if(!(e>(s=i+(a.bottomRow-a.topRow)))){var d=e>i?a.topRow+(e-i):a.topRow,h=Math.min(a.bottomRow,d+t-1),g=arguments.length>2?r:a.leftCol,u=arguments.length>2?o:a.rightCol;l.push(new _CellRange(d,g,h,u));t-=h-d+1}}return new RowRange(l)}}class PdfPageRowRange{constructor(e,t,r){this._col=t;this._row=r;this._range=e}get range(){return this._range}get pageCol(){return this._col}get pageRow(){return this._row}}const FAKE_CELL="wj-pdf-fake-cell";function getFakeCell(e){if(!_fc){(_fc=document.createElement("div")).setAttribute(FAKE_CELL,"true");softGrid()&&_fc.setAttribute(softGrid().FlexGrid._WJS_MEASURE,"true")}let t=_fc.style;t.cssText="";t.position="absolute";t.overflow="hidden";t.width="1px";t.height="1px";t.clipPath="inset(100%)";t.clip="rect(0 0 0 0)";let r=e.hostElement,o=r.children.length?r.children[0]:r;_fc.parentNode!==o&&o.appendChild(_fc);return _fc}function _removeFakeCell(){if(_fc){wijmo_1.removeChild(_fc);_fc=null}}exports._removeFakeCell=_removeFakeCell;class FlexGridPdfConverter{static draw(e,t,r,o,l){this.drawToPosition(e,t,null,r,o,l)}static drawToPosition(e,t,r,o,l,i){wijmo_1.assert(!!e,"The flex argument cannot be null.");wijmo_1.assert(!!t,"The doc argument cannot be null.");let s,n=softGrid()&&e instanceof softGrid().FlexGrid,a=e;try{i=_FlexGridPdfCoreConverter._applyDefaultDrawSettings(i);let d=e;if(n){if(i&&i.recalculateStarWidths){s=a.columns.getTotalSize();a.columns._updateStarSizes(pdf.ptToPx(t.width))}d=this._getFlexGridAdapter(a,i)}_FlexGridPdfCoreConverter.draw(d,t,r,o,l,i)}finally{_removeFakeCell();n&&i&&i.recalculateStarWidths&&a.columns._updateStarSizes(s)}}static export(e,t,r){wijmo_1.assert(!!e,"The flex argument cannot be null.");wijmo_1.assert(!!t,"The fileName argument cannot be empty.");var o=(r=this._applyDefaultExportSettings(r)).documentOptions.ended;r.documentOptions.ended=(e,i)=>{r.progress&&r.progress(1);o&&!1===o.apply(l,[e,i])||pdf.saveBlob(i.blob,t);e.dispose()};var l=new pdf.PdfDocument(r.documentOptions);this.drawToPosition(e,l,null,null,null,r);l.end()}static _getFlexGridAdapter(e,t){return new(softMultiRow()&&e instanceof softMultiRow().MultiRow&&MultiRowAdapter||softSheet()&&e instanceof softSheet().FlexSheet&&FlexSheetAdapter||softOlap()&&e instanceof softOlap().PivotGrid&&PivotGridAdapter||softTransposed()&&e instanceof softTransposed().TransposedGrid&&_TransposedGridAdapter||softTransposedMultiRow()&&e instanceof softTransposedMultiRow().TransposedMultiRow&&TransposedMultiRowAdapter||FlexGridAdapter)(e,t)}static _applyDefaultExportSettings(e){return _merge(_merge({},e),this._DefaultExportSettings)}}FlexGridPdfConverter._DefaultExportSettings=_merge({scaleMode:ScaleMode.PageWidth,documentOptions:{compress:!1,pageSettings:{margins:{left:36,right:36,top:18,bottom:18}}},_progressMax:.9},_FlexGridPdfCoreConverter.DefaultDrawSettings);exports.FlexGridPdfConverter=FlexGridPdfConverter;class FlexGridAdapter{constructor(e,t){this._defBorderColor=null;this._flex=e;this._settings=t;t.quickCellStyles&&(this._styleCache=new StyleCache(500))}get flex(){return this._flex}get settings(){return this._settings}get columns(){return this._flex.columns}get rows(){return this._flex.rows}get bottomLeftCells(){return this._flex.bottomLeftCells}get cells(){return this._flex.cells}get columnFooters(){return this._flex.columnFooters}get columnHeaders(){return this._flex.columnHeaders}get rowHeaders(){return this._flex.rowHeaders}get topLeftCells(){return this._flex.topLeftCells}get treeIndent(){return this._flex.treeIndent}getSelection(){var e=[],t=this._flex.selection,r=softGrid();switch(this._flex.selectionMode){case r.SelectionMode.None:break;case r.SelectionMode.Cell:case r.SelectionMode.CellRange:e.push(new _CellRange(t.row,t.col,t.row2,t.col2));break;case r.SelectionMode.Row:e.push(new _CellRange(t.topRow,0,t.topRow,this._flex.cells.columns.length-1));break;case r.SelectionMode.RowRange:e.push(new _CellRange(t.topRow,0,t.bottomRow,this._flex.cells.columns.length-1));break;case r.SelectionMode.ListBox:for(var o=-1,l=0;l<this._flex.rows.length;l++){if(this._flex.rows[l].isSelected){o<0&&(o=l);l===this._flex.rows.length-1&&e.push(new _CellRange(o,0,l,this._flex.cells.columns.length-1))}else{o>=0&&e.push(new _CellRange(o,0,l-1,this._flex.cells.columns.length-1));o=-1}}}return e}getCell(e,t,r,o){var l=e.getCellElement(t,r);if(!l){l=getFakeCell(e);this._flex.cellFactory.updateCell(e,t,r,l,null,o)}return l}getComputedDefBorderColor(){if(null==this._defBorderColor){let e=window.getComputedStyle(this._flex.hostElement);this._defBorderColor="none"!=e.borderRightStyle?e.borderRightColor:"none"!=e.borderBottomStyle?e.borderBottomColor:"none"!=e.borderLeftStyle?e.borderLeftColor:"none"!=e.borderTopStyle?e.borderTopColor:"rgba(0,0,0,0.2)"}return this._defBorderColor}getComputedStyle(e,t){let r,o=null==t.getAttribute(FAKE_CELL),l=t.className,i=l.indexOf("wj-state-selected")>=0||l.indexOf("wj-state-multi-selected")>=0;i&&(t.className=l.replace("wj-state-selected","").replace("wj-state-multi-selected",""));if(this._styleCache){let o=e.hostElement,l=t.style.cssText.split(/;\s+/).filter(e=>{var t=e.substring(0,e.indexOf(":"));return/^(color|background-color|border-color|border-left-color|border-right-color|border-top-color|border-bottom-color|font|textAlign)/i.test(t)}).join(";"),i=t;do{l=i.className+l}while(i!==o&&(i=i.parentElement));if(!(r=this._styleCache.getValue(l))){r=window.getComputedStyle(t);r=this._styleCache.add(l,r)}}else r=_cloneStyle(window.getComputedStyle(t));o&&i&&(t.className=l);return r}getMergedRange(e,t,r){let o=this._flex.getMergedRange(e,t,r,!1);return o?new _CellRange(o.row,o.col,o.row2,o.col2):null}get showColumnHeader(){return!!(this._flex.headersVisibility&softGrid().HeadersVisibility.Column)}get showRowHeader(){return!!(this._flex.headersVisibility&softGrid().HeadersVisibility.Row)}get showColumnFooter(){return this._flex.columnFooters.rows.length>0}alignMergedTextToTheTopRow(e){return!1}getCellData(e,t,r){return e.getCellData(t,r,!0)}getCellContent(e,t,r,o){let l,i=softGrid();if(this.settings.customCellContent){let i=this.getCell(e,t.index,o,!0);!(l=(l=i.innerText.trim()).replace(/\r/gm,"").replace(/\n+/gm,"\n"))&&this.isBooleanCell(e,t,r)&&(l=null==(l=this._extractCheckboxValue(i))?"":l+"")}else{let s=r.isContentHtml;l=this.getCellData(e,t.index,o);if(this.isGroupRow(t)&&e.cellType===i.CellType.Cell&&r.index===e.columns.firstVisibleIndex){s=!0;l||(l=t.getGroupHeader())}s&&(l=wijmo_1.toPlainText(l).trim())}return l}isBooleanCell(e,t,r){return r.dataType===wijmo_1.DataType.Boolean&&e.cellType===softGrid().CellType.Cell&&(!this.isExpandableGroupRow(t)||r.visibleIndex>0)}getColumn(e,t,r){return e.columns[r]}isAlternatingRow(e){let t=!1,r=this._flex.alternatingRowStep;if(r){t=e.visibleIndex%(r+1)==0;1==r&&(t=!t)}return t}isGroupRow(e){return e instanceof softGrid().GroupRow}isNewRow(e){return e instanceof softGrid()._NewRowTemplate}isDetailRow(e){return softDetail()&&e instanceof softDetail().DetailRow}isExpandableGroupRow(e){return e instanceof softGrid().GroupRow&&e.hasChildren}isRenderableRow(e){return e.isVisible&&e.renderHeight>0&&!this.isNewRow(e)}isRenderableColumn(e){return e.isVisible&&e.renderWidth>0}getCellStyle(e,t,r){var o=this.settings.styles,l=_merge({},o.cellStyle),i=this._flex,s=softGrid();switch(e.cellType){case s.CellType.Cell:this.isExpandableGroupRow(t)?_merge(l,o.groupCellStyle,!0):this.isAlternatingRow(t)&&_merge(l,o.altCellStyle,!0);break;case s.CellType.ColumnHeader:case s.CellType.RowHeader:case s.CellType.TopLeft:case s.CellType.BottomLeft:_merge(l,o.headerCellStyle,!0);break;case s.CellType.ColumnFooter:_merge(l,o.headerCellStyle,!0);_merge(l,o.footerCellStyle,!0)}!this.settings.customCellContent&&i._getShowErrors()&&i._getError(e,t.index,r.index)&&_merge(l,o.errorCellStyle,!0);return l}_extractCheckboxValue(e){var t=e.querySelector("input[type=checkbox]");if(t&&"none"!==t.style.display&&"hidden"!==t.style.visibility)return t.checked}}class FlexSheetAdapter extends FlexGridAdapter{getCellData(e,t,r){return e.cellType===softGrid().CellType.Cell?e.rows[t]instanceof softSheet().HeaderRow?this.flex.columnHeaders.getCellData(t,r,!0):this.flex.getCellValue(t,r,!0):super.getCellData(e,t,r)}getCellStyle(e,t,r){var o=super.getCellStyle(e,t,r),l=this.flex.selectedSheet.findTable(t.index,r.index);if(l){var i=l.getRange(),s=t.index-i.topRow,n=r.index-i.leftCol,a=l._getTableCellAppliedStyles(s,n);a&&(a.font=new pdf.PdfFont(a.fontFamily,pdf._asPt(a.fontSize,!0,void 0),a.fontStyle,a.fontWeight));_merge(o,a,!0)}return o}get showColumnHeader(){return!1}get showRowHeader(){return!1}get showColumnFooter(){return!1}}class MultiRowAdapter extends FlexGridAdapter{getColumn(e,t,r){return _combineColumns(super.getColumn(e,t,r),this.flex.getBindingColumn(e,t,r))}isAlternatingRow(e){if(e instanceof softMultiRow()._MultiRow){let t=!1,r=this.flex.alternatingRowStep;if(r){t=e.dataIndex%(r+1)==0;1==r&&(t=!t)}return t}return super.isAlternatingRow(e)}}class PivotGridAdapter extends FlexGridAdapter{alignMergedTextToTheTopRow(e){let t=softGrid();return!this.flex.centerHeadersVertically&&(e.cellType===t.CellType.ColumnHeader||e.cellType===t.CellType.RowHeader)}}class _TransposedGridAdapter extends FlexGridAdapter{getColumn(e,t,r){let o=super.getColumn(e,t,r);if(e.cellType!=softGrid().CellType.Cell)return o;{let r=e.grid._getBindingColumn(e,t,o);return r?_combineColumns(o,r):o}}}class TransposedMultiRowAdapter extends FlexGridAdapter{getColumn(e,t,r){let o=super.getColumn(e,t,r);if(e.cellType!=softGrid().CellType.Cell)return o;{let l=this.flex.getBindingColumn(e,t,r);return l?_combineColumns(o,l):o}}}class StyleCache{constructor(e){this._cache={};this._size=0;this._max=e}add(e,t){this._size>=this._max&&this.clear();let r=this._cache[e]=_cloneStyle(t);this._size++;return r}clear(){this._cache={};this._size=0}getValue(e){return this._cache[e]||null}hasKey(e){return!!this._cache[e]}}var PdfWebWorkerResponseStatus;!function(e){e[e.Done=1]="Done";e[e.Progress=2]="Progress"}(PdfWebWorkerResponseStatus||(PdfWebWorkerResponseStatus={}));const DefGridName="";class PdfWebWorkerExportDoneEventArgs extends wijmo_1.EventArgs{constructor(e){super();this._buf=e}get blob(){this._blob||(this._blob=new Blob([new Uint8Array(this._buf)],{type:"application/pdf"}));return this._blob}get buffer(){return this._buf}}exports.PdfWebWorkerExportDoneEventArgs=PdfWebWorkerExportDoneEventArgs;class PdfWebWorkerClient{static exportGrid(e,t,r,o,l,i){(o=FlexGridPdfConverter._applyDefaultExportSettings(o)).progress=o.progress||i;this.addGrid(e,t,DefGridName,o);this.export(e,o.documentOptions,e=>{wijmo_1.isFunction(l)&&!1===l(e)||pdf.saveBlob(e.blob,r)},i)}static export(e,t,r,o){e.addEventListener("message",(function handler(t){let l=t.data;switch(l.status){case PdfWebWorkerResponseStatus.Done:e.removeEventListener("message",handler);wijmo_1.isFunction(r)&&r(new PdfWebWorkerExportDoneEventArgs(l.data));break;case PdfWebWorkerResponseStatus.Progress:o&&o(l.data);break;default:throw`Unknown status: ${l.status}`}}));let l=this._clientDataToArrayBuffer(e);e.postMessage({content:l,settings:t},[l]);this._clearClientData(e)}static addGrid(e,t,r,o){let l=this._gridToJson(t,o);this._addClientData(e,JSON.stringify(l),r,o,!0)}static addImage(e,t,r,o){let l=wijmo_1.isString(t)&&t.indexOf("data:image/svg")>=0?t:pdf._PdfImageHelper.getDataUri(t);this._addClientData(e,l,r,o)}static addString(e,t,r){this._addClientData(e,t,r,null)}static serializeGrid(e,t){let r=this._gridToJson(e,t);return strToBuf(JSON.stringify(r))}static _addClientData(e,t,r,o,l=!1){wijmo_1.asType(e,Worker);wijmo_1.asString(r);wijmo_1.asString(t,!0);let i=e;i.clientData=i.clientData||{};i.clientData[r]={content:t,settings:o?JSON.stringify(o):null};var s=i.clientData[r];if(l){s.isGrid=!0;s.progressMessaging=!!o&&wijmo_1.isFunction(o.progress)}}static _clearClientData(e){delete e.clientData}static _clientDataToArrayBuffer(e){let t=e;return strToBuf(JSON.stringify(t.clientData||{}))}static _gridToJson(e,t){t=FlexGridPdfConverter._applyDefaultExportSettings(t);let r,o;try{r=new pdf.PdfDocument(t.documentOptions);if(t&&t.recalculateStarWidths){o=e.columns.getTotalSize();e.columns._updateStarSizes(pdf.ptToPx(r.width))}return this._getJsonConverter(e,t).convert()}finally{_removeFakeCell();t&&t.recalculateStarWidths&&e.columns._updateStarSizes(o);if(null!=r){r.dispose();r=null}}}static _getJsonConverter(e,t){return new(softMultiRow()&&e instanceof softMultiRow().MultiRow&&MultiRowJsonConverter||softOlap()&&e instanceof softOlap().PivotGrid&&PivotGridJsonConverter||softTransposed()&&e instanceof softTransposed().TransposedGrid&&TransposedGridJsonConverter||softTransposedMultiRow()&&e instanceof softTransposedMultiRow().TransposedMultiRow&&TransposedMultirowJsonConverter||FlexGridJsonConverter)(e,t,FlexGridPdfConverter._getFlexGridAdapter(e,t))}}exports.PdfWebWorkerClient=PdfWebWorkerClient;class PdfWebWorker{static initExportGrid(){this.initExport((e,t)=>{var r=t[DefGridName];if(r.progressMessaging){r.settings._progressMax=FlexGridPdfConverter._DefaultExportSettings._progressMax;r.settings.progress=e=>{this.sendExportProgress(e)};e.ended.addHandler(()=>{this.sendExportProgress(1)})}FlexGridPdfConverter.draw(r.content,e,null,null,r.settings);e.end()})}static initExport(e){self.addEventListener("message",(function handler(t){self.removeEventListener("message",handler);let r=t.data,o=JSON.parse(bufToStr(r.content)),l=r.settings||{};l.ended=(e,t)=>{blobToBuf(t.blob,e=>{self.postMessage({data:e,status:PdfWebWorkerResponseStatus.Done},[e])})};let i=new pdf.PdfDocument(l);Object.keys(o).forEach(e=>{let t=o[e];t.settings&&(t.settings=JSON.parse(t.settings));if(t.isGrid){t.settings&&PdfWebWorker._disableUnsupportedFeatures(t.settings);t.content=PdfWebWorker._deserializeGridFromString(t.content,t.settings)}});e(i,o)}))}static sendExportProgress(e){e=wijmo_1.clamp(e,0,1);self.postMessage({data:e,status:PdfWebWorkerResponseStatus.Progress})}static deserializeGrid(e,t){return this._deserializeGridFromString(bufToStr(e),t)}static _deserializeGridFromString(e,t){return this._getJsonAdapter(JSON.parse(e),FlexGridPdfConverter._applyDefaultExportSettings(t))}static _disableUnsupportedFeatures(e){e.customCellContent=!1}static _getJsonAdapter(e,t){switch(e.typeName){case"MultiRow":return new MultiRowJsonAdapter(e,t);case"PivotGrid":return new PivotGridJsonAdapter(e,t);case"TransposedGrid":return new TransposedGridJsonAdapter(e,t);case"TransposedMultiRow":return new TransposedMultiRowJsonAdapter(e,t);default:return new FlexGridJsonAdapter(e,t)}}}exports.PdfWebWorker=PdfWebWorker;function bufToStr(e){for(var t=new Uint16Array(e),r="",o=0,l=t.length;o<l;o++)r+=String.fromCharCode(t[o]);return r}function strToBuf(e){for(var t=new ArrayBuffer(2*e.length),r=new Uint16Array(t),o=0,l=e.length;o<l;o++)r[o]=e.charCodeAt(o);return t}function blobToBuf(e,t){wijmo_1.asFunction(t);var r=new FileReader;r.onload=function(e){t(e.target.result)};r.readAsArrayBuffer(e)}var RowState,ColState;!function(e){e[e.None=0]="None";e[e.Alternate=1]="Alternate";e[e.Group=2]="Group";e[e.ExpandableGroup=4]="ExpandableGroup";e[e.New=8]="New";e[e.Visible=16]="Visible";e[e.Detail=32]="Detail"}(RowState||(RowState={}));!function(e){e[e.None=0]="None";e[e.Visible=1]="Visible"}(ColState||(ColState={}));class FlexGridJsonConverter{constructor(e,t,r){this._flex=e;this._settings=t;this._adapter=r}convert(){var e={};e.typeName=this._getTypeName(this._flex);e.selection=this._serializeSelection();e.showColumnFooter=this.adapter.showColumnFooter;e.showColumnHeader=this.adapter.showColumnHeader;e.showRowHeader=this.adapter.showRowHeader;e.treeIndent=this._flex.treeIndent;e.bottomLeftCells=this._serializePanel(this._flex.bottomLeftCells);e.cells=this._serializePanel(this._flex.cells);e.columnFooters=this._serializePanel(this._flex.columnFooters);e.columnHeaders=this._serializePanel(this._flex.columnHeaders);e.rowHeaders=this._serializePanel(this._flex.rowHeaders);e.topLeftCells=this._serializePanel(this._flex.topLeftCells);return e}get adapter(){return this._adapter}get flex(){return this._flex}_getTypeName(e){return e.constructor.toString().match(/function\s*(\w+)/)[1]}_getRowState(e){var t=RowState.None;this.adapter.isAlternatingRow(e)&&(t|=RowState.Alternate);e instanceof softGrid().GroupRow&&(t|=RowState.Group);this.adapter.isDetailRow(e)&&(t|=RowState.Detail);this.adapter.isExpandableGroupRow(e)&&(t|=RowState.ExpandableGroup);e instanceof softGrid()._NewRowTemplate&&(t|=RowState.New);e.isVisible&&(t|=RowState.Visible);return t}_getColumnState(e){var t=ColState.None;e.isVisible&&(t|=ColState.Visible);return t}_serializeSelection(){let e=this.adapter.getSelection(),t=[];for(let o=0;o<e.length;o++){var r=e[o];t.push([r.row,r.col,r.row2,r.col2])}return t}_serializeColumns(e){let t=[];for(let r=0,o=(e||[]).length;r<o;r++){let o=e[r],l=null;if(o){l={aggregate:o.aggregate,renderWidth:o.renderWidth,visibleIndex:o.visibleIndex};let e=o.getAlignment();e&&(l.alignment=e);let t=this._getColumnState(o);t!==ColState.None&&(l.state=t);o.binding&&(l.binding=o.binding);null!=o.dataType&&(l.dataType=o.dataType);null!=o.name&&(l.name=o.name);o.wordWrap&&(l.wordWrap=!0);o.multiLine&&(l.multiLine=!0)}t.push(l)}return t}_serializePanel(e){let t={cellType:e.cellType,height:e.height,width:e.width},getAlignment=e=>{if(e.align)return e.align;if(!e.dataMap)switch(e.dataType){case wijmo_1.DataType.Boolean:return"center";case wijmo_1.DataType.Number:return"right"}return null};t.mergedRanges=this._serializeMergedRanges(e);t.columns=this._serializeColumns(e.columns);t.columnsFirstVisibleIndex=e.columns.firstVisibleIndex;t.rows=[];t.rowsMaxGroupLevel=e.rows.maxGroupLevel;let r=!this._settings.customCellContent&&this._flex._getShowErrors();for(let o=0,l=e.rows.length,i=e.columns.length;o<l;o++){let l=e.rows[o],s={renderHeight:l.renderHeight};t.rows.push(s);let n=getAlignment(l);n&&(s.alignment=n);l instanceof softGrid().GroupRow&&(s.level=l.level);let a=this._getRowState(l);a!==RowState.None&&(s.state=a);l.binding&&(s.binding=l.binding);null!=l.dataType&&(s.dataType=l.dataType);l.wordWrap&&(s.wordWrap=!0);l.multiLine&&(s.multiLine=!0);s.cells=[];let d=softGrid();for(let t=0;t<i;t++){let l=this._adapter.getCellContent(e,e.rows[o],e.columns[t],t);if(wijmo_1.isFunction(this._settings.formatItem)){let r=new PdfFormatItemEventArgs(e,new d.CellRange(o,t),null,null,null,null,null,()=>this._adapter.getCell(e,o,t,!0),null);r.data=l;this._settings.formatItem(r);r.data!==l&&(l=r.data)}s.cells[t]=l;if(r&&this._flex._getError(e,o,t)){s.errors||(s.errors={});s.errors[t]=1}}}return t}_serializeMergedRanges(e){for(var t=[],r=[],o=0;o<e.columns.length;o++)r[o]=0;for(var l=0;l<e.rows.length;l++)for(var i=0;i<e.columns.length;i++)if(!(l<r[i])){var s=e.grid.getMergedRange(e,l,i);if(null!=s&&!s.isSingleCell){t.push([s.row,s.col,s.row2,s.col2]);for(var n=s.col;n<=s.col2;n++)r[n]=s.row2+1;s.col===s.col2||(i=s.col2)}}return t}}class MultiRowJsonConverter extends FlexGridJsonConverter{convert(){let e=super.convert();e.rowsPerItem=this.flex.rowsPerItem;return e}_serializePanel(e){let t=super._serializePanel(e);t.cellGroups=this._serializeCellGroup(e);return t}_serializeCellGroup(e){let t=[],r=[],o=softGrid(),l=this.flex.rowsPerItem;e.cellType!==o.CellType.TopLeft&&e.cellType!==o.CellType.ColumnHeader||(l=e.rows.length);for(let o=0;o<l;o++){r[o]=[];for(let l=0;l<e.columns.length;l++){let i=this.flex.getBindingColumn(e,o,l),s=t.indexOf(i);r[o][l]=s<0?t.push(i)-1:s}}return{bindingColumns:this._serializeColumns(t),mappings:r}}}class PivotGridJsonConverter extends FlexGridJsonConverter{convert(){let e=super.convert();e.centerHeadersVertically=this.flex.centerHeadersVertically;return e}}class TransposedGridJsonConverter extends FlexGridJsonConverter{convert(){let e=super.convert(),t=new Array(this.flex.cells.rows.length),r=this.flex.cells,o=softGrid();for(var l=0,i=r.rows.length;l<i;l++){var s=r.rows[l].dataItem,n=s&&s._rowInfo;n instanceof o.Column||(n=_combineColumns(n,n));t[l]=n}e.rowInfo=this._serializeColumns(t);return e}}class TransposedMultirowJsonConverter extends FlexGridJsonConverter{convert(){let e=super.convert();e.cellGroups=this._serializeCellGroup();e.columnsPerItem=this.flex.columnsPerItem;return e}_serializeCellGroup(){let e=[],t=[],r=this.flex.columnsPerItem,o=this.flex.cells;for(let l=0;l<o.rows.length;l++){t[l]=[];for(let i=0;i<r;i++){let r=this.flex.getBindingColumn(o,l,i),s=e.indexOf(r);t[l][i]=s<0?e.push(r)-1:s}}return{bindingColumns:this._serializeColumns(e),mappings:t}}}class RowJson{constructor(e,t){this.index=t;this.binding=e.binding;this.dataType=e.dataType;this.alignment=e.alignment;this.level=e.level;this.renderHeight=e.renderHeight;this.cells=e.cells;this.wordWrap=e.wordWrap||!1;this.multiLine=e.multiLine||!1;this.errors=e.errors;this._state=e.state}get isAlternatingRow(){return(this._state&RowState.Alternate)!==RowState.None}get isGroupRow(){return(this._state&RowState.Group)!==RowState.None}get isDetailRow(){return(this._state&RowState.Detail)!==RowState.None}get isExpandableGroupRow(){return(this._state&RowState.ExpandableGroup)!==RowState.None}get isNewRow(){return(this._state&RowState.New)!==RowState.None}get isVisible(){return(this._state&RowState.Visible)!==RowState.None}}class ColumnJson{constructor(e,t){this.index=t;this.binding=e.binding;this.dataType=e.dataType;this.aggregate=e.aggregate;this.name=e.name;this.renderWidth=e.renderWidth;this.visibleIndex=e.visibleIndex;this.wordWrap=e.wordWrap||!1;this.multiLine=e.multiLine||!1;this._alignment=e.alignment;this._state=e.state}getAlignment(e){return this._alignment?this._alignment:e&&e.alignment?e.alignment:""}get isVisible(){return(this._state&ColState.Visible)!==ColState.None}}class RowJsonCollection{constructor(e,t=-1){this.maxGroupLevel=t;this.length=e.length;for(let t=0;t<e.length;t++)this[t]=new RowJson(e[t],t)}}class ColumnJsonCollection{constructor(e,t=-1){this.firstVisibleIndex=t;this.length=e.length;for(let t=0;t<e.length;t++){let r=e[t];this[t]=r?new ColumnJson(e[t],t):null}}}class GridJsonPanel{constructor(e){this.height=e.height;this.width=e.width;this.cellType=e.cellType;this.columns=new ColumnJsonCollection(e.columns,e.columnsFirstVisibleIndex);this.rows=new RowJsonCollection(e.rows,e.rowsMaxGroupLevel);this._mergedRanges=this._deserializeMergedRanges(e.mergedRanges)}getCellData(e,t){return this.rows[e].cells[t]}getMergedRange(e,t){let r=this._mergedRanges[e];if(r)for(let e=0,l=r.length;e<l;e++){var o=r[e];if(t>=o.col&&t<=o.col2)return o}return null}_deserializeMergedRanges(e){let t=[];e=e||[];for(let e=0,r=this.rows.length;e<r;e++)t[e]=[];for(let r=0,o=e.length;r<o;r++){let o=e[r],l=new _CellRange(o[0],o[1],o[2],o[3]);for(let e=l.row;e<=l.row2;e++)t[e].push(l)}return t}}class FlexGridJsonAdapter{constructor(e,t){this.settings=t;this.bottomLeftCells=this.deserializePanel(e.bottomLeftCells);this.cells=this.deserializePanel(e.cells);this.columnFooters=this.deserializePanel(e.columnFooters);this.columnHeaders=this.deserializePanel(e.columnHeaders);this.rowHeaders=this.deserializePanel(e.rowHeaders);this.topLeftCells=this.deserializePanel(e.topLeftCells);this.treeIndent=e.treeIndent;this.showColumnFooter=e.showColumnFooter;this.showColumnHeader=e.showColumnHeader;this.showRowHeader=e.showRowHeader;this._selection=[];for(let t=0;t<e.selection.length;t++){let r=e.selection[t];this._selection.push(new _CellRange(r[0],r[1],r[2],r[3]))}}get columns(){return this.cells.columns}get rows(){return this.cells.rows}getSelection(){return this._selection}getCell(e,t,r,o){throw"Not implemented"}getComputedDefBorderColor(){throw"Not implemented"}getComputedStyle(e,t){throw"Not implemented"}getMergedRange(e,t,r){return e.getMergedRange(t,r)}alignMergedTextToTheTopRow(e){return!1}getCellData(e,t,r){return e.getCellData(t,r)}getCellContent(e,t,r,o){return this.getCellData(e,t.index,o)}isBooleanCell(e,t,r){return r.dataType===wijmo_1.DataType.Boolean&&e.cellType===_CellType.Cell&&!this.isExpandableGroupRow(t)}getColumn(e,t,r){return e.columns[r]}isAlternatingRow(e){return e.isAlternatingRow}isGroupRow(e){return e.isGroupRow}isNewRow(e){return e.isNewRow}isDetailRow(e){return e.isDetailRow}isExpandableGroupRow(e){return e.isExpandableGroupRow}isRenderableRow(e){return e.isVisible&&e.renderHeight>0&&!this.isNewRow(e)}isRenderableColumn(e){return e.isVisible&&e.renderWidth>0}getCellStyle(e,t,r){var o=this.settings.styles,l=_merge({},o.cellStyle);switch(e.cellType){case _CellType.Cell:this.isExpandableGroupRow(t)?_merge(l,o.groupCellStyle,!0):this.isAlternatingRow(t)&&_merge(l,o.altCellStyle,!0);break;case _CellType.ColumnHeader:case _CellType.RowHeader:case _CellType.TopLeft:case _CellType.BottomLeft:_merge(l,o.headerCellStyle,!0);break;case _CellType.ColumnFooter:_merge(l,o.headerCellStyle,!0);_merge(l,o.footerCellStyle,!0)}t.errors&&t.errors[r.index]&&_merge(l,o.errorCellStyle,!0);return l}deserializePanel(e){return new GridJsonPanel(e)}}class PivotGridJsonAdapter extends FlexGridJsonAdapter{constructor(e,t){super(e,t);this._centerHeadersVertically=e.centerHeadersVertically}alignMergedTextToTheTopRow(e){return!this._centerHeadersVertically&&(e.cellType===_CellType.ColumnHeader||e.cellType===_CellType.RowHeader)}}class MultiRowJsonPanel extends GridJsonPanel{constructor(e){super(e);e.cellGroups&&(this._cellGroups={bindingColumns:new ColumnJsonCollection(e.cellGroups.bindingColumns),mappings:e.cellGroups.mappings})}getColumn(e,t,r){var o=this.columns[t];if(this._cellGroups){this.cellType!==_CellType.ColumnHeader&&this.cellType!==_CellType.BottomLeft&&(e%=r);return _combineColumns(o,this._cellGroups.bindingColumns[this._cellGroups.mappings[e][t]])}return o}}class MultiRowJsonAdapter extends FlexGridJsonAdapter{constructor(e,t){super(e,t);this._rowsPerItem=e.rowsPerItem}deserializePanel(e){return new MultiRowJsonPanel(e)}getColumn(e,t,r){return e.getColumn(t,r,this._rowsPerItem)}}class TransposedGridJsonAdapter extends FlexGridJsonAdapter{constructor(e,t){super(e,t);this._rowInfo=new ColumnJsonCollection(e.rowInfo)}getColumn(e,t,r){let o=super.getColumn(e,t,r);if(e.cellType!==_CellType.Cell)return o;{let e=this._rowInfo[t];return e?_combineColumns(o,e):o}}}class TransposedMultiRowJsonAdapter extends FlexGridJsonAdapter{constructor(e,t){super(e,t);this._columnsPerItem=e.columnsPerItem;e.cellGroups&&(this._cellGroups={bindingColumns:new ColumnJsonCollection(e.cellGroups.bindingColumns),mappings:e.cellGroups.mappings})}getColumn(e,t,r){let o=super.getColumn(e,t,r);if(this._cellGroups&&e.cellType===_CellType.Cell){r%=this._columnsPerItem;return _combineColumns(o,this._cellGroups.bindingColumns[this._cellGroups.mappings[t][r]])}return o}}wijmo_1._registerModule("wijmo.grid.pdf",selfModule);