vue-intl 6.2.9 → 6.3.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/LICENSE.md +0 -0
- package/README.md +0 -0
- package/index.d.ts +0 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/injection-key.d.ts +0 -0
- package/injection-key.d.ts.map +1 -1
- package/injection-key.js +0 -0
- package/package.json +4 -3
- package/plugin.d.ts +0 -0
- package/plugin.d.ts.map +1 -1
- package/plugin.js +6 -6
- package/provider.d.ts +0 -0
- package/provider.d.ts.map +1 -1
- package/provider.js +4 -4
package/LICENSE.md
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
|
File without changes
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA;AACvC,OAAO,EACL,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,SAAS,GACV,MAAM,gBAAgB,CAAA;AACvB,wBAAgB,cAAc,CAC5B,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,GAAG,iBAAiB,EACrB,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACrC,IAAI,EAAE,CAAC,GAAG,CAAC,CAEZ;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAE1C;AACD,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineMessage = exports.defineMessages = exports.IntlError = exports.IntlErrorCode = exports.MissingTranslationError = exports.MessageFormatError = exports.MissingDataError = exports.InvalidConfigError = exports.UnsupportedFormatterError = exports.createIntlCache = exports.intlKey = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./plugin"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./provider"), exports);
|
|
7
7
|
var injection_key_1 = require("./injection-key");
|
|
8
8
|
Object.defineProperty(exports, "intlKey", { enumerable: true, get: function () { return injection_key_1.intlKey; } });
|
|
9
9
|
var intl_1 = require("@formatjs/intl");
|
package/injection-key.d.ts
CHANGED
|
File without changes
|
package/injection-key.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injection-key.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"injection-key.d.ts","sourceRoot":"","sources":["injection-key.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAW,CAAA"}
|
package/injection-key.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-intl",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "formatjs intl binding for vue",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"author": "Long Ho <holevietlong@gmail.com>",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/types": "^7.12.11",
|
|
21
|
-
"@formatjs/
|
|
21
|
+
"@formatjs/icu-messageformat-parser": "2.1.7",
|
|
22
|
+
"@formatjs/intl": "2.4.0",
|
|
22
23
|
"tslib": "2.4.0"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"vue": "^3.2.23"
|
|
26
27
|
},
|
|
27
28
|
"license": "ISC"
|
|
28
|
-
}
|
|
29
|
+
}
|
package/plugin.d.ts
CHANGED
|
File without changes
|
package/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,gBAAgB,CAAA;AACvB,OAAO,GAAG,MAAM,KAAK,CAAA;AAGrB,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,yBAAyB;QACjC,KAAK,EAAE,SAAS,CAAA;QAChB,cAAc,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA;QAC/C,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;QACzC,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;QACzC,oBAAoB,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAA;QAC3D,mBAAmB,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAA;QACzD,kBAAkB,EAAE,cAAc,CAAC,mBAAmB,CAAC,CAAA;QACvD,aAAa,EAAE,cAAc,CAAC,cAAc,CAAC,CAAA;QAC7C,WAAW,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;KAC1C;CACF;AAED,eAAO,MAAM,UAAU,YAAa,UAAU,KAAG,UAmB/C,CAAA"}
|
package/plugin.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createIntl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
install
|
|
4
|
+
const intl_1 = require("@formatjs/intl");
|
|
5
|
+
const injection_key_1 = require("./injection-key");
|
|
6
|
+
const createIntl = (options) => ({
|
|
7
|
+
install(app) {
|
|
8
8
|
if (!options) {
|
|
9
9
|
throw new Error('Missing `options` for vue-intl plugin');
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
const intl = (0, intl_1.createIntl)(options);
|
|
12
12
|
app.config.globalProperties.$intl = intl;
|
|
13
13
|
app.config.globalProperties.$formatMessage = intl.formatMessage;
|
|
14
14
|
app.config.globalProperties.$formatDate = intl.formatDate;
|
|
@@ -20,5 +20,5 @@ var createIntl = function (options) { return ({
|
|
|
20
20
|
app.config.globalProperties.$formatList = intl.formatList;
|
|
21
21
|
app.provide(injection_key_1.intlKey, intl);
|
|
22
22
|
},
|
|
23
|
-
});
|
|
23
|
+
});
|
|
24
24
|
exports.createIntl = createIntl;
|
package/provider.d.ts
CHANGED
|
File without changes
|
package/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAIxC,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,QAElD;AAED,wBAAgB,OAAO,sBAQtB"}
|
package/provider.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useIntl = exports.provideIntl = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const vue_1 = require("vue");
|
|
5
|
+
const injection_key_1 = require("./injection-key");
|
|
6
6
|
function provideIntl(intl) {
|
|
7
7
|
(0, vue_1.provide)(injection_key_1.intlKey, intl);
|
|
8
8
|
}
|
|
9
9
|
exports.provideIntl = provideIntl;
|
|
10
10
|
function useIntl() {
|
|
11
|
-
|
|
11
|
+
const intl = (0, vue_1.inject)(injection_key_1.intlKey);
|
|
12
12
|
if (!intl) {
|
|
13
|
-
throw new Error(
|
|
13
|
+
throw new Error(`An intl object was not injected. Install the plugin or use provideIntl.`);
|
|
14
14
|
}
|
|
15
15
|
return intl;
|
|
16
16
|
}
|