be-intl 0.0.40 → 0.0.42
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 +9 -3
- package/behivior.js +17 -1
- package/package.json +7 -7
- package//360/237/214/220.js +9 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# be-intl
|
|
1
|
+
# be-intl (🌐)
|
|
2
2
|
|
|
3
3
|
Format numbers, dates automatically and semantically.
|
|
4
4
|
|
|
@@ -29,7 +29,6 @@ emits
|
|
|
29
29
|
<time lang="ar-EG" datetime="2011-11-18T14:54:39.929Z" be-intl="{ "weekday": "long", "year": "numeric", "month": "long", "day": "numeric" }">الجمعة، ١٨ نوفمبر ٢٠١١</time>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
[WIP]
|
|
33
32
|
|
|
34
33
|
We can also employ more semantic syntax:
|
|
35
34
|
|
|
@@ -37,7 +36,14 @@ We can also employ more semantic syntax:
|
|
|
37
36
|
<data value=123456.789 lang="de-DE" be-intl-style=currency be-intl-currency=EUR></data>
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
## Alternative names
|
|
40
|
+
|
|
41
|
+
The semantic example above involves a lot of keyboard tapping of the letters "be-intl". To avoid blisters on your itty bitty fingers, we provide an alternative base attribute you can use:
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<time lang="ar-EG" datetime="2011-11-18T14:54:39.929Z"
|
|
45
|
+
🌐-weekday=long 🌐-year=numeric 🌐-month=long 🌐-day=numeric></time>
|
|
46
|
+
```
|
|
41
47
|
|
|
42
48
|
## Viewing Locally
|
|
43
49
|
|
package/behivior.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BeHive, MountObserver, seed } from 'be-hive/be-hive.js';
|
|
|
2
2
|
const defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
|
|
3
3
|
export const emc = {
|
|
4
4
|
base: 'be-intl',
|
|
5
|
-
branches: ['', 'style', 'currency',],
|
|
5
|
+
branches: ['', 'style', 'currency', 'weekday', 'year', 'month', 'day'],
|
|
6
6
|
map: {
|
|
7
7
|
'0.0': {
|
|
8
8
|
instanceOf: 'Object',
|
|
@@ -16,6 +16,22 @@ export const emc = {
|
|
|
16
16
|
'2.0': {
|
|
17
17
|
instanceOf: 'String',
|
|
18
18
|
mapsTo: '?.format?.currency'
|
|
19
|
+
},
|
|
20
|
+
'3.0': {
|
|
21
|
+
instanceOf: 'String',
|
|
22
|
+
mapsTo: '?.format?.weekday'
|
|
23
|
+
},
|
|
24
|
+
'4.0': {
|
|
25
|
+
instanceOf: 'String',
|
|
26
|
+
mapsTo: '?.format?.year'
|
|
27
|
+
},
|
|
28
|
+
'5.0': {
|
|
29
|
+
instanceOf: 'String',
|
|
30
|
+
mapsTo: '?.format?.month'
|
|
31
|
+
},
|
|
32
|
+
'6.0': {
|
|
33
|
+
instanceOf: 'String',
|
|
34
|
+
mapsTo: '?.format?.day'
|
|
19
35
|
}
|
|
20
36
|
},
|
|
21
37
|
osotas: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "be-intl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"web-components",
|
|
6
6
|
"web-component",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"update": "ncu -u && npm install"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"be-enhanced": "0.0.
|
|
31
|
-
"be-hive": "0.0.
|
|
32
|
-
"be-propagating": "0.0.
|
|
33
|
-
"be-value-added": "0.0.
|
|
34
|
-
"trans-render": "0.0.
|
|
30
|
+
"be-enhanced": "0.0.112",
|
|
31
|
+
"be-hive": "0.0.192",
|
|
32
|
+
"be-propagating": "0.0.54",
|
|
33
|
+
"be-value-added": "0.0.46",
|
|
34
|
+
"trans-render": "0.0.796"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"may-it-serve": "0.0.
|
|
37
|
+
"may-it-serve": "0.0.8",
|
|
38
38
|
"@playwright/test": "1.45.1"
|
|
39
39
|
},
|
|
40
40
|
"author": "anderson.bruce.b@gmail.com",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MountObserver, seed, BeHive } from 'be-hive/be-hive.js';
|
|
2
|
+
import { emc as baseEMC } from './behivior.js';
|
|
3
|
+
export const emc = {
|
|
4
|
+
...baseEMC,
|
|
5
|
+
base: '🌐',
|
|
6
|
+
enhPropKey: '🌐',
|
|
7
|
+
};
|
|
8
|
+
const mose = seed(emc);
|
|
9
|
+
MountObserver.synthesize(document, BeHive, mose);
|