@mescius/wijmo.webcomponents.base 5.20232.939 → 5.20241.3-rc
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -100
- package/es2015-commonjs.js +1 -1
- package/es2015-esm.js +1 -1
- package/es5-esm.js +2 -2
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[English](#wijmo) | [日本語](#wijmo-jp) | [
|
1
|
+
[English](#wijmo) | [日本語](#wijmo-jp) | [한국어](#wijmo-kr)
|
2
2
|
|
3
3
|
# Wijmo
|
4
4
|
|
@@ -59,19 +59,19 @@ Sample source code available with our [Wijmo Developer Pack](https://developer.m
|
|
59
59
|
### To install latest release version:
|
60
60
|
|
61
61
|
```sh
|
62
|
-
npm install @
|
62
|
+
npm install @mescius/wijmo.all
|
63
63
|
```
|
64
64
|
|
65
65
|
### To install latest nightly build:
|
66
66
|
|
67
67
|
```sh
|
68
|
-
npm install @
|
68
|
+
npm install @mescius/wijmo.all@nightly
|
69
69
|
```
|
70
70
|
|
71
71
|
### To install latest RC build:
|
72
72
|
|
73
73
|
```sh
|
74
|
-
npm install @
|
74
|
+
npm install @mescius/wijmo.all@rc
|
75
75
|
```
|
76
76
|
|
77
77
|
## Documentation
|
@@ -159,99 +159,6 @@ Submit questions to our team of [Wijmo Experts](https://developer.mescius.com/fo
|
|
159
159
|
- [サポート&サービス](https://developer.mescius.jp/support)
|
160
160
|
- [サブスクリプションサービス利用規約](https://download.mescius.jp/license/other/componentone-subscriptionservice.pdf)
|
161
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
162
|
|
256
163
|
# Wijmo KR
|
257
164
|
|
@@ -302,19 +209,19 @@ Wijmo는 또한 NPM을 지원합니다. 이를 통해 최신 버전의 Wijmo 라
|
|
302
209
|
**[최신 정식 버전]**
|
303
210
|
|
304
211
|
```sh
|
305
|
-
npm install @
|
212
|
+
npm install @mescius/wijmo.all
|
306
213
|
```
|
307
214
|
|
308
215
|
**[Nightly 버전]**
|
309
216
|
|
310
217
|
```sh
|
311
|
-
npm install @
|
218
|
+
npm install @mescius/wijmo.all@nightly
|
312
219
|
```
|
313
220
|
|
314
221
|
**[RC 버전]**
|
315
222
|
|
316
223
|
```sh
|
317
|
-
npm install @
|
224
|
+
npm install @mescius/wijmo.all@rc
|
318
225
|
```
|
319
226
|
|
320
227
|
## 빠른시작 가이드
|
package/es2015-commonjs.js
CHANGED
package/es2015-esm.js
CHANGED
package/es5-esm.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
*
|
3
|
-
* Wijmo Library 5.
|
3
|
+
* Wijmo Library 5.20241.3
|
4
4
|
* https://developer.mescius.com/wijmo
|
5
5
|
*
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
@@ -11,4 +11,4 @@
|
|
11
11
|
*
|
12
12
|
*/
|
13
13
|
|
14
|
-
import{Control,isArray,addClass}from"@mescius/wijmo";import{ControlMetaFactory}from"@mescius/wijmo.meta";!function(){var t=document.createElement("style");t.innerHTML=".wj-web-component {\n display: inline-block;\n }";document.head.insertBefore(t,document.head.firstElementChild)}();var WjComponentBehavior=function(){function WjComponentBehavior(t){this._isMounted=!1;this._mountedCBs=[];this._isDomInitialized=!1;this._initialValues=[];this.component=t;this.isWrapper||(this.control=t)}WjComponentBehavior._attach=function(t){return new this(t)};WjComponentBehavior.register=function(t,e){if(null!=e){var o=!!t;if(this._registered.indexOf(e)<0){this._registered.push(e);window.customElements.define(o?t:"wjc-dummy-"+ ++this._cmpRegId,e)}else if(o)throw"Wijmo WebComponents error: component '"+t+"' is already registered.";if(e.wrappedClass){if(o)for(var _loop_1=function(t){var o=t.propertyName;if(t.isNativeControlProperty){o in HTMLElement.prototype&&console.log("WARNING: Wijmo WebComponent '"+e.name+"' exposes the '"+o+"' property which coinsides with the HTMLElement class member.");Object.defineProperty(e.prototype,o,{get:function(){return this.control[o]},set:function(t){this.control[o]=t},enumerable:!0,configurable:!0})}},n=0,i=this._getMetaData(e).props;n<i.length;n++){_loop_1(i[n])}}else for(var r=Object.getPrototypeOf(e.prototype).constructor;r.prototype!==HTMLElement.prototype&&this._registered.indexOf(r)<0;r=Object.getPrototypeOf(r.prototype).constructor){var a="wjc-dummy-"+ ++this._cmpRegId;this._registered.push(r);window.customElements.define(a,r)}}};WjComponentBehavior.getProps=function(t){this._ensureMetadata(t);return t._props};WjComponentBehavior.ensureNs=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];for(var n=t.split("."),i=window,r=!0,a=0,
|
14
|
+
import{Control,isArray,addClass}from"@mescius/wijmo";import{ControlMetaFactory}from"@mescius/wijmo.meta";!function(){var t=document.createElement("style");t.innerHTML=".wj-web-component {\n display: inline-block;\n }";document.head.insertBefore(t,document.head.firstElementChild)}();var WjComponentBehavior=function(){function WjComponentBehavior(t){this._isMounted=!1;this._mountedCBs=[];this._isDomInitialized=!1;this._initialValues=[];this.component=t;this.isWrapper||(this.control=t)}WjComponentBehavior._attach=function(t){return new this(t)};WjComponentBehavior.register=function(t,e){if(null!=e){var o=!!t;if(this._registered.indexOf(e)<0){this._registered.push(e);window.customElements.define(o?t:"wjc-dummy-"+ ++this._cmpRegId,e)}else if(o)throw"Wijmo WebComponents error: component '"+t+"' is already registered.";if(e.wrappedClass){if(o)for(var _loop_1=function(t){var o=t.propertyName;if(t.isNativeControlProperty){o in HTMLElement.prototype&&console.log("WARNING: Wijmo WebComponent '"+e.name+"' exposes the '"+o+"' property which coinsides with the HTMLElement class member.");Object.defineProperty(e.prototype,o,{get:function(){return this.control[o]},set:function(t){this.control[o]=t},enumerable:!0,configurable:!0})}},n=0,i=this._getMetaData(e).props;n<i.length;n++){_loop_1(i[n])}}else for(var r=Object.getPrototypeOf(e.prototype).constructor;r.prototype!==HTMLElement.prototype&&this._registered.indexOf(r)<0;r=Object.getPrototypeOf(r.prototype).constructor){var a="wjc-dummy-"+ ++this._cmpRegId;this._registered.push(r);window.customElements.define(a,r)}}};WjComponentBehavior.getProps=function(t){this._ensureMetadata(t);return t._props};WjComponentBehavior.ensureNs=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];for(var n=t.split("."),i=window,r=!0,a=0,s=n;a<s.length;a++){var p=s[a],h=i[p];if(!h){h=i[p]={};r=!1}i=h}if(e)for(var l=0,m=e;l<m.length;l++){var c=m[l];if(c&&!i[c]){i[c]=null;r=!1}}return r};Object.defineProperty(WjComponentBehavior.prototype,"isWrapper",{get:function(){return null!=this.component.constructor.wrappedClass},enumerable:!0,configurable:!0});WjComponentBehavior.prototype.lhConnected=function(){this.parentComponent=this.component.parentElement;this._prepareControl();this._isChild()&&this._initParent()};WjComponentBehavior.prototype.lhDisconnected=function(){var t=this.control;if(t&&this._isChild()){var e=this._getParentProp();if(e){var o=this.parentComponent[e];if(isArray(o)){var n=o.indexOf(t);n>-1&&o.splice(n,1)}}}this.parentComponent=null};WjComponentBehavior.prototype.lhAttributeChanged=function(t,e,o){this._onAttributeChanged(t,e,o)};WjComponentBehavior.prototype._initParent=function(){this._callCmpMethod(WjComponentBehavior._beforeInitParent);var t=this._getParentProp();if(t){var e=this.parentComponent.control,o=e[t];if(isArray(o)){var n=this._getSiblingIndex();(n<0||n>=o.length)&&(n=o.length);o.splice(n,0,this.control)}else e[t]=this.control}this._callCmpMethod(WjComponentBehavior._afterInitParent)};WjComponentBehavior.prototype._prepareControl=function(){if(!this._isDomInitialized){var t=this.component.constructor,e=this.component,o=this.control=t.wrappedClass?this._createControl():e;e.control=o;addClass(e,"wj-web-component");if(e instanceof Control&&o.hostElement!==e){var n=o.hostElement;n.style.height="100%";n.style.width="100%"}this._isChild()&&(e.style.display="none");this._initDom();if(!this._siblingId){null==t.siblingId&&(t.siblingId=++WjComponentBehavior._siblingDirId+"");this._siblingId=t.siblingId}e.setAttribute(WjComponentBehavior._typeSiblingIdAttr,this._siblingId);this._flushInitialValues();this._initEvents()}};WjComponentBehavior.prototype._initDom=function(){if(!this._isDomInitialized){this._isDomInitialized=!0;var t=this.control,e=this.component;t instanceof Control&&t.hostElement!==e&&e.appendChild(t.hostElement)}};WjComponentBehavior.prototype._createControl=function(){var t=this._isChild()?this._isParentInCtor()?this.parentComponent.control:void 0:this._getElement();return new(WjComponentBehavior._getControlType(this.component.constructor))(t)};WjComponentBehavior.prototype._initEvents=function(){var t=this,e=WjComponentBehavior._getMetaData(this.component.constructor);if(e)for(var o=0,n=e.events;o<n.length;o++){!function(e){t.control[e.eventName].addHandler((function(o,n){t.component.dispatchEvent(new CustomEvent(WjComponentBehavior.toDash(e.eventName),{detail:n}))}))}(n[o])}};WjComponentBehavior.prototype._onAttributeChanged=function(t,e,o){var n=this.control;if(e!=o)if(n){this._initialValues&&this._flushInitialValues();var i=WjComponentBehavior,r=i._getPropsMetaData(this.component.constructor),a=t,s=i.toCamelCase(t),p=r[a];null!=p&&(o=p.castValueToType(o));n[s]!==o&&(n[s]=o)}else this._initialValues&&this._initialValues.push({name:t,oldValue:e,newValue:o})};WjComponentBehavior.prototype._flushInitialValues=function(){var t=this._initialValues;if(t){this._initialValues=null;for(var e=0,o=t;e<o.length;e++){var n=o[e];this._onAttributeChanged(n.name,n.oldValue,n.newValue)}}};WjComponentBehavior.prototype._isChild=function(){var t=this.component.constructor;return null!=t.parentProp||null!=t.parentInCtor};WjComponentBehavior.prototype._isParentInCtor=function(){return!0===this.component.constructor.parentInCtor};WjComponentBehavior.prototype._getParentProp=function(){return this.component.getAttribute("wj-property")||this.component.constructor.parentProp};WjComponentBehavior.prototype._getSiblingIndex=function(){var t=this._getElement(),e=t.parentElement;if(!e)return-1;for(var o=e.childNodes,n=-1,i=this._siblingId,r=0;r<o.length;r++){var a=o[r];if(1==a.nodeType&&a.getAttribute(WjComponentBehavior._typeSiblingIdAttr)==i){++n;if(a===t)return n}}return-1};WjComponentBehavior.prototype._getElement=function(){return this.component};WjComponentBehavior._getControlType=function(t){return t.wrappedClass?t.wrappedClass():Object.getPrototypeOf(t.prototype).constructor};WjComponentBehavior._getMetaDataId=function(t){return this._getControlType(t)};WjComponentBehavior._getMetaData=function(t){this._ensureMetadata(t);return t._meta};WjComponentBehavior._getPropsMetaData=function(t){this._ensureMetadata(t);return t._propsMeta};WjComponentBehavior._ensureMetadata=function(t){if(!t._meta){var e=this._getMetaDataId(t);if(e){var o=t._meta=ControlMetaFactory.getMetaData(e);o.prepare();for(var n=t._propsMeta={},i=o.props,r=t._props=[],a=0,s=i;a<s.length;a++){var p=s[a],h=WjComponentBehavior.toDash(p.propertyName);n[h]=p;r.push(h)}}}};WjComponentBehavior.prototype._callCmpMethod=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];var n=this.component,i=n[t];"function"==typeof i&&i.apply(n,e)};WjComponentBehavior.toCamelCase=function(t){return ControlMetaFactory.toCamelCase(t)};WjComponentBehavior.toDash=function(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t[0].toLowerCase()}))};WjComponentBehavior._typeSiblingIdAttr="_wjSiblingId";WjComponentBehavior._behClassProp="_wjBehCl";WjComponentBehavior._behProp="_wjBehaviour";WjComponentBehavior._beforeInitParent="_beforeInitParent";WjComponentBehavior._afterInitParent="_afterInitParent";WjComponentBehavior._siblingDirId=0;WjComponentBehavior._cmpRegId=0;WjComponentBehavior._registered=[];return WjComponentBehavior}();export{WjComponentBehavior};
|
package/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
*
|
3
|
-
* Wijmo Library 5.
|
3
|
+
* Wijmo Library 5.20241.3
|
4
4
|
* https://developer.mescius.com/wijmo
|
5
5
|
*
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
@@ -10,7 +10,7 @@
|
|
10
10
|
* https://developer.mescius.com/wijmo/licensing
|
11
11
|
*
|
12
12
|
*/
|
13
|
-
import { PropDescBase } from '@
|
13
|
+
import { PropDescBase } from '@mescius/wijmo.meta';
|
14
14
|
export interface IPropsMeta {
|
15
15
|
[name: string]: PropDescBase;
|
16
16
|
}
|
package/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
*
|
3
|
-
* Wijmo Library 5.
|
3
|
+
* Wijmo Library 5.20241.3
|
4
4
|
* https://developer.mescius.com/wijmo
|
5
5
|
*
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
@@ -11,4 +11,4 @@
|
|
11
11
|
*
|
12
12
|
*/
|
13
13
|
|
14
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@mescius/wijmo"),wijmo_meta_1=require("@mescius/wijmo.meta");!function(){var t=document.createElement("style");t.innerHTML=".wj-web-component {\n display: inline-block;\n }";document.head.insertBefore(t,document.head.firstElementChild)}();var WjComponentBehavior=function(){function WjComponentBehavior(t){this._isMounted=!1;this._mountedCBs=[];this._isDomInitialized=!1;this._initialValues=[];this.component=t;this.isWrapper||(this.control=t)}WjComponentBehavior._attach=function(t){return new this(t)};WjComponentBehavior.register=function(t,e){if(null!=e){var o=!!t;if(this._registered.indexOf(e)<0){this._registered.push(e);window.customElements.define(o?t:"wjc-dummy-"+ ++this._cmpRegId,e)}else if(o)throw"Wijmo WebComponents error: component '"+t+"' is already registered.";if(e.wrappedClass){if(o)for(var _loop_1=function(t){var o=t.propertyName;if(t.isNativeControlProperty){o in HTMLElement.prototype&&console.log("WARNING: Wijmo WebComponent '"+e.name+"' exposes the '"+o+"' property which coinsides with the HTMLElement class member.");Object.defineProperty(e.prototype,o,{get:function(){return this.control[o]},set:function(t){this.control[o]=t},enumerable:!0,configurable:!0})}},n=0,i=this._getMetaData(e).props;n<i.length;n++){_loop_1(i[n])}}else for(var r=Object.getPrototypeOf(e.prototype).constructor;r.prototype!==HTMLElement.prototype&&this._registered.indexOf(r)<0;r=Object.getPrototypeOf(r.prototype).constructor){var a="wjc-dummy-"+ ++this._cmpRegId;this._registered.push(r);window.customElements.define(a,r)}}};WjComponentBehavior.getProps=function(t){this._ensureMetadata(t);return t._props};WjComponentBehavior.ensureNs=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];for(var n=t.split("."),i=window,r=!0,a=0,
|
14
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var wijmo_1=require("@mescius/wijmo"),wijmo_meta_1=require("@mescius/wijmo.meta");!function(){var t=document.createElement("style");t.innerHTML=".wj-web-component {\n display: inline-block;\n }";document.head.insertBefore(t,document.head.firstElementChild)}();var WjComponentBehavior=function(){function WjComponentBehavior(t){this._isMounted=!1;this._mountedCBs=[];this._isDomInitialized=!1;this._initialValues=[];this.component=t;this.isWrapper||(this.control=t)}WjComponentBehavior._attach=function(t){return new this(t)};WjComponentBehavior.register=function(t,e){if(null!=e){var o=!!t;if(this._registered.indexOf(e)<0){this._registered.push(e);window.customElements.define(o?t:"wjc-dummy-"+ ++this._cmpRegId,e)}else if(o)throw"Wijmo WebComponents error: component '"+t+"' is already registered.";if(e.wrappedClass){if(o)for(var _loop_1=function(t){var o=t.propertyName;if(t.isNativeControlProperty){o in HTMLElement.prototype&&console.log("WARNING: Wijmo WebComponent '"+e.name+"' exposes the '"+o+"' property which coinsides with the HTMLElement class member.");Object.defineProperty(e.prototype,o,{get:function(){return this.control[o]},set:function(t){this.control[o]=t},enumerable:!0,configurable:!0})}},n=0,i=this._getMetaData(e).props;n<i.length;n++){_loop_1(i[n])}}else for(var r=Object.getPrototypeOf(e.prototype).constructor;r.prototype!==HTMLElement.prototype&&this._registered.indexOf(r)<0;r=Object.getPrototypeOf(r.prototype).constructor){var a="wjc-dummy-"+ ++this._cmpRegId;this._registered.push(r);window.customElements.define(a,r)}}};WjComponentBehavior.getProps=function(t){this._ensureMetadata(t);return t._props};WjComponentBehavior.ensureNs=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];for(var n=t.split("."),i=window,r=!0,a=0,s=n;a<s.length;a++){var p=s[a],h=i[p];if(!h){h=i[p]={};r=!1}i=h}if(e)for(var l=0,m=e;l<m.length;l++){var c=m[l];if(c&&!i[c]){i[c]=null;r=!1}}return r};Object.defineProperty(WjComponentBehavior.prototype,"isWrapper",{get:function(){return null!=this.component.constructor.wrappedClass},enumerable:!0,configurable:!0});WjComponentBehavior.prototype.lhConnected=function(){this.parentComponent=this.component.parentElement;this._prepareControl();this._isChild()&&this._initParent()};WjComponentBehavior.prototype.lhDisconnected=function(){var t=this.control;if(t)if(this._isChild()){var e=this._getParentProp();if(e){var o=this.parentComponent[e];if(wijmo_1.isArray(o)){var n=o.indexOf(t);n>-1&&o.splice(n,1)}}}else wijmo_1.Control;this.parentComponent=null};WjComponentBehavior.prototype.lhAttributeChanged=function(t,e,o){this._onAttributeChanged(t,e,o)};WjComponentBehavior.prototype._initParent=function(){this._callCmpMethod(WjComponentBehavior._beforeInitParent);var t=this._getParentProp();if(t){var e=this.parentComponent.control,o=e[t];if(wijmo_1.isArray(o)){var n=this._getSiblingIndex();(n<0||n>=o.length)&&(n=o.length);o.splice(n,0,this.control)}else e[t]=this.control}this._callCmpMethod(WjComponentBehavior._afterInitParent)};WjComponentBehavior.prototype._prepareControl=function(){if(!this._isDomInitialized){var t=this.component.constructor,e=this.component,o=this.control=t.wrappedClass?this._createControl():e;e.control=o;wijmo_1.addClass(e,"wj-web-component");if(e instanceof wijmo_1.Control&&o.hostElement!==e){var n=o.hostElement;n.style.height="100%";n.style.width="100%"}this._isChild()&&(e.style.display="none");this._initDom();if(!this._siblingId){null==t.siblingId&&(t.siblingId=++WjComponentBehavior._siblingDirId+"");this._siblingId=t.siblingId}e.setAttribute(WjComponentBehavior._typeSiblingIdAttr,this._siblingId);this._flushInitialValues();this._initEvents()}};WjComponentBehavior.prototype._initDom=function(){if(!this._isDomInitialized){this._isDomInitialized=!0;var t=this.control,e=this.component;t instanceof wijmo_1.Control&&t.hostElement!==e&&e.appendChild(t.hostElement)}};WjComponentBehavior.prototype._createControl=function(){var t=this._isChild()?this._isParentInCtor()?this.parentComponent.control:void 0:this._getElement();return new(WjComponentBehavior._getControlType(this.component.constructor))(t)};WjComponentBehavior.prototype._initEvents=function(){var t=this,e=WjComponentBehavior._getMetaData(this.component.constructor);if(e)for(var o=0,n=e.events;o<n.length;o++){!function(e){t.control[e.eventName].addHandler((function(o,n){t.component.dispatchEvent(new CustomEvent(WjComponentBehavior.toDash(e.eventName),{detail:n}))}))}(n[o])}};WjComponentBehavior.prototype._onAttributeChanged=function(t,e,o){var n=this.control;if(e!=o)if(n){this._initialValues&&this._flushInitialValues();var i=WjComponentBehavior,r=i._getPropsMetaData(this.component.constructor),a=t,s=i.toCamelCase(t),p=r[a];null!=p&&(o=p.castValueToType(o));n[s]!==o&&(n[s]=o)}else this._initialValues&&this._initialValues.push({name:t,oldValue:e,newValue:o})};WjComponentBehavior.prototype._flushInitialValues=function(){var t=this._initialValues;if(t){this._initialValues=null;for(var e=0,o=t;e<o.length;e++){var n=o[e];this._onAttributeChanged(n.name,n.oldValue,n.newValue)}}};WjComponentBehavior.prototype._isChild=function(){var t=this.component.constructor;return null!=t.parentProp||null!=t.parentInCtor};WjComponentBehavior.prototype._isParentInCtor=function(){return!0===this.component.constructor.parentInCtor};WjComponentBehavior.prototype._getParentProp=function(){return this.component.getAttribute("wj-property")||this.component.constructor.parentProp};WjComponentBehavior.prototype._getSiblingIndex=function(){var t=this._getElement(),e=t.parentElement;if(!e)return-1;for(var o=e.childNodes,n=-1,i=this._siblingId,r=0;r<o.length;r++){var a=o[r];if(1==a.nodeType&&a.getAttribute(WjComponentBehavior._typeSiblingIdAttr)==i){++n;if(a===t)return n}}return-1};WjComponentBehavior.prototype._getElement=function(){return this.component};WjComponentBehavior._getControlType=function(t){return t.wrappedClass?t.wrappedClass():Object.getPrototypeOf(t.prototype).constructor};WjComponentBehavior._getMetaDataId=function(t){return this._getControlType(t)};WjComponentBehavior._getMetaData=function(t){this._ensureMetadata(t);return t._meta};WjComponentBehavior._getPropsMetaData=function(t){this._ensureMetadata(t);return t._propsMeta};WjComponentBehavior._ensureMetadata=function(t){if(!t._meta){var e=this._getMetaDataId(t);if(e){var o=t._meta=wijmo_meta_1.ControlMetaFactory.getMetaData(e);o.prepare();for(var n=t._propsMeta={},i=o.props,r=t._props=[],a=0,s=i;a<s.length;a++){var p=s[a],h=WjComponentBehavior.toDash(p.propertyName);n[h]=p;r.push(h)}}}};WjComponentBehavior.prototype._callCmpMethod=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];var n=this.component,i=n[t];"function"==typeof i&&i.apply(n,e)};WjComponentBehavior.toCamelCase=function(t){return wijmo_meta_1.ControlMetaFactory.toCamelCase(t)};WjComponentBehavior.toDash=function(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t[0].toLowerCase()}))};WjComponentBehavior._typeSiblingIdAttr="_wjSiblingId";WjComponentBehavior._behClassProp="_wjBehCl";WjComponentBehavior._behProp="_wjBehaviour";WjComponentBehavior._beforeInitParent="_beforeInitParent";WjComponentBehavior._afterInitParent="_afterInitParent";WjComponentBehavior._siblingDirId=0;WjComponentBehavior._cmpRegId=0;WjComponentBehavior._registered=[];return WjComponentBehavior}();exports.WjComponentBehavior=WjComponentBehavior;
|
package/package.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mescius/wijmo.webcomponents.base",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.20241.3-rc",
|
4
4
|
"description": "UI library for pure JS, Angular, React, Vue and more...",
|
5
5
|
"author": "MESCIUS inc",
|
6
6
|
"license": "Commercial",
|
7
7
|
"main": "./index.js",
|
8
8
|
"types": "./index.d.ts",
|
9
9
|
"dependencies": {
|
10
|
-
"@mescius/wijmo": "5.
|
11
|
-
"@mescius/wijmo.meta": "5.
|
10
|
+
"@mescius/wijmo": "5.20241.3-rc",
|
11
|
+
"@mescius/wijmo.meta": "5.20241.3-rc"
|
12
12
|
},
|
13
13
|
"homepage": "https://developer.mescius.com/wijmo",
|
14
14
|
"bugs": {
|