@eclipse-scout/svg 22.0.39 → 23.1.0-beta.4
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/package.json +13 -10
- package/src/main/js/index.ts +22 -0
- package/src/main/js/svg/{SvgField.js → SvgField.ts} +15 -17
- package/src/main/js/svg/SvgFieldAdapter.ts +30 -0
- package/src/main/js/svg/SvgFieldEventMap.ts +20 -0
- package/src/main/js/svg/SvgFieldModel.ts +15 -0
- package/target/dist/d.ts/index.d.ts +7 -0
- package/target/dist/d.ts/index.d.ts.map +1 -0
- package/target/dist/d.ts/svg/SvgField.d.ts +14 -0
- package/target/dist/d.ts/svg/SvgField.d.ts.map +1 -0
- package/target/dist/d.ts/svg/SvgFieldAdapter.d.ts +8 -0
- package/target/dist/d.ts/svg/SvgFieldAdapter.d.ts.map +1 -0
- package/target/dist/d.ts/svg/SvgFieldEventMap.d.ts +9 -0
- package/target/dist/d.ts/svg/SvgFieldEventMap.d.ts.map +1 -0
- package/target/dist/d.ts/svg/SvgFieldModel.d.ts +5 -0
- package/target/dist/d.ts/svg/SvgFieldModel.d.ts.map +1 -0
- package/target/dist/dev/eclipse-scout-svg.js +276 -0
- package/target/dist/dev/eclipse-scout-svg.js.map +1 -0
- package/target/dist/prod/eclipse-scout-svg-91e2d79d7c56c352ec4e.min.js +3 -0
- package/target/dist/prod/eclipse-scout-svg-91e2d79d7c56c352ec4e.min.js.map +1 -0
- package/src/main/js/index.js +0 -17
- package/src/main/js/svg/SvgFieldAdapter.js +0 -32
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-scout/svg",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.1.0-beta.4",
|
|
4
4
|
"description": "Eclipse Scout",
|
|
5
5
|
"author": "BSI Business Systems Integration AG",
|
|
6
6
|
"homepage": "https://www.eclipse.org/scout",
|
|
@@ -10,20 +10,22 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "EPL-1.0",
|
|
12
12
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
14
|
-
"npm": ">=
|
|
15
|
-
"pnpm": ">=
|
|
13
|
+
"node": ">=18.12.1",
|
|
14
|
+
"npm": ">=9.1.1",
|
|
15
|
+
"pnpm": ">=7.16.0"
|
|
16
16
|
},
|
|
17
|
-
"main": "./
|
|
17
|
+
"main": "./target/dist/dev/eclipse-scout-svg.js",
|
|
18
18
|
"files": [
|
|
19
|
-
"src/main/js"
|
|
19
|
+
"src/main/js",
|
|
20
|
+
"target/dist"
|
|
20
21
|
],
|
|
21
22
|
"devDependencies": {
|
|
22
|
-
"@eclipse-scout/cli": "
|
|
23
|
-
"@eclipse-scout/releng": "^22.0.0"
|
|
23
|
+
"@eclipse-scout/cli": "23.1.0-beta.4",
|
|
24
|
+
"@eclipse-scout/releng": "^22.0.0",
|
|
25
|
+
"@eclipse-scout/migrate": "23.1.0-beta.4"
|
|
24
26
|
},
|
|
25
27
|
"dependencies": {
|
|
26
|
-
"@eclipse-scout/core": "
|
|
28
|
+
"@eclipse-scout/core": "23.1.0-beta.4",
|
|
27
29
|
"jquery": "3.6.0"
|
|
28
30
|
},
|
|
29
31
|
"scripts": {
|
|
@@ -36,5 +38,6 @@
|
|
|
36
38
|
"version:snapshot": "releng-scripts version:snapshot",
|
|
37
39
|
"version:release:dependencies": "releng-scripts version:release:dependencies",
|
|
38
40
|
"version:release": "releng-scripts version:release"
|
|
39
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"types": "./target/dist/d.ts/index.d.ts"
|
|
40
43
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
|
+
* All rights reserved. This program and the accompanying materials
|
|
4
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
+
* which accompanies this distribution, and is available at
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
|
+
*
|
|
8
|
+
* Contributors:
|
|
9
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
+
*/
|
|
11
|
+
import {ObjectFactory} from '@eclipse-scout/core';
|
|
12
|
+
|
|
13
|
+
export * from './svg/SvgField';
|
|
14
|
+
export * from './svg/SvgFieldModel';
|
|
15
|
+
export * from './svg/SvgFieldEventMap';
|
|
16
|
+
export * from './svg/SvgFieldAdapter';
|
|
17
|
+
|
|
18
|
+
import * as self from './index';
|
|
19
|
+
|
|
20
|
+
export default self;
|
|
21
|
+
|
|
22
|
+
ObjectFactory.get().registerNamespace('scout', self);
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {AppLinkKeyStroke,
|
|
11
|
+
import {AppLinkKeyStroke, FormField} from '@eclipse-scout/core';
|
|
12
12
|
import $ from 'jquery';
|
|
13
|
+
import {SvgFieldEventMap, SvgFieldModel} from '../index';
|
|
13
14
|
|
|
14
|
-
export
|
|
15
|
+
export class SvgField extends FormField implements SvgFieldModel {
|
|
16
|
+
declare model: SvgFieldModel;
|
|
17
|
+
declare eventMap: SvgFieldEventMap;
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
super();
|
|
18
|
-
}
|
|
19
|
+
svgDocument: string;
|
|
19
20
|
|
|
20
|
-
_render() {
|
|
21
|
+
protected override _render() {
|
|
21
22
|
this.addContainer(this.$parent, 'svg-field');
|
|
22
23
|
this.addLabel();
|
|
23
24
|
this.addField(this.$parent.makeDiv());
|
|
@@ -25,20 +26,17 @@ export default class SvgField extends ValueField {
|
|
|
25
26
|
this.addStatus();
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
_renderProperties() {
|
|
29
|
+
protected override _renderProperties() {
|
|
29
30
|
super._renderProperties();
|
|
30
31
|
this._renderSvgDocument();
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
* @override FormField.js
|
|
35
|
-
*/
|
|
36
|
-
_initKeyStrokeContext() {
|
|
34
|
+
protected override _initKeyStrokeContext() {
|
|
37
35
|
super._initKeyStrokeContext();
|
|
38
36
|
this.keyStrokeContext.registerKeyStroke(new AppLinkKeyStroke(this, this._onAppLinkAction));
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
_renderSvgDocument() {
|
|
39
|
+
protected _renderSvgDocument() {
|
|
42
40
|
if (!this.svgDocument) {
|
|
43
41
|
this.$field.empty();
|
|
44
42
|
return;
|
|
@@ -50,14 +48,14 @@ export default class SvgField extends ValueField {
|
|
|
50
48
|
.unfocusable();
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
_onAppLinkAction(event) {
|
|
51
|
+
protected _onAppLinkAction(event: JQuery.KeyboardEventBase | JQuery.ClickEvent) {
|
|
54
52
|
let $target = $(event.delegateTarget);
|
|
55
|
-
let ref = $target.data('ref');
|
|
53
|
+
let ref = $target.data('ref') as string;
|
|
56
54
|
this._triggerAppLinkAction(ref);
|
|
57
55
|
event.preventDefault();
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
_triggerAppLinkAction(ref) {
|
|
58
|
+
protected _triggerAppLinkAction(ref: string) {
|
|
61
59
|
this.trigger('appLinkAction', {
|
|
62
60
|
ref: ref
|
|
63
61
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
|
+
* All rights reserved. This program and the accompanying materials
|
|
4
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
+
* which accompanies this distribution, and is available at
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
|
+
*
|
|
8
|
+
* Contributors:
|
|
9
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
+
*/
|
|
11
|
+
import {Event, FormFieldAdapter} from '@eclipse-scout/core';
|
|
12
|
+
import {SvgFieldAppLinkActionEvent} from './SvgFieldEventMap';
|
|
13
|
+
import {SvgField} from '../index';
|
|
14
|
+
|
|
15
|
+
export class SvgFieldAdapter extends FormFieldAdapter {
|
|
16
|
+
|
|
17
|
+
protected _onWidgetAppLinkAction(event: SvgFieldAppLinkActionEvent) {
|
|
18
|
+
this._send('appLinkAction', {
|
|
19
|
+
ref: event.ref
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
protected override _onWidgetEvent(event: Event<SvgField>) {
|
|
24
|
+
if (event.type === 'appLinkAction') {
|
|
25
|
+
this._onWidgetAppLinkAction(event as SvgFieldAppLinkActionEvent);
|
|
26
|
+
} else {
|
|
27
|
+
super._onWidgetEvent(event);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
|
+
* All rights reserved. This program and the accompanying materials
|
|
4
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
+
* which accompanies this distribution, and is available at
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
|
+
*
|
|
8
|
+
* Contributors:
|
|
9
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
+
*/
|
|
11
|
+
import {Event, FormFieldEventMap} from '@eclipse-scout/core';
|
|
12
|
+
import {SvgField} from '../index';
|
|
13
|
+
|
|
14
|
+
export interface SvgFieldAppLinkActionEvent<T = SvgField> extends Event<T> {
|
|
15
|
+
ref: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SvgFieldEventMap extends FormFieldEventMap {
|
|
19
|
+
'appLinkAction': SvgFieldAppLinkActionEvent;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
|
+
* All rights reserved. This program and the accompanying materials
|
|
4
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
+
* which accompanies this distribution, and is available at
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
|
+
*
|
|
8
|
+
* Contributors:
|
|
9
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
+
*/
|
|
11
|
+
import {FormFieldModel} from '@eclipse-scout/core';
|
|
12
|
+
|
|
13
|
+
export interface SvgFieldModel extends FormFieldModel {
|
|
14
|
+
svgDocument?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/js/index.ts"],"names":[],"mappings":"AAYA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AAEtC,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormField } from '@eclipse-scout/core';
|
|
2
|
+
import { SvgFieldEventMap, SvgFieldModel } from '../index';
|
|
3
|
+
export declare class SvgField extends FormField implements SvgFieldModel {
|
|
4
|
+
model: SvgFieldModel;
|
|
5
|
+
eventMap: SvgFieldEventMap;
|
|
6
|
+
svgDocument: string;
|
|
7
|
+
protected _render(): void;
|
|
8
|
+
protected _renderProperties(): void;
|
|
9
|
+
protected _initKeyStrokeContext(): void;
|
|
10
|
+
protected _renderSvgDocument(): void;
|
|
11
|
+
protected _onAppLinkAction(event: JQuery.KeyboardEventBase | JQuery.ClickEvent): void;
|
|
12
|
+
protected _triggerAppLinkAction(ref: string): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=SvgField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgField.d.ts","sourceRoot":"","sources":["../../../../src/main/js/svg/SvgField.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AAEzD,qBAAa,QAAS,SAAQ,SAAU,YAAW,aAAa;IACtD,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;IAEnC,WAAW,EAAE,MAAM,CAAC;cAED,OAAO;cAQP,iBAAiB;cAKjB,qBAAqB;IAKxC,SAAS,CAAC,kBAAkB;IAY5B,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,UAAU;IAO9E,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,MAAM;CAK5C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Event, FormFieldAdapter } from '@eclipse-scout/core';
|
|
2
|
+
import { SvgFieldAppLinkActionEvent } from './SvgFieldEventMap';
|
|
3
|
+
import { SvgField } from '../index';
|
|
4
|
+
export declare class SvgFieldAdapter extends FormFieldAdapter {
|
|
5
|
+
protected _onWidgetAppLinkAction(event: SvgFieldAppLinkActionEvent): void;
|
|
6
|
+
protected _onWidgetEvent(event: Event<SvgField>): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=SvgFieldAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgFieldAdapter.d.ts","sourceRoot":"","sources":["../../../../src/main/js/svg/SvgFieldAdapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAElC,qBAAa,eAAgB,SAAQ,gBAAgB;IAEnD,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,0BAA0B;cAM/C,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC;CAOzD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Event, FormFieldEventMap } from '@eclipse-scout/core';
|
|
2
|
+
import { SvgField } from '../index';
|
|
3
|
+
export interface SvgFieldAppLinkActionEvent<T = SvgField> extends Event<T> {
|
|
4
|
+
ref: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SvgFieldEventMap extends FormFieldEventMap {
|
|
7
|
+
'appLinkAction': SvgFieldAppLinkActionEvent;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SvgFieldEventMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgFieldEventMap.d.ts","sourceRoot":"","sources":["../../../../src/main/js/svg/SvgFieldEventMap.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,KAAK,EAAE,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAC,QAAQ,EAAC,MAAM,UAAU,CAAC;AAElC,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,QAAQ,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACxE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,eAAe,EAAE,0BAA0B,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgFieldModel.d.ts","sourceRoot":"","sources":["../../../../src/main/js/svg/SvgFieldModel.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__eclipse_scout_core_ec9759ad__ from "@eclipse-scout/core";
|
|
2
|
+
/******/ var __webpack_modules__ = ({
|
|
3
|
+
|
|
4
|
+
/***/ "./src/main/js/index.ts":
|
|
5
|
+
/*!******************************!*\
|
|
6
|
+
!*** ./src/main/js/index.ts ***!
|
|
7
|
+
\******************************/
|
|
8
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9
|
+
|
|
10
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
/* harmony export */ "SvgField": () => (/* reexport safe */ _svg_SvgField__WEBPACK_IMPORTED_MODULE_1__.SvgField),
|
|
13
|
+
/* harmony export */ "SvgFieldAdapter": () => (/* reexport safe */ _svg_SvgFieldAdapter__WEBPACK_IMPORTED_MODULE_4__.SvgFieldAdapter),
|
|
14
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15
|
+
/* harmony export */ });
|
|
16
|
+
/* harmony import */ var _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @eclipse-scout/core */ "@eclipse-scout/core");
|
|
17
|
+
/* harmony import */ var _svg_SvgField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svg/SvgField */ "./src/main/js/svg/SvgField.ts");
|
|
18
|
+
/* harmony import */ var _svg_SvgFieldModel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./svg/SvgFieldModel */ "./src/main/js/svg/SvgFieldModel.ts");
|
|
19
|
+
/* harmony import */ var _svg_SvgFieldEventMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./svg/SvgFieldEventMap */ "./src/main/js/svg/SvgFieldEventMap.ts");
|
|
20
|
+
/* harmony import */ var _svg_SvgFieldAdapter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./svg/SvgFieldAdapter */ "./src/main/js/svg/SvgFieldAdapter.ts");
|
|
21
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index */ "./src/main/js/index.ts");
|
|
22
|
+
/*
|
|
23
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
24
|
+
* All rights reserved. This program and the accompanying materials
|
|
25
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
26
|
+
* which accompanies this distribution, and is available at
|
|
27
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
28
|
+
*
|
|
29
|
+
* Contributors:
|
|
30
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_index__WEBPACK_IMPORTED_MODULE_5__);
|
|
39
|
+
_eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__.ObjectFactory.get().registerNamespace('scout', _index__WEBPACK_IMPORTED_MODULE_5__);
|
|
40
|
+
|
|
41
|
+
/***/ }),
|
|
42
|
+
|
|
43
|
+
/***/ "./src/main/js/svg/SvgField.ts":
|
|
44
|
+
/*!*************************************!*\
|
|
45
|
+
!*** ./src/main/js/svg/SvgField.ts ***!
|
|
46
|
+
\*************************************/
|
|
47
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
48
|
+
|
|
49
|
+
__webpack_require__.r(__webpack_exports__);
|
|
50
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
51
|
+
/* harmony export */ "SvgField": () => (/* binding */ SvgField)
|
|
52
|
+
/* harmony export */ });
|
|
53
|
+
/* harmony import */ var _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @eclipse-scout/core */ "@eclipse-scout/core");
|
|
54
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jquery */ "jquery");
|
|
55
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_1__);
|
|
56
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
57
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
58
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
59
|
+
/*
|
|
60
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
61
|
+
* All rights reserved. This program and the accompanying materials
|
|
62
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
63
|
+
* which accompanies this distribution, and is available at
|
|
64
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
65
|
+
*
|
|
66
|
+
* Contributors:
|
|
67
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class SvgField extends _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__.FormField {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
_defineProperty(this, "svgDocument", void 0);
|
|
75
|
+
}
|
|
76
|
+
_render() {
|
|
77
|
+
this.addContainer(this.$parent, 'svg-field');
|
|
78
|
+
this.addLabel();
|
|
79
|
+
this.addField(this.$parent.makeDiv());
|
|
80
|
+
this.addMandatoryIndicator();
|
|
81
|
+
this.addStatus();
|
|
82
|
+
}
|
|
83
|
+
_renderProperties() {
|
|
84
|
+
super._renderProperties();
|
|
85
|
+
this._renderSvgDocument();
|
|
86
|
+
}
|
|
87
|
+
_initKeyStrokeContext() {
|
|
88
|
+
super._initKeyStrokeContext();
|
|
89
|
+
this.keyStrokeContext.registerKeyStroke(new _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__.AppLinkKeyStroke(this, this._onAppLinkAction));
|
|
90
|
+
}
|
|
91
|
+
_renderSvgDocument() {
|
|
92
|
+
if (!this.svgDocument) {
|
|
93
|
+
this.$field.empty();
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.$field.html(this.svgDocument);
|
|
97
|
+
this.$field.find('.app-link').on('click', this._onAppLinkAction.bind(this)).attr('tabindex', '0').unfocusable();
|
|
98
|
+
}
|
|
99
|
+
_onAppLinkAction(event) {
|
|
100
|
+
let $target = jquery__WEBPACK_IMPORTED_MODULE_1___default()(event.delegateTarget);
|
|
101
|
+
let ref = $target.data('ref');
|
|
102
|
+
this._triggerAppLinkAction(ref);
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
}
|
|
105
|
+
_triggerAppLinkAction(ref) {
|
|
106
|
+
this.trigger('appLinkAction', {
|
|
107
|
+
ref: ref
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/***/ }),
|
|
113
|
+
|
|
114
|
+
/***/ "./src/main/js/svg/SvgFieldAdapter.ts":
|
|
115
|
+
/*!********************************************!*\
|
|
116
|
+
!*** ./src/main/js/svg/SvgFieldAdapter.ts ***!
|
|
117
|
+
\********************************************/
|
|
118
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
119
|
+
|
|
120
|
+
__webpack_require__.r(__webpack_exports__);
|
|
121
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122
|
+
/* harmony export */ "SvgFieldAdapter": () => (/* binding */ SvgFieldAdapter)
|
|
123
|
+
/* harmony export */ });
|
|
124
|
+
/* harmony import */ var _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @eclipse-scout/core */ "@eclipse-scout/core");
|
|
125
|
+
/*
|
|
126
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
127
|
+
* All rights reserved. This program and the accompanying materials
|
|
128
|
+
* are made available under the terms of the Eclipse Public License v1.0
|
|
129
|
+
* which accompanies this distribution, and is available at
|
|
130
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
131
|
+
*
|
|
132
|
+
* Contributors:
|
|
133
|
+
* BSI Business Systems Integration AG - initial API and implementation
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
class SvgFieldAdapter extends _eclipse_scout_core__WEBPACK_IMPORTED_MODULE_0__.FormFieldAdapter {
|
|
137
|
+
_onWidgetAppLinkAction(event) {
|
|
138
|
+
this._send('appLinkAction', {
|
|
139
|
+
ref: event.ref
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
_onWidgetEvent(event) {
|
|
143
|
+
if (event.type === 'appLinkAction') {
|
|
144
|
+
this._onWidgetAppLinkAction(event);
|
|
145
|
+
} else {
|
|
146
|
+
super._onWidgetEvent(event);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/***/ }),
|
|
152
|
+
|
|
153
|
+
/***/ "./src/main/js/svg/SvgFieldEventMap.ts":
|
|
154
|
+
/*!*********************************************!*\
|
|
155
|
+
!*** ./src/main/js/svg/SvgFieldEventMap.ts ***!
|
|
156
|
+
\*********************************************/
|
|
157
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
158
|
+
|
|
159
|
+
__webpack_require__.r(__webpack_exports__);
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/***/ }),
|
|
163
|
+
|
|
164
|
+
/***/ "./src/main/js/svg/SvgFieldModel.ts":
|
|
165
|
+
/*!******************************************!*\
|
|
166
|
+
!*** ./src/main/js/svg/SvgFieldModel.ts ***!
|
|
167
|
+
\******************************************/
|
|
168
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
169
|
+
|
|
170
|
+
__webpack_require__.r(__webpack_exports__);
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/***/ }),
|
|
174
|
+
|
|
175
|
+
/***/ "jquery":
|
|
176
|
+
/*!*************************!*\
|
|
177
|
+
!*** external "jquery" ***!
|
|
178
|
+
\*************************/
|
|
179
|
+
/***/ ((module) => {
|
|
180
|
+
|
|
181
|
+
module.exports = require("jquery");
|
|
182
|
+
|
|
183
|
+
/***/ }),
|
|
184
|
+
|
|
185
|
+
/***/ "@eclipse-scout/core":
|
|
186
|
+
/*!**************************************!*\
|
|
187
|
+
!*** external "@eclipse-scout/core" ***!
|
|
188
|
+
\**************************************/
|
|
189
|
+
/***/ ((module) => {
|
|
190
|
+
|
|
191
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
192
|
+
var y = x => () => x
|
|
193
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__eclipse_scout_core_ec9759ad__;
|
|
194
|
+
|
|
195
|
+
/***/ })
|
|
196
|
+
|
|
197
|
+
/******/ });
|
|
198
|
+
/************************************************************************/
|
|
199
|
+
/******/ // The module cache
|
|
200
|
+
/******/ var __webpack_module_cache__ = {};
|
|
201
|
+
/******/
|
|
202
|
+
/******/ // The require function
|
|
203
|
+
/******/ function __webpack_require__(moduleId) {
|
|
204
|
+
/******/ // Check if module is in cache
|
|
205
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
206
|
+
/******/ if (cachedModule !== undefined) {
|
|
207
|
+
/******/ return cachedModule.exports;
|
|
208
|
+
/******/ }
|
|
209
|
+
/******/ // Create a new module (and put it into the cache)
|
|
210
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
211
|
+
/******/ // no module.id needed
|
|
212
|
+
/******/ // no module.loaded needed
|
|
213
|
+
/******/ exports: {}
|
|
214
|
+
/******/ };
|
|
215
|
+
/******/
|
|
216
|
+
/******/ // Execute the module function
|
|
217
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
218
|
+
/******/
|
|
219
|
+
/******/ // Return the exports of the module
|
|
220
|
+
/******/ return module.exports;
|
|
221
|
+
/******/ }
|
|
222
|
+
/******/
|
|
223
|
+
/************************************************************************/
|
|
224
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
225
|
+
/******/ (() => {
|
|
226
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
227
|
+
/******/ __webpack_require__.n = (module) => {
|
|
228
|
+
/******/ var getter = module && module.__esModule ?
|
|
229
|
+
/******/ () => (module['default']) :
|
|
230
|
+
/******/ () => (module);
|
|
231
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
232
|
+
/******/ return getter;
|
|
233
|
+
/******/ };
|
|
234
|
+
/******/ })();
|
|
235
|
+
/******/
|
|
236
|
+
/******/ /* webpack/runtime/define property getters */
|
|
237
|
+
/******/ (() => {
|
|
238
|
+
/******/ // define getter functions for harmony exports
|
|
239
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
240
|
+
/******/ for(var key in definition) {
|
|
241
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
242
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
243
|
+
/******/ }
|
|
244
|
+
/******/ }
|
|
245
|
+
/******/ };
|
|
246
|
+
/******/ })();
|
|
247
|
+
/******/
|
|
248
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
249
|
+
/******/ (() => {
|
|
250
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
251
|
+
/******/ })();
|
|
252
|
+
/******/
|
|
253
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
254
|
+
/******/ (() => {
|
|
255
|
+
/******/ // define __esModule on exports
|
|
256
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
257
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
258
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
259
|
+
/******/ }
|
|
260
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
261
|
+
/******/ };
|
|
262
|
+
/******/ })();
|
|
263
|
+
/******/
|
|
264
|
+
/************************************************************************/
|
|
265
|
+
/******/
|
|
266
|
+
/******/ // startup
|
|
267
|
+
/******/ // Load entry module and return exports
|
|
268
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
269
|
+
/******/ var __webpack_exports__ = __webpack_require__("./src/main/js/index.ts");
|
|
270
|
+
/******/ var __webpack_exports__SvgField = __webpack_exports__.SvgField;
|
|
271
|
+
/******/ var __webpack_exports__SvgFieldAdapter = __webpack_exports__.SvgFieldAdapter;
|
|
272
|
+
/******/ var __webpack_exports__default = __webpack_exports__["default"];
|
|
273
|
+
/******/ export { __webpack_exports__SvgField as SvgField, __webpack_exports__SvgFieldAdapter as SvgFieldAdapter, __webpack_exports__default as default };
|
|
274
|
+
/******/
|
|
275
|
+
|
|
276
|
+
//# sourceMappingURL=eclipse-scout-svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eclipse-scout-svg.js","mappings":"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","sources":["webpack:///./src/main/js/index.ts","webpack:///./src/main/js/svg/SvgField.ts","webpack:///./src/main/js/svg/SvgFieldAdapter.ts","webpack:///external commonjs \"jquery\"","webpack:///external module \"@eclipse-scout/core\"","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["/*\n * Copyright (c) 2010-2022 BSI Business Systems Integration AG.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * https://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * BSI Business Systems Integration AG - initial API and implementation\n */\nimport {ObjectFactory} from '@eclipse-scout/core';\n\nexport * from './svg/SvgField';\nexport * from './svg/SvgFieldModel';\nexport * from './svg/SvgFieldEventMap';\nexport * from './svg/SvgFieldAdapter';\n\nimport * as self from './index';\n\nexport default self;\n\nObjectFactory.get().registerNamespace('scout', self);\n","/*\n * Copyright (c) 2010-2022 BSI Business Systems Integration AG.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * https://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * BSI Business Systems Integration AG - initial API and implementation\n */\nimport {AppLinkKeyStroke, FormField} from '@eclipse-scout/core';\nimport $ from 'jquery';\nimport {SvgFieldEventMap, SvgFieldModel} from '../index';\n\nexport class SvgField extends FormField implements SvgFieldModel {\n declare model: SvgFieldModel;\n declare eventMap: SvgFieldEventMap;\n\n svgDocument: string;\n\n protected override _render() {\n this.addContainer(this.$parent, 'svg-field');\n this.addLabel();\n this.addField(this.$parent.makeDiv());\n this.addMandatoryIndicator();\n this.addStatus();\n }\n\n protected override _renderProperties() {\n super._renderProperties();\n this._renderSvgDocument();\n }\n\n protected override _initKeyStrokeContext() {\n super._initKeyStrokeContext();\n this.keyStrokeContext.registerKeyStroke(new AppLinkKeyStroke(this, this._onAppLinkAction));\n }\n\n protected _renderSvgDocument() {\n if (!this.svgDocument) {\n this.$field.empty();\n return;\n }\n this.$field.html(this.svgDocument);\n this.$field.find('.app-link')\n .on('click', this._onAppLinkAction.bind(this))\n .attr('tabindex', '0')\n .unfocusable();\n }\n\n protected _onAppLinkAction(event: JQuery.KeyboardEventBase | JQuery.ClickEvent) {\n let $target = $(event.delegateTarget);\n let ref = $target.data('ref') as string;\n this._triggerAppLinkAction(ref);\n event.preventDefault();\n }\n\n protected _triggerAppLinkAction(ref: string) {\n this.trigger('appLinkAction', {\n ref: ref\n });\n }\n}\n","/*\n * Copyright (c) 2010-2022 BSI Business Systems Integration AG.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * https://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * BSI Business Systems Integration AG - initial API and implementation\n */\nimport {Event, FormFieldAdapter} from '@eclipse-scout/core';\nimport {SvgFieldAppLinkActionEvent} from './SvgFieldEventMap';\nimport {SvgField} from '../index';\n\nexport class SvgFieldAdapter extends FormFieldAdapter {\n\n protected _onWidgetAppLinkAction(event: SvgFieldAppLinkActionEvent) {\n this._send('appLinkAction', {\n ref: event.ref\n });\n }\n\n protected override _onWidgetEvent(event: Event<SvgField>) {\n if (event.type === 'appLinkAction') {\n this._onWidgetAppLinkAction(event as SvgFieldAppLinkActionEvent);\n } else {\n super._onWidgetEvent(event);\n }\n }\n}\n","module.exports = require(\"jquery\");","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__eclipse_scout_core_ec9759ad__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/main/js/index.ts\");\n",""],"names":["ObjectFactory","self","get","registerNamespace","AppLinkKeyStroke","FormField","$","SvgField","_render","addContainer","$parent","addLabel","addField","makeDiv","addMandatoryIndicator","addStatus","_renderProperties","_renderSvgDocument","_initKeyStrokeContext","keyStrokeContext","registerKeyStroke","_onAppLinkAction","svgDocument","$field","empty","html","find","on","bind","attr","unfocusable","event","$target","delegateTarget","ref","data","_triggerAppLinkAction","preventDefault","trigger","FormFieldAdapter","SvgFieldAdapter","_onWidgetAppLinkAction","_send","_onWidgetEvent","type"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import*as o from"@eclipse-scout/core";var r={};r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{SvgField:()=>s,SvgFieldAdapter:()=>_,default:()=>l});var d={};r.r(d),r.d(d,{SvgField:()=>s,SvgFieldAdapter:()=>_,default:()=>l});var c=t=>{var e={};return r.d(e,t),e},b=t=>()=>t;const p=c({AppLinkKeyStroke:()=>o.AppLinkKeyStroke,FormField:()=>o.FormField,FormFieldAdapter:()=>o.FormFieldAdapter,ObjectFactory:()=>o.ObjectFactory}),u=require("jquery");var g=r.n(u);function f(t,e,i){return e=v(e),e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function v(t){var e=m(t,"string");return typeof e=="symbol"?e:String(e)}function m(t,e){if(typeof t!="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class s extends p.FormField{constructor(){super(...arguments),f(this,"svgDocument",void 0)}_render(){this.addContainer(this.$parent,"svg-field"),this.addLabel(),this.addField(this.$parent.makeDiv()),this.addMandatoryIndicator(),this.addStatus()}_renderProperties(){super._renderProperties(),this._renderSvgDocument()}_initKeyStrokeContext(){super._initKeyStrokeContext(),this.keyStrokeContext.registerKeyStroke(new p.AppLinkKeyStroke(this,this._onAppLinkAction))}_renderSvgDocument(){if(!this.svgDocument){this.$field.empty();return}this.$field.html(this.svgDocument),this.$field.find(".app-link").on("click",this._onAppLinkAction.bind(this)).attr("tabindex","0").unfocusable()}_onAppLinkAction(e){let a=g()(e.delegateTarget).data("ref");this._triggerAppLinkAction(a),e.preventDefault()}_triggerAppLinkAction(e){this.trigger("appLinkAction",{ref:e})}}class _ extends p.FormFieldAdapter{_onWidgetAppLinkAction(e){this._send("appLinkAction",{ref:e.ref})}_onWidgetEvent(e){e.type==="appLinkAction"?this._onWidgetAppLinkAction(e):super._onWidgetEvent(e)}}const l=d;p.ObjectFactory.get().registerNamespace("scout",d);var A=n.SvgField,y=n.SvgFieldAdapter,S=n.default;export{A as SvgField,y as SvgFieldAdapter,S as default};
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=eclipse-scout-svg-91e2d79d7c56c352ec4e.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eclipse-scout-svg-91e2d79d7c56c352ec4e.min.js","mappings":"sCACA,IAAIA,EAAsB,CAAC,ECA3BA,EAAoB,EAAKC,GAAW,CACnC,IAAIC,EAASD,GAAUA,EAAO,WAC7B,IAAOA,EAAO,QACd,IAAOA,EACR,OAAAD,EAAoB,EAAEE,EAAQ,CAAE,EAAGA,CAAO,CAAC,EACpCA,CACR,ECNAF,EAAoB,EAAI,CAACG,EAASC,IAAe,CAChD,QAAQC,KAAOD,EACXJ,EAAoB,EAAEI,EAAYC,CAAG,GAAK,CAACL,EAAoB,EAAEG,EAASE,CAAG,GAC/E,OAAO,eAAeF,EAASE,EAAK,CAAE,WAAY,GAAM,IAAKD,EAAWC,EAAK,CAAC,CAGjF,ECPAL,EAAoB,EAAI,CAACM,EAAKC,IAAU,OAAO,UAAU,eAAe,KAAKD,EAAKC,CAAI,ECCtFP,EAAoB,EAAKG,GAAY,CACjC,OAAO,OAAW,KAAe,OAAO,aAC1C,OAAO,eAAeA,EAAS,OAAO,YAAa,CAAE,MAAO,QAAS,CAAC,EAEvE,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC7D,E,wJCNA,IAAIK,EAAIC,GAAK,CAAE,IAAID,EAAI,CAAC,EAAG,OAAAR,EAAoB,EAAEQ,EAAGC,CAAC,EAAUD,CAAG,EAC9DC,EAAID,GAAK,IAAMA,EACnB,MAAM,EAA+BA,EAAE,CAAG,iBAAqB,IAAME,EAAyD,iBAAmB,UAAc,IAAMA,EAAyD,UAAY,iBAAqB,IAAMA,EAAyD,iBAAmB,cAAkB,IAAMA,EAAyD,aAAc,CAAC,ECF3a,EAA+B,QAAQ,QAAQ,E,8dCc/C,MAAOC,UAAiBC,EAAAA,SAAU,CAAD,+DAMlBC,SAAU,CAC3B,KAAKC,aAAa,KAAKC,QAAS,WAAW,EAC3C,KAAKC,SAAS,EACd,KAAKC,SAAS,KAAKF,QAAQG,QAAQ,CAAC,EACpC,KAAKC,sBAAsB,EAC3B,KAAKC,UAAU,CACjB,CAEmBC,mBAAoB,CACrC,MAAMA,kBAAkB,EACxB,KAAKC,mBAAmB,CAC1B,CAEmBC,uBAAwB,CACzC,MAAMA,sBAAsB,EAC5B,KAAKC,iBAAiBC,kBAAkB,IAAIC,EAAAA,iBAAiB,KAAM,KAAKC,gBAAgB,CAAC,CAC3F,CAEUL,oBAAqB,CAC7B,GAAI,CAAC,KAAKM,YAAa,CACrB,KAAKC,OAAOC,MAAM,EAClB,M,CAEF,KAAKD,OAAOE,KAAK,KAAKH,WAAW,EACjC,KAAKC,OAAOG,KAAK,WAAW,EACzBC,GAAG,QAAS,KAAKN,iBAAiBO,KAAK,IAAI,CAAC,EAC5CC,KAAK,WAAY,GAAG,EACpBC,YAAY,CACjB,CAEUT,iBAAiBU,EAAqD,CAE9E,IAAIC,EADUC,EAAAA,EAAEF,EAAMG,cAAc,EAClBC,KAAK,KAAK,EAC5B,KAAKC,sBAAsBJ,CAAG,EAC9BD,EAAMM,eAAe,CACvB,CAEUD,sBAAsBJ,EAAa,CAC3C,KAAKM,QAAQ,gBAAiB,CAC5BN,IAAKA,C,CACN,CACH,C,CC/CI,MAAOO,UAAwBC,EAAAA,gBAAiB,CAE1CC,uBAAuBV,EAAmC,CAClE,KAAKW,MAAM,gBAAiB,CAC1BV,IAAKD,EAAMC,G,CACZ,CACH,CAEmBW,eAAeZ,EAAwB,CACpDA,EAAMa,OAAS,gBACjB,KAAKH,uBAAuBV,CAAmC,EAE/D,MAAMY,eAAeZ,CAAK,CAE9B,C,CCTF,QAAec,EAEfC,EAAAA,cAAAA,IAAkB,EAAEC,kBAAkB,QAASF,CAAI,E","sources":["bootstrap","compat get default export","define property getters","hasOwnProperty shorthand","make namespace object","core\"","external commonjs \"jquery\"","SvgField.ts","SvgFieldAdapter.ts","index.ts"],"names":["__webpack_require__","module","getter","exports","definition","key","obj","prop","x","y","__WEBPACK_EXTERNAL_MODULE__eclipse_scout_core_ec9759ad__","SvgField","FormField","_render","addContainer","$parent","addLabel","addField","makeDiv","addMandatoryIndicator","addStatus","_renderProperties","_renderSvgDocument","_initKeyStrokeContext","keyStrokeContext","registerKeyStroke","AppLinkKeyStroke","_onAppLinkAction","svgDocument","$field","empty","html","find","on","bind","attr","unfocusable","event","ref","$","delegateTarget","data","_triggerAppLinkAction","preventDefault","trigger","SvgFieldAdapter","FormFieldAdapter","_onWidgetAppLinkAction","_send","_onWidgetEvent","type","self","ObjectFactory","registerNamespace"],"sourceRoot":""}
|
package/src/main/js/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2010-2021 BSI Business Systems Integration AG.
|
|
3
|
-
* All rights reserved. This program and the accompanying materials
|
|
4
|
-
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
-
* which accompanies this distribution, and is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-v10.html
|
|
7
|
-
*
|
|
8
|
-
* Contributors:
|
|
9
|
-
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
-
*/
|
|
11
|
-
export {default as SvgField} from './svg/SvgField';
|
|
12
|
-
export {default as SvgFieldAdapter} from './svg/SvgFieldAdapter';
|
|
13
|
-
|
|
14
|
-
import * as self from './index.js';
|
|
15
|
-
|
|
16
|
-
export default self;
|
|
17
|
-
window.scout = Object.assign(window.scout || {}, self);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2014-2017 BSI Business Systems Integration AG.
|
|
3
|
-
* All rights reserved. This program and the accompanying materials
|
|
4
|
-
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
|
-
* which accompanies this distribution, and is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-v10.html
|
|
7
|
-
*
|
|
8
|
-
* Contributors:
|
|
9
|
-
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
|
-
*/
|
|
11
|
-
import {ValueFieldAdapter} from '@eclipse-scout/core';
|
|
12
|
-
|
|
13
|
-
export default class SvgFieldAdapter extends ValueFieldAdapter {
|
|
14
|
-
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
_onWidgetAppLinkAction(event) {
|
|
20
|
-
this._send('appLinkAction', {
|
|
21
|
-
ref: event.ref
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_onWidgetEvent(event) {
|
|
26
|
-
if (event.type === 'appLinkAction') {
|
|
27
|
-
this._onWidgetAppLinkAction(event);
|
|
28
|
-
} else {
|
|
29
|
-
super._onWidgetEvent(event);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|