@mediafly/js-ui 47.2.1 → 47.3.1-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/CHANGELOG.md +2 -18
- package/lib/auto-complete/auto-complete-match-renderer.component.d.ts +0 -5
- package/lib/auto-complete/auto-complete-match-renderer.component.js +5 -23
- package/lib/auto-complete/auto-complete-match-renderer.component.js.map +1 -1
- package/lib/auto-complete/auto-complete.component.html +2 -1
- package/lib/font-selector/font-selector.d.ts +37 -8
- package/lib/font-selector/font-selector.html +58 -13
- package/lib/font-selector/font-selector.js +174 -17
- package/lib/font-selector/font-selector.js.map +1 -1
- package/lib/font-selector/google-webfonts-api.service.d.ts +1 -1
- package/lib/font-selector/google-webfonts-api.service.js +10 -2
- package/lib/font-selector/google-webfonts-api.service.js.map +1 -1
- package/lib/font-selector/webfont-loader.service.d.ts +1 -2
- package/lib/font-selector/webfont-loader.service.js +2 -2
- package/lib/font-selector/webfont-loader.service.js.map +1 -1
- package/lib/jsui.module.css +13 -2
- package/lib/rich-text/index.d.ts +0 -1
- package/lib/rich-text/index.js +0 -1
- package/lib/rich-text/index.js.map +1 -1
- package/lib/rich-text/rich-text.component.d.ts +2 -2
- package/lib/rich-text/rich-text.component.html +6 -14
- package/lib/rich-text/rich-text.component.js +6 -5
- package/lib/rich-text/rich-text.component.js.map +1 -1
- package/lib/styles.css +25 -16
- package/lib/tsconfig.deploy.tsbuildinfo +19 -31
- package/package.json +2 -2
- package/src/components/auto-complete/auto-complete-match-renderer.component.ts +6 -31
- package/src/components/auto-complete/auto-complete.component.html +2 -1
- package/src/components/auto-complete/auto-complete.component.less +2 -1
- package/src/components/font-selector/font-selector.html +58 -13
- package/src/components/font-selector/font-selector.less +100 -0
- package/src/components/font-selector/font-selector.ts +191 -17
- package/src/components/font-selector/google-webfonts-api.backend.ts +1 -1
- package/src/components/font-selector/google-webfonts-api.service.ts +10 -2
- package/src/components/font-selector/webfont-loader.service.ts +2 -2
- package/src/components/index.less +1 -1
- package/src/components/less/objects/buttons.less +8 -0
- package/src/components/less/objects/buttons.module.css +11 -0
- package/src/components/less/variables/colors.less +2 -2
- package/src/components/less/variables.module.css +2 -2
- package/src/components/rich-text/index.ts +0 -1
- package/src/components/rich-text/rich-text.component.html +6 -14
- package/src/components/rich-text/rich-text.component.less +5 -1
- package/src/components/rich-text/rich-text.component.ts +7 -5
- package/tsconfig.tsbuildinfo +48 -65
- package/lib/rich-text/rich-text-toolbar-container.component.d.ts +0 -16
- package/lib/rich-text/rich-text-toolbar-container.component.html +0 -12
- package/lib/rich-text/rich-text-toolbar-container.component.js +0 -75
- package/lib/rich-text/rich-text-toolbar-container.component.js.map +0 -1
- package/src/components/rich-text/rich-text-toolbar-container.component.html +0 -12
- package/src/components/rich-text/rich-text-toolbar-container.component.ts +0 -66
- package/src/components/rich-text/rich-text-toolbar-container.less +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/rich-text/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/rich-text/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="angular-sanitize" />
|
|
2
2
|
/// <reference types="angular-mocks" />
|
|
3
|
-
/// <reference types="google.fonts" />
|
|
4
3
|
import { sanitize } from 'angular';
|
|
5
4
|
import { FontFamilyStyle } from '../font-selector/font-selector';
|
|
6
5
|
export default class RichTextComponentController implements ng.IComponentController {
|
|
@@ -12,6 +11,7 @@ export default class RichTextComponentController implements ng.IComponentControl
|
|
|
12
11
|
protected allowColorSelection?: boolean;
|
|
13
12
|
protected allowFontSelection?: boolean;
|
|
14
13
|
protected fontStyle?: FontFamilyStyle;
|
|
14
|
+
protected fontSelectorId: string;
|
|
15
15
|
protected isRequired: boolean;
|
|
16
16
|
protected requiredText: string;
|
|
17
17
|
protected selectedColor: string;
|
|
@@ -32,7 +32,7 @@ export default class RichTextComponentController implements ng.IComponentControl
|
|
|
32
32
|
$onInit(): void;
|
|
33
33
|
$postLink(): void;
|
|
34
34
|
protected colorChanged(): void;
|
|
35
|
-
protected fontSelected(
|
|
35
|
+
protected fontSelected(fontFamily: string): void;
|
|
36
36
|
protected manageValidity(): void;
|
|
37
37
|
protected onTextChange(_delta: any, _oldContents: any, source: any): void;
|
|
38
38
|
protected selectionChange(range: any, oldRange: any, source: any): void;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
<div id="toolbar" class="c-rich-text">
|
|
2
2
|
|
|
3
|
-
<span ng-if="$ctrl.allowFontSelection" class="ql-formats">
|
|
4
|
-
<mfly:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<mfly:toolbar-container>
|
|
10
|
-
<mfly:font-selector
|
|
11
|
-
label-text="{{ $ctrl.fontLabelText }}"
|
|
12
|
-
on-font-select="$ctrl.fontSelected(font)">
|
|
13
|
-
</mfly:font-selector>
|
|
14
|
-
</mfly:toolbar-container>
|
|
15
|
-
</mfly:rich-text-toolbar-container>
|
|
16
|
-
|
|
3
|
+
<span ng-if="$ctrl.allowFontSelection" class="ql-formats c-rich-text-font-container">
|
|
4
|
+
<mfly:font-selector
|
|
5
|
+
input-id="$ctrl.fontSelectorId"
|
|
6
|
+
font-family="$ctrl.selectedFont"
|
|
7
|
+
on-font-select="$ctrl.fontSelected(fontFamily)">
|
|
8
|
+
</mfly:font-selector>
|
|
17
9
|
</span>
|
|
18
10
|
|
|
19
11
|
<span class="ql-formats">
|
|
@@ -43,6 +43,7 @@ export default class RichTextComponentController {
|
|
|
43
43
|
this.requiredText = this.translateFactory.instant('JSUI.REQUIRED');
|
|
44
44
|
this.selectedColor = this.DEFAULT_COLOR;
|
|
45
45
|
this.selectedFont = this.DEFAULT_FONT;
|
|
46
|
+
this.fontSelectorId = 'rteFontSelector' + Math.floor(Math.random() * 1000 + 1);
|
|
46
47
|
this.colorPicker = document.getElementById('rteColorInput');
|
|
47
48
|
this.colorPicker.addEventListener('change', this.colorChanged.bind(this));
|
|
48
49
|
// programatically reset size
|
|
@@ -80,14 +81,14 @@ export default class RichTextComponentController {
|
|
|
80
81
|
colorChanged() {
|
|
81
82
|
this.applyColor();
|
|
82
83
|
}
|
|
83
|
-
fontSelected(
|
|
84
|
-
if (
|
|
84
|
+
fontSelected(fontFamily) {
|
|
85
|
+
if (fontFamily) {
|
|
85
86
|
this.$rootScope.$broadcast('richTextToolbarContainer:closeContainer');
|
|
86
87
|
const fontAtributor = Quill.import('attributors/style/font');
|
|
87
|
-
fontAtributor.whitelist = [
|
|
88
|
-
this.updateFontDisplay(
|
|
88
|
+
fontAtributor.whitelist = [fontFamily];
|
|
89
|
+
this.updateFontDisplay(fontFamily);
|
|
89
90
|
Quill.register(fontAtributor, true);
|
|
90
|
-
this.editor.format('font',
|
|
91
|
+
this.editor.format('font', fontFamily);
|
|
91
92
|
this.sanitizeContents();
|
|
92
93
|
}
|
|
93
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text.component.js","sourceRoot":"","sources":["../../src/components/rich-text/rich-text.component.ts"],"names":[],"mappings":"AAAA,OAAO,OAAqB,MAAM,SAAS,CAAA;AAC3C,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,CAAC,MAAM,QAAQ,CAAA;AAGtB,8GAA8G;AAC9G,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,iBAAgD,EAAG,EAAE;IAClF,iBAAiB,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,OAAO,OAAO,2BAA2B;
|
|
1
|
+
{"version":3,"file":"rich-text.component.js","sourceRoot":"","sources":["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G,IAAI,CAAC,aAAa,CAAA;gBAEvC,OAAM;aACN;YACD,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBAErB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC7B,OAAM;aACN;YAED,IAAI,CAAC,aAAa,GAAG,KAAK,CAAA;QAC3B,CAAC,CAAC,CAAA;IAEH,CAAC;CAGD;AAGD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE;IAC3C,QAAQ,EAAE;QACT,mBAAmB,EAAE,GAAG;QACxB,kBAAkB,EAAE,GAAG;QACvB,UAAU,EAAE,GAAG;QACf,OAAO,EAAE,GAAG;KACZ;IACD,UAAU,EAAE,2BAA2B;IACvC,OAAO,EAAE;QACR,WAAW,EAAE,SAAS;KACtB;IACD,QAAQ,EAAE,OAAO,CAAC,4BAA4B,CAAC;CAC/C,CAAC,CAAA"}
|
package/lib/styles.css
CHANGED
|
@@ -453,6 +453,8 @@ fieldset[disabled] .o-button.active {
|
|
|
453
453
|
border-radius: 26px;
|
|
454
454
|
}
|
|
455
455
|
.o-button.o-button--small {
|
|
456
|
+
background: #fff;
|
|
457
|
+
border: 1px solid #bbb;
|
|
456
458
|
border-radius: 16px;
|
|
457
459
|
font-size: 13px;
|
|
458
460
|
font-weight: 400;
|
|
@@ -460,6 +462,13 @@ fieldset[disabled] .o-button.active {
|
|
|
460
462
|
padding: 6px 12px;
|
|
461
463
|
white-space: nowrap;
|
|
462
464
|
}
|
|
465
|
+
@media (hover) {
|
|
466
|
+
.o-button.o-button--small:hover {
|
|
467
|
+
background-color: #f6f6f6;
|
|
468
|
+
border-color: #999;
|
|
469
|
+
color: #767676;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
463
472
|
.o-button.o-button--small:focus,
|
|
464
473
|
.o-button.o-button--small:active:focus,
|
|
465
474
|
.o-button.o-button--small.active:focus.o-button::after {
|
|
@@ -582,9 +591,9 @@ fieldset[disabled] .o-button.active {
|
|
|
582
591
|
color: #008c48;
|
|
583
592
|
}
|
|
584
593
|
.o-alert--danger {
|
|
585
|
-
background-color: #
|
|
586
|
-
border-color: #
|
|
587
|
-
color: #
|
|
594
|
+
background-color: #f9ebee;
|
|
595
|
+
border-color: #edc4cd;
|
|
596
|
+
color: #89142e;
|
|
588
597
|
}
|
|
589
598
|
.o-alert--warning {
|
|
590
599
|
background-color: #f9e4de;
|
|
@@ -603,7 +612,7 @@ fieldset[disabled] .o-button.active {
|
|
|
603
612
|
color: #008c48;
|
|
604
613
|
}
|
|
605
614
|
.o-alert.o-alert--danger a {
|
|
606
|
-
color: #
|
|
615
|
+
color: #89142e;
|
|
607
616
|
}
|
|
608
617
|
.o-alert.o-alert--warning a {
|
|
609
618
|
color: #de6a44;
|
|
@@ -886,7 +895,7 @@ ng-form.o-form .o-form-control.ng-dirty:focus {
|
|
|
886
895
|
}
|
|
887
896
|
form.o-form .o-form-control.ng-invalid,
|
|
888
897
|
ng-form.o-form .o-form-control.ng-invalid {
|
|
889
|
-
border: 1px solid #
|
|
898
|
+
border: 1px solid #89142e;
|
|
890
899
|
}
|
|
891
900
|
form.o-form .o-form-control.ng-invalid:focus,
|
|
892
901
|
ng-form.o-form .o-form-control.ng-invalid:focus {
|
|
@@ -985,17 +994,17 @@ ng-form.o-form--no-highlight .o-input-group__add-on--dirty:focus {
|
|
|
985
994
|
box-shadow: 0 0 8px rgba(187, 187, 187, 0.9);
|
|
986
995
|
}
|
|
987
996
|
ng-form:not(.ng-pristine) .o-input-group__add-on--invalid {
|
|
988
|
-
border-bottom-color: #
|
|
989
|
-
border-top-color: #
|
|
997
|
+
border-bottom-color: #89142e;
|
|
998
|
+
border-top-color: #89142e;
|
|
990
999
|
}
|
|
991
1000
|
ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:first-child {
|
|
992
|
-
border-left-color: #
|
|
1001
|
+
border-left-color: #89142e;
|
|
993
1002
|
}
|
|
994
1003
|
ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:first-child.o-input-group__add-on--focus {
|
|
995
1004
|
box-shadow: 0 0 8px rgba(169, 68, 66, 0.8);
|
|
996
1005
|
}
|
|
997
1006
|
ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:last-child {
|
|
998
|
-
border-right-color: #
|
|
1007
|
+
border-right-color: #89142e;
|
|
999
1008
|
}
|
|
1000
1009
|
ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:last-child.o-input-group__add-on--focus {
|
|
1001
1010
|
box-shadow: 2px 0 8px rgba(169, 68, 66, 0.8);
|
|
@@ -1022,7 +1031,7 @@ ng-form.o-form--no-highlight ng-form:not(.ng-pristine) .o-input-group__add-on--i
|
|
|
1022
1031
|
right: 15px;
|
|
1023
1032
|
}
|
|
1024
1033
|
.o-text-validation.o-text-validation--warning {
|
|
1025
|
-
color: #
|
|
1034
|
+
color: #89142e;
|
|
1026
1035
|
}
|
|
1027
1036
|
.o-text-validation.o-text-validation--valid {
|
|
1028
1037
|
color: #008c48;
|
|
@@ -1920,7 +1929,7 @@ h1.o-page-title:not(:last-child) {
|
|
|
1920
1929
|
white-space: nowrap;
|
|
1921
1930
|
}
|
|
1922
1931
|
.o-label.is-danger {
|
|
1923
|
-
background-color: #
|
|
1932
|
+
background-color: #89142e;
|
|
1924
1933
|
}
|
|
1925
1934
|
.o-label.is-info {
|
|
1926
1935
|
background-color: #015677;
|
|
@@ -2075,7 +2084,7 @@ h1.o-page-title:not(:last-child) {
|
|
|
2075
2084
|
font-style: italic;
|
|
2076
2085
|
}
|
|
2077
2086
|
.c-disabled-option--warning {
|
|
2078
|
-
color: #
|
|
2087
|
+
color: #89142e;
|
|
2079
2088
|
display: block;
|
|
2080
2089
|
font-style: normal;
|
|
2081
2090
|
font-weight: bold;
|
|
@@ -2303,7 +2312,7 @@ th {
|
|
|
2303
2312
|
.o-table > thead > tr.is-dangerous > th,
|
|
2304
2313
|
.o-table > tbody > tr.is-dangerous > th,
|
|
2305
2314
|
.o-table > tfoot > tr.is-dangerous > th {
|
|
2306
|
-
background-color: #
|
|
2315
|
+
background-color: #f9ebee;
|
|
2307
2316
|
}
|
|
2308
2317
|
.o-table-actions {
|
|
2309
2318
|
font-size: 16px;
|
|
@@ -2627,7 +2636,7 @@ a:focus,
|
|
|
2627
2636
|
color: #008c48;
|
|
2628
2637
|
}
|
|
2629
2638
|
.u-color-danger {
|
|
2630
|
-
color: #
|
|
2639
|
+
color: #89142e;
|
|
2631
2640
|
}
|
|
2632
2641
|
.u-color-warning {
|
|
2633
2642
|
color: #de6a44;
|
|
@@ -2660,7 +2669,7 @@ a:focus,
|
|
|
2660
2669
|
background-color: #008c48;
|
|
2661
2670
|
}
|
|
2662
2671
|
.u-bg-color-danger {
|
|
2663
|
-
background-color: #
|
|
2672
|
+
background-color: #89142e;
|
|
2664
2673
|
}
|
|
2665
2674
|
.u-bg-color-warning {
|
|
2666
2675
|
background-color: #de6a44;
|
|
@@ -2672,7 +2681,7 @@ a:focus,
|
|
|
2672
2681
|
background-color: #d8f2e6;
|
|
2673
2682
|
}
|
|
2674
2683
|
.u-bg-color-danger-light {
|
|
2675
|
-
background-color: #
|
|
2684
|
+
background-color: #f9ebee;
|
|
2676
2685
|
}
|
|
2677
2686
|
.u-bg-color-warning-light {
|
|
2678
2687
|
background-color: #f9e4de;
|
|
@@ -257,8 +257,8 @@
|
|
|
257
257
|
"affectsGlobalScope": true
|
|
258
258
|
},
|
|
259
259
|
"../src/components/auto-complete/auto-complete-match-renderer.component.ts": {
|
|
260
|
-
"version": "
|
|
261
|
-
"signature": "
|
|
260
|
+
"version": "55c5692f46ba38077d7c00bec7caf44b97bed4122c8833355df1791c2a791f67",
|
|
261
|
+
"signature": "70fbdf3f96f5d2fb88a4f033f7fe1fc7e66ce89ed53a4ea7724df2cad302de4b",
|
|
262
262
|
"affectsGlobalScope": false
|
|
263
263
|
},
|
|
264
264
|
"../src/components/auto-complete/auto-complete.component.ts": {
|
|
@@ -992,18 +992,18 @@
|
|
|
992
992
|
"affectsGlobalScope": false
|
|
993
993
|
},
|
|
994
994
|
"../src/components/font-selector/google-webfonts-api.service.ts": {
|
|
995
|
-
"version": "
|
|
996
|
-
"signature": "
|
|
995
|
+
"version": "14d62473571fff27b3ba1540ddcf043f9bfa331c7fc47204004edef890ba4eda",
|
|
996
|
+
"signature": "3dc4e08773f66a87996f8ac8fd6225905cb5fb739e6eb15aae2c289ab0f69d63",
|
|
997
997
|
"affectsGlobalScope": false
|
|
998
998
|
},
|
|
999
999
|
"../src/components/font-selector/webfont-loader.service.ts": {
|
|
1000
|
-
"version": "
|
|
1001
|
-
"signature": "
|
|
1000
|
+
"version": "105268f7d3e429008190295158d932a4b46f68c006aff0e6f7efc24bb2e01b82",
|
|
1001
|
+
"signature": "38ee30c747171f5bf17cbd5d96eaf9b7095e2b1b68882951ad5ef33cebf4525f",
|
|
1002
1002
|
"affectsGlobalScope": false
|
|
1003
1003
|
},
|
|
1004
1004
|
"../src/components/font-selector/font-selector.ts": {
|
|
1005
|
-
"version": "
|
|
1006
|
-
"signature": "
|
|
1005
|
+
"version": "6e7ca13ee10c5ff77aafbe5fda8aa34c1ccd1d79db3e3c543ae1713fc5af1a22",
|
|
1006
|
+
"signature": "377d9b0a6490e527e690c881aeb32aa89c09143848a0ef7ecec157dcdcf02df0",
|
|
1007
1007
|
"affectsGlobalScope": false
|
|
1008
1008
|
},
|
|
1009
1009
|
"../src/components/font-selector/index.ts": {
|
|
@@ -1252,18 +1252,13 @@
|
|
|
1252
1252
|
"affectsGlobalScope": false
|
|
1253
1253
|
},
|
|
1254
1254
|
"../src/components/rich-text/rich-text.component.ts": {
|
|
1255
|
-
"version": "
|
|
1256
|
-
"signature": "
|
|
1257
|
-
"affectsGlobalScope": false
|
|
1258
|
-
},
|
|
1259
|
-
"../src/components/rich-text/rich-text-toolbar-container.component.ts": {
|
|
1260
|
-
"version": "04c12ab3e6ac121baf8354d8a89258ed262bce4aa941c327452d351a47f01785",
|
|
1261
|
-
"signature": "7d6455c16fbfb867677c53d35e17cf21139677dd383fdbafd7647d32924489c2",
|
|
1255
|
+
"version": "53bf9363d7a10c77ddc456155ed42ae9153f888fbae46b2da4f003a15a603326",
|
|
1256
|
+
"signature": "1226ecd4f74dcfd1bf29571b5c8e34c441abbd196737f06442d07b9278524d84",
|
|
1262
1257
|
"affectsGlobalScope": false
|
|
1263
1258
|
},
|
|
1264
1259
|
"../src/components/rich-text/index.ts": {
|
|
1265
|
-
"version": "
|
|
1266
|
-
"signature": "
|
|
1260
|
+
"version": "50157f3fd625cad4e4e958e0a38a95b883477c8032dd72b688f923d0e3806910",
|
|
1261
|
+
"signature": "6a4e2d386c323050fa51016d8b2479f89cd5d55d431927b6a77b27271cccd82f",
|
|
1267
1262
|
"affectsGlobalScope": false
|
|
1268
1263
|
},
|
|
1269
1264
|
"../src/components/show-image-loader/show-image-loader.js": {
|
|
@@ -1687,13 +1682,13 @@
|
|
|
1687
1682
|
"affectsGlobalScope": false
|
|
1688
1683
|
},
|
|
1689
1684
|
"../node_modules/@types/keyv/index.d.ts": {
|
|
1690
|
-
"version": "
|
|
1691
|
-
"signature": "
|
|
1685
|
+
"version": "9e7f7ac4d964992cf1b77612ca07e5695821881aa1a9acb0ef0509f192a5ea23",
|
|
1686
|
+
"signature": "9e7f7ac4d964992cf1b77612ca07e5695821881aa1a9acb0ef0509f192a5ea23",
|
|
1692
1687
|
"affectsGlobalScope": false
|
|
1693
1688
|
},
|
|
1694
1689
|
"../node_modules/@types/http-cache-semantics/index.d.ts": {
|
|
1695
|
-
"version": "
|
|
1696
|
-
"signature": "
|
|
1690
|
+
"version": "0bf440ab914e79e890cb15e5ffacb5e18bec678338b3eab069a5829d3d5c96e3",
|
|
1691
|
+
"signature": "0bf440ab914e79e890cb15e5ffacb5e18bec678338b3eab069a5829d3d5c96e3",
|
|
1697
1692
|
"affectsGlobalScope": false
|
|
1698
1693
|
},
|
|
1699
1694
|
"../node_modules/@types/responselike/index.d.ts": {
|
|
@@ -1702,8 +1697,8 @@
|
|
|
1702
1697
|
"affectsGlobalScope": false
|
|
1703
1698
|
},
|
|
1704
1699
|
"../node_modules/@types/cacheable-request/index.d.ts": {
|
|
1705
|
-
"version": "
|
|
1706
|
-
"signature": "
|
|
1700
|
+
"version": "73c05cca1bb5aa8e93efd089af51643b7ff005e47064a0e624a74ee20480a2eb",
|
|
1701
|
+
"signature": "73c05cca1bb5aa8e93efd089af51643b7ff005e47064a0e624a74ee20480a2eb",
|
|
1707
1702
|
"affectsGlobalScope": false
|
|
1708
1703
|
},
|
|
1709
1704
|
"../node_modules/@types/minimatch/index.d.ts": {
|
|
@@ -3406,7 +3401,7 @@
|
|
|
3406
3401
|
"../src/components/first-time-motivator/ftm-target-element.ts"
|
|
3407
3402
|
],
|
|
3408
3403
|
"../src/components/font-selector/font-selector.ts": [
|
|
3409
|
-
"../
|
|
3404
|
+
"../node_modules/@types/lodash/index.d.ts",
|
|
3410
3405
|
"../src/components/decorators/index.ts",
|
|
3411
3406
|
"../src/components/font-selector/google-webfonts-api.service.ts",
|
|
3412
3407
|
"../src/components/font-selector/webfont-loader.service.ts",
|
|
@@ -3644,12 +3639,8 @@
|
|
|
3644
3639
|
"../src/components/decorators/index.ts"
|
|
3645
3640
|
],
|
|
3646
3641
|
"../src/components/rich-text/index.ts": [
|
|
3647
|
-
"../src/components/rich-text/rich-text-toolbar-container.component.ts",
|
|
3648
3642
|
"../src/components/rich-text/rich-text.component.ts"
|
|
3649
3643
|
],
|
|
3650
|
-
"../src/components/rich-text/rich-text-toolbar-container.component.ts": [
|
|
3651
|
-
"../src/components/decorators/index.ts"
|
|
3652
|
-
],
|
|
3653
3644
|
"../src/components/rich-text/rich-text.component.ts": [
|
|
3654
3645
|
"../node_modules/@types/angular/index.d.ts",
|
|
3655
3646
|
"../node_modules/@types/jquery/index.d.ts",
|
|
@@ -5002,7 +4993,6 @@
|
|
|
5002
4993
|
"../src/components/first-time-motivator/ftm-target-element.ts"
|
|
5003
4994
|
],
|
|
5004
4995
|
"../src/components/font-selector/font-selector.ts": [
|
|
5005
|
-
"../src/components/auto-complete/auto-complete-match-renderer.component.ts",
|
|
5006
4996
|
"../src/components/font-selector/google-webfonts-api.service.ts",
|
|
5007
4997
|
"../src/components/font-selector/webfont-loader.service.ts",
|
|
5008
4998
|
"../src/components/translate/translate-factory.ts"
|
|
@@ -5154,7 +5144,6 @@
|
|
|
5154
5144
|
"../src/components/response-handlers/log-error-handler.ts"
|
|
5155
5145
|
],
|
|
5156
5146
|
"../src/components/rich-text/index.ts": [
|
|
5157
|
-
"../src/components/rich-text/rich-text-toolbar-container.component.ts",
|
|
5158
5147
|
"../src/components/rich-text/rich-text.component.ts"
|
|
5159
5148
|
],
|
|
5160
5149
|
"../src/components/rich-text/rich-text.component.ts": [
|
|
@@ -5595,7 +5584,6 @@
|
|
|
5595
5584
|
"../src/components/response-handlers/index.ts",
|
|
5596
5585
|
"../src/components/response-handlers/log-error-handler.ts",
|
|
5597
5586
|
"../src/components/rich-text/index.ts",
|
|
5598
|
-
"../src/components/rich-text/rich-text-toolbar-container.component.ts",
|
|
5599
5587
|
"../src/components/rich-text/rich-text.component.ts",
|
|
5600
5588
|
"../src/components/show-image-loader/index.ts",
|
|
5601
5589
|
"../src/components/show-image-loader/show-image-loader.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediafly/js-ui",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.3.1-0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "UI components for Mediafly Angular applications",
|
|
6
6
|
"repository": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"postcss-loader": "3.0.0",
|
|
80
80
|
"postcss-modules-values": "3.0.0",
|
|
81
81
|
"raw-loader": "4.0.1",
|
|
82
|
-
"release-it": "
|
|
82
|
+
"release-it": "13.6.5",
|
|
83
83
|
"rimraf": "3.0.2",
|
|
84
84
|
"stylelint": "13.13.1",
|
|
85
85
|
"stylelint-webpack-plugin": "3.0.1",
|
|
@@ -44,9 +44,7 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
|
|
|
44
44
|
protected keyEventElement: HTMLInputElement | null = null
|
|
45
45
|
protected matches: AutoCompleteMatch[] = []
|
|
46
46
|
|
|
47
|
-
private debouncedFetchAndSetMatches
|
|
48
|
-
private fetchRequestCount: number = 0
|
|
49
|
-
private inputArray: string[] = []
|
|
47
|
+
private debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), this.delay)
|
|
50
48
|
private observer: MutationObserver
|
|
51
49
|
|
|
52
50
|
constructor(
|
|
@@ -57,13 +55,6 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
|
|
|
57
55
|
protected $timeout: ng.ITimeoutService,
|
|
58
56
|
) {}
|
|
59
57
|
|
|
60
|
-
$onChanges(changes: { delay: ng.IChangesObject<number> }) {
|
|
61
|
-
|
|
62
|
-
if (changes.delay) {
|
|
63
|
-
this.debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), changes.delay.currentValue)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
58
|
$onDestroy() {
|
|
68
59
|
|
|
69
60
|
if (this.keyEventElement) {
|
|
@@ -131,31 +122,15 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
|
|
|
131
122
|
return
|
|
132
123
|
}
|
|
133
124
|
|
|
134
|
-
|
|
135
|
-
this.inputArray.push(input)
|
|
136
|
-
|
|
137
|
-
if (this.onStartedFetching) {
|
|
138
|
-
this.fetchRequestCount = this.fetchRequestCount + 1
|
|
139
|
-
this.onStartedFetching()
|
|
140
|
-
}
|
|
125
|
+
if (this.onStartedFetching) { this.onStartedFetching() }
|
|
141
126
|
|
|
142
127
|
// Wrap the entire fetch in a timeout so that fetching callbacks will
|
|
143
128
|
// be called correctly while the async part happens.
|
|
144
129
|
this.$timeout(() => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (this.
|
|
149
|
-
// each set of matches could be shown when received but this can give a weird "flickering" effect depending on the async order of responses
|
|
150
|
-
|
|
151
|
-
// instead, when the last thing in the current array of inputs is returned, use it & ignore the rest of the responses
|
|
152
|
-
if ((inputArrayIndex === this.inputArray.length - 1) && this.onDoneFetching) {
|
|
153
|
-
this.matches = matches
|
|
154
|
-
this.onDoneFetching()
|
|
155
|
-
// reset the count and array
|
|
156
|
-
this.fetchRequestCount = 0
|
|
157
|
-
this.inputArray = []
|
|
158
|
-
}
|
|
130
|
+
this.$q.when(this.getMatches({ input, origin: this.keyEventElementId }))
|
|
131
|
+
.then(matches => {
|
|
132
|
+
this.matches = matches
|
|
133
|
+
if (this.onDoneFetching) { this.onDoneFetching() }
|
|
159
134
|
})
|
|
160
135
|
})
|
|
161
136
|
}
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
test-value="$ctrl.inputValue">
|
|
28
28
|
</auto-complete-match-renderer>
|
|
29
29
|
|
|
30
|
-
<span ng-class="{ 'is-visible': $ctrl.isFetching }"
|
|
30
|
+
<span ng-class="{ 'is-visible': $ctrl.isFetching }"
|
|
31
|
+
class="far fa-spin fa-spinner c-auto-complete__spinner"></span>
|
|
31
32
|
|
|
32
33
|
<span ng-if="$ctrl.displayClose"
|
|
33
34
|
ng-click="$ctrl.clear()"
|
|
@@ -1,13 +1,58 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
<ng-form class="o-form c-font-selector" novalidate>
|
|
2
|
+
|
|
3
|
+
<div ng-click="$ctrl.clickSelect($event)"
|
|
4
|
+
ng-class="{'is-disabled': $ctrl.isDisabled}"
|
|
5
|
+
class="c-font-selector__select">
|
|
6
|
+
|
|
7
|
+
<div>{{ $ctrl.fontFamily }}</div>
|
|
8
|
+
|
|
9
|
+
<div class="fas fa-sort c-font-selector__select__icon"></div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
ng-if="!$ctrl.fontFamily && $ctrl.isRequired"
|
|
14
|
+
class="c-font-selector__warning">{{ $ctrl.requiredText }}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div ng-class="{'is-visible': $ctrl.isDropdownVisible }"
|
|
18
|
+
class="c-font-selector__dropdown">
|
|
19
|
+
|
|
20
|
+
<input
|
|
21
|
+
autocapitalize="off"
|
|
22
|
+
autocomplete="off"
|
|
23
|
+
autocorrect="off"
|
|
24
|
+
class="o-form-control c-font-selector__input"
|
|
25
|
+
id="{{ $ctrl.inputId }}"
|
|
26
|
+
name="autocomplete"
|
|
27
|
+
ng-click="$ctrl.inputClick($event)"
|
|
28
|
+
ng-model="$ctrl.inputValue"
|
|
29
|
+
placeholder="{{ $ctrl.placeholderText }}"
|
|
30
|
+
type="text">
|
|
31
|
+
|
|
32
|
+
<span ng-class="{ 'is-visible': $ctrl.isFetching && $ctrl.inputValue.length >= $ctrl.minLength }"
|
|
33
|
+
class="far fa-spin fa-spinner c-font-selector__dropdown__spinner">
|
|
34
|
+
</span>
|
|
35
|
+
|
|
36
|
+
<span ng-if="!$ctrl.isFetching && $ctrl.inputValue.length >= $ctrl.minLength"
|
|
37
|
+
ng-click="$ctrl.clearInput($event)"
|
|
38
|
+
class="c-font-selector__dropdown__close fal fa-times-circle">
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
<div ng-mousemove="$ctrl.dropdownWasMousedOver($event)"
|
|
42
|
+
class="c-font-selector__dropdown__matches">
|
|
43
|
+
<div
|
|
44
|
+
class="c-font-selector__match-row"
|
|
45
|
+
data-test="auto-complete-match"
|
|
46
|
+
ng-class="[
|
|
47
|
+
($ctrl.interactionMode === 'mouse') ? 'with-mouse' : 'with-keyboard',
|
|
48
|
+
{ 'is-selected': ($ctrl.kbSelectedIndex === $index) },
|
|
49
|
+
]"
|
|
50
|
+
ng-style="{'font-family': match}"
|
|
51
|
+
ng-click="$ctrl.matchWasSelected(match)"
|
|
52
|
+
ng-repeat="match in $ctrl.matches">
|
|
53
|
+
<span>{{ match }}</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
</ng-form>
|