@dangl/angular-material-shared 2.2.0 → 2.3.0-beta0037
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/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
- package/esm2020/lib/angular-material-shared.module.mjs +38 -0
- package/esm2020/lib/components/footer/footer.component.mjs +33 -0
- package/esm2020/lib/components/header/header.component.mjs +80 -0
- package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
- package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
- package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/fesm2015/dangl-angular-material-shared.mjs +292 -0
- package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
- package/fesm2020/dangl-angular-material-shared.mjs +290 -0
- package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
- package/{dangl-angular-material-shared.d.ts → index.d.ts} +1 -0
- package/lib/angular-material-shared.module.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +3 -0
- package/lib/components/header/header.component.d.ts +3 -0
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
- package/package.json +28 -16
- package/styles/material-style.scss +1 -1
- package/styles/material-theme.scss +4 -3
- package/styles/material-variables.scss +9 -8
- package/tinymce-assets/icons/default/icons.js +11 -1
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/cs.js +118 -75
- package/tinymce-assets/langs/cy.js +61 -18
- package/tinymce-assets/langs/da.js +60 -17
- package/tinymce-assets/langs/de.js +60 -17
- package/tinymce-assets/langs/eo.js +334 -138
- package/tinymce-assets/langs/es_ES.js +32 -2
- package/tinymce-assets/langs/fa.js +60 -17
- package/tinymce-assets/langs/fa_IR.js +31 -1
- package/tinymce-assets/langs/fr_FR.js +60 -17
- package/tinymce-assets/langs/hu_HU.js +60 -17
- package/tinymce-assets/langs/ja.js +60 -17
- package/tinymce-assets/langs/ko_KR.js +3 -3
- package/tinymce-assets/langs/nb_NO.js +61 -18
- package/tinymce-assets/langs/nl.js +60 -17
- package/tinymce-assets/langs/pl.js +60 -17
- package/tinymce-assets/langs/pt_BR.js +60 -17
- package/tinymce-assets/langs/pt_PT.js +60 -17
- package/tinymce-assets/langs/ro.js +60 -17
- package/tinymce-assets/langs/ro_RO.js +32 -2
- package/tinymce-assets/langs/ru.js +60 -17
- package/tinymce-assets/langs/ru_RU.js +445 -0
- package/tinymce-assets/langs/sl.js +59 -14
- package/tinymce-assets/langs/ta.js +60 -17
- package/tinymce-assets/langs/ta_IN.js +60 -17
- package/tinymce-assets/langs/th_TH.js +60 -17
- package/tinymce-assets/langs/tr_TR.js +81 -8
- package/tinymce-assets/langs/vi.js +179 -21
- package/tinymce-assets/langs/zh_CN.js +60 -17
- package/tinymce-assets/plugins/advlist/plugin.js +29 -48
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
- package/tinymce-assets/plugins/anchor/plugin.js +8 -8
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autolink/plugin.js +58 -30
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autosave/plugin.js +9 -9
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
- package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
- package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
- package/tinymce-assets/plugins/charmap/plugin.js +39 -49
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
- package/tinymce-assets/plugins/code/plugin.js +9 -10
- package/tinymce-assets/plugins/code/plugin.min.js +2 -2
- package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
- package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
- package/tinymce-assets/plugins/directionality/plugin.js +186 -53
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
- package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullscreen/plugin.js +496 -129
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
- package/tinymce-assets/plugins/help/plugin.js +101 -122
- package/tinymce-assets/plugins/help/plugin.min.js +2 -2
- package/tinymce-assets/plugins/hr/plugin.js +9 -10
- package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
- package/tinymce-assets/plugins/image/plugin.js +78 -73
- package/tinymce-assets/plugins/image/plugin.min.js +2 -2
- package/tinymce-assets/plugins/imagetools/plugin.js +484 -307
- package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
- package/tinymce-assets/plugins/importcss/plugin.js +50 -51
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
- package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
- package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
- package/tinymce-assets/plugins/link/plugin.js +131 -125
- package/tinymce-assets/plugins/link/plugin.min.js +2 -2
- package/tinymce-assets/plugins/lists/plugin.js +256 -229
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
- package/tinymce-assets/plugins/media/plugin.js +124 -147
- package/tinymce-assets/plugins/media/plugin.min.js +2 -2
- package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
- package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
- package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
- package/tinymce-assets/plugins/pagebreak/plugin.js +16 -17
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
- package/tinymce-assets/plugins/paste/plugin.js +196 -157
- package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
- package/tinymce-assets/plugins/preview/plugin.js +13 -14
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
- package/tinymce-assets/plugins/print/plugin.js +13 -14
- package/tinymce-assets/plugins/print/plugin.min.js +2 -2
- package/tinymce-assets/plugins/quickbars/plugin.js +33 -48
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/save/plugin.js +9 -8
- package/tinymce-assets/plugins/save/plugin.min.js +2 -2
- package/tinymce-assets/plugins/searchreplace/plugin.js +73 -70
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
- package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
- package/tinymce-assets/plugins/table/plugin.js +2831 -2264
- package/tinymce-assets/plugins/table/plugin.min.js +2 -2
- package/tinymce-assets/plugins/template/plugin.js +84 -70
- package/tinymce-assets/plugins/template/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
- package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textpattern/plugin.js +76 -96
- package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
- package/tinymce-assets/plugins/toc/plugin.js +31 -29
- package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualchars/plugin.js +52 -67
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
- package/tinymce-assets/skins/ui/oxide/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/themes/mobile/theme.js +2798 -3255
- package/tinymce-assets/themes/mobile/theme.min.js +2 -2
- package/tinymce-assets/themes/silver/theme.js +25400 -25371
- package/tinymce-assets/themes/silver/theme.min.js +2 -2
- package/bundles/dangl-angular-material-shared.umd.js +0 -285
- package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
- package/dangl-angular-material-shared.metadata.json +0 -1
- package/esm2015/lib/angular-material-shared.module.js +0 -25
- package/esm2015/lib/components/footer/footer.component.js +0 -27
- package/esm2015/lib/components/header/header.component.js +0 -67
- package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
- package/fesm2015/dangl-angular-material-shared.js +0 -259
- package/fesm2015/dangl-angular-material-shared.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
26
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
27
|
|
|
28
|
-
var get = function (fullscreenState) {
|
|
28
|
+
var get$5 = function (fullscreenState) {
|
|
29
29
|
return {
|
|
30
30
|
isFullscreen: function () {
|
|
31
31
|
return fullscreenState.get() !== null;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
return t;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
var isType = function (type) {
|
|
48
|
+
var isType$1 = function (type) {
|
|
49
49
|
return function (value) {
|
|
50
50
|
return typeOf(value) === type;
|
|
51
51
|
};
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
return typeof value === type;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
-
var isString = isType('string');
|
|
59
|
-
var isArray = isType('array');
|
|
58
|
+
var isString = isType$1('string');
|
|
59
|
+
var isArray = isType$1('array');
|
|
60
60
|
var isBoolean = isSimpleType('boolean');
|
|
61
61
|
var isNullable = function (a) {
|
|
62
62
|
return a === null || a === undefined;
|
|
@@ -88,6 +88,9 @@
|
|
|
88
88
|
return value;
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
+
var identity = function (x) {
|
|
92
|
+
return x;
|
|
93
|
+
};
|
|
91
94
|
function curry(fn) {
|
|
92
95
|
var initialArgs = [];
|
|
93
96
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -109,20 +112,14 @@
|
|
|
109
112
|
return NONE;
|
|
110
113
|
};
|
|
111
114
|
var NONE = function () {
|
|
112
|
-
var eq = function (o) {
|
|
113
|
-
return o.isNone();
|
|
114
|
-
};
|
|
115
115
|
var call = function (thunk) {
|
|
116
116
|
return thunk();
|
|
117
117
|
};
|
|
118
|
-
var id =
|
|
119
|
-
return n;
|
|
120
|
-
};
|
|
118
|
+
var id = identity;
|
|
121
119
|
var me = {
|
|
122
120
|
fold: function (n, _s) {
|
|
123
121
|
return n();
|
|
124
122
|
},
|
|
125
|
-
is: never,
|
|
126
123
|
isSome: never,
|
|
127
124
|
isNone: always,
|
|
128
125
|
getOr: id,
|
|
@@ -139,9 +136,9 @@
|
|
|
139
136
|
bind: none,
|
|
140
137
|
exists: never,
|
|
141
138
|
forall: always,
|
|
142
|
-
filter:
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
filter: function () {
|
|
140
|
+
return none();
|
|
141
|
+
},
|
|
145
142
|
toArray: function () {
|
|
146
143
|
return [];
|
|
147
144
|
},
|
|
@@ -161,9 +158,6 @@
|
|
|
161
158
|
fold: function (n, s) {
|
|
162
159
|
return s(a);
|
|
163
160
|
},
|
|
164
|
-
is: function (v) {
|
|
165
|
-
return a === v;
|
|
166
|
-
},
|
|
167
161
|
isSome: always,
|
|
168
162
|
isNone: never,
|
|
169
163
|
getOr: constant_a,
|
|
@@ -190,14 +184,6 @@
|
|
|
190
184
|
},
|
|
191
185
|
toString: function () {
|
|
192
186
|
return 'some(' + a + ')';
|
|
193
|
-
},
|
|
194
|
-
equals: function (o) {
|
|
195
|
-
return o.is(a);
|
|
196
|
-
},
|
|
197
|
-
equals_: function (o, elementEq) {
|
|
198
|
-
return o.fold(never, function (b) {
|
|
199
|
-
return elementEq(a, b);
|
|
200
|
-
});
|
|
201
187
|
}
|
|
202
188
|
};
|
|
203
189
|
return me;
|
|
@@ -211,7 +197,20 @@
|
|
|
211
197
|
from: from
|
|
212
198
|
};
|
|
213
199
|
|
|
214
|
-
var
|
|
200
|
+
var __assign = function () {
|
|
201
|
+
__assign = Object.assign || function __assign(t) {
|
|
202
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
203
|
+
s = arguments[i];
|
|
204
|
+
for (var p in s)
|
|
205
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
206
|
+
t[p] = s[p];
|
|
207
|
+
}
|
|
208
|
+
return t;
|
|
209
|
+
};
|
|
210
|
+
return __assign.apply(this, arguments);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var singleton = function (doRevoke) {
|
|
215
214
|
var subject = Cell(Optional.none());
|
|
216
215
|
var revoke = function () {
|
|
217
216
|
return subject.get().each(doRevoke);
|
|
@@ -223,6 +222,9 @@
|
|
|
223
222
|
var isSet = function () {
|
|
224
223
|
return subject.get().isSome();
|
|
225
224
|
};
|
|
225
|
+
var get = function () {
|
|
226
|
+
return subject.get();
|
|
227
|
+
};
|
|
226
228
|
var set = function (s) {
|
|
227
229
|
revoke();
|
|
228
230
|
subject.set(Optional.some(s));
|
|
@@ -230,34 +232,21 @@
|
|
|
230
232
|
return {
|
|
231
233
|
clear: clear,
|
|
232
234
|
isSet: isSet,
|
|
235
|
+
get: get,
|
|
233
236
|
set: set
|
|
234
237
|
};
|
|
235
238
|
};
|
|
236
239
|
var unbindable = function () {
|
|
237
|
-
return
|
|
240
|
+
return singleton(function (s) {
|
|
238
241
|
return s.unbind();
|
|
239
242
|
});
|
|
240
243
|
};
|
|
241
244
|
var value = function () {
|
|
242
|
-
var subject =
|
|
243
|
-
var clear = function () {
|
|
244
|
-
return subject.set(Optional.none());
|
|
245
|
-
};
|
|
246
|
-
var set = function (s) {
|
|
247
|
-
return subject.set(Optional.some(s));
|
|
248
|
-
};
|
|
249
|
-
var isSet = function () {
|
|
250
|
-
return subject.get().isSome();
|
|
251
|
-
};
|
|
245
|
+
var subject = singleton(noop);
|
|
252
246
|
var on = function (f) {
|
|
253
247
|
return subject.get().each(f);
|
|
254
248
|
};
|
|
255
|
-
return {
|
|
256
|
-
clear: clear,
|
|
257
|
-
set: set,
|
|
258
|
-
isSet: isSet,
|
|
259
|
-
on: on
|
|
260
|
-
};
|
|
249
|
+
return __assign(__assign({}, subject), { on: on });
|
|
261
250
|
};
|
|
262
251
|
|
|
263
252
|
var nativePush = Array.prototype.push;
|
|
@@ -270,13 +259,13 @@
|
|
|
270
259
|
}
|
|
271
260
|
return r;
|
|
272
261
|
};
|
|
273
|
-
var each = function (xs, f) {
|
|
262
|
+
var each$1 = function (xs, f) {
|
|
274
263
|
for (var i = 0, len = xs.length; i < len; i++) {
|
|
275
264
|
var x = xs[i];
|
|
276
265
|
f(x, i);
|
|
277
266
|
}
|
|
278
267
|
};
|
|
279
|
-
var filter = function (xs, pred) {
|
|
268
|
+
var filter$1 = function (xs, pred) {
|
|
280
269
|
var r = [];
|
|
281
270
|
for (var i = 0, len = xs.length; i < len; i++) {
|
|
282
271
|
var x = xs[i];
|
|
@@ -286,6 +275,20 @@
|
|
|
286
275
|
}
|
|
287
276
|
return r;
|
|
288
277
|
};
|
|
278
|
+
var findUntil = function (xs, pred, until) {
|
|
279
|
+
for (var i = 0, len = xs.length; i < len; i++) {
|
|
280
|
+
var x = xs[i];
|
|
281
|
+
if (pred(x, i)) {
|
|
282
|
+
return Optional.some(x);
|
|
283
|
+
} else if (until(x, i)) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return Optional.none();
|
|
288
|
+
};
|
|
289
|
+
var find$1 = function (xs, pred) {
|
|
290
|
+
return findUntil(xs, pred, never);
|
|
291
|
+
};
|
|
289
292
|
var flatten = function (xs) {
|
|
290
293
|
var r = [];
|
|
291
294
|
for (var i = 0, len = xs.length; i < len; ++i) {
|
|
@@ -296,18 +299,27 @@
|
|
|
296
299
|
}
|
|
297
300
|
return r;
|
|
298
301
|
};
|
|
299
|
-
var bind = function (xs, f) {
|
|
302
|
+
var bind$3 = function (xs, f) {
|
|
300
303
|
return flatten(map(xs, f));
|
|
301
304
|
};
|
|
302
|
-
var get$
|
|
305
|
+
var get$4 = function (xs, i) {
|
|
303
306
|
return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
|
|
304
307
|
};
|
|
305
308
|
var head = function (xs) {
|
|
306
|
-
return get$
|
|
309
|
+
return get$4(xs, 0);
|
|
310
|
+
};
|
|
311
|
+
var findMap = function (arr, f) {
|
|
312
|
+
for (var i = 0; i < arr.length; i++) {
|
|
313
|
+
var r = f(arr[i], i);
|
|
314
|
+
if (r.isSome()) {
|
|
315
|
+
return r;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return Optional.none();
|
|
307
319
|
};
|
|
308
320
|
|
|
309
321
|
var keys = Object.keys;
|
|
310
|
-
var each
|
|
322
|
+
var each = function (obj, f) {
|
|
311
323
|
var props = keys(obj);
|
|
312
324
|
for (var k = 0, len = props.length; k < len; k++) {
|
|
313
325
|
var i = props[k];
|
|
@@ -316,7 +328,11 @@
|
|
|
316
328
|
}
|
|
317
329
|
};
|
|
318
330
|
|
|
319
|
-
var
|
|
331
|
+
var contains = function (str, substr) {
|
|
332
|
+
return str.indexOf(substr) !== -1;
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
var isSupported$1 = function (dom) {
|
|
320
336
|
return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
321
337
|
};
|
|
322
338
|
|
|
@@ -357,7 +373,7 @@
|
|
|
357
373
|
fromPoint: fromPoint
|
|
358
374
|
};
|
|
359
375
|
|
|
360
|
-
|
|
376
|
+
typeof window !== 'undefined' ? window : Function('return this;')();
|
|
361
377
|
|
|
362
378
|
var DOCUMENT = 9;
|
|
363
379
|
var DOCUMENT_FRAGMENT = 11;
|
|
@@ -367,15 +383,367 @@
|
|
|
367
383
|
var type = function (element) {
|
|
368
384
|
return element.dom.nodeType;
|
|
369
385
|
};
|
|
370
|
-
var isType
|
|
386
|
+
var isType = function (t) {
|
|
371
387
|
return function (element) {
|
|
372
388
|
return type(element) === t;
|
|
373
389
|
};
|
|
374
390
|
};
|
|
375
|
-
var isElement = isType
|
|
376
|
-
var isText = isType
|
|
377
|
-
var isDocument = isType
|
|
378
|
-
var isDocumentFragment = isType
|
|
391
|
+
var isElement = isType(ELEMENT);
|
|
392
|
+
var isText = isType(TEXT);
|
|
393
|
+
var isDocument = isType(DOCUMENT);
|
|
394
|
+
var isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
|
395
|
+
|
|
396
|
+
var cached = function (f) {
|
|
397
|
+
var called = false;
|
|
398
|
+
var r;
|
|
399
|
+
return function () {
|
|
400
|
+
var args = [];
|
|
401
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
402
|
+
args[_i] = arguments[_i];
|
|
403
|
+
}
|
|
404
|
+
if (!called) {
|
|
405
|
+
called = true;
|
|
406
|
+
r = f.apply(null, args);
|
|
407
|
+
}
|
|
408
|
+
return r;
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
var DeviceType = function (os, browser, userAgent, mediaMatch) {
|
|
413
|
+
var isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
|
|
414
|
+
var isiPhone = os.isiOS() && !isiPad;
|
|
415
|
+
var isMobile = os.isiOS() || os.isAndroid();
|
|
416
|
+
var isTouch = isMobile || mediaMatch('(pointer:coarse)');
|
|
417
|
+
var isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
|
|
418
|
+
var isPhone = isiPhone || isMobile && !isTablet;
|
|
419
|
+
var iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
|
|
420
|
+
var isDesktop = !isPhone && !isTablet && !iOSwebview;
|
|
421
|
+
return {
|
|
422
|
+
isiPad: constant(isiPad),
|
|
423
|
+
isiPhone: constant(isiPhone),
|
|
424
|
+
isTablet: constant(isTablet),
|
|
425
|
+
isPhone: constant(isPhone),
|
|
426
|
+
isTouch: constant(isTouch),
|
|
427
|
+
isAndroid: os.isAndroid,
|
|
428
|
+
isiOS: os.isiOS,
|
|
429
|
+
isWebView: constant(iOSwebview),
|
|
430
|
+
isDesktop: constant(isDesktop)
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
var firstMatch = function (regexes, s) {
|
|
435
|
+
for (var i = 0; i < regexes.length; i++) {
|
|
436
|
+
var x = regexes[i];
|
|
437
|
+
if (x.test(s)) {
|
|
438
|
+
return x;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return undefined;
|
|
442
|
+
};
|
|
443
|
+
var find = function (regexes, agent) {
|
|
444
|
+
var r = firstMatch(regexes, agent);
|
|
445
|
+
if (!r) {
|
|
446
|
+
return {
|
|
447
|
+
major: 0,
|
|
448
|
+
minor: 0
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
var group = function (i) {
|
|
452
|
+
return Number(agent.replace(r, '$' + i));
|
|
453
|
+
};
|
|
454
|
+
return nu$2(group(1), group(2));
|
|
455
|
+
};
|
|
456
|
+
var detect$3 = function (versionRegexes, agent) {
|
|
457
|
+
var cleanedAgent = String(agent).toLowerCase();
|
|
458
|
+
if (versionRegexes.length === 0) {
|
|
459
|
+
return unknown$2();
|
|
460
|
+
}
|
|
461
|
+
return find(versionRegexes, cleanedAgent);
|
|
462
|
+
};
|
|
463
|
+
var unknown$2 = function () {
|
|
464
|
+
return nu$2(0, 0);
|
|
465
|
+
};
|
|
466
|
+
var nu$2 = function (major, minor) {
|
|
467
|
+
return {
|
|
468
|
+
major: major,
|
|
469
|
+
minor: minor
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
var Version = {
|
|
473
|
+
nu: nu$2,
|
|
474
|
+
detect: detect$3,
|
|
475
|
+
unknown: unknown$2
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
var detectBrowser$1 = function (browsers, userAgentData) {
|
|
479
|
+
return findMap(userAgentData.brands, function (uaBrand) {
|
|
480
|
+
var lcBrand = uaBrand.brand.toLowerCase();
|
|
481
|
+
return find$1(browsers, function (browser) {
|
|
482
|
+
var _a;
|
|
483
|
+
return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
|
484
|
+
}).map(function (info) {
|
|
485
|
+
return {
|
|
486
|
+
current: info.name,
|
|
487
|
+
version: Version.nu(parseInt(uaBrand.version, 10), 0)
|
|
488
|
+
};
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var detect$2 = function (candidates, userAgent) {
|
|
494
|
+
var agent = String(userAgent).toLowerCase();
|
|
495
|
+
return find$1(candidates, function (candidate) {
|
|
496
|
+
return candidate.search(agent);
|
|
497
|
+
});
|
|
498
|
+
};
|
|
499
|
+
var detectBrowser = function (browsers, userAgent) {
|
|
500
|
+
return detect$2(browsers, userAgent).map(function (browser) {
|
|
501
|
+
var version = Version.detect(browser.versionRegexes, userAgent);
|
|
502
|
+
return {
|
|
503
|
+
current: browser.name,
|
|
504
|
+
version: version
|
|
505
|
+
};
|
|
506
|
+
});
|
|
507
|
+
};
|
|
508
|
+
var detectOs = function (oses, userAgent) {
|
|
509
|
+
return detect$2(oses, userAgent).map(function (os) {
|
|
510
|
+
var version = Version.detect(os.versionRegexes, userAgent);
|
|
511
|
+
return {
|
|
512
|
+
current: os.name,
|
|
513
|
+
version: version
|
|
514
|
+
};
|
|
515
|
+
});
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
|
|
519
|
+
var checkContains = function (target) {
|
|
520
|
+
return function (uastring) {
|
|
521
|
+
return contains(uastring, target);
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
var browsers = [
|
|
525
|
+
{
|
|
526
|
+
name: 'Edge',
|
|
527
|
+
versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
|
|
528
|
+
search: function (uastring) {
|
|
529
|
+
return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
name: 'Chrome',
|
|
534
|
+
brand: 'Chromium',
|
|
535
|
+
versionRegexes: [
|
|
536
|
+
/.*?chrome\/([0-9]+)\.([0-9]+).*/,
|
|
537
|
+
normalVersionRegex
|
|
538
|
+
],
|
|
539
|
+
search: function (uastring) {
|
|
540
|
+
return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
name: 'IE',
|
|
545
|
+
versionRegexes: [
|
|
546
|
+
/.*?msie\ ?([0-9]+)\.([0-9]+).*/,
|
|
547
|
+
/.*?rv:([0-9]+)\.([0-9]+).*/
|
|
548
|
+
],
|
|
549
|
+
search: function (uastring) {
|
|
550
|
+
return contains(uastring, 'msie') || contains(uastring, 'trident');
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
name: 'Opera',
|
|
555
|
+
versionRegexes: [
|
|
556
|
+
normalVersionRegex,
|
|
557
|
+
/.*?opera\/([0-9]+)\.([0-9]+).*/
|
|
558
|
+
],
|
|
559
|
+
search: checkContains('opera')
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
name: 'Firefox',
|
|
563
|
+
versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
|
|
564
|
+
search: checkContains('firefox')
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: 'Safari',
|
|
568
|
+
versionRegexes: [
|
|
569
|
+
normalVersionRegex,
|
|
570
|
+
/.*?cpu os ([0-9]+)_([0-9]+).*/
|
|
571
|
+
],
|
|
572
|
+
search: function (uastring) {
|
|
573
|
+
return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
];
|
|
577
|
+
var oses = [
|
|
578
|
+
{
|
|
579
|
+
name: 'Windows',
|
|
580
|
+
search: checkContains('win'),
|
|
581
|
+
versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
name: 'iOS',
|
|
585
|
+
search: function (uastring) {
|
|
586
|
+
return contains(uastring, 'iphone') || contains(uastring, 'ipad');
|
|
587
|
+
},
|
|
588
|
+
versionRegexes: [
|
|
589
|
+
/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
|
|
590
|
+
/.*cpu os ([0-9]+)_([0-9]+).*/,
|
|
591
|
+
/.*cpu iphone os ([0-9]+)_([0-9]+).*/
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: 'Android',
|
|
596
|
+
search: checkContains('android'),
|
|
597
|
+
versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
name: 'OSX',
|
|
601
|
+
search: checkContains('mac os x'),
|
|
602
|
+
versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
name: 'Linux',
|
|
606
|
+
search: checkContains('linux'),
|
|
607
|
+
versionRegexes: []
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
name: 'Solaris',
|
|
611
|
+
search: checkContains('sunos'),
|
|
612
|
+
versionRegexes: []
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
name: 'FreeBSD',
|
|
616
|
+
search: checkContains('freebsd'),
|
|
617
|
+
versionRegexes: []
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
name: 'ChromeOS',
|
|
621
|
+
search: checkContains('cros'),
|
|
622
|
+
versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
|
|
623
|
+
}
|
|
624
|
+
];
|
|
625
|
+
var PlatformInfo = {
|
|
626
|
+
browsers: constant(browsers),
|
|
627
|
+
oses: constant(oses)
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
var edge = 'Edge';
|
|
631
|
+
var chrome = 'Chrome';
|
|
632
|
+
var ie = 'IE';
|
|
633
|
+
var opera = 'Opera';
|
|
634
|
+
var firefox = 'Firefox';
|
|
635
|
+
var safari = 'Safari';
|
|
636
|
+
var unknown$1 = function () {
|
|
637
|
+
return nu$1({
|
|
638
|
+
current: undefined,
|
|
639
|
+
version: Version.unknown()
|
|
640
|
+
});
|
|
641
|
+
};
|
|
642
|
+
var nu$1 = function (info) {
|
|
643
|
+
var current = info.current;
|
|
644
|
+
var version = info.version;
|
|
645
|
+
var isBrowser = function (name) {
|
|
646
|
+
return function () {
|
|
647
|
+
return current === name;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
return {
|
|
651
|
+
current: current,
|
|
652
|
+
version: version,
|
|
653
|
+
isEdge: isBrowser(edge),
|
|
654
|
+
isChrome: isBrowser(chrome),
|
|
655
|
+
isIE: isBrowser(ie),
|
|
656
|
+
isOpera: isBrowser(opera),
|
|
657
|
+
isFirefox: isBrowser(firefox),
|
|
658
|
+
isSafari: isBrowser(safari)
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
var Browser = {
|
|
662
|
+
unknown: unknown$1,
|
|
663
|
+
nu: nu$1,
|
|
664
|
+
edge: constant(edge),
|
|
665
|
+
chrome: constant(chrome),
|
|
666
|
+
ie: constant(ie),
|
|
667
|
+
opera: constant(opera),
|
|
668
|
+
firefox: constant(firefox),
|
|
669
|
+
safari: constant(safari)
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
var windows = 'Windows';
|
|
673
|
+
var ios = 'iOS';
|
|
674
|
+
var android = 'Android';
|
|
675
|
+
var linux = 'Linux';
|
|
676
|
+
var osx = 'OSX';
|
|
677
|
+
var solaris = 'Solaris';
|
|
678
|
+
var freebsd = 'FreeBSD';
|
|
679
|
+
var chromeos = 'ChromeOS';
|
|
680
|
+
var unknown = function () {
|
|
681
|
+
return nu({
|
|
682
|
+
current: undefined,
|
|
683
|
+
version: Version.unknown()
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
var nu = function (info) {
|
|
687
|
+
var current = info.current;
|
|
688
|
+
var version = info.version;
|
|
689
|
+
var isOS = function (name) {
|
|
690
|
+
return function () {
|
|
691
|
+
return current === name;
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
return {
|
|
695
|
+
current: current,
|
|
696
|
+
version: version,
|
|
697
|
+
isWindows: isOS(windows),
|
|
698
|
+
isiOS: isOS(ios),
|
|
699
|
+
isAndroid: isOS(android),
|
|
700
|
+
isOSX: isOS(osx),
|
|
701
|
+
isLinux: isOS(linux),
|
|
702
|
+
isSolaris: isOS(solaris),
|
|
703
|
+
isFreeBSD: isOS(freebsd),
|
|
704
|
+
isChromeOS: isOS(chromeos)
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
var OperatingSystem = {
|
|
708
|
+
unknown: unknown,
|
|
709
|
+
nu: nu,
|
|
710
|
+
windows: constant(windows),
|
|
711
|
+
ios: constant(ios),
|
|
712
|
+
android: constant(android),
|
|
713
|
+
linux: constant(linux),
|
|
714
|
+
osx: constant(osx),
|
|
715
|
+
solaris: constant(solaris),
|
|
716
|
+
freebsd: constant(freebsd),
|
|
717
|
+
chromeos: constant(chromeos)
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
var detect$1 = function (userAgent, userAgentDataOpt, mediaMatch) {
|
|
721
|
+
var browsers = PlatformInfo.browsers();
|
|
722
|
+
var oses = PlatformInfo.oses();
|
|
723
|
+
var browser = userAgentDataOpt.bind(function (userAgentData) {
|
|
724
|
+
return detectBrowser$1(browsers, userAgentData);
|
|
725
|
+
}).orThunk(function () {
|
|
726
|
+
return detectBrowser(browsers, userAgent);
|
|
727
|
+
}).fold(Browser.unknown, Browser.nu);
|
|
728
|
+
var os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
|
|
729
|
+
var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
|
|
730
|
+
return {
|
|
731
|
+
browser: browser,
|
|
732
|
+
os: os,
|
|
733
|
+
deviceType: deviceType
|
|
734
|
+
};
|
|
735
|
+
};
|
|
736
|
+
var PlatformDetection = { detect: detect$1 };
|
|
737
|
+
|
|
738
|
+
var mediaMatch = function (query) {
|
|
739
|
+
return window.matchMedia(query).matches;
|
|
740
|
+
};
|
|
741
|
+
var platform = cached(function () {
|
|
742
|
+
return PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch);
|
|
743
|
+
});
|
|
744
|
+
var detect = function () {
|
|
745
|
+
return platform();
|
|
746
|
+
};
|
|
379
747
|
|
|
380
748
|
var is = function (element, selector) {
|
|
381
749
|
var dom = element.dom;
|
|
@@ -399,7 +767,7 @@
|
|
|
399
767
|
var bypassSelector = function (dom) {
|
|
400
768
|
return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
|
|
401
769
|
};
|
|
402
|
-
var all = function (selector, scope) {
|
|
770
|
+
var all$1 = function (selector, scope) {
|
|
403
771
|
var base = scope === undefined ? document : scope.dom;
|
|
404
772
|
return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);
|
|
405
773
|
};
|
|
@@ -433,9 +801,9 @@
|
|
|
433
801
|
}
|
|
434
802
|
return ret;
|
|
435
803
|
};
|
|
436
|
-
var siblings = function (element) {
|
|
804
|
+
var siblings$2 = function (element) {
|
|
437
805
|
var filterSelf = function (elements) {
|
|
438
|
-
return filter(elements, function (x) {
|
|
806
|
+
return filter$1(elements, function (x) {
|
|
439
807
|
return !eq(element, x);
|
|
440
808
|
});
|
|
441
809
|
};
|
|
@@ -449,7 +817,7 @@
|
|
|
449
817
|
return isDocumentFragment(dos) && isNonNullable(dos.dom.host);
|
|
450
818
|
};
|
|
451
819
|
var supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
|
|
452
|
-
var isSupported
|
|
820
|
+
var isSupported = constant(supported);
|
|
453
821
|
var getRootNode = supported ? function (e) {
|
|
454
822
|
return SugarElement.fromDom(e.dom.getRootNode());
|
|
455
823
|
} : documentOrOwner;
|
|
@@ -461,7 +829,7 @@
|
|
|
461
829
|
return SugarElement.fromDom(e.dom.host);
|
|
462
830
|
};
|
|
463
831
|
var getOriginalEventTarget = function (event) {
|
|
464
|
-
if (isSupported
|
|
832
|
+
if (isSupported() && isNonNullable(event.target)) {
|
|
465
833
|
var el = SugarElement.fromDom(event.target);
|
|
466
834
|
if (isElement(el) && isOpenShadowHost(el)) {
|
|
467
835
|
if (event.composed && event.composedPath) {
|
|
@@ -507,7 +875,7 @@
|
|
|
507
875
|
var set = function (element, key, value) {
|
|
508
876
|
rawSet(element.dom, key, value);
|
|
509
877
|
};
|
|
510
|
-
var get$
|
|
878
|
+
var get$3 = function (element, key) {
|
|
511
879
|
var v = element.dom.getAttribute(key);
|
|
512
880
|
return v === null ? undefined : v;
|
|
513
881
|
};
|
|
@@ -520,24 +888,24 @@
|
|
|
520
888
|
console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
|
|
521
889
|
throw new Error('CSS value must be a string: ' + value);
|
|
522
890
|
}
|
|
523
|
-
if (isSupported(dom)) {
|
|
891
|
+
if (isSupported$1(dom)) {
|
|
524
892
|
dom.style.setProperty(property, value);
|
|
525
893
|
}
|
|
526
894
|
};
|
|
527
895
|
var setAll = function (element, css) {
|
|
528
896
|
var dom = element.dom;
|
|
529
|
-
each
|
|
897
|
+
each(css, function (v, k) {
|
|
530
898
|
internalSet(dom, k, v);
|
|
531
899
|
});
|
|
532
900
|
};
|
|
533
|
-
var get$
|
|
901
|
+
var get$2 = function (element, property) {
|
|
534
902
|
var dom = element.dom;
|
|
535
903
|
var styles = window.getComputedStyle(dom);
|
|
536
904
|
var r = styles.getPropertyValue(property);
|
|
537
905
|
return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
|
|
538
906
|
};
|
|
539
907
|
var getUnsafeProperty = function (dom, property) {
|
|
540
|
-
return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
|
|
908
|
+
return isSupported$1(dom) ? dom.style.getPropertyValue(property) : '';
|
|
541
909
|
};
|
|
542
910
|
|
|
543
911
|
var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
|
|
@@ -574,16 +942,16 @@
|
|
|
574
942
|
element.dom.addEventListener(event, wrapped, useCapture);
|
|
575
943
|
return { unbind: curry(unbind, element, event, wrapped, useCapture) };
|
|
576
944
|
};
|
|
577
|
-
var bind$
|
|
945
|
+
var bind$2 = function (element, event, filter, handler) {
|
|
578
946
|
return binder(element, event, filter, handler, false);
|
|
579
947
|
};
|
|
580
948
|
var unbind = function (element, event, handler, useCapture) {
|
|
581
949
|
element.dom.removeEventListener(event, handler, useCapture);
|
|
582
950
|
};
|
|
583
951
|
|
|
584
|
-
var filter
|
|
585
|
-
var bind$
|
|
586
|
-
return bind$
|
|
952
|
+
var filter = always;
|
|
953
|
+
var bind$1 = function (element, event, handler) {
|
|
954
|
+
return bind$2(element, event, filter, handler);
|
|
587
955
|
};
|
|
588
956
|
|
|
589
957
|
var r = function (left, top) {
|
|
@@ -598,16 +966,20 @@
|
|
|
598
966
|
};
|
|
599
967
|
var SugarPosition = r;
|
|
600
968
|
|
|
601
|
-
var get$
|
|
969
|
+
var get$1 = function (_DOC) {
|
|
602
970
|
var doc = _DOC !== undefined ? _DOC.dom : document;
|
|
603
971
|
var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
|
|
604
972
|
var y = doc.body.scrollTop || doc.documentElement.scrollTop;
|
|
605
973
|
return SugarPosition(x, y);
|
|
606
974
|
};
|
|
607
975
|
|
|
608
|
-
var get
|
|
976
|
+
var get = function (_win) {
|
|
609
977
|
var win = _win === undefined ? window : _win;
|
|
610
|
-
|
|
978
|
+
if (detect().browser.isFirefox()) {
|
|
979
|
+
return Optional.none();
|
|
980
|
+
} else {
|
|
981
|
+
return Optional.from(win['visualViewport']);
|
|
982
|
+
}
|
|
611
983
|
};
|
|
612
984
|
var bounds = function (x, y, width, height) {
|
|
613
985
|
return {
|
|
@@ -622,8 +994,8 @@
|
|
|
622
994
|
var getBounds = function (_win) {
|
|
623
995
|
var win = _win === undefined ? window : _win;
|
|
624
996
|
var doc = win.document;
|
|
625
|
-
var scroll = get$
|
|
626
|
-
return get
|
|
997
|
+
var scroll = get$1(SugarElement.fromDom(doc));
|
|
998
|
+
return get(win).fold(function () {
|
|
627
999
|
var html = win.document.documentElement;
|
|
628
1000
|
var width = html.clientWidth;
|
|
629
1001
|
var height = html.clientHeight;
|
|
@@ -632,8 +1004,8 @@
|
|
|
632
1004
|
return bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height);
|
|
633
1005
|
});
|
|
634
1006
|
};
|
|
635
|
-
var bind
|
|
636
|
-
return get
|
|
1007
|
+
var bind = function (name, callback, _win) {
|
|
1008
|
+
return get(_win).map(function (visualViewport) {
|
|
637
1009
|
var handler = function (e) {
|
|
638
1010
|
return callback(fromRawEvent(e));
|
|
639
1011
|
};
|
|
@@ -648,11 +1020,11 @@
|
|
|
648
1020
|
});
|
|
649
1021
|
};
|
|
650
1022
|
|
|
651
|
-
var global$
|
|
1023
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
652
1024
|
|
|
653
|
-
var global$
|
|
1025
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
654
1026
|
|
|
655
|
-
var global
|
|
1027
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
656
1028
|
|
|
657
1029
|
var fireFullscreenStateChanged = function (editor, state) {
|
|
658
1030
|
editor.fire('FullscreenStateChanged', { state: state });
|
|
@@ -714,22 +1086,22 @@
|
|
|
714
1086
|
return elem.dom === getFullscreenElement(owner(elem).dom);
|
|
715
1087
|
};
|
|
716
1088
|
|
|
717
|
-
var ancestors = function (scope, predicate, isRoot) {
|
|
718
|
-
return filter(parents(scope, isRoot), predicate);
|
|
1089
|
+
var ancestors$1 = function (scope, predicate, isRoot) {
|
|
1090
|
+
return filter$1(parents(scope, isRoot), predicate);
|
|
719
1091
|
};
|
|
720
1092
|
var siblings$1 = function (scope, predicate) {
|
|
721
|
-
return filter(siblings(scope), predicate);
|
|
1093
|
+
return filter$1(siblings$2(scope), predicate);
|
|
722
1094
|
};
|
|
723
1095
|
|
|
724
|
-
var all
|
|
725
|
-
return all(selector);
|
|
1096
|
+
var all = function (selector) {
|
|
1097
|
+
return all$1(selector);
|
|
726
1098
|
};
|
|
727
|
-
var ancestors
|
|
728
|
-
return ancestors(scope, function (e) {
|
|
1099
|
+
var ancestors = function (scope, selector, isRoot) {
|
|
1100
|
+
return ancestors$1(scope, function (e) {
|
|
729
1101
|
return is(e, selector);
|
|
730
1102
|
}, isRoot);
|
|
731
1103
|
};
|
|
732
|
-
var siblings
|
|
1104
|
+
var siblings = function (scope, selector) {
|
|
733
1105
|
return siblings$1(scope, function (e) {
|
|
734
1106
|
return is(e, selector);
|
|
735
1107
|
});
|
|
@@ -740,18 +1112,18 @@
|
|
|
740
1112
|
var ancestorPosition = 'position:absolute!important;';
|
|
741
1113
|
var ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
|
|
742
1114
|
var bgFallback = 'background-color:rgb(255,255,255)!important;';
|
|
743
|
-
var isAndroid = global$
|
|
1115
|
+
var isAndroid = global$1.os.isAndroid();
|
|
744
1116
|
var matchColor = function (editorBody) {
|
|
745
|
-
var color = get$
|
|
1117
|
+
var color = get$2(editorBody, 'background-color');
|
|
746
1118
|
return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
|
|
747
1119
|
};
|
|
748
1120
|
var clobberStyles = function (dom, container, editorBody) {
|
|
749
1121
|
var gatherSiblings = function (element) {
|
|
750
|
-
return siblings
|
|
1122
|
+
return siblings(element, '*:not(.tox-silver-sink)');
|
|
751
1123
|
};
|
|
752
1124
|
var clobber = function (clobberStyle) {
|
|
753
1125
|
return function (element) {
|
|
754
|
-
var styles = get$
|
|
1126
|
+
var styles = get$3(element, 'style');
|
|
755
1127
|
var backup = styles === undefined ? 'no-styles' : styles.trim();
|
|
756
1128
|
if (backup === clobberStyle) {
|
|
757
1129
|
return;
|
|
@@ -761,18 +1133,18 @@
|
|
|
761
1133
|
}
|
|
762
1134
|
};
|
|
763
1135
|
};
|
|
764
|
-
var ancestors = ancestors
|
|
765
|
-
var siblings = bind(ancestors, gatherSiblings);
|
|
1136
|
+
var ancestors$1 = ancestors(container, '*');
|
|
1137
|
+
var siblings$1 = bind$3(ancestors$1, gatherSiblings);
|
|
766
1138
|
var bgColor = matchColor(editorBody);
|
|
767
|
-
each(siblings, clobber(siblingStyles));
|
|
768
|
-
each(ancestors, clobber(ancestorPosition + ancestorStyles + bgColor));
|
|
1139
|
+
each$1(siblings$1, clobber(siblingStyles));
|
|
1140
|
+
each$1(ancestors$1, clobber(ancestorPosition + ancestorStyles + bgColor));
|
|
769
1141
|
var containerStyles = isAndroid === true ? '' : ancestorPosition;
|
|
770
1142
|
clobber(containerStyles + ancestorStyles + bgColor)(container);
|
|
771
1143
|
};
|
|
772
1144
|
var restoreStyles = function (dom) {
|
|
773
|
-
var clobberedEls = all
|
|
774
|
-
each(clobberedEls, function (element) {
|
|
775
|
-
var restore = get$
|
|
1145
|
+
var clobberedEls = all('[' + attr + ']');
|
|
1146
|
+
each$1(clobberedEls, function (element) {
|
|
1147
|
+
var restore = get$3(element, attr);
|
|
776
1148
|
if (restore !== 'no-styles') {
|
|
777
1149
|
setAll(element, dom.parseStyle(restore));
|
|
778
1150
|
} else {
|
|
@@ -782,18 +1154,14 @@
|
|
|
782
1154
|
});
|
|
783
1155
|
};
|
|
784
1156
|
|
|
785
|
-
var DOM = global$
|
|
1157
|
+
var DOM = global$2.DOM;
|
|
786
1158
|
var getScrollPos = function () {
|
|
787
|
-
|
|
788
|
-
return {
|
|
789
|
-
x: vp.x,
|
|
790
|
-
y: vp.y
|
|
791
|
-
};
|
|
1159
|
+
return getBounds(window);
|
|
792
1160
|
};
|
|
793
1161
|
var setScrollPos = function (pos) {
|
|
794
|
-
window.scrollTo(pos.x, pos.y);
|
|
1162
|
+
return window.scrollTo(pos.x, pos.y);
|
|
795
1163
|
};
|
|
796
|
-
var viewportUpdate = get
|
|
1164
|
+
var viewportUpdate = get().fold(function () {
|
|
797
1165
|
return {
|
|
798
1166
|
bind: noop,
|
|
799
1167
|
unbind: noop
|
|
@@ -818,15 +1186,15 @@
|
|
|
818
1186
|
});
|
|
819
1187
|
});
|
|
820
1188
|
};
|
|
821
|
-
var update = global
|
|
1189
|
+
var update = global.throttle(function () {
|
|
822
1190
|
refreshScroll();
|
|
823
1191
|
refreshVisualViewport();
|
|
824
1192
|
}, 50);
|
|
825
|
-
var bind = function (element) {
|
|
1193
|
+
var bind$1 = function (element) {
|
|
826
1194
|
editorContainer.set(element);
|
|
827
1195
|
update();
|
|
828
|
-
resizeBinder.set(bind
|
|
829
|
-
scrollBinder.set(bind
|
|
1196
|
+
resizeBinder.set(bind('resize', update));
|
|
1197
|
+
scrollBinder.set(bind('scroll', update));
|
|
830
1198
|
};
|
|
831
1199
|
var unbind = function () {
|
|
832
1200
|
editorContainer.on(function () {
|
|
@@ -836,7 +1204,7 @@
|
|
|
836
1204
|
editorContainer.clear();
|
|
837
1205
|
};
|
|
838
1206
|
return {
|
|
839
|
-
bind: bind,
|
|
1207
|
+
bind: bind$1,
|
|
840
1208
|
unbind: unbind
|
|
841
1209
|
};
|
|
842
1210
|
});
|
|
@@ -848,7 +1216,7 @@
|
|
|
848
1216
|
var fullscreenRoot = getFullscreenRoot(editor);
|
|
849
1217
|
var fullscreenInfo = fullscreenState.get();
|
|
850
1218
|
var editorBody = SugarElement.fromDom(editor.getBody());
|
|
851
|
-
var isTouch = global$
|
|
1219
|
+
var isTouch = global$1.deviceType.isTouch();
|
|
852
1220
|
var editorContainerStyle = editorContainer.style;
|
|
853
1221
|
var iframe = editor.iframeElement;
|
|
854
1222
|
var iframeStyle = iframe.style;
|
|
@@ -874,7 +1242,7 @@
|
|
|
874
1242
|
});
|
|
875
1243
|
};
|
|
876
1244
|
if (!fullscreenInfo) {
|
|
877
|
-
var fullscreenChangeHandler = bind$
|
|
1245
|
+
var fullscreenChangeHandler = bind$1(owner(fullscreenRoot), getFullscreenchangeEventName(), function (_evt) {
|
|
878
1246
|
if (getFullscreenNative(editor)) {
|
|
879
1247
|
if (!isFullscreenElement(fullscreenRoot) && fullscreenState.get() !== null) {
|
|
880
1248
|
toggleFullscreen(editor, fullscreenState);
|
|
@@ -915,15 +1283,15 @@
|
|
|
915
1283
|
editorContainerStyle.height = fullscreenInfo.containerHeight;
|
|
916
1284
|
editorContainerStyle.top = fullscreenInfo.containerTop;
|
|
917
1285
|
editorContainerStyle.left = fullscreenInfo.containerLeft;
|
|
1286
|
+
cleanup();
|
|
918
1287
|
setScrollPos(fullscreenInfo.scrollPos);
|
|
919
1288
|
fullscreenState.set(null);
|
|
920
1289
|
fireFullscreenStateChanged(editor, false);
|
|
921
|
-
cleanup();
|
|
922
1290
|
editor.off('remove', cleanup);
|
|
923
1291
|
}
|
|
924
1292
|
};
|
|
925
1293
|
|
|
926
|
-
var register = function (editor, fullscreenState) {
|
|
1294
|
+
var register$1 = function (editor, fullscreenState) {
|
|
927
1295
|
editor.addCommand('mceFullScreen', function () {
|
|
928
1296
|
toggleFullscreen(editor, fullscreenState);
|
|
929
1297
|
});
|
|
@@ -941,36 +1309,35 @@
|
|
|
941
1309
|
};
|
|
942
1310
|
};
|
|
943
1311
|
};
|
|
944
|
-
var register
|
|
1312
|
+
var register = function (editor, fullscreenState) {
|
|
1313
|
+
var onAction = function () {
|
|
1314
|
+
return editor.execCommand('mceFullScreen');
|
|
1315
|
+
};
|
|
945
1316
|
editor.ui.registry.addToggleMenuItem('fullscreen', {
|
|
946
1317
|
text: 'Fullscreen',
|
|
947
1318
|
icon: 'fullscreen',
|
|
948
1319
|
shortcut: 'Meta+Shift+F',
|
|
949
|
-
onAction:
|
|
950
|
-
return editor.execCommand('mceFullScreen');
|
|
951
|
-
},
|
|
1320
|
+
onAction: onAction,
|
|
952
1321
|
onSetup: makeSetupHandler(editor, fullscreenState)
|
|
953
1322
|
});
|
|
954
1323
|
editor.ui.registry.addToggleButton('fullscreen', {
|
|
955
1324
|
tooltip: 'Fullscreen',
|
|
956
1325
|
icon: 'fullscreen',
|
|
957
|
-
onAction:
|
|
958
|
-
return editor.execCommand('mceFullScreen');
|
|
959
|
-
},
|
|
1326
|
+
onAction: onAction,
|
|
960
1327
|
onSetup: makeSetupHandler(editor, fullscreenState)
|
|
961
1328
|
});
|
|
962
1329
|
};
|
|
963
1330
|
|
|
964
1331
|
function Plugin () {
|
|
965
|
-
global.add('fullscreen', function (editor) {
|
|
1332
|
+
global$3.add('fullscreen', function (editor) {
|
|
966
1333
|
var fullscreenState = Cell(null);
|
|
967
1334
|
if (editor.inline) {
|
|
968
|
-
return get(fullscreenState);
|
|
1335
|
+
return get$5(fullscreenState);
|
|
969
1336
|
}
|
|
970
|
-
register(editor, fullscreenState);
|
|
971
1337
|
register$1(editor, fullscreenState);
|
|
1338
|
+
register(editor, fullscreenState);
|
|
972
1339
|
editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
|
|
973
|
-
return get(fullscreenState);
|
|
1340
|
+
return get$5(fullscreenState);
|
|
974
1341
|
});
|
|
975
1342
|
}
|
|
976
1343
|
|