@globalpayments/vega 2.34.0 → 2.34.1
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/dist/cjs/{app-globals-4e819773.js → app-globals-48582633.js} +2 -2
- package/dist/cjs/{content-state-3a2724f6.js → content-state-6a5b9736.js} +64 -294
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{text-color-toolbar-button-slimmer-b1c9f40e.js → text-color-toolbar-button-slimmer-21a166e4.js} +1 -1
- package/dist/cjs/{text-node-0d12da5a.js → text-node-494856f3.js} +0 -122
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +5 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +629 -416
- package/dist/cjs/vega-table_8.cjs.entry.js +1 -1
- package/dist/cjs/vega.cjs.js +3 -3
- package/dist/collection/components/vega-pagination/vega-pagination.js +5 -2
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/bold-annotation.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/code-annotation.js +0 -9
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.js +0 -44
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/image-annotation.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/indent-annotation.js +0 -42
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/italic-annotation.js +0 -9
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/link-annotation.js +0 -14
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.js +0 -11
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +0 -26
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-style-annotation.js +0 -44
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/underline-annotation.js +0 -11
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +0 -18
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +0 -13
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +0 -19
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +0 -27
- package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +2 -14
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +0 -10
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +0 -32
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.js +258 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.js +71 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.js +70 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.js +37 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.js +55 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.js +85 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +49 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.js +50 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.js +60 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.js +50 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.js +56 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +7 -3
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.css +3 -0
- package/dist/esm/{app-globals-9971ccfd.js → app-globals-48531a04.js} +2 -2
- package/dist/esm/{content-state-acf55eb0.js → content-state-4b036bf1.js} +65 -295
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{text-color-toolbar-button-slimmer-d0255b98.js → text-color-toolbar-button-slimmer-b2270b64.js} +1 -1
- package/dist/esm/{text-node-6f7d736c.js → text-node-a652ca87.js} +0 -122
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-pagination.entry.js +5 -2
- package/dist/esm/vega-rich-text-content.entry.js +2 -2
- package/dist/esm/vega-rich-text-editor_4.entry.js +630 -417
- package/dist/esm/vega-table_8.entry.js +1 -1
- package/dist/esm/vega.js +3 -3
- package/dist/types/components/vega-pagination/vega-pagination.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/dto/annotations/bold-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/code-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/horizontal-alignment-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/image-annotation.d.ts +0 -8
- package/dist/types/components/vega-rich-text-editor/dto/annotations/indent-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/italic-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/link-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/strikethrough-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/text-color-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/annotations/text-style-annotation.d.ts +0 -14
- package/dist/types/components/vega-rich-text-editor/dto/annotations/underline-annotation.d.ts +0 -7
- package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +0 -8
- package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +0 -1
- package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/block-to-rte-block-strategy.abstract.d.ts +111 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/continue-inline-to-rte-text-block-strategy.d.ts +32 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy-processor.d.ts +19 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/element-to-dto-strategy.abstract.d.ts +32 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/img-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-block-to-rte-text-block-strategy.d.ts +38 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ol-to-rte-list-block-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/span-img-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/ul-to-rte-list-block-strategy.d.ts +36 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/vega-image-to-rte-image-block-strategy.d.ts +31 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-d302f052.entry.js → p-0190095c.entry.js} +1 -1
- package/dist/vega/p-10393104.js +1 -0
- package/dist/vega/p-584dcd9b.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-c1d97d12.entry.js → p-734ea281.entry.js} +1 -1
- package/dist/vega/{p-49f4a666.js → p-8836c1b9.js} +1 -1
- package/dist/vega/p-8f004647.entry.js +1 -0
- package/dist/vega/p-9e732a26.entry.js +1 -0
- package/dist/vega/{p-2fc3af2f.js → p-9f39dd10.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-handler.abstract.js +0 -135
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-processor.js +0 -74
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/image-to-dto-handler.js +0 -47
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/inline-block-to-dto-handler.js +0 -39
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/link-to-dto-handler.js +0 -50
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-item-to-dto-handler.js +0 -41
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-to-dto-handler.js +0 -57
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/paragraph-to-dto-handler.js +0 -56
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-block-to-dto-handler.js +0 -77
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-to-dto-handler.js +0 -44
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-handler.abstract.d.ts +0 -67
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/element-to-dto-processor.d.ts +0 -29
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/image-to-dto-handler.d.ts +0 -37
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/inline-block-to-dto-handler.d.ts +0 -35
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/link-to-dto-handler.d.ts +0 -37
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-item-to-dto-handler.d.ts +0 -36
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/list-to-dto-handler.d.ts +0 -39
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/paragraph-to-dto-handler.d.ts +0 -39
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-block-to-dto-handler.d.ts +0 -46
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-handler/text-to-dto-handler.d.ts +0 -37
- package/dist/vega/p-315667f1.js +0 -1
- package/dist/vega/p-728b029a.entry.js +0 -1
- package/dist/vega/p-b6af0fc1.entry.js +0 -1
- package/dist/vega/p-e43c2a27.js +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as promiseResolve, b as bootstrapLazy } from './global-slimmer-registry-6887a59f.js';
|
|
2
|
-
import { g as globalScripts } from './app-globals-
|
|
2
|
+
import { g as globalScripts } from './app-globals-48531a04.js';
|
|
3
3
|
import './feature-flag-controller-dfde0cfa.js';
|
|
4
4
|
import './index-44c794b4.js';
|
|
5
5
|
import './_commonjsHelpers-9943807e.js';
|
|
@@ -26,10 +26,10 @@ import './translation-b3fe8e74.js';
|
|
|
26
26
|
import './typography-396de03f.js';
|
|
27
27
|
import './valid-credit-card-number-rule-2aef3ad5.js';
|
|
28
28
|
import './regex-dfe11abf.js';
|
|
29
|
-
import './text-node-
|
|
29
|
+
import './text-node-a652ca87.js';
|
|
30
30
|
import './type-guard-158f6d7a.js';
|
|
31
31
|
import './accessibility-e5fd0fab.js';
|
|
32
|
-
import './content-state-
|
|
32
|
+
import './content-state-4b036bf1.js';
|
|
33
33
|
|
|
34
34
|
/*
|
|
35
35
|
Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as MapToComponentField, V as VegaSlimmer, h } from './global-slimmer-registry-6887a59f.js';
|
|
2
2
|
import { D as DomNodeSubjectObserverFactory, b as VegaClick, M as VegaPopoverShow, N as VegaPopoverHide, V as VegaChange } from './dom-node-subject-observer-factory-80358591.js';
|
|
3
3
|
import { V as VegaInternalIconManager } from './internal-icon-manager-7fc7535a.js';
|
|
4
|
-
import { T as TextSplittableAction, c as TextColorAnnotation, d as RTE_TEXT_COLORS, R as RTETextNode } from './text-node-
|
|
4
|
+
import { T as TextSplittableAction, c as TextColorAnnotation, d as RTE_TEXT_COLORS, R as RTETextNode } from './text-node-a652ca87.js';
|
|
5
5
|
import { d as VegaDarkModeStyleController, a as NodeAnnotationTypeEnum } from './node.abstract-93746055.js';
|
|
6
6
|
|
|
7
7
|
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -5,7 +5,6 @@ import { a as VegaInternalComponentDidRender, b as VegaInternalRichTextEditorSel
|
|
|
5
5
|
import { h } from './global-slimmer-registry-6887a59f.js';
|
|
6
6
|
import { g as generateUUID } from './create-public-api-runtime-metrics-slimmer-14cb4599.js';
|
|
7
7
|
import { i as isNonNullable } from './type-guard-158f6d7a.js';
|
|
8
|
-
import { r as rgbToHex } from './ui-5600b48f.js';
|
|
9
8
|
import { c as createEnterKeyHandlerToTriggerClick } from './accessibility-e5fd0fab.js';
|
|
10
9
|
|
|
11
10
|
/* istanbul ignore next */
|
|
@@ -150,17 +149,6 @@ class StrikethroughAnnotation extends NodeAnnotation {
|
|
|
150
149
|
static from(strikethrough) {
|
|
151
150
|
return [NodeAnnotationTypeEnum.STRIKETHROUGH, new StrikethroughAnnotation(strikethrough)];
|
|
152
151
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Generate the map item for the annotation by html element
|
|
155
|
-
*
|
|
156
|
-
* @param {HTMLElement} node - An html element.
|
|
157
|
-
* @returns {[NodeAnnotationTypeEnum.STRIKETHROUGH, StrikethroughAnnotation]} Map item for the annotation
|
|
158
|
-
*/
|
|
159
|
-
static fromHTML(node) {
|
|
160
|
-
return this.from(node.style.textDecoration.includes('line-through') ||
|
|
161
|
-
node.nodeName === 'S' ||
|
|
162
|
-
node.classList.contains('v-rte--strikethrough'));
|
|
163
|
-
}
|
|
164
152
|
/**
|
|
165
153
|
* Generate the JSON representation of the annotation
|
|
166
154
|
*
|
|
@@ -207,17 +195,6 @@ class UnderlineAnnotation extends NodeAnnotation {
|
|
|
207
195
|
static from(underline) {
|
|
208
196
|
return [NodeAnnotationTypeEnum.UNDERLINE, new UnderlineAnnotation(underline)];
|
|
209
197
|
}
|
|
210
|
-
/**
|
|
211
|
-
* Generate the map item for the annotation by html element
|
|
212
|
-
*
|
|
213
|
-
* @param {HTMLElement} node - An html element.
|
|
214
|
-
* @returns {[NodeAnnotationTypeEnum.UNDERLINE, UnderlineAnnotation]} Map item for the annotation
|
|
215
|
-
*/
|
|
216
|
-
static fromHTML(node) {
|
|
217
|
-
return this.from(node.style.textDecoration.includes('underline') ||
|
|
218
|
-
node.nodeName === 'U' ||
|
|
219
|
-
node.classList.contains('v-rte--underline'));
|
|
220
|
-
}
|
|
221
198
|
/**
|
|
222
199
|
* Generate the JSON representation of the annotation
|
|
223
200
|
*
|
|
@@ -264,15 +241,6 @@ class ItalicAnnotation extends NodeAnnotation {
|
|
|
264
241
|
static from(italic) {
|
|
265
242
|
return [NodeAnnotationTypeEnum.ITALIC, new ItalicAnnotation(italic)];
|
|
266
243
|
}
|
|
267
|
-
/**
|
|
268
|
-
* Generate the map item for the annotation by html element
|
|
269
|
-
*
|
|
270
|
-
* @param {HTMLElement} node - An html element.
|
|
271
|
-
* @returns {[NodeAnnotationTypeEnum.ITALIC, ItalicAnnotation]} Map item for the annotation
|
|
272
|
-
*/
|
|
273
|
-
static fromHTML(node) {
|
|
274
|
-
return this.from(node.nodeName === 'I' || node.style.fontStyle === 'italic' || node.nodeName === 'EM');
|
|
275
|
-
}
|
|
276
244
|
/**
|
|
277
245
|
* Generate the JSON representation of the annotation
|
|
278
246
|
*
|
|
@@ -311,16 +279,6 @@ class BoldAnnotation extends NodeAnnotation {
|
|
|
311
279
|
static from(bold) {
|
|
312
280
|
return [NodeAnnotationTypeEnum.BOLD, new BoldAnnotation(bold)];
|
|
313
281
|
}
|
|
314
|
-
/**
|
|
315
|
-
* Generate the map item for the annotation by html element
|
|
316
|
-
*
|
|
317
|
-
* @param {HTMLElement} node - An html element.
|
|
318
|
-
* @returns {[NodeAnnotationTypeEnum.BOLD, BoldAnnotation]} Map item for the annotation
|
|
319
|
-
*/
|
|
320
|
-
static fromHTML(node) {
|
|
321
|
-
const style = node.style;
|
|
322
|
-
return this.from(node.nodeName === 'STRONG' || style.fontWeight === 'bold' || style.fontWeight === '700');
|
|
323
|
-
}
|
|
324
282
|
/**
|
|
325
283
|
* Generate the JSON representation of the annotation
|
|
326
284
|
*
|
|
@@ -377,15 +335,6 @@ class CodeAnnotation extends NodeAnnotation {
|
|
|
377
335
|
static from(code) {
|
|
378
336
|
return [NodeAnnotationTypeEnum.CODE, new CodeAnnotation(code)];
|
|
379
337
|
}
|
|
380
|
-
/**
|
|
381
|
-
* Generate the map item for the annotation by html element
|
|
382
|
-
*
|
|
383
|
-
* @param {HTMLElement} node - An html element.
|
|
384
|
-
* @returns {[NodeAnnotationTypeEnum.CODE, CodeAnnotation]} Map item for the annotation
|
|
385
|
-
*/
|
|
386
|
-
static fromHTML(node) {
|
|
387
|
-
return this.from(node.classList.contains('v-rte--code') || node.nodeName === 'CODE');
|
|
388
|
-
}
|
|
389
338
|
/**
|
|
390
339
|
* Generate the JSON representation of the annotation
|
|
391
340
|
*
|
|
@@ -432,31 +381,6 @@ class TextColorAnnotation extends NodeAnnotation {
|
|
|
432
381
|
static from(textColor) {
|
|
433
382
|
return [NodeAnnotationTypeEnum.TEXT_COLOR, new TextColorAnnotation(textColor)];
|
|
434
383
|
}
|
|
435
|
-
/**
|
|
436
|
-
* Generate the map item for the annotation by html element
|
|
437
|
-
*
|
|
438
|
-
* @param {HTMLElement} node - An html element.
|
|
439
|
-
* @returns {[NodeAnnotationTypeEnum.TEXT_COLOR, TextColorAnnotation]} Map item for the annotation
|
|
440
|
-
*/
|
|
441
|
-
static fromHTML(node) {
|
|
442
|
-
var _a;
|
|
443
|
-
const color = node.style.color;
|
|
444
|
-
const hexColor = (_a = rgbToHex(color)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
445
|
-
if (hexColor) {
|
|
446
|
-
const colorSchema = RTE_TEXT_COLORS.find((schema) => schema.light === hexColor || schema.dark === hexColor);
|
|
447
|
-
if (colorSchema)
|
|
448
|
-
return this.from(colorSchema.key);
|
|
449
|
-
return null;
|
|
450
|
-
}
|
|
451
|
-
else {
|
|
452
|
-
for (const color of RTE_TEXT_COLORS) {
|
|
453
|
-
if (node.style.color.includes(color.key)) {
|
|
454
|
-
return this.from(color.key);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
return null;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
384
|
/**
|
|
461
385
|
* Generate the JSON representation of the annotation
|
|
462
386
|
*
|
|
@@ -517,20 +441,6 @@ class LinkAnnotation extends NodeAnnotation {
|
|
|
517
441
|
new LinkAnnotation({ href: link.href, groupKey: link.groupKey }),
|
|
518
442
|
];
|
|
519
443
|
}
|
|
520
|
-
/**
|
|
521
|
-
* Generate the map item for the annotation by html element
|
|
522
|
-
*
|
|
523
|
-
* @param {HTMLElement} node - An html element.
|
|
524
|
-
* @returns {[NodeAnnotationTypeEnum.LINK, LinkAnnotation]} Map item for the annotation
|
|
525
|
-
*/
|
|
526
|
-
static fromHTML(node) {
|
|
527
|
-
return node.hasAttribute('data-href')
|
|
528
|
-
? this.from({
|
|
529
|
-
href: node.getAttribute('data-href'),
|
|
530
|
-
groupKey: node.getAttribute('data-group-key'),
|
|
531
|
-
})
|
|
532
|
-
: null;
|
|
533
|
-
}
|
|
534
444
|
/**
|
|
535
445
|
* Generate the JSON representation of the annotation
|
|
536
446
|
*
|
|
@@ -806,20 +716,6 @@ class RTETextNode extends RTENode {
|
|
|
806
716
|
}
|
|
807
717
|
return textNode;
|
|
808
718
|
}
|
|
809
|
-
static fromHTML(node, parentBlock) {
|
|
810
|
-
const textNode = new RTETextNode(generateUUID(), node.textContent, parentBlock);
|
|
811
|
-
if (node.nodeType !== Node.TEXT_NODE) {
|
|
812
|
-
textNode.annotationMap = new Map(Object.keys(NodeAnnotationTypeEnum)
|
|
813
|
-
.map((nodeAnnotationType) => {
|
|
814
|
-
return this.createAnnotationEntityFromHTML(nodeAnnotationType, node);
|
|
815
|
-
})
|
|
816
|
-
.filter(isNonNullable));
|
|
817
|
-
if (node.hasAttribute('data-group-key')) {
|
|
818
|
-
parentBlock.apply(new LinkGroupAnnotationAction(node.getAttribute('data-group-key'), [textNode]));
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
return textNode;
|
|
822
|
-
}
|
|
823
719
|
static createAnnotationEntity(type, value) {
|
|
824
720
|
switch (type) {
|
|
825
721
|
case 'bold':
|
|
@@ -838,24 +734,6 @@ class RTETextNode extends RTENode {
|
|
|
838
734
|
return LinkAnnotation.from(value);
|
|
839
735
|
}
|
|
840
736
|
}
|
|
841
|
-
static createAnnotationEntityFromHTML(type, node) {
|
|
842
|
-
switch (type) {
|
|
843
|
-
case 'BOLD':
|
|
844
|
-
return BoldAnnotation.fromHTML(node);
|
|
845
|
-
case 'ITALIC':
|
|
846
|
-
return ItalicAnnotation.fromHTML(node);
|
|
847
|
-
case 'UNDERLINE':
|
|
848
|
-
return UnderlineAnnotation.fromHTML(node);
|
|
849
|
-
case 'STRIKETHROUGH':
|
|
850
|
-
return StrikethroughAnnotation.fromHTML(node);
|
|
851
|
-
case 'CODE':
|
|
852
|
-
return CodeAnnotation.fromHTML(node);
|
|
853
|
-
case 'TEXT_COLOR':
|
|
854
|
-
return TextColorAnnotation.fromHTML(node);
|
|
855
|
-
case 'LINK':
|
|
856
|
-
return LinkAnnotation.fromHTML(node);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
737
|
toJSON() {
|
|
860
738
|
const annotations = Array.from(this.annotationMap.values())
|
|
861
739
|
.filter((annotation) => annotation instanceof NodeAnnotation)
|
|
@@ -9,9 +9,9 @@ var FrameworkEnum;
|
|
|
9
9
|
/** The VegaEnvManager class manages vega environment parameters. */
|
|
10
10
|
class VegaEnvManager {
|
|
11
11
|
constructor() {
|
|
12
|
-
// The `2.34.
|
|
12
|
+
// The `2.34.1` will be replaced to a version string when running publish script.
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
14
|
-
this.vegaVersion = '2.34.
|
|
14
|
+
this.vegaVersion = '2.34.1';
|
|
15
15
|
this.framework = FrameworkEnum.VanillaJs;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
@@ -282,7 +282,6 @@ const VegaPagination = class {
|
|
|
282
282
|
};
|
|
283
283
|
this.onPageSizeSelectorChange = (pageSize) => {
|
|
284
284
|
this.pageSize = pageSize;
|
|
285
|
-
this.vegaPageSizeChangeEventEmitter.emit(this.pageSize);
|
|
286
285
|
};
|
|
287
286
|
this.calculatePages = () => {
|
|
288
287
|
if (!this.total) {
|
|
@@ -333,7 +332,11 @@ const VegaPagination = class {
|
|
|
333
332
|
this.currentValueGuard();
|
|
334
333
|
this.vegaChangeEventEmitter.emit(this.current);
|
|
335
334
|
}
|
|
335
|
+
watchTotal() {
|
|
336
|
+
this.pageCount = this.calculatePages();
|
|
337
|
+
}
|
|
336
338
|
watchPageSize() {
|
|
339
|
+
this.vegaPageSizeChangeEventEmitter.emit(this.pageSize);
|
|
337
340
|
this.pageCount = this.calculatePages();
|
|
338
341
|
}
|
|
339
342
|
componentWillLoad() {
|
|
@@ -350,7 +353,7 @@ const VegaPagination = class {
|
|
|
350
353
|
static get watchers() { return {
|
|
351
354
|
"pageCount": ["watchPageCount"],
|
|
352
355
|
"current": ["watchCurrent"],
|
|
353
|
-
"total": ["
|
|
356
|
+
"total": ["watchTotal"],
|
|
354
357
|
"pageSize": ["watchPageSize"]
|
|
355
358
|
}; }
|
|
356
359
|
};
|
|
@@ -2,10 +2,10 @@ import { d as MapToComponentField, V as VegaSlimmer, h, H as Host, r as register
|
|
|
2
2
|
import { V as VegaComponentUsageRuntimeMetricsSlimmer, I as InjectVegaGlobalSlimmer } from './component-usage-runtime-metrics-21813c36.js';
|
|
3
3
|
import { s as sanitizeVegaComponent } from './component-051a594c.js';
|
|
4
4
|
import { d as VegaDarkModeStyleController } from './node.abstract-93746055.js';
|
|
5
|
-
import { T as TextColorToolbarButtonSlimmer } from './text-color-toolbar-button-slimmer-
|
|
5
|
+
import { T as TextColorToolbarButtonSlimmer } from './text-color-toolbar-button-slimmer-b2270b64.js';
|
|
6
6
|
import { S as SubStateObserverSlimmer } from './sub-state-observer-slimmer-0968ce04.js';
|
|
7
7
|
import { f as findParent } from './ui-5600b48f.js';
|
|
8
|
-
import { b as waitForComponentDidRender } from './text-node-
|
|
8
|
+
import { b as waitForComponentDidRender } from './text-node-a652ca87.js';
|
|
9
9
|
import './_commonjsHelpers-9943807e.js';
|
|
10
10
|
import './static-subject-title-e06a3840.js';
|
|
11
11
|
import './change-manager-8f5b72c2.js';
|