@mediafly/js-ui 47.3.1-1 → 47.3.1-2

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  ## @mediafly/js-ui changelog
2
2
 
3
+ **47.2.1**
4
+
5
+ * auto-complete-match-renderer: Fixed the debounce delay and the handling of the async getMatches responses
6
+
7
+ **47.2.0**
8
+
9
+ * Buttons: Added small sizing to primary buttons
10
+
11
+ **47.1.0**
12
+
13
+ * Colors: Tweaked color-danger and color-danger-light values
14
+
15
+ **47.0.0**
16
+
17
+ * **Breaking:** Update AngularJS to 1.8
18
+
3
19
  **46.3.0**
4
20
 
5
21
  * CSS Modules: Added button module styles
@@ -57,11 +73,11 @@
57
73
 
58
74
  **45.0.1**
59
75
 
60
- * Add a `o-hero` header typography class and update the font-size for `o-h1` class
76
+ * **Breaking:** Add an `o-hero` header typography class and update the font-size for `o-h1` class
61
77
 
62
78
  **44.0.0**
63
79
 
64
- * Errors: Start handling 400 api errors.
80
+ * **Breaking:** Errors: Start handling 400 api errors.
65
81
 
66
82
  **43.4.2**
67
83
 
@@ -44,8 +44,13 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
44
44
  protected keyEventElement: HTMLInputElement | null;
45
45
  protected matches: AutoCompleteMatch[];
46
46
  private debouncedFetchAndSetMatches;
47
+ private fetchRequestCount;
48
+ private inputArray;
47
49
  private observer;
48
50
  constructor($document: ng.IDocumentService, $element: ng.IAugmentedJQuery, $q: ng.IQService, $scope: ng.IScope, $timeout: ng.ITimeoutService);
51
+ $onChanges(changes: {
52
+ delay: ng.IChangesObject<number>;
53
+ }): void;
49
54
  $onDestroy(): void;
50
55
  $onInit(): void;
51
56
  dropdownWasMousedOver(): void;
@@ -20,7 +20,8 @@ export default class AutoCompleteMatchRendererComponentController {
20
20
  this.kbSelectedIndex = -1;
21
21
  this.keyEventElement = null;
22
22
  this.matches = [];
23
- this.debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), this.delay);
23
+ this.fetchRequestCount = 0;
24
+ this.inputArray = [];
24
25
  this.onClickElsewhere = ($event) => {
25
26
  this.$timeout(() => {
26
27
  this.matches = [];
@@ -70,6 +71,11 @@ export default class AutoCompleteMatchRendererComponentController {
70
71
  $event.stopPropagation();
71
72
  });
72
73
  }
74
+ $onChanges(changes) {
75
+ if (changes.delay) {
76
+ this.debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), changes.delay.currentValue);
77
+ }
78
+ }
73
79
  $onDestroy() {
74
80
  if (this.keyEventElement) {
75
81
  this.keyEventElement.removeEventListener('input', this.debouncedFetchAndSetMatches);
@@ -129,17 +135,29 @@ export default class AutoCompleteMatchRendererComponentController {
129
135
  });
130
136
  return;
131
137
  }
138
+ // each keystroke above the minLength will fire a new fetch request and we'll want to end with the 'last' input so put each 'input' in an array
139
+ this.inputArray.push(input);
132
140
  if (this.onStartedFetching) {
141
+ this.fetchRequestCount = this.fetchRequestCount + 1;
133
142
  this.onStartedFetching();
134
143
  }
135
144
  // Wrap the entire fetch in a timeout so that fetching callbacks will
136
145
  // be called correctly while the async part happens.
