@mediafly/js-ui 50.2.1-2 → 50.2.1-3
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 -28
- package/.certs/localhost.pfx +0 -0
- package/lib/dropdown/dropdown.js +2 -0
- package/lib/dropdown/dropdown.js.map +1 -1
- package/lib/font-selector/font-selector.js +1 -1
- package/lib/metadata-form/metadata-form.component.js +7 -0
- package/lib/metadata-form/metadata-form.component.js.map +1 -1
- package/lib/metadata-form/metadata-form.html +2 -0
- package/lib/rich-text/rich-text.component.d.ts +18 -50
- package/lib/rich-text/rich-text.component.html +3 -3
- package/lib/rich-text/rich-text.component.js +115 -283
- package/lib/rich-text/rich-text.component.js.map +1 -1
- package/lib/tsconfig.deploy.tsbuildinfo +8 -417
- package/package.json +2 -3
- package/src/components/dropdown/dropdown.ts +3 -1
- package/src/components/font-selector/font-selector.ts +1 -1
- package/src/components/less/vendor/quill.snow.css +941 -6
- package/src/components/metadata-form/metadata-form.component.ts +15 -7
- package/src/components/metadata-form/metadata-form.html +2 -0
- package/src/components/rich-text/rich-text.component.html +3 -3
- package/src/components/rich-text/rich-text.component.ts +127 -309
- package/tsconfig.tsbuildinfo +0 -7221
|
@@ -6,7 +6,7 @@ import { Component, Inject, Input, Output } from '../decorators'
|
|
|
6
6
|
export interface MetadataDefinition {
|
|
7
7
|
description?: string
|
|
8
8
|
endpoint?: string
|
|
9
|
-
enum?: (string | { id: string, label: string })
|
|
9
|
+
enum?: (string | { id: string, label: string })[]
|
|
10
10
|
format: 'color' | 'date-time' | 'dropdown' | 'password' | 'lookup' | 'multiline' | 'tag' | 'unit-list' | null
|
|
11
11
|
isArray?: boolean
|
|
12
12
|
label: string
|
|
@@ -67,7 +67,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
67
67
|
@Inject('$http') private $http: ng.IHttpService,
|
|
68
68
|
@Inject('$timeout') private $timeout: ng.ITimeoutService,
|
|
69
69
|
@Inject('translateFactory') private translateFactory
|
|
70
|
-
) {}
|
|
70
|
+
) { }
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
$onChanges(changes: { metadata: ng.IChangesObject<Record<string, unknown>> }) {
|
|
@@ -94,6 +94,8 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
94
94
|
this.leaveUnchangedText = this.translateFactory.instant('JSUI.LEAVE_UNCHANGED')
|
|
95
95
|
this.noText = this.translateFactory.instant('JSUI.NO')
|
|
96
96
|
this.yesText = this.translateFactory.instant('JSUI.YES')
|
|
97
|
+
|
|
98
|
+
console.log(`-----> metadata-form schema`, this.schema)
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
addArrayMetadata(property: MetadataDefinition) {
|
|
@@ -120,7 +122,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
if (this.onChange) {
|
|
123
|
-
return this.onChange({ change: { [property.name]: this.metadata[property.name] }})
|
|
125
|
+
return this.onChange({ change: { [property.name]: this.metadata[property.name] } })
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
|
|
@@ -156,6 +158,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
156
158
|
const fieldName = Object.keys(value)[0]
|
|
157
159
|
const fieldValue = _.get(value, fieldName)
|
|
158
160
|
const schemaField = _.find(this.schema, ['name', fieldName])
|
|
161
|
+
console.log(`-----> metadata-form change`, fieldName, fieldValue, schemaField)
|
|
159
162
|
|
|
160
163
|
if (!schemaField) {
|
|
161
164
|
return
|
|
@@ -167,6 +170,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
167
170
|
&& schemaField.format !== 'tag'
|
|
168
171
|
&& schemaField.format !== 'lookup') {
|
|
169
172
|
|
|
173
|
+
console.log('-----> metadata-form change: initializing array field', fieldName, fieldValue)
|
|
170
174
|
this.metadata[fieldName] = [fieldValue]
|
|
171
175
|
}
|
|
172
176
|
|
|
@@ -178,6 +182,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
178
182
|
&& schemaField.format !== 'tag'
|
|
179
183
|
&& this.metadata[fieldName].length === 1) {
|
|
180
184
|
|
|
185
|
+
console.log('-----> metadata-form change: setting focus in field', fieldName, fieldValue)
|
|
181
186
|
this.setFocusInField(fieldName, 0)
|
|
182
187
|
}
|
|
183
188
|
|
|
@@ -189,12 +194,13 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
189
194
|
&& schemaField.format !== 'tag'
|
|
190
195
|
&& this.metadata[fieldName].length === 1) {
|
|
191
196
|
|
|
197
|
+
console.log('-----> metadata-form change: setting field to null', fieldName, fieldValue)
|
|
192
198
|
this.metadata[fieldName] = null
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
// Pass up the whole array for array type fields.
|
|
196
202
|
if (schemaField.isArray && this.onChange) {
|
|
197
|
-
return this.onChange({ change: { [fieldName]: this.metadata[fieldName] }})
|
|
203
|
+
return this.onChange({ change: { [fieldName]: this.metadata[fieldName] } })
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
// For object fields, pass up an object containing the changed key/value.
|
|
@@ -205,7 +211,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
205
211
|
|
|
206
212
|
// Otherwise, just pass up the actual value.
|
|
207
213
|
if (this.onChange) {
|
|
208
|
-
return this.onChange({ change: { [fieldName]: fieldValue }})
|
|
214
|
+
return this.onChange({ change: { [fieldName]: fieldValue } })
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
217
|
|
|
@@ -247,7 +253,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
247
253
|
lookupFieldValue(property: MetadataDefinition, term?: string) {
|
|
248
254
|
|
|
249
255
|
const url = `${property.endpoint}`
|
|
250
|
-
const config = { params: { field: property.name, term }}
|
|
256
|
+
const config = { params: { field: property.name, term } }
|
|
251
257
|
|
|
252
258
|
this.lookupLoading[property.name] = true
|
|
253
259
|
|
|
@@ -282,6 +288,7 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
282
288
|
|
|
283
289
|
removeArrayMetadata(property: MetadataDefinition, index: number) {
|
|
284
290
|
|
|
291
|
+
console.log('-----> metadata-form removeArrayMetadata', property.name, index)
|
|
285
292
|
_.pullAt(this.metadata[property.name], index)
|
|
286
293
|
|
|
287
294
|
if (this.metadata[property.name].length === 0) {
|
|
@@ -296,11 +303,12 @@ export default class MetadataFormController implements ng.IComponentController {
|
|
|
296
303
|
this.forms[property.name].$setPristine()
|
|
297
304
|
|
|
298
305
|
if (this.onChange) {
|
|
299
|
-
return this.onChange({ change: { [property.name]: this.metadata[property.name] }})
|
|
306
|
+
return this.onChange({ change: { [property.name]: this.metadata[property.name] } })
|
|
300
307
|
}
|
|
301
308
|
}
|
|
302
309
|
|
|
303
310
|
selectLookupRecord(name: string, record: MetadataFieldRecord) {
|
|
311
|
+
console.log('-----> metadata-form selectLookupRecord', name, record)
|
|
304
312
|
this.metadata[name] = record.id
|
|
305
313
|
}
|
|
306
314
|
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
</mfly:dropdown>
|
|
157
157
|
|
|
158
158
|
<div ng-if="schemaField.isArray">
|
|
159
|
+
Here it is
|
|
159
160
|
<div
|
|
160
161
|
class="c-metadata-form__array-row"
|
|
161
162
|
ng-if="!$ctrl.metadata[schemaField.name].length">
|
|
@@ -183,6 +184,7 @@
|
|
|
183
184
|
ng-repeat="entry in $ctrl.metadata[schemaField.name] track by $index">
|
|
184
185
|
|
|
185
186
|
<div class="c-metadata-form__array-row__input">
|
|
187
|
+
This one is {{ $ctrl.metadata[schemaField.name][$index] }}
|
|
186
188
|
<mfly:dropdown
|
|
187
189
|
enum-options="schemaField.enum"
|
|
188
190
|
input-id="{{ schemaField.name }}-{{ $index }}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div id="
|
|
1
|
+
<div id="toolbar" class="c-rich-text">
|
|
2
2
|
|
|
3
3
|
<span ng-if="$ctrl.allowFontSelection" class="ql-formats c-rich-text-font-container">
|
|
4
4
|
<mfly:font-selector
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</span>
|
|
10
10
|
|
|
11
11
|
<span class="ql-formats">
|
|
12
|
-
<select id="
|
|
12
|
+
<select id="editorSize" class="ql-size">
|
|
13
13
|
<option value="10px" data-value="10px">10px</option>
|
|
14
14
|
<option value="12px" data-value="12px">12px</option>
|
|
15
15
|
<option value="14px" data-value="14px">14px</option>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<!-- ng show for event handler -->
|
|
24
24
|
<span ng-show="$ctrl.allowColorSelection" class="ql-formats">
|
|
25
|
-
<input id="
|
|
25
|
+
<input id="rteColorInput"
|
|
26
26
|
type="color"
|
|
27
27
|
ng-model="$ctrl.selectedColor">
|
|
28
28
|
</span>
|