locize 4.0.12 → 4.0.14
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/CHANGELOG.md +8 -0
- package/dist/cjs/index.d.ts +8 -1
- package/dist/esm/index.d.ts +8 -1
- package/dist/umd/locize.js +46 -59
- package/dist/umd/locize.min.js +1 -1
- package/index.d.ts +8 -1
- package/locize.js +46 -59
- package/locize.min.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export const locizePlugin: LocizePlugin
|
|
|
20
20
|
export function locizeEditorPlugin(opt?: {
|
|
21
21
|
qsProp?: string
|
|
22
22
|
show?: boolean
|
|
23
|
+
projectId?: string
|
|
24
|
+
version?: string
|
|
23
25
|
}): LocizePlugin
|
|
24
26
|
|
|
25
27
|
/**
|
|
@@ -35,4 +37,9 @@ export function addLocizeSavedHandler(fn: (data: any) => void): void
|
|
|
35
37
|
/**
|
|
36
38
|
* If used without i18next.
|
|
37
39
|
*/
|
|
38
|
-
export function startStandalone(
|
|
40
|
+
export function startStandalone(opt?: {
|
|
41
|
+
qsProp?: string
|
|
42
|
+
show?: boolean
|
|
43
|
+
projectId?: string
|
|
44
|
+
version?: string
|
|
45
|
+
}): void
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export const locizePlugin: LocizePlugin
|
|
|
20
20
|
export function locizeEditorPlugin(opt?: {
|
|
21
21
|
qsProp?: string
|
|
22
22
|
show?: boolean
|
|
23
|
+
projectId?: string
|
|
24
|
+
version?: string
|
|
23
25
|
}): LocizePlugin
|
|
24
26
|
|
|
25
27
|
/**
|
|
@@ -35,4 +37,9 @@ export function addLocizeSavedHandler(fn: (data: any) => void): void
|
|
|
35
37
|
/**
|
|
36
38
|
* If used without i18next.
|
|
37
39
|
*/
|
|
38
|
-
export function startStandalone(
|
|
40
|
+
export function startStandalone(opt?: {
|
|
41
|
+
qsProp?: string
|
|
42
|
+
show?: boolean
|
|
43
|
+
projectId?: string
|
|
44
|
+
version?: string
|
|
45
|
+
}): void
|
package/dist/umd/locize.js
CHANGED
|
@@ -27,25 +27,20 @@
|
|
|
27
27
|
|
|
28
28
|
function toPropertyKey(t) {
|
|
29
29
|
var i = toPrimitive(t, "string");
|
|
30
|
-
return "symbol" == _typeof(i) ? i :
|
|
30
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function _defineProperty(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
writable: true
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
obj[key] = value;
|
|
44
|
-
}
|
|
45
|
-
return obj;
|
|
33
|
+
function _defineProperty(e, r, t) {
|
|
34
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
35
|
+
value: t,
|
|
36
|
+
enumerable: !0,
|
|
37
|
+
configurable: !0,
|
|
38
|
+
writable: !0
|
|
39
|
+
}) : e[r] = t, e;
|
|
46
40
|
}
|
|
47
41
|
|
|
48
|
-
var
|
|
42
|
+
var isBrowser = typeof window !== 'undefined';
|
|
43
|
+
var INVISIBLE_CHARACTERS = isBrowser ? ["\u200C", "\u200D"] : ["\u200B", "\u200C"];
|
|
49
44
|
var INVISIBLE_REGEX = RegExp("([".concat(INVISIBLE_CHARACTERS.join(''), "]{9})+"), 'gu');
|
|
50
45
|
var TEMPLATE_MINIMUM_LENGTH = '{"k":"a"}'.length;
|
|
51
46
|
var invisibleStartMarker = 'subliminal:start';
|
|
@@ -142,7 +137,7 @@
|
|
|
142
137
|
}
|
|
143
138
|
|
|
144
139
|
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
145
|
-
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t),
|
|
140
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
146
141
|
var postProcessorName = 'subliminal';
|
|
147
142
|
var SubliminalPostProcessor = {
|
|
148
143
|
name: postProcessorName,
|
|
@@ -268,8 +263,8 @@
|
|
|
268
263
|
data: data$1
|
|
269
264
|
};
|
|
270
265
|
|
|
271
|
-
function _arrayWithHoles(
|
|
272
|
-
if (Array.isArray(
|
|
266
|
+
function _arrayWithHoles(r) {
|
|
267
|
+
if (Array.isArray(r)) return r;
|
|
273
268
|
}
|
|
274
269
|
|
|
275
270
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -300,27 +295,26 @@
|
|
|
300
295
|
}
|
|
301
296
|
}
|
|
302
297
|
|
|
303
|
-
function _arrayLikeToArray(
|
|
304
|
-
|
|
305
|
-
for (var
|
|
306
|
-
return
|
|
298
|
+
function _arrayLikeToArray(r, a) {
|
|
299
|
+
(null == a || a > r.length) && (a = r.length);
|
|
300
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
301
|
+
return n;
|
|
307
302
|
}
|
|
308
303
|
|
|
309
|
-
function _unsupportedIterableToArray(
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
304
|
+
function _unsupportedIterableToArray(r, a) {
|
|
305
|
+
if (r) {
|
|
306
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
307
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
308
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
309
|
+
}
|
|
316
310
|
}
|
|
317
311
|
|
|
318
312
|
function _nonIterableRest() {
|
|
319
313
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
320
314
|
}
|
|
321
315
|
|
|
322
|
-
function _slicedToArray(
|
|
323
|
-
return _arrayWithHoles(
|
|
316
|
+
function _slicedToArray(r, e) {
|
|
317
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
324
318
|
}
|
|
325
319
|
|
|
326
320
|
function debounce(func, wait, immediate) {
|
|
@@ -649,20 +643,20 @@
|
|
|
649
643
|
}
|
|
650
644
|
api.addHandler('commitKey', handler$7);
|
|
651
645
|
|
|
652
|
-
function _arrayWithoutHoles(
|
|
653
|
-
if (Array.isArray(
|
|
646
|
+
function _arrayWithoutHoles(r) {
|
|
647
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
654
648
|
}
|
|
655
649
|
|
|
656
|
-
function _iterableToArray(
|
|
657
|
-
if (typeof Symbol
|
|
650
|
+
function _iterableToArray(r) {
|
|
651
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
658
652
|
}
|
|
659
653
|
|
|
660
654
|
function _nonIterableSpread() {
|
|
661
655
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
662
656
|
}
|
|
663
657
|
|
|
664
|
-
function _toConsumableArray(
|
|
665
|
-
return _arrayWithoutHoles(
|
|
658
|
+
function _toConsumableArray(r) {
|
|
659
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
666
660
|
}
|
|
667
661
|
|
|
668
662
|
function handler$6(payload) {
|
|
@@ -924,33 +918,26 @@
|
|
|
924
918
|
}
|
|
925
919
|
api.addHandler('requestPopupChanges', handler$4);
|
|
926
920
|
|
|
927
|
-
function _objectWithoutPropertiesLoose(
|
|
928
|
-
if (
|
|
929
|
-
var
|
|
930
|
-
var
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
key = sourceKeys[i];
|
|
934
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
935
|
-
target[key] = source[key];
|
|
921
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
922
|
+
if (null == r) return {};
|
|
923
|
+
var t = {};
|
|
924
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
925
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
926
|
+
t[n] = r[n];
|
|
936
927
|
}
|
|
937
|
-
return
|
|
928
|
+
return t;
|
|
938
929
|
}
|
|
939
930
|
|
|
940
|
-
function _objectWithoutProperties(
|
|
941
|
-
if (
|
|
942
|
-
var
|
|
943
|
-
|
|
931
|
+
function _objectWithoutProperties(e, t) {
|
|
932
|
+
if (null == e) return {};
|
|
933
|
+
var o,
|
|
934
|
+
r,
|
|
935
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
944
936
|
if (Object.getOwnPropertySymbols) {
|
|
945
|
-
var
|
|
946
|
-
for (
|
|
947
|
-
key = sourceSymbolKeys[i];
|
|
948
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
949
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
950
|
-
target[key] = source[key];
|
|
951
|
-
}
|
|
937
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
938
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
952
939
|
}
|
|
953
|
-
return
|
|
940
|
+
return i;
|
|
954
941
|
}
|
|
955
942
|
|
|
956
943
|
var _excluded$1 = ["lng", "ns"];
|