be-intl 0.0.39 → 0.0.41

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 CHANGED
@@ -1,4 +1,4 @@
1
- # be-intl
1
+ # be-intl (🌐)
2
2
 
3
3
  Format numbers, dates automatically and semantically.
4
4
 
@@ -37,7 +37,14 @@ We can also employ more semantic syntax:
37
37
  <data value=123456.789 lang="de-DE" be-intl-style=currency be-intl-currency=EUR></data>
38
38
  ```
39
39
 
40
- [TODO] Support [expanding out the attribute](https://github.com/bahrus/be-hive#behivior-aspects-untested) to avoid use of JSON
40
+ ## Alternative names [TODO]
41
+
42
+ 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:
43
+
44
+ ```html
45
+ <time lang="ar-EG" datetime="2011-11-18T14:54:39.929Z"
46
+ 🌐-weekday=long 🌐-year=numeric 🌐-month=long 🌐-day=numeric></time>
47
+ ```
41
48
 
42
49
  ## Viewing Locally
43
50
 
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.39",
3
+ "version": "0.0.41",
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.107",
31
- "be-hive": "0.0.184",
32
- "be-propagating": "0.0.50",
33
- "be-value-added": "0.0.42",
34
- "trans-render": "0.0.790"
30
+ "be-enhanced": "0.0.112",
31
+ "be-hive": "0.0.191",
32
+ "be-propagating": "0.0.53",
33
+ "be-value-added": "0.0.45",
34
+ "trans-render": "0.0.796"
35
35
  },
36
36
  "devDependencies": {
37
- "may-it-serve": "0.0.7",
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);