137
146
  this.$timeout(() => {
138
- this.$q.when(this.getMatches({ input, origin: this.keyEventElementId }))
139
- .then(matches => {
140
- this.matches = matches;
141
- if (this.onDoneFetching) {
147
+ const inputArrayIndex = this.fetchRequestCount - 1;
148
+ this.$q.when(this.getMatches({ input: this.inputArray[inputArrayIndex], origin: this.keyEventElementId }))
149
+ .then((matches) => {
150
+ if (this.fetchRequestCount === 0) {
151
+ return;
152
+ }
153
+ // each set of matches could be shown when received but this can give a weird "flickering" effect depending on the async order of responses
154
+ // instead, when the last thing in the current array of inputs is returned, use it & ignore the rest of the responses
155
+ if ((inputArrayIndex === this.inputArray.length - 1) && this.onDoneFetching) {
156
+ this.matches = matches;
142
157
  this.onDoneFetching();
158
+ // reset the count and array
159
+ this.fetchRequestCount = 0;
160
+ this.inputArray = [];
143
161
  }
144
162
  });
145
163
  });
@@ -1 +1 @@
1
- {"version":3,"file":"auto-complete-match-renderer.component.js","sourceRoot":"","sources":["../../src/components/auto-complete/auto-complete-match-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,CAAC,MAAM,QAAQ,CAAA;AAetB,MAAM,UAAU,yBAAyB,CAAC,CAAoB;IAC7D,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,4CAA4C;IAuBhE,YACW,SAA8B,EAC9B,QAA6B,EAC7B,EAAgB,EAChB,MAAiB,EACjB,QAA4B;QAJ5B,cAAS,GAAT,SAAS,CAAqB;QAC9B,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,OAAE,GAAF,EAAE,CAAc;QAChB,WAAM,GAAN,MAAM,CAAW;QACjB,aAAQ,GAAR,QAAQ,CAAoB;QAb7B,oBAAe,GAAyB,OAAO,CAAA;QAC/C,oBAAe,GAAG,CAAC,CAAC,CAAA;QACpB,oBAAe,GAA4B,IAAI,CAAA;QAC/C,YAAO,GAAwB,EAAE,CAAA;QAEnC,gCAA2B,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QAsGrF,qBAAgB,GAAG,CAAC,MAAkB,EAAE,EAAE;YAEjD,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;gBAClB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;YAClB,CAAC,CAAC,CAAA;QACH,CAAC,CAAA;QAEO,cAAS,GAAG,CAAC,MAAqB,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YAEjE,IAAI,CAAC,eAAe,GAAG,UAAU,CAAA;YAEjC,kDAAkD;YAClD,IAAI,MAAM,CAAC,GAAG,KAA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C9B,KAAK,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;SAC7D,CAAC,CAAA;IACH,CAAC;IAwDO,aAAa,CAAC,KAAa;QAElC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,KAAK,CAAmB,CAAA;QACtF,IAAI,GAAG,EAAE;YACR,GAAG,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;SAC5D;IACF,CAAC;CACD;AAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,2BAA2B,EAAE;IAC5D,QAAQ,EAAE;QACT,KAAK,EAAE,GAAG;QACV,UAAU,EAAE,GAAG;QACf,iBAAiB,EAAE,GAAG;QACtB,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,GAAG;QACb,iBAAiB,EAAE,GAAG;QACtB,SAAS,EAAE,GAAG;KACd;IACD,UAAU,EAAE,4CAA4C;IACxD,QAAQ,EAAE,OAAO,CAAC,+CAA+C,CAAC;CAClE,CAAC,CAAA"}
1
+ {"version":3,"file":"auto-complete-match-renderer.component.js","sourceRoot":"","sources":["../../src/components/auto-complete/auto-complete-match-renderer.component.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,CAAC,MAAM,QAAQ,CAAA;AAetB,MAAM,UAAU,yBAAyB,CAAC,CAAoB;IAC7D,OAAO,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;AACjC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,4CAA4C;IAyBhE,YACW,SAA8B,EAC9B,QAA6B,EAC7B,EAAgB,EAChB,MAAiB,EACjB,QAA4B;QAJ5B,cAAS,GAAT,SAAS,CAAqB;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CAAA;QACjB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,CAAA;QACzB,IAAI,CAAC,QAAQ,CAAC;YACb,YAAY,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK;YAC3E,MAAM,EAAE,IAAI,CAAC,iBAAiB;YAC9B,KAAK,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;SAC7D,CAAC,CAAA;IACH,CAAC;IAwDO,aAAa,CAAC,KAAa;QAElC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,KAAK,CAAmB,CAAA;QACtF,IAAI,GAAG,EAAE;YACR,GAAG,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;SAC5D;IACF,CAAC;CACD;AAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,2BAA2B,EAAE;IAC5D,QAAQ,EAAE;QACT,KAAK,EAAE,GAAG;QACV,UAAU,EAAE,GAAG;QACf,iBAAiB,EAAE,GAAG;QACtB,SAAS,EAAE,GAAG;QACd,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,GAAG;QACb,iBAAiB,EAAE,GAAG;QACtB,SAAS,EAAE,GAAG;KACd;IACD,UAAU,EAAE,4CAA4C;IACxD,QAAQ,EAAE,OAAO,CAAC,+CAA+C,CAAC;CAClE,CAAC,CAAA"}
@@ -32,10 +32,12 @@ export default class FontSelectorController implements ng.IComponentController {
32
32
  protected loadingFonts: boolean;
33
33
  protected placeholderText: string;
34
34
  protected popularFonts: string[];
35
+ protected popularFontsText: string;
35
36
  protected matches: string[];
36
37
  protected minLength: number;
37
38
  protected requiredText: string;
38
39
  protected showPopular: boolean;
40
+ protected whatAreGoogleFonts: string;
39
41
  private debouncedFetchAndSetMatches;
40
42
  private inputElement;
41
43
  private observer;
@@ -39,8 +39,13 @@
39
39
  class="c-font-selector__dropdown__close fal fa-times-circle">
40
40
  </span>
41
41
 
42
- <div ng-if="$ctrl.showPopular && !$ctrl.inputValue"
43
- class="c-font-selector__dropdown__label">or select from popular <a class="o-link" href="https://fonts.google.com/" target="_blank">Google Fonts</a></div>
42
+ <div ng-if="$ctrl.showPopular && !$ctrl.inputValue" class="c-font-selector__dropdown__header">
43
+ <div class="c-font-selector__dropdown__header__label">{{ $ctrl.popularFontsText }} </div>
44
+ <div class="c-font-selector__dropdown__header__link">
45
+ <a class="o-link" href="https://fonts.google.com/" target="_blank">{{ $ctrl.whatAreGoogleFonts }}</a>
46
+ </div>
47
+ </div>
48
+
44
49
 
45
50
  <div ng-mousemove="$ctrl.dropdownWasMousedOver($event)"
46
51
  class="c-font-selector__dropdown__matches">
@@ -87,11 +87,13 @@ let FontSelectorController = class FontSelectorController {
87
87
  }
88
88
  $onInit() {
89
89
  if (!this.inputId) {
90
- throw new Error(`You must provide a string to key-event-element-id on the AutoCompleteMatchRenderer.`);
90
+ throw new Error(`You must provide a string to key-event-element-id on the FontSelector.`);
91
91
  }
92
- // set label text
93
- this.placeholderText = this.translateFactory.instant('JSUI.SEARCH_ALL_FONTS');
92
+ // set labels and text
93
+ this.placeholderText = this.translateFactory.instant('JSUI.SEARCH_ALL_GOOGLE_FONTS');
94
+ this.popularFontsText = this.translateFactory.instant('JSUI.POPULAR_FONTS');
94
95
  this.requiredText = this.translateFactory.instant('JSUI.REQUIRED');
96
+ this.whatAreGoogleFonts = this.translateFactory.instant('JSUI.WHAT_ARE_GOOGLE_FONTS');
95
97
  // init list of popylar fonts
96
98
  this.googleWebfontsApiService.getFontList('popularity')
97
99
  .then(popularList => {
@@ -1 +1 @@
1
- {"version":3,"file":"font-selector.js","sourceRoot":"","sources":["../../src/components/font-selector/font-selector.ts"],"names":[],"mappings":";;;;;;;;;;;;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EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;SAC5D;IACF,CAAC;CAED,CAAA;AAjPY;IAAX,KAAK,CAAC,GAAG,CAAC;;uDAAiB;AAChB;IAAX,KAAK,CAAC,GAAG,CAAC;;0DAAqB;AACpB;IAAX,KAAK,CAAC,GAAG,CAAC;;0DAAqB;AACnB;IAAZ,KAAK,CAAC,IAAI,CAAC;;0DAAoB;AAElB;IAAb,MAAM,CAAC,IAAI,CAAC;;4DAAuD;AAPhD,sBAAsB;IAL1C,SAAS,CAAC;QACV,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,OAAO,CAAC,sBAAsB,CAAC;KACzC,CAAC;IAkCC,WAAA,MAAM,CAAC,WAAW,CAAC,CAAA;IACnB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,MAAM,CAAC,IAAI,CAAC,CAAA;IACZ,WAAA,MAAM,CAAC,0BAA0B,CAAC,CAAA;IAClC,WAAA,MAAM,CAAC,kBAAkB,CAAC,CAAA;IAC1B,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;yEAFuC,wBAAwB,UAEhC,oBAAoB;GAtC/D,sBAAsB,CAmP1C;eAnPoB,sBAAsB"}
@@ -32,8 +32,8 @@
32
32
  /* UI colors */
33
33
  --color-success-light: #d8f2e6;
34
34
  --color-success: #008c48;
35
- --color-danger-light: #f9ebee;
36
- --color-danger: #89142e;
35
+ --color-danger-light: #f7dfe4;
36
+ --color-danger: #d90d36;
37
37
  --color-warning-light: #f9e4de;
38
38
  --color-warning: #de6a44;
39
39
  --color-info-light: #d8edf5;
@@ -222,23 +222,12 @@
222
222
  }
223
223
 
224
224
  .button.isSmall {
225
- background: #fff;
226
- border: 1px solid var(--color-gray-x-light);
227
225
  border-radius: 16px;
228
226
  font-size: 13px;
229
227
  font-weight: var(--font-weight-regular);
230
228
  height: auto; /* Match the non-module large button height instead of using fixed height of flex button */
231
229
  line-height: 1;
232
230
  padding: 6px 12px;
233
-
234
- /* We set an explicit background on this button so we need more specificity on the hover style: */
235
- @media (hover: hover) {
236
- &:hover {
237
- background-color: var(--color-button-default-hover-background);
238
- border-color: var(--color-button-default-hover-border);
239
- color: var(--color-button-default-text);
240
- }
241
- }
242
231
  }
243
232
 
244
233
  .button.isRoundRect {
@@ -30,11 +30,12 @@
30
30
  "NO": "No",
31
31
  "OK_GOT_IT": "OK, got it",
32
32
  "PDF": "PDF",
33
+ "POPULAR_FONTS": "Popular Fonts",
33
34
  "POWERPOINT": "PowerPoint",
34
35
  "PRIVACY_POLICY": "Privacy Policy",
35
36
  "RECENT_CHANGES": "Recent Changes",
36
37
  "REQUIRED": "Required",
37
- "SEARCH_ALL_FONTS": "Search all fonts",
38
+ "SEARCH_ALL_GOOGLE_FONTS": "Search all Google fonts",
38
39
  "STATUS_CHECK": "Status Check",
39
40
  "SUPPORT": "Need help?",
40
41
  "TERMS_OF_USE": "Terms of Use",
@@ -42,6 +43,7 @@
42
43
  "UNKNOWN": "Unknown",
43
44
  "USER": "User",
44
45
  "VIDEO": "Video",
46
+ "WHAT_ARE_GOOGLE_FONTS": "What are Google Fonts?",
45
47
  "WORD_DOC": "Word document",
46
48
  "YES": "Yes",
47
49
  "ZIP": "ZIP file"
package/lib/styles.css CHANGED
@@ -453,8 +453,6 @@ 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;
458
456
  border-radius: 16px;
459
457
  font-size: 13px;
460
458
  font-weight: 400;
@@ -462,13 +460,6 @@ fieldset[disabled] .o-button.active {
462
460
  padding: 6px 12px;
463
461
  white-space: nowrap;
464
462
  }
465
- @media (hover) {
466
- .o-button.o-button--small:hover {
467
- background-color: #f6f6f6;
468
- border-color: #999;
469
- color: #767676;
470
- }
471
- }
472
463
  .o-button.o-button--small:focus,
473
464
  .o-button.o-button--small:active:focus,
474
465
  .o-button.o-button--small.active:focus.o-button::after {
@@ -591,9 +582,9 @@ fieldset[disabled] .o-button.active {
591
582
  color: #008c48;
592
583
  }
593
584
  .o-alert--danger {
594
- background-color: #f9ebee;
595
- border-color: #edc4cd;
596
- color: #89142e;
585
+ background-color: #f7dfe4;
586
+ border-color: #edb6c2;
587
+ color: #d90d36;
597
588
  }
598
589
  .o-alert--warning {
599
590
  background-color: #f9e4de;
@@ -612,7 +603,7 @@ fieldset[disabled] .o-button.active {
612
603
  color: #008c48;
613
604
  }
614
605
  .o-alert.o-alert--danger a {
615
- color: #89142e;
606
+ color: #d90d36;
616
607
  }
617
608
  .o-alert.o-alert--warning a {
618
609
  color: #de6a44;
@@ -895,7 +886,7 @@ ng-form.o-form .o-form-control.ng-dirty:focus {
895
886
  }
896
887
  form.o-form .o-form-control.ng-invalid,
897
888
  ng-form.o-form .o-form-control.ng-invalid {
898
- border: 1px solid #89142e;
889
+ border: 1px solid #d90d36;
899
890
  }
900
891
  form.o-form .o-form-control.ng-invalid:focus,
901
892
  ng-form.o-form .o-form-control.ng-invalid:focus {
@@ -994,17 +985,17 @@ ng-form.o-form--no-highlight .o-input-group__add-on--dirty:focus {
994
985
  box-shadow: 0 0 8px rgba(187, 187, 187, 0.9);
995
986
  }
996
987
  ng-form:not(.ng-pristine) .o-input-group__add-on--invalid {
997
- border-bottom-color: #89142e;
998
- border-top-color: #89142e;
988
+ border-bottom-color: #d90d36;
989
+ border-top-color: #d90d36;
999
990
  }
1000
991
  ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:first-child {
1001
- border-left-color: #89142e;
992
+ border-left-color: #d90d36;
1002
993
  }
1003
994
  ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:first-child.o-input-group__add-on--focus {
1004
995
  box-shadow: 0 0 8px rgba(169, 68, 66, 0.8);
1005
996
  }
1006
997
  ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:last-child {
1007
- border-right-color: #89142e;
998
+ border-right-color: #d90d36;
1008
999
  }
1009
1000
  ng-form:not(.ng-pristine) .o-input-group__add-on--invalid:last-child.o-input-group__add-on--focus {
1010
1001
  box-shadow: 2px 0 8px rgba(169, 68, 66, 0.8);
@@ -1031,7 +1022,7 @@ ng-form.o-form--no-highlight ng-form:not(.ng-pristine) .o-input-group__add-on--i
1031
1022
  right: 15px;
1032
1023
  }
1033
1024
  .o-text-validation.o-text-validation--warning {
1034
- color: #89142e;
1025
+ color: #d90d36;
1035
1026
  }
1036
1027
  .o-text-validation.o-text-validation--valid {
1037
1028
  color: #008c48;
@@ -1929,7 +1920,7 @@ h1.o-page-title:not(:last-child) {
1929
1920
  white-space: nowrap;
1930
1921
  }
1931
1922
  .o-label.is-danger {
1932
- background-color: #89142e;
1923
+ background-color: #d90d36;
1933
1924
  }
1934
1925
  .o-label.is-info {
1935
1926
  background-color: #015677;
@@ -2084,7 +2075,7 @@ h1.o-page-title:not(:last-child) {
2084
2075
  font-style: italic;
2085
2076
  }
2086
2077
  .c-disabled-option--warning {
2087
- color: #89142e;
2078
+ color: #d90d36;
2088
2079
  display: block;
2089
2080
  font-style: normal;
2090
2081
  font-weight: bold;
@@ -2312,7 +2303,7 @@ th {
2312
2303
  .o-table > thead > tr.is-dangerous > th,
2313
2304
  .o-table > tbody > tr.is-dangerous > th,
2314
2305
  .o-table > tfoot > tr.is-dangerous > th {
2315
- background-color: #f9ebee;
2306
+ background-color: #f7dfe4;
2316
2307
  }
2317
2308
  .o-table-actions {
2318
2309
  font-size: 16px;
@@ -2636,7 +2627,7 @@ a:focus,
2636
2627
  color: #008c48;
2637
2628
  }
2638
2629
  .u-color-danger {
2639
- color: #89142e;
2630
+ color: #d90d36;
2640
2631
  }
2641
2632
  .u-color-warning {
2642
2633
  color: #de6a44;
@@ -2669,7 +2660,7 @@ a:focus,
2669
2660
  background-color: #008c48;
2670
2661
  }
2671
2662
  .u-bg-color-danger {
2672
- background-color: #89142e;
2663
+ background-color: #d90d36;
2673
2664
  }
2674
2665
  .u-bg-color-warning {
2675
2666
  background-color: #de6a44;
@@ -2681,7 +2672,7 @@ a:focus,
2681
2672
  background-color: #d8f2e6;
2682
2673
  }
2683
2674
  .u-bg-color-danger-light {
2684
- background-color: #f9ebee;
2675
+ background-color: #f7dfe4;
2685
2676
  }
2686
2677
  .u-bg-color-warning-light {
2687
2678
  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": "55c5692f46ba38077d7c00bec7caf44b97bed4122c8833355df1791c2a791f67",
261
- "signature": "70fbdf3f96f5d2fb88a4f033f7fe1fc7e66ce89ed53a4ea7724df2cad302de4b",
260
+ "version": "06b49d923e933c00d95c7dafaffa03e551256c011b61b1daa5f3515a62eca6e6",
261
+ "signature": "b3f5ddcf48e78ce8fff89df8b5d4e705c16fe8c9a23b0a8d7a3c99a5e207f487",
262
262
  "affectsGlobalScope": false
263
263
  },
264
264
  "../src/components/auto-complete/auto-complete.component.ts": {
@@ -437,8 +437,8 @@
437
437
  "affectsGlobalScope": false
438
438
  },
439
439
  "../src/components/localization/index.strings.json": {
440
- "version": "338553eaad94f4106f3417d14a9be37537d28ed4b81783fc839a1ec2636f3d70",
441
- "signature": "65e04e222a2916429f61d68efa84747fb7870cf5cfc32c7730ae8561438eb918",
440
+ "version": "06807f23008498ce0bba6fb93d8b71baf15aa783fbed106f7d44c7fa769aae53",
441
+ "signature": "a61dea801df3138f719c56b316771f1c4c388a97c255e7b2e7d2805099b42767",
442
442
  "affectsGlobalScope": true
443
443
  },
444
444
  "../src/components/translate/translate-factory.ts": {
@@ -1002,8 +1002,8 @@
1002
1002
  "affectsGlobalScope": false
1003
1003
  },
1004
1004
  "../src/components/font-selector/font-selector.ts": {
1005
- "version": "6d3361fe0e8d65ab5169d339418b94d7a48300bff06e6f303994b38a99373355",
1006
- "signature": "122f14a3ae62afc0a455023e08deefa19c937c16c155a0afe78ea89d3c8fe11d",
1005
+ "version": "0bf735dc464e631776d0fd55a2e533552f77522ee82c2b07b28322f9ff1f7a34",
1006
+ "signature": "9c1e3bd19b202d3cdffbce594ee57756906ffb367e93a5f4d6698e59ea2137a5",
1007
1007
  "affectsGlobalScope": false
1008
1008
  },
1009
1009
  "../src/components/font-selector/index.ts": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediafly/js-ui",
3
- "version": "47.3.1-1",
3
+ "version": "47.3.1-2",
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": "13.6.5",
82
+ "release-it": "14.11.8",
83
83
  "rimraf": "3.0.2",
84
84
  "stylelint": "13.13.1",
85
85
  "stylelint-webpack-plugin": "3.0.1",
@@ -44,7 +44,9 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
44
44
  protected keyEventElement: HTMLInputElement | null = null
45
45
  protected matches: AutoCompleteMatch[] = []
46
46
 
47
- private debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), this.delay)
47
+ private debouncedFetchAndSetMatches: () => void
48
+ private fetchRequestCount: number = 0
49
+ private inputArray: string[] = []
48
50
  private observer: MutationObserver
49
51
 
50
52
  constructor(
@@ -55,6 +57,13 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
55
57
  protected $timeout: ng.ITimeoutService,
56
58
  ) {}
57
59
 
60
+ $onChanges(changes: { delay: ng.IChangesObject<number> }) {
61
+
62
+ if (changes.delay) {
63
+ this.debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), changes.delay.currentValue)
64
+ }
65
+ }
66
+
58
67
  $onDestroy() {
59
68
 
60
69
  if (this.keyEventElement) {
@@ -122,15 +131,31 @@ export default class AutoCompleteMatchRendererComponentController implements ng.
122
131
  return
123
132
  }
124
133
 
125
- if (this.onStartedFetching) { this.onStartedFetching() }
134
+ // each keystroke above the minLength will fire a new fetch request and we'll want to end with the 'last' input so put each 'input' in an array
135
+ this.inputArray.push(input)
136
+
137
+ if (this.onStartedFetching) {
138
+ this.fetchRequestCount = this.fetchRequestCount + 1
139
+ this.onStartedFetching()
140
+ }
126
141
 
127
142
  // Wrap the entire fetch in a timeout so that fetching callbacks will
128
143
  // be called correctly while the async part happens.
129
144
  this.$timeout(() => {
130
- this.$q.when(this.getMatches({ input, origin: this.keyEventElementId }))
131
- .then(matches => {
132
- this.matches = matches
133
- if (this.onDoneFetching) { this.onDoneFetching() }
145
+ const inputArrayIndex = this.fetchRequestCount - 1
146
+ this.$q.when(this.getMatches({ input: this.inputArray[inputArrayIndex], origin: this.keyEventElementId }))
147
+ .then((matches) => {
148
+ if (this.fetchRequestCount === 0) { return }
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
+ }
134
159
  })
135
160
  })
136
161
  }
@@ -39,8 +39,13 @@
39
39
  class="c-font-selector__dropdown__close fal fa-times-circle">
40
40
  </span>
41
41
 
42
- <div ng-if="$ctrl.showPopular && !$ctrl.inputValue"
43
- class="c-font-selector__dropdown__label">or select from popular <a class="o-link" href="https://fonts.google.com/" target="_blank">Google Fonts</a></div>
42
+ <div ng-if="$ctrl.showPopular && !$ctrl.inputValue" class="c-font-selector__dropdown__header">
43
+ <div class="c-font-selector__dropdown__header__label">{{ $ctrl.popularFontsText }} </div>
44
+ <div class="c-font-selector__dropdown__header__link">
45
+ <a class="o-link" href="https://fonts.google.com/" target="_blank">{{ $ctrl.whatAreGoogleFonts }}</a>
46
+ </div>
47
+ </div>
48
+
44
49
 
45
50
  <div ng-mousemove="$ctrl.dropdownWasMousedOver($event)"
46
51
  class="c-font-selector__dropdown__matches">
@@ -56,14 +56,19 @@
56
56
  }
57
57
  }
58
58
 
59
- .c-font-selector__dropdown__label {
60
- border-bottom: 1px solid @color-gray-light;
61
- color: @color-gray-light;
59
+ .c-font-selector__dropdown__header {
60
+ border-bottom: 1px solid @color-gray-xx-light;
61
+ display: flex;
62
62
  font-size: 13px;
63
- font-style: italic;
63
+ justify-content: space-between;
64
64
  padding: 5px 10px;
65
65
  }
66
66
 
67
+ .c-font-selector__dropdown__header__label {
68
+ color: @color-gray-medium;
69
+ font-weight: 700;
70
+ }
71
+
67
72
  .o-form-control.c-font-selector__input {
68
73
  margin: 4px 3px 10px;
69
74
  outline: none;
@@ -33,10 +33,12 @@ export default class FontSelectorController implements ng.IComponentController {
33
33
  protected loadingFonts: boolean = true
34
34
  protected placeholderText!: string
35
35
  protected popularFonts: string[]
36
+ protected popularFontsText: string
36
37
  protected matches: string[] = []
37
38
  protected minLength: number = 2
38
39
  protected requiredText: string
39
40
  protected showPopular: boolean = true
41
+ protected whatAreGoogleFonts: string
40
42
 
41
43
  private debouncedFetchAndSetMatches = _.debounce(() => this.fetchAndSetMatches(), this.delay)
42
44
  private inputElement: HTMLElement
@@ -65,11 +67,12 @@ export default class FontSelectorController implements ng.IComponentController {
65
67
  }
66
68
 
67
69
  $onInit() {
68
- if (!this.inputId) { throw new Error(`You must provide a string to key-event-element-id on the AutoCompleteMatchRenderer.`) }
69
- // set label text
70
- this.placeholderText = this.translateFactory.instant('JSUI.SEARCH_ALL_FONTS')
71
-
70
+ if (!this.inputId) { throw new Error(`You must provide a string to key-event-element-id on the FontSelector.`) }
71
+ // set labels and text
72
+ this.placeholderText = this.translateFactory.instant('JSUI.SEARCH_ALL_GOOGLE_FONTS')
73
+ this.popularFontsText = this.translateFactory.instant('JSUI.POPULAR_FONTS')
72
74
  this.requiredText = this.translateFactory.instant('JSUI.REQUIRED')
75
+ this.whatAreGoogleFonts = this.translateFactory.instant('JSUI.WHAT_ARE_GOOGLE_FONTS')
73
76
 
74
77
  // init list of popylar fonts
75
78
  this.googleWebfontsApiService.getFontList('popularity')
@@ -182,20 +182,12 @@
182
182
  // Small button
183
183
  // -------------------------------------------------
184
184
  &.o-button--small {
185
- background: #fff;
186
- border: 1px solid @color-gray-x-light;
187
185
  border-radius: 16px;
188
186
  font-size: 13px;
189
187
  font-weight: @font-weight-regular;
190
188
  line-height: 1;
191
189
  padding: 6px 12px;
192
190
  white-space: nowrap;
193
-
194
- @media (hover) {
195
- &:hover {
196
- .hover-button();
197
- }
198
- }
199
191
  }
200
192
 
201
193
  // Fix outline border-radius for smaller buttons
@@ -96,23 +96,12 @@
96
96
  }
97
97
 
98
98
  .button.isSmall {
99
- background: #fff;
100
- border: 1px solid var(--color-gray-x-light);
101
99
  border-radius: 16px;
102
100
  font-size: 13px;
103
101
  font-weight: var(--font-weight-regular);
104
102
  height: auto; /* Match the non-module large button height instead of using fixed height of flex button */
105
103
  line-height: 1;
106
104
  padding: 6px 12px;
107
-
108
- /* We set an explicit background on this button so we need more specificity on the hover style: */
109
- @media (hover: hover) {
110
- &:hover {
111
- background-color: var(--color-button-default-hover-background);
112
- border-color: var(--color-button-default-hover-border);
113
- color: var(--color-button-default-text);
114
- }
115
- }
116
105
  }
117
106
 
118
107
  .button.isRoundRect {
@@ -29,8 +29,8 @@
29
29
  // ----------------------------------------------
30
30
  @color-success-light: #d8f2e6;
31
31
  @color-success: #008c48;
32
- @color-danger-light: #f9ebee;
33
- @color-danger: #89142e;
32
+ @color-danger-light: #f7dfe4;
33
+ @color-danger: #d90d36;
34
34
  @color-warning-light: #f9e4de;
35
35
  @color-warning: #de6a44;
36
36
  @color-info-light: #d8edf5;
@@ -32,8 +32,8 @@
32
32
  /* UI colors */
33
33
  --color-success-light: #d8f2e6;
34
34
  --color-success: #008c48;
35
- --color-danger-light: #f9ebee;
36
- --color-danger: #89142e;
35
+ --color-danger-light: #f7dfe4;
36
+ --color-danger: #d90d36;
37
37
  --color-warning-light: #f9e4de;
38
38
  --color-warning: #de6a44;
39
39
  --color-info-light: #d8edf5;
@@ -30,11 +30,12 @@
30
30
  "NO": "No",
31
31
  "OK_GOT_IT": "OK, got it",
32
32
  "PDF": "PDF",
33
+ "POPULAR_FONTS": "Popular Fonts",
33
34
  "POWERPOINT": "PowerPoint",
34
35
  "PRIVACY_POLICY": "Privacy Policy",
35
36
  "RECENT_CHANGES": "Recent Changes",
36
37
  "REQUIRED": "Required",
37
- "SEARCH_ALL_FONTS": "Search all fonts",
38
+ "SEARCH_ALL_GOOGLE_FONTS": "Search all Google fonts",
38
39
  "STATUS_CHECK": "Status Check",
39
40
  "SUPPORT": "Need help?",
40
41
  "TERMS_OF_USE": "Terms of Use",
@@ -42,6 +43,7 @@
42
43
  "UNKNOWN": "Unknown",
43
44
  "USER": "User",
44
45
  "VIDEO": "Video",
46
+ "WHAT_ARE_GOOGLE_FONTS": "What are Google Fonts?",
45
47
  "WORD_DOC": "Word document",
46
48
  "YES": "Yes",
47
49
  "ZIP": "ZIP file"
@@ -1297,8 +1297,8 @@
1297
1297
  "affectsGlobalScope": false
1298
1298
  },
1299
1299
  "./src/components/auto-complete/auto-complete-match-renderer.component.ts": {
1300
- "version": "55c5692f46ba38077d7c00bec7caf44b97bed4122c8833355df1791c2a791f67",
1301
- "signature": "70fbdf3f96f5d2fb88a4f033f7fe1fc7e66ce89ed53a4ea7724df2cad302de4b",
1300
+ "version": "06b49d923e933c00d95c7dafaffa03e551256c011b61b1daa5f3515a62eca6e6",
1301
+ "signature": "b3f5ddcf48e78ce8fff89df8b5d4e705c16fe8c9a23b0a8d7a3c99a5e207f487",
1302
1302
  "affectsGlobalScope": false
1303
1303
  },
1304
1304
  "./src/app/forms/auto-complete/auto-complete.page.ts": {
@@ -1732,8 +1732,8 @@
1732
1732
  "affectsGlobalScope": false
1733
1733
  },
1734
1734
  "./src/components/localization/index.strings.json": {
1735
- "version": "338553eaad94f4106f3417d14a9be37537d28ed4b81783fc839a1ec2636f3d70",
1736
- "signature": "65e04e222a2916429f61d68efa84747fb7870cf5cfc32c7730ae8561438eb918",
1735
+ "version": "06807f23008498ce0bba6fb93d8b71baf15aa783fbed106f7d44c7fa769aae53",
1736
+ "signature": "a61dea801df3138f719c56b316771f1c4c388a97c255e7b2e7d2805099b42767",
1737
1737
  "affectsGlobalScope": true
1738
1738
  },
1739
1739
  "./src/components/translate/translate-factory.ts": {
@@ -1832,8 +1832,8 @@
1832
1832
  "affectsGlobalScope": false
1833
1833
  },
1834
1834
  "./src/components/font-selector/font-selector.ts": {
1835
- "version": "6d3361fe0e8d65ab5169d339418b94d7a48300bff06e6f303994b38a99373355",
1836
- "signature": "122f14a3ae62afc0a455023e08deefa19c937c16c155a0afe78ea89d3c8fe11d",
1835
+ "version": "0bf735dc464e631776d0fd55a2e533552f77522ee82c2b07b28322f9ff1f7a34",
1836
+ "signature": "9c1e3bd19b202d3cdffbce594ee57756906ffb367e93a5f4d6698e59ea2137a5",
1837
1837
  "affectsGlobalScope": false
1838
1838
  },
1839
1839
  "./src/components/font-selector/index.ts": {