@mediafly/js-ui 51.2.3 → 51.3.0-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/.certs/ca.crt +33 -33
- package/.certs/localhost.crt +34 -33
- package/.certs/localhost.key +27 -27
- package/.certs/localhost.pfx +0 -0
- package/CHANGELOG.md +4 -0
- package/lib/auto-complete/auto-complete-match-renderer.component.d.ts +2 -2
- package/lib/auto-complete/auto-complete-match-renderer.component.js.map +1 -1
- package/lib/auto-complete/auto-complete.component.d.ts +2 -2
- package/lib/auto-complete/auto-complete.component.js.map +1 -1
- package/lib/decorators/index.d.ts +2 -2
- package/lib/decorators/index.js.map +1 -1
- package/lib/dropdown/dropdown.d.ts +2 -2
- package/lib/dropdown/dropdown.js.map +1 -1
- package/lib/dropdown-menu/dropdown-menu-action.component.d.ts +2 -2
- package/lib/dropdown-menu/dropdown-menu-action.component.js.map +1 -1
- package/lib/dropdown-menu/dropdown-menu-contents.d.ts +2 -2
- package/lib/dropdown-menu/dropdown-menu-contents.js.map +1 -1
- package/lib/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/lib/dropdown-menu/dropdown-menu.js.map +1 -1
- package/lib/feedback/clipboard.service.d.ts +3 -7
- package/lib/feedback/clipboard.service.js +14 -23
- package/lib/feedback/clipboard.service.js.map +1 -1
- package/lib/feedback/feedback.component.d.ts +5 -5
- package/lib/feedback/feedback.component.html +0 -2
- package/lib/feedback/feedback.component.js +25 -38
- package/lib/feedback/feedback.component.js.map +1 -1
- package/lib/font-selector/font-selector.d.ts +2 -2
- package/lib/font-selector/font-selector.js.map +1 -1
- package/lib/metadata-form/metadata-form.component.d.ts +2 -2
- package/lib/metadata-form/metadata-form.component.js.map +1 -1
- package/lib/modal/modal.component.d.ts +2 -2
- package/lib/modal/modal.component.js.map +1 -1
- package/lib/progress-bar/progress-bar.component.d.ts +2 -2
- package/lib/progress-bar/progress-bar.component.js.map +1 -1
- package/lib/tabs/tab-group.d.ts +2 -2
- package/lib/tabs/tab-group.js.map +1 -1
- package/lib/tabs/tab-html-title.d.ts +2 -2
- package/lib/tabs/tab-html-title.js.map +1 -1
- package/lib/tabs/tab.d.ts +2 -2
- package/lib/tabs/tab.js.map +1 -1
- package/lib/tag-input/tag-input.component.d.ts +2 -2
- package/lib/tag-input/tag-input.component.js.map +1 -1
- package/lib/tsconfig.deploy.tsbuildinfo +72 -44
- package/package.json +1 -2
- package/src/components/auto-complete/auto-complete-match-renderer.component.ts +2 -1
- package/src/components/auto-complete/auto-complete.component.ts +2 -1
- package/src/components/decorators/index.ts +2 -2
- package/src/components/dropdown/dropdown.ts +2 -1
- package/src/components/dropdown-menu/dropdown-menu-action.component.ts +2 -1
- package/src/components/dropdown-menu/dropdown-menu-contents.ts +2 -1
- package/src/components/dropdown-menu/dropdown-menu.ts +2 -1
- package/src/components/feedback/clipboard.service.ts +12 -25
- package/src/components/feedback/feedback.component.html +0 -2
- package/src/components/feedback/feedback.component.ts +27 -42
- package/src/components/font-selector/font-selector.ts +2 -1
- package/src/components/metadata-form/metadata-form.component.ts +2 -1
- package/src/components/modal/modal.component.ts +2 -1
- package/src/components/progress-bar/progress-bar.component.ts +2 -1
- package/src/components/tabs/tab-group.ts +2 -1
- package/src/components/tabs/tab-html-title.ts +2 -2
- package/src/components/tabs/tab.ts +2 -1
- package/src/components/tag-input/tag-input.component.ts +2 -1
- package/tsconfig.tsbuildinfo +7221 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
2
2
|
import { Component, Inject } from '../decorators'
|
|
3
3
|
import ClipboardService from './clipboard.service'
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ export interface FeedbackOptions {
|
|
|
22
22
|
selector: 'feedbackManager',
|
|
23
23
|
template: require('./feedback.component.html'),
|
|
24
24
|
})
|
|
25
|
-
export default class FeedbackManager implements
|
|
25
|
+
export default class FeedbackManager implements IComponentController {
|
|
26
26
|
protected alerts: object[] = []
|
|
27
27
|
private timer: ng.IPromise<any> | undefined
|
|
28
28
|
|
|
@@ -33,11 +33,13 @@ export default class FeedbackManager implements ng.IComponentController {
|
|
|
33
33
|
@Inject('$sce') private $sce: ng.ISCEService,
|
|
34
34
|
@Inject('$timeout') private $timeout: ng.ITimeoutService,
|
|
35
35
|
@Inject('clipboardService') private clipboardService: ClipboardService,
|
|
36
|
-
@Inject('translateFactory') private translateFactory,
|
|
37
36
|
) {}
|
|
38
37
|
|
|
39
38
|
$onInit() {
|
|
40
39
|
|
|
40
|
+
// Handle clicks on copy-links inside feedback
|
|
41
|
+
window.addEventListener('click', this.handleFeedbackClick)
|
|
42
|
+
|
|
41
43
|
this.$rootScope.$on('showFeedback', (event, args: FeedbackOptions & {alertMessage: string}) => {
|
|
42
44
|
|
|
43
45
|
args.alertMessage = args.trustAsHtml ? args.alertMessage : this.$sanitize(args.alertMessage)
|
|
@@ -46,48 +48,45 @@ export default class FeedbackManager implements ng.IComponentController {
|
|
|
46
48
|
throw new Error('The clipboardContents and autoCopyContents options are mutually exclusive.')
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
if (this.clipboardService.clipboard) {
|
|
50
|
-
this.clipboardService.clipboard.destroy()
|
|
51
|
-
}
|
|
52
|
-
|
|
53
51
|
if (args.clipboardContents && args.copyLinkText) {
|
|
54
|
-
args.alertMessage += `<br/><a class="
|
|
55
|
-
|
|
52
|
+
args.alertMessage += `<br/><a class="o-link" data-clipboard-text="${this.$sanitize(args.clipboardContents)}" data-clipboard-success="${this.$sanitize(args.copySuccessMessage || '')}">
|
|
53
|
+
${this.$sanitize(args.copyLinkText)}
|
|
54
|
+
</a>`
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
if (args.autoCopyContents) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
args.copySuccessMessage = this.translateFactory.instant('JSUI.COPIED_SUCCESSFULLY')
|
|
62
|
-
this.clipboardService.initClipboard('.js-clipboard', args)
|
|
63
|
-
|
|
64
|
-
const selectTextArea = this.createTextArea(this.$sanitize(args.autoCopyContents))
|
|
65
|
-
|
|
66
|
-
if (document.execCommand('copy')) {
|
|
67
|
-
selectTextArea.focus()
|
|
68
|
-
selectTextArea.select()
|
|
69
|
-
document.execCommand('copy')
|
|
70
|
-
document.body.removeChild(selectTextArea)
|
|
71
|
-
} else {
|
|
72
|
-
this.$timeout(() => {
|
|
73
|
-
angular.element('.js-clipboard').triggerHandler('click')
|
|
74
|
-
document.body.removeChild(selectTextArea)
|
|
75
|
-
}, 0)
|
|
76
|
-
}
|
|
58
|
+
this.clipboardService.writeToClipboard(args.autoCopyContents, args.copySuccessMessage)
|
|
59
|
+
return
|
|
77
60
|
}
|
|
78
61
|
|
|
79
62
|
this.removeTimer(this.timer)
|
|
80
63
|
this.addAlert(args.alertMessage, args)
|
|
81
|
-
|
|
82
64
|
})
|
|
83
65
|
}
|
|
84
66
|
|
|
67
|
+
$onDestroy() {
|
|
68
|
+
window.removeEventListener('click', this.handleFeedbackClick)
|
|
69
|
+
}
|
|
70
|
+
|
|
85
71
|
protected closeAlert(index: number) {
|
|
86
72
|
|
|
87
73
|
this.removeTimer(this.timer)
|
|
88
74
|
this.alerts.splice(index, 1)
|
|
89
75
|
}
|
|
90
76
|
|
|
77
|
+
private handleFeedbackClick = (event: MouseEvent) => {
|
|
78
|
+
this.$timeout(() => {
|
|
79
|
+
const target = event.target as HTMLElement | null
|
|
80
|
+
if (!target?.closest('.c-feedback_container')) { return }
|
|
81
|
+
|
|
82
|
+
const toCopy = target?.getAttribute('data-clipboard-text')
|
|
83
|
+
const onSuccess = target?.getAttribute('data-clipboard-success')
|
|
84
|
+
if (toCopy) {
|
|
85
|
+
this.clipboardService.writeToClipboard(toCopy, onSuccess || undefined)
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
91
90
|
private addAlert(message: string, options: FeedbackOptions) {
|
|
92
91
|
|
|
93
92
|
this.alerts = [{
|
|
@@ -103,20 +102,6 @@ export default class FeedbackManager implements ng.IComponentController {
|
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
private createTextArea(text: string, autoCopy: boolean = false): HTMLTextAreaElement {
|
|
107
|
-
|
|
108
|
-
const selectTextArea = document.createElement('textarea')
|
|
109
|
-
selectTextArea.id = 'selectTextArea'
|
|
110
|
-
selectTextArea.style.position = 'fixed'
|
|
111
|
-
selectTextArea.style.left = '0'
|
|
112
|
-
selectTextArea.style.top = '0'
|
|
113
|
-
selectTextArea.style.opacity = '0'
|
|
114
|
-
selectTextArea.value = text
|
|
115
|
-
document.body.appendChild(selectTextArea)
|
|
116
|
-
|
|
117
|
-
return selectTextArea
|
|
118
|
-
}
|
|
119
|
-
|
|
120
105
|
private removeTimer(timer: ng.IPromise<any> | undefined) {
|
|
121
106
|
if (timer) {
|
|
122
107
|
this.$interval.cancel(timer)
|
|
@@ -3,6 +3,7 @@ import GoogleWebfontsApiService from './google-webfonts-api.service'
|
|
|
3
3
|
import WebfontLoaderService from './webfont-loader.service'
|
|
4
4
|
import type { TranslateFactory } from '../translate/translate-factory'
|
|
5
5
|
import _ from 'lodash'
|
|
6
|
+
import { IComponentController } from 'angular'
|
|
6
7
|
|
|
7
8
|
export interface FontFamilyStyle {
|
|
8
9
|
'font-family': string
|
|
@@ -12,7 +13,7 @@ export interface FontFamilyStyle {
|
|
|
12
13
|
selector: 'mflyFontSelector',
|
|
13
14
|
template: require('./font-selector.html')
|
|
14
15
|
})
|
|
15
|
-
export default class FontSelectorController implements
|
|
16
|
+
export default class FontSelectorController implements IComponentController {
|
|
16
17
|
|
|
17
18
|
@Input('<') inputId!: string
|
|
18
19
|
@Input('<') isDisabled?: boolean
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import _ from 'lodash'
|
|
2
3
|
import { Component, Inject, Input, Output } from '../decorators'
|
|
3
4
|
|
|
@@ -31,7 +32,7 @@ export interface MetadataFieldRecord {
|
|
|
31
32
|
selector: 'mflyMetadataForm',
|
|
32
33
|
template: require('./metadata-form.html')
|
|
33
34
|
})
|
|
34
|
-
export default class MetadataFormController implements
|
|
35
|
+
export default class MetadataFormController implements IComponentController {
|
|
35
36
|
|
|
36
37
|
/** Whether the first field in the form should be auto-focused. */
|
|
37
38
|
@Input() autoFocus: boolean
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import _ from 'lodash'
|
|
2
3
|
import { Component, Inject, Input, Output } from '../decorators'
|
|
3
4
|
import MflyModalService from './modal.service'
|
|
@@ -18,7 +19,7 @@ export interface ModalDismissConfirmation {
|
|
|
18
19
|
footer: '?mflyModalFooter',
|
|
19
20
|
},
|
|
20
21
|
})
|
|
21
|
-
export default class MflyModalComponentController implements
|
|
22
|
+
export default class MflyModalComponentController implements IComponentController {
|
|
22
23
|
|
|
23
24
|
@Input('@') modalBodyClass?: string | undefined
|
|
24
25
|
@Input('@') modalHeaderClass?: string | undefined
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import {Component, Input} from '../decorators'
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
@@ -5,7 +6,7 @@ import {Component, Input} from '../decorators'
|
|
|
5
6
|
template: require('./progress-bar.html'),
|
|
6
7
|
transclude: true
|
|
7
8
|
})
|
|
8
|
-
export default class ProgressBar implements
|
|
9
|
+
export default class ProgressBar implements IComponentController {
|
|
9
10
|
|
|
10
11
|
fillStyle: { width: string }
|
|
11
12
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import _ from 'lodash'
|
|
2
3
|
import { Component, Input } from '../decorators'
|
|
3
4
|
import { ActiveTabColor } from '../style-typings/styles'
|
|
@@ -9,7 +10,7 @@ import TabController from './tab'
|
|
|
9
10
|
template: require('./tab-group.html'),
|
|
10
11
|
transclude: true,
|
|
11
12
|
})
|
|
12
|
-
export default class TabGroupController implements
|
|
13
|
+
export default class TabGroupController implements IComponentController {
|
|
13
14
|
|
|
14
15
|
@Input('=') activeTab: string
|
|
15
16
|
@Input() activeTabColor: string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import angular from 'angular'
|
|
1
|
+
import angular, { IComponentController } from 'angular'
|
|
2
2
|
import {Component, Inject} from '../decorators'
|
|
3
3
|
import TabController from './tab'
|
|
4
4
|
import TabGroupController from './tab-group'
|
|
@@ -12,7 +12,7 @@ import TabGroupController from './tab-group'
|
|
|
12
12
|
parentGroup: '^mflyTabGroup'
|
|
13
13
|
}
|
|
14
14
|
})
|
|
15
|
-
export default class TabHtmlTitleController implements
|
|
15
|
+
export default class TabHtmlTitleController implements IComponentController {
|
|
16
16
|
|
|
17
17
|
protected parent: TabController
|
|
18
18
|
protected parentGroup: TabGroupController
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import {Component, Input, Output} from '../decorators'
|
|
2
3
|
import TabGroupController from './tab-group'
|
|
3
4
|
|
|
@@ -9,7 +10,7 @@ import TabGroupController from './tab-group'
|
|
|
9
10
|
parent: '^mflyTabGroup'
|
|
10
11
|
}
|
|
11
12
|
})
|
|
12
|
-
export default class TabController implements
|
|
13
|
+
export default class TabController implements IComponentController {
|
|
13
14
|
|
|
14
15
|
@Input('<')
|
|
15
16
|
isDisabled?: boolean
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IComponentController } from 'angular'
|
|
1
2
|
import _ from 'lodash'
|
|
2
3
|
import { Component, Inject, Input, Output } from '../decorators'
|
|
3
4
|
|
|
@@ -16,7 +17,7 @@ export type TagModel = string | DisplayableObject
|
|
|
16
17
|
},
|
|
17
18
|
template: require('./tag-input.html'),
|
|
18
19
|
})
|
|
19
|
-
export default class TagInputController implements
|
|
20
|
+
export default class TagInputController implements IComponentController {
|
|
20
21
|
|
|
21
22
|
@Input() externalInput!: boolean
|
|
22
23
|
@Input() isDisabled!: boolean
|