@ev-core/aurelia-v1-icon 0.6.5 → 2.0.0
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/dist/commonjs/value-converter/icon-valueconverter.d.ts +5 -4
- package/dist/commonjs/value-converter/icon-valueconverter.js +7 -25
- package/dist/commonjs/value-converter/icon-valueconverter.js.map +1 -1
- package/dist/native-modules/value-converter/icon-valueconverter.d.ts +5 -4
- package/dist/native-modules/value-converter/icon-valueconverter.js +7 -25
- package/dist/native-modules/value-converter/icon-valueconverter.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { convertIcon, convertIconToClassList, ensureIconType } from "@ev-core/au-core-icon";
|
|
1
2
|
export declare class UiIconValueConverter {
|
|
2
|
-
toView: typeof
|
|
3
|
-
static convert
|
|
4
|
-
static convertToClassList
|
|
5
|
-
static ensureType
|
|
3
|
+
toView: typeof convertIcon;
|
|
4
|
+
static convert: typeof convertIcon;
|
|
5
|
+
static convertToClassList: typeof convertIconToClassList;
|
|
6
|
+
static ensureType: typeof ensureIconType;
|
|
6
7
|
}
|
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var UiIconValueConverter_1;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.UiIconValueConverter = void 0;
|
|
5
4
|
const tslib_1 = require("tslib");
|
|
6
5
|
const aurelia_framework_1 = require("aurelia-framework");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const fallback = 'exclamation';
|
|
10
|
-
let UiIconValueConverter = UiIconValueConverter_1 = class UiIconValueConverter {
|
|
6
|
+
const au_core_icon_1 = require("@ev-core/au-core-icon");
|
|
7
|
+
let UiIconValueConverter = class UiIconValueConverter {
|
|
11
8
|
constructor() {
|
|
12
|
-
this.toView =
|
|
13
|
-
}
|
|
14
|
-
static convert(icon) {
|
|
15
|
-
return UiIconValueConverter_1.convertToClassList(icon)?.join(' ') ?? '';
|
|
16
|
-
}
|
|
17
|
-
static convertToClassList(icon) {
|
|
18
|
-
if (!icon) {
|
|
19
|
-
icon = fallback;
|
|
20
|
-
}
|
|
21
|
-
let classes = icon.trim().split(' ').map(e => prefix + e);
|
|
22
|
-
UiIconValueConverter_1.ensureType(classes);
|
|
23
|
-
return classes;
|
|
24
|
-
}
|
|
25
|
-
static ensureType(classes) {
|
|
26
|
-
const hasType = classes.some(e => types.some(t => t == e));
|
|
27
|
-
if (hasType) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
classes.unshift(types[0]);
|
|
9
|
+
this.toView = au_core_icon_1.convertIcon;
|
|
31
10
|
}
|
|
32
11
|
};
|
|
33
12
|
exports.UiIconValueConverter = UiIconValueConverter;
|
|
34
|
-
|
|
13
|
+
UiIconValueConverter.convert = au_core_icon_1.convertIcon;
|
|
14
|
+
UiIconValueConverter.convertToClassList = au_core_icon_1.convertIconToClassList;
|
|
15
|
+
UiIconValueConverter.ensureType = au_core_icon_1.ensureIconType;
|
|
16
|
+
exports.UiIconValueConverter = UiIconValueConverter = tslib_1.__decorate([
|
|
35
17
|
(0, aurelia_framework_1.valueConverter)('icon')
|
|
36
18
|
], UiIconValueConverter);
|
|
37
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/value-converter/icon-valueconverter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/value-converter/icon-valueconverter.ts"],"names":[],"mappings":";;;;AAAA,yDAAmD;AACnD,wDAA4F;AAGrF,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QACL,WAAM,GAAG,0BAAW,CAAC;IAKvB,CAAC;;AANY,oDAAoB;AAGxB,4BAAO,GAAG,0BAAH,AAAc,CAAC;AACtB,uCAAkB,GAAG,qCAAH,AAAyB,CAAC;AAC5C,+BAAU,GAAG,6BAAH,AAAiB,CAAC;+BALxB,oBAAoB;IADhC,IAAA,kCAAc,EAAC,MAAM,CAAC;GACV,oBAAoB,CAMhC","file":"icon-valueconverter.js","sourceRoot":"../../../src/"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { convertIcon, convertIconToClassList, ensureIconType } from "@ev-core/au-core-icon";
|
|
1
2
|
export declare class UiIconValueConverter {
|
|
2
|
-
toView: typeof
|
|
3
|
-
static convert
|
|
4
|
-
static convertToClassList
|
|
5
|
-
static ensureType
|
|
3
|
+
toView: typeof convertIcon;
|
|
4
|
+
static convert: typeof convertIcon;
|
|
5
|
+
static convertToClassList: typeof convertIconToClassList;
|
|
6
|
+
static ensureType: typeof ensureIconType;
|
|
6
7
|
}
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
var UiIconValueConverter_1;
|
|
2
1
|
import { __decorate } from "tslib";
|
|
3
2
|
import { valueConverter } from "aurelia-framework";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const fallback = 'exclamation';
|
|
7
|
-
let UiIconValueConverter = UiIconValueConverter_1 = class UiIconValueConverter {
|
|
3
|
+
import { convertIcon, convertIconToClassList, ensureIconType } from "@ev-core/au-core-icon";
|
|
4
|
+
let UiIconValueConverter = class UiIconValueConverter {
|
|
8
5
|
constructor() {
|
|
9
|
-
this.toView =
|
|
10
|
-
}
|
|
11
|
-
static convert(icon) {
|
|
12
|
-
return UiIconValueConverter_1.convertToClassList(icon)?.join(' ') ?? '';
|
|
13
|
-
}
|
|
14
|
-
static convertToClassList(icon) {
|
|
15
|
-
if (!icon) {
|
|
16
|
-
icon = fallback;
|
|
17
|
-
}
|
|
18
|
-
let classes = icon.trim().split(' ').map(e => prefix + e);
|
|
19
|
-
UiIconValueConverter_1.ensureType(classes);
|
|
20
|
-
return classes;
|
|
21
|
-
}
|
|
22
|
-
static ensureType(classes) {
|
|
23
|
-
const hasType = classes.some(e => types.some(t => t == e));
|
|
24
|
-
if (hasType) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
classes.unshift(types[0]);
|
|
6
|
+
this.toView = convertIcon;
|
|
28
7
|
}
|
|
29
8
|
};
|
|
30
|
-
UiIconValueConverter =
|
|
9
|
+
UiIconValueConverter.convert = convertIcon;
|
|
10
|
+
UiIconValueConverter.convertToClassList = convertIconToClassList;
|
|
11
|
+
UiIconValueConverter.ensureType = ensureIconType;
|
|
12
|
+
UiIconValueConverter = __decorate([
|
|
31
13
|
valueConverter('icon')
|
|
32
14
|
], UiIconValueConverter);
|
|
33
15
|
export { UiIconValueConverter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/value-converter/icon-valueconverter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/value-converter/icon-valueconverter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGrF,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QACL,WAAM,GAAG,WAAW,CAAC;IAKvB,CAAC;;AAHQ,4BAAO,GAAG,WAAH,AAAc,CAAC;AACtB,uCAAkB,GAAG,sBAAH,AAAyB,CAAC;AAC5C,+BAAU,GAAG,cAAH,AAAiB,CAAC;AALxB,oBAAoB;IADhC,cAAc,CAAC,MAAM,CAAC;GACV,oBAAoB,CAMhC","file":"icon-valueconverter.js","sourceRoot":"../../../src/"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ev-core/aurelia-v1-icon",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "Aurelia v1 icon attribute and value converter plugin.",
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@ev-core/core": "0.
|
|
6
|
+
"@ev-core/au-core-icon": "2.0.0",
|
|
7
|
+
"@ev-core/core": "2.0.0"
|
|
7
8
|
},
|
|
8
9
|
"peerDependencies": {
|
|
9
10
|
"aurelia-binding": "^1.0.0 || ^2.0.0",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"server-destroy": "^1.0.1",
|
|
43
44
|
"socket.io": "^4.8.1",
|
|
44
45
|
"text": "requirejs/text",
|
|
45
|
-
"typescript": "^5.9.
|
|
46
|
+
"typescript": "^5.9.3",
|
|
46
47
|
"typescript-eslint": "^8.38.0"
|
|
47
48
|
},
|
|
48
49
|
"overrides": {
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"glob-parent": "^6.0.0",
|
|
52
53
|
"micromatch": "^4.0.0"
|
|
53
54
|
},
|
|
55
|
+
"types": "dist/native-modules/index.d.ts",
|
|
54
56
|
"main": "dist/commonjs/index.js",
|
|
55
57
|
"module": "dist/native-modules/index.js",
|
|
56
58
|
"files": [
|