@redvars/peacock 4.2.0 → 4.2.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/{BaseField-_unSNU5x.js → BaseField-D8ByB0l3.js} +3 -3
- package/dist/{BaseField-_unSNU5x.js.map → BaseField-D8ByB0l3.js.map} +1 -1
- package/dist/{BaseInput-DtZH0fPJ.js → BaseInput-xCHvT4AN.js} +2 -2
- package/dist/{BaseInput-DtZH0fPJ.js.map → BaseInput-xCHvT4AN.js.map} +1 -1
- package/dist/ai-badge.js +2 -2
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-progress-D7Nmfh1s.js → base-progress-DxNgAQtw.js} +2 -2
- package/dist/{base-progress-D7Nmfh1s.js.map → base-progress-DxNgAQtw.js.map} +1 -1
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/calendar.js +2 -2
- package/dist/{canvas-base-CWQ4rQ2s.js → canvas-base-DHKf2CmA.js} +2 -2
- package/dist/{canvas-base-CWQ4rQ2s.js.map → canvas-base-DHKf2CmA.js.map} +1 -1
- package/dist/{cartesian-chart-CS5yRLfE.js → cartesian-chart-G6VX1aKk.js} +2 -2
- package/dist/{cartesian-chart-CS5yRLfE.js.map → cartesian-chart-G6VX1aKk.js.map} +1 -1
- package/dist/{cb-group-base-CO30uFQZ.js → cb-group-base-CZLzCnXK.js} +2 -2
- package/dist/{cb-group-base-CO30uFQZ.js.map → cb-group-base-CZLzCnXK.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +4 -4
- package/dist/chart-bar.js +4 -4
- package/dist/{chart-base-C_XKVyhf.js → chart-base-DREru2P0.js} +2 -2
- package/dist/{chart-base-C_XKVyhf.js.map → chart-base-DREru2P0.js.map} +1 -1
- package/dist/chart-doughnut.js +3 -3
- package/dist/chart-line.js +4 -4
- package/dist/chart-pie.js +3 -3
- package/dist/chat-event.js +2 -2
- package/dist/chat-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +3 -3
- package/dist/checkbox.js +3 -3
- package/dist/chip-set.js +2 -2
- package/dist/chip.js +2 -2
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +3 -3
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +4 -4
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +24 -12
- package/dist/comment-composer.js.map +1 -1
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +4 -4
- package/dist/custom-elements-jsdocs.json +54 -2
- package/dist/custom-elements.json +134 -43
- package/dist/date-field.js +5 -5
- package/dist/date-picker.js +2 -2
- package/dist/date-range-field.js +5 -5
- package/dist/datetime-field.js +5 -5
- package/dist/dependency-map.js +3 -3
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/{diagram-Va096vj9.js → diagram-CHF70xTL.js} +2 -2
- package/dist/{diagram-Va096vj9.js.map → diagram-CHF70xTL.js.map} +1 -1
- package/dist/diagram-controls.js +2 -2
- package/dist/diagram-minimap.js +2 -2
- package/dist/diagram.js +4 -4
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +4 -4
- package/dist/{document-editor-Dc8JeFVB.js → document-editor-Cb9fCxvA.js} +22 -10
- package/dist/{document-editor-Dc8JeFVB.js.map → document-editor-Cb9fCxvA.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- package/dist/erd.js +3 -3
- package/dist/file-upload.js +3 -3
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +4 -4
- package/dist/form.js +2 -2
- package/dist/{generative-view-BKlcuujw.js → generative-view-C4fJ2zI7.js} +2 -2
- package/dist/{generative-view-BKlcuujw.js.map → generative-view-C4fJ2zI7.js.map} +1 -1
- package/dist/generative-view.js +3 -3
- package/dist/html-editor.js +29 -12
- package/dist/html-editor.js.map +1 -1
- package/dist/{i18n-controller-DJHsE1YH.js → i18n-controller-CH4e9sju.js} +2 -2
- package/dist/{i18n-controller-DJHsE1YH.js.map → i18n-controller-CH4e9sju.js.map} +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +16 -16
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +3 -3
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/listbox.js +2 -2
- package/dist/loader-full.js +9 -9
- package/dist/loader.js +9 -9
- package/dist/markdown-editor.js +29 -12
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mention-input.js +4 -4
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +2 -2
- package/dist/number-field.js +4 -4
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +4 -4
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +4 -4
- package/dist/{picker-field-CUI05sWc.js → picker-field-loXW-xrW.js} +3 -3
- package/dist/{picker-field-CUI05sWc.js.map → picker-field-loXW-xrW.js.map} +1 -1
- package/dist/pin-input.js +4 -4
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +24 -12
- package/dist/prompt-input.js.map +1 -1
- package/dist/radio.js +3 -3
- package/dist/rating.js +3 -3
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-N_hqnXej.js → rich-text-input-B5j0eqCJ.js} +21 -18
- package/dist/rich-text-input-B5j0eqCJ.js.map +1 -0
- package/dist/{schema-Dy0z-80u.js → schema-BJzlGRP1.js} +2 -2
- package/dist/{schema-Dy0z-80u.js.map → schema-BJzlGRP1.js.map} +1 -1
- package/dist/search.js +3 -3
- package/dist/select.js +4 -4
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +3 -3
- package/dist/slider.js +3 -3
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/i18n/strings.d.ts +0 -1
- package/dist/src/__internal/rich-text/rich-text-input.d.ts +6 -1
- package/dist/src/html-editor/html-editor.d.ts +5 -0
- package/dist/src/markdown-editor/markdown-editor.d.ts +5 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-DnYjGbbc.js → strings-o6v6Hrmn.js} +1 -2
- package/dist/strings-o6v6Hrmn.js.map +1 -0
- package/dist/svg.js +2 -2
- package/dist/switch.js +3 -3
- package/dist/table.js +2 -2
- package/dist/textarea.js +4 -4
- package/dist/time-field.js +5 -5
- package/dist/time-picker.js +2 -2
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-CXmFSp3b.js → toggle-base-BSzBnLZN.js} +2 -2
- package/dist/{toggle-base-CXmFSp3b.js.map → toggle-base-BSzBnLZN.js.map} +1 -1
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +3 -3
- package/dist/tree-chart.js +3 -3
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +4 -4
- package/dist/user-menu.js +2 -2
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-timeline.js +2 -2
- package/dist/workflow.js +3 -3
- package/dist/workspace-switcher.js +2 -2
- package/package.json +1 -1
- package/src/__internal/i18n/strings.ts +0 -1
- package/src/__internal/rich-text/editor-chrome.scss +27 -10
- package/src/__internal/rich-text/rich-text-input.ts +17 -16
- package/src/html-editor/html-editor.ts +5 -0
- package/src/markdown-editor/markdown-editor.ts +5 -0
- package/dist/rich-text-input-N_hqnXej.js.map +0 -1
- package/dist/strings-DnYjGbbc.js.map +0 -1
package/dist/chat-event.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { I as I18nController } from './i18n-controller-
|
|
3
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
4
4
|
import { p as parseDatetime, f as formatAbsoluteTime, c as formatClockTime } from './relative-time-BNxqvEbg.js';
|
|
5
|
-
import './strings-
|
|
5
|
+
import './strings-o6v6Hrmn.js';
|
|
6
6
|
import './locale-DEsJZCQG.js';
|
|
7
7
|
|
|
8
8
|
var css_248z = i`@charset "UTF-8";
|
package/dist/chat-message.js
CHANGED
|
@@ -2,10 +2,10 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b, A } from './
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './class-map-NDIkZErE.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
6
6
|
import { p as parseDatetime, f as formatAbsoluteTime, c as formatClockTime } from './relative-time-BNxqvEbg.js';
|
|
7
7
|
import './directive-ZPhl09Yt.js';
|
|
8
|
-
import './strings-
|
|
8
|
+
import './strings-o6v6Hrmn.js';
|
|
9
9
|
import './locale-DEsJZCQG.js';
|
|
10
10
|
|
|
11
11
|
var css_248z = i`@charset "UTF-8";
|
package/dist/chat-thread.js
CHANGED
|
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
6
6
|
import './base-Cl6v8-BZ.js';
|
|
7
|
-
import './strings-
|
|
7
|
+
import './strings-o6v6Hrmn.js';
|
|
8
8
|
import './locale-DEsJZCQG.js';
|
|
9
9
|
|
|
10
10
|
var css_248z = i`* {
|
package/dist/checkbox-group.js
CHANGED
|
@@ -3,13 +3,13 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { e } from './query-CHb9Ft_d.js';
|
|
4
4
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
5
5
|
import { l } from './live-D_5OfuGD.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import { g as getFormValue, a as getFormState } from './form-associated-BHbg72PG.js';
|
|
8
|
-
import { B as BaseInput } from './BaseInput-
|
|
8
|
+
import { B as BaseInput } from './BaseInput-xCHvT4AN.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
11
|
import './directive-helpers-Bx3mu42O.js';
|
|
12
|
-
import './strings-
|
|
12
|
+
import './strings-o6v6Hrmn.js';
|
|
13
13
|
import './locale-DEsJZCQG.js';
|
|
14
14
|
import './element-internals-QME0yEz4.js';
|
|
15
15
|
import './state-BCeDVCI9.js';
|
package/dist/checkbox.js
CHANGED
|
@@ -2,15 +2,15 @@ import { i, _ as __decorate, I as IndividualComponent, w, b } from './Individual
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { e } from './class-map-NDIkZErE.js';
|
|
4
4
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
5
|
-
import { p as peacockString } from './strings-
|
|
6
|
-
import { T as ToggleBase } from './toggle-base-
|
|
5
|
+
import { p as peacockString } from './strings-o6v6Hrmn.js';
|
|
6
|
+
import { T as ToggleBase } from './toggle-base-BSzBnLZN.js';
|
|
7
7
|
import './directive-ZPhl09Yt.js';
|
|
8
8
|
import './state-BCeDVCI9.js';
|
|
9
9
|
import './query-CHb9Ft_d.js';
|
|
10
10
|
import './base-Cl6v8-BZ.js';
|
|
11
11
|
import './form-associated-BHbg72PG.js';
|
|
12
12
|
import './element-internals-QME0yEz4.js';
|
|
13
|
-
import './BaseInput-
|
|
13
|
+
import './BaseInput-xCHvT4AN.js';
|
|
14
14
|
import './suggestion-controller-7YRQqkaI.js';
|
|
15
15
|
import './ai-controller-DR_Tg0sN.js';
|
|
16
16
|
import './locale-DEsJZCQG.js';
|
package/dist/chip-set.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { B as BaseInput } from './BaseInput-
|
|
3
|
+
import { B as BaseInput } from './BaseInput-xCHvT4AN.js';
|
|
4
4
|
import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
|
|
5
5
|
import { g as getFormValue } from './form-associated-BHbg72PG.js';
|
|
6
|
-
import { p as peacockString } from './strings-
|
|
6
|
+
import { p as peacockString } from './strings-o6v6Hrmn.js';
|
|
7
7
|
import './state-BCeDVCI9.js';
|
|
8
8
|
import './element-internals-QME0yEz4.js';
|
|
9
9
|
import './suggestion-controller-7YRQqkaI.js';
|
package/dist/chip.js
CHANGED
|
@@ -13,11 +13,11 @@ import { a as mixinBaseButton } from './base-button-BJMGMcMv.js';
|
|
|
13
13
|
import { m as mixinHyperlink } from './hyperlink-DycWPKwU.js';
|
|
14
14
|
import { m as mixinDelegatesAria } from './delegate-Bw2wdPFP.js';
|
|
15
15
|
import { m as mixinElementInternals } from './element-internals-QME0yEz4.js';
|
|
16
|
-
import { I as I18nController } from './i18n-controller-
|
|
16
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
17
17
|
import './base-Cl6v8-BZ.js';
|
|
18
18
|
import './directive-ZPhl09Yt.js';
|
|
19
19
|
import './warn-once-BNxX1Y98.js';
|
|
20
|
-
import './strings-
|
|
20
|
+
import './strings-o6v6Hrmn.js';
|
|
21
21
|
import './locale-DEsJZCQG.js';
|
|
22
22
|
|
|
23
23
|
var css_248z$1 = i`* {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { e } from './class-map-NDIkZErE.js';
|
|
3
3
|
import { o } from './style-map-CHOg6N_R.js';
|
|
4
|
-
import { B as BaseProgress } from './base-progress-
|
|
4
|
+
import { B as BaseProgress } from './base-progress-DxNgAQtw.js';
|
|
5
5
|
import './directive-ZPhl09Yt.js';
|
|
6
6
|
import './property-B2TG3KEE.js';
|
|
7
|
-
import './i18n-controller-
|
|
8
|
-
import './strings-
|
|
7
|
+
import './i18n-controller-CH4e9sju.js';
|
|
8
|
+
import './strings-o6v6Hrmn.js';
|
|
9
9
|
import './locale-DEsJZCQG.js';
|
|
10
10
|
import './delegate-Bw2wdPFP.js';
|
|
11
11
|
|
package/dist/citation.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b, A } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
5
5
|
import { s as safeUrl } from './url-BFUh__RO.js';
|
|
6
|
-
import './strings-
|
|
6
|
+
import './strings-o6v6Hrmn.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = i`* {
|
package/dist/code-editor.js
CHANGED
|
@@ -3,14 +3,14 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import { A as AiController } from './ai-controller-DR_Tg0sN.js';
|
|
8
|
-
import { B as BaseInput } from './BaseInput-
|
|
8
|
+
import { B as BaseInput } from './BaseInput-xCHvT4AN.js';
|
|
9
9
|
import { o as observeThemeChange } from './observe-theme-change-CkSENG98.js';
|
|
10
10
|
import { t as tokenColor } from './token-colors-DEO6rvEu.js';
|
|
11
11
|
import './base-Cl6v8-BZ.js';
|
|
12
12
|
import './directive-ZPhl09Yt.js';
|
|
13
|
-
import './strings-
|
|
13
|
+
import './strings-o6v6Hrmn.js';
|
|
14
14
|
import './locale-DEsJZCQG.js';
|
|
15
15
|
import './element-internals-QME0yEz4.js';
|
|
16
16
|
import './form-associated-BHbg72PG.js';
|
package/dist/code-highlighter.js
CHANGED
|
@@ -4,11 +4,11 @@ import { r } from './state-BCeDVCI9.js';
|
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
6
|
import { o } from './style-map-CHOg6N_R.js';
|
|
7
|
-
import { I as I18nController } from './i18n-controller-
|
|
7
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
8
8
|
import { T as TOKEN_DEFAULTS } from './token-colors-DEO6rvEu.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
|
-
import './strings-
|
|
11
|
+
import './strings-o6v6Hrmn.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
13
|
|
|
14
14
|
/**
|
package/dist/color-field.js
CHANGED
|
@@ -4,13 +4,13 @@ import { r } from './state-BCeDVCI9.js';
|
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { o } from './style-map-CHOg6N_R.js';
|
|
6
6
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
7
|
-
import { I as I18nController } from './i18n-controller-
|
|
8
|
-
import { B as BaseField } from './BaseField-
|
|
7
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
8
|
+
import { B as BaseField } from './BaseField-D8ByB0l3.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
|
-
import './strings-
|
|
11
|
+
import './strings-o6v6Hrmn.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
|
-
import './BaseInput-
|
|
13
|
+
import './BaseInput-xCHvT4AN.js';
|
|
14
14
|
import './element-internals-QME0yEz4.js';
|
|
15
15
|
import './form-associated-BHbg72PG.js';
|
|
16
16
|
import './suggestion-controller-7YRQqkaI.js';
|
package/dist/color-picker.js
CHANGED
|
@@ -3,10 +3,10 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { o } from './style-map-CHOg6N_R.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import './base-Cl6v8-BZ.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
|
-
import './strings-
|
|
9
|
+
import './strings-o6v6Hrmn.js';
|
|
10
10
|
import './locale-DEsJZCQG.js';
|
|
11
11
|
|
|
12
12
|
var css_248z = i`:host {
|
package/dist/command-palette.js
CHANGED
|
@@ -3,7 +3,7 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import { A as AiController } from './ai-controller-DR_Tg0sN.js';
|
|
8
8
|
import { s as sparkle } from './sparkle-BmtM0vbq.js';
|
|
9
9
|
import { i as isApplePlatform } from './platform-BUuoTAmr.js';
|
|
@@ -11,7 +11,7 @@ import { O as OverlayController } from './overlay-controller-BOk-kfil.js';
|
|
|
11
11
|
import { c as css_248z$1 } from './modal-B78gUfEO.js';
|
|
12
12
|
import './base-Cl6v8-BZ.js';
|
|
13
13
|
import './directive-ZPhl09Yt.js';
|
|
14
|
-
import './strings-
|
|
14
|
+
import './strings-o6v6Hrmn.js';
|
|
15
15
|
import './locale-DEsJZCQG.js';
|
|
16
16
|
|
|
17
17
|
var css_248z = i`/*
|
package/dist/comment-composer.js
CHANGED
|
@@ -3,7 +3,7 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './class-map-NDIkZErE.js';
|
|
5
5
|
import { i as Extension } from './slash-controller-DAsDquPA.js';
|
|
6
|
-
import { R as RichTextInput } from './rich-text-input-
|
|
6
|
+
import { R as RichTextInput } from './rich-text-input-B5j0eqCJ.js';
|
|
7
7
|
import { e as extractMentions } from './markdown-lexer-Bx4Vkpu6.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
9
|
import './diff-CT416thw.js';
|
|
@@ -18,12 +18,12 @@ import './url-BFUh__RO.js';
|
|
|
18
18
|
import './query-CHb9Ft_d.js';
|
|
19
19
|
import './base-Cl6v8-BZ.js';
|
|
20
20
|
import './style-map-CHOg6N_R.js';
|
|
21
|
-
import './BaseInput-
|
|
21
|
+
import './BaseInput-xCHvT4AN.js';
|
|
22
22
|
import './element-internals-QME0yEz4.js';
|
|
23
23
|
import './form-associated-BHbg72PG.js';
|
|
24
|
-
import './strings-
|
|
24
|
+
import './strings-o6v6Hrmn.js';
|
|
25
25
|
import './suggestion-controller-7YRQqkaI.js';
|
|
26
|
-
import './i18n-controller-
|
|
26
|
+
import './i18n-controller-CH4e9sju.js';
|
|
27
27
|
|
|
28
28
|
var css_248z = i`* {
|
|
29
29
|
box-sizing: border-box;
|
|
@@ -252,6 +252,22 @@ img.ProseMirror-separator {
|
|
|
252
252
|
flex: 1;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
.read-only-badge {
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
gap: var(--spacing-050, 0.25rem);
|
|
259
|
+
padding: 0 var(--spacing-100, 0.5rem);
|
|
260
|
+
color: var(--color-on-surface-variant);
|
|
261
|
+
font-family: var(--typography-label-small-font-family) !important;
|
|
262
|
+
font-size: var(--typography-label-small-font-size) !important;
|
|
263
|
+
font-weight: var(--typography-label-small-font-weight) !important;
|
|
264
|
+
line-height: var(--typography-label-small-line-height) !important;
|
|
265
|
+
letter-spacing: var(--typography-label-small-letter-spacing) !important;
|
|
266
|
+
}
|
|
267
|
+
.read-only-badge wc-icon {
|
|
268
|
+
--icon-size: 0.875rem;
|
|
269
|
+
}
|
|
270
|
+
|
|
255
271
|
.editor-area {
|
|
256
272
|
--_pad: var(--spacing-150, 0.75rem);
|
|
257
273
|
position: relative;
|
|
@@ -501,9 +517,12 @@ img.ProseMirror-separator {
|
|
|
501
517
|
border-radius: 0;
|
|
502
518
|
}
|
|
503
519
|
|
|
520
|
+
:host([disabled]) .toolbar,
|
|
521
|
+
:host([disabled]) .editor-area {
|
|
522
|
+
opacity: var(--state-disabled-content-opacity, 0.38);
|
|
523
|
+
}
|
|
504
524
|
:host([disabled]) .editor-area {
|
|
505
525
|
cursor: not-allowed;
|
|
506
|
-
opacity: 0.6;
|
|
507
526
|
}
|
|
508
527
|
|
|
509
528
|
:host([readonly]) .editor-area {
|
|
@@ -517,13 +536,6 @@ img.ProseMirror-separator {
|
|
|
517
536
|
padding-block: var(--spacing-100, 0.5rem);
|
|
518
537
|
}
|
|
519
538
|
|
|
520
|
-
.state-tag {
|
|
521
|
-
position: absolute;
|
|
522
|
-
inset-block-start: var(--spacing-050, 0.25rem);
|
|
523
|
-
inset-inline-end: var(--spacing-050, 0.25rem);
|
|
524
|
-
z-index: 1;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
539
|
.slash-anchor,
|
|
528
540
|
.bubble-anchor,
|
|
529
541
|
.link-anchor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-composer.js","sources":["../../src/comment-composer/comment-composer.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Extension, type Editor, type Extensions } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\nimport type { BlockCommand } from '@/__internal/rich-text/commands.js';\nimport { extractMentions } from '@/__internal/rich-text/markdown-lexer.js';\nimport type { RichTextMention } from '@/__internal/rich-text/mention.js';\n\nimport styles from './comment-composer.scss';\n\n/** `detail` of `submit`: the Markdown and the mentions in it. */\nexport interface CommentComposerSubmitDetail {\n value: string;\n mentions: RichTextMention[];\n}\n\n/**\n * @label Comment Composer\n * @tag wc-comment-composer\n * @rawTag comment-composer\n *\n * @summary A box for writing a comment in rich text, with mentions, that sends it with a button or Ctrl+Enter.\n * @overview\n * <p>The composer is where people write a comment or a work note, such as at the bottom of a ticket's\n * discussion. It starts as a one-line box; focusing it opens the editor and a footer with the\n * formatting tools and <strong>Send</strong>. Comments are Markdown: bold, italic, strikethrough,\n * code, links, lists, checklists, quotes and code blocks, but no headings or tables.</p>\n *\n * <p><strong>Send</strong> or Ctrl+Enter (Cmd+Enter on a Mac) fires a cancelable\n * <code>submit</code> with the Markdown in <code>detail.value</code> and the people it mentions in\n * <code>detail.mentions</code>. Unless the event is cancelled the composer empties; cancel it to keep\n * the text, for example while a request fails. Set <code>loading</code> while the comment is being\n * saved. <code>dismissible</code> adds a <strong>Cancel</strong> button, and Escape, that empty the\n * composer and fire <code>cancel</code>; use it for reply and edit composers.</p>\n *\n * <p>Mentions work as on <code>wc-markdown-editor</code>: answer <code>search</code> by setting\n * <code>suggestions</code>. Inside <code>wc-discussion</code>, set the suggestions on the discussion\n * instead and it passes them to whichever composer asked.</p>\n *\n * <p>Put controls of your own in the footer with the <code>start</code> slot, such as a select for\n * <em>Comment</em> or <em>Work note</em>, or an attach button, and an avatar before the box with\n * the <code>avatar</code> slot. The composer is form-associated, so it also works as the\n * \"Additional comments\" field of a form.</p>\n *\n * @slot avatar - Shown before the box, such as the current person's `wc-avatar`.\n * @slot start - Controls in the footer after the formatting tools, such as a visibility select or an attach button.\n *\n * @cssprop --comment-composer-background - Background of the box.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string, mentions: {id: string, label: string, trigger: string}[]}>} submit - Cancelable. The person sent the comment.\n * @fires {CustomEvent} cancel - The person pressed Cancel or Escape in a `dismissible` composer.\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-comment-composer placeholder=\"Add a comment\"></wc-comment-composer>\n * ```\n * @tags input editor collaboration\n */\n@IndividualComponent\nexport class CommentComposer extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ────────────────────────────────────────────────────────────\n\n /** Text of the send button. Defaults to \"Send\". */\n @property({ type: String, attribute: 'submit-label' })\n submitLabel = '';\n\n /** Shows the comment is being saved: Send shows progress and does nothing. */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /** Keeps the composer open even when it is empty and not focused. */\n @property({ type: Boolean, reflect: true })\n expanded = false;\n\n /** Adds a Cancel button, and Escape, that empty the composer and fire `cancel`. */\n @property({ type: Boolean })\n dismissible = false;\n\n // ── State ─────────────────────────────────────────────────────────────────\n\n /** Whether focus is in the composer. */\n @state() private active = false;\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'comment' as const;\n\n protected readonly sourceLanguage = 'markdown' as const;\n\n protected readonly sourceIcon = 'markdown';\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.rows = 3;\n this.addEventListener('focusin', () => {\n this.active = true;\n });\n this.addEventListener('focusout', (event: FocusEvent) => {\n const next = event.relatedTarget as Node | null;\n if (next && (next === this || this.contains(next))) return;\n this.active = false;\n });\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n /** Sends the comment, as Send does. */\n submit() {\n const value = this.currentValue();\n if (!value.trim() || this.loading || this.disabled || this.readonly) {\n return;\n }\n // Sending is the person's confirmation of a reply the assistant drafted.\n this.acceptSuggestion('submit');\n const accepted = this.dispatchEvent(\n new CustomEvent<CommentComposerSubmitDetail>('submit', {\n detail: { value, mentions: extractMentions(value) },\n bubbles: true,\n composed: true,\n cancelable: true,\n }),\n );\n if (accepted) this.clear();\n }\n\n /** Empties the composer. */\n clear() {\n this.value = '';\n }\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected get showBlockHandle(): boolean {\n return false;\n }\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getMarkdown();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'markdown' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('commentComposerLabel');\n }\n\n /** A comment has no use for a divider. */\n protected toolbarBlocks(editor: Editor): BlockCommand[] {\n return super.toolbarBlocks(editor).filter(block => block.id !== 'divider');\n }\n\n protected extraExtensions(): Extensions {\n return [\n Extension.create({\n name: 'peacockComposerKeys',\n addKeyboardShortcuts: () => ({\n 'Mod-Enter': () => {\n this.submit();\n return true;\n },\n Escape: () => {\n if (\n !this.dismissible ||\n this.mentions.visible ||\n this.slash.visible\n ) {\n return false;\n }\n this.cancel();\n return true;\n },\n }),\n }),\n ];\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n /** The value, including typing the editor has not reported yet. */\n private currentValue(): string {\n const { editor } = this;\n return editor\n ? this.normalizeValue(this.readFromEditor(editor))\n : this.value;\n }\n\n private get open(): boolean {\n return this.expanded || this.active || !!this.value.trim();\n }\n\n private cancel = () => {\n this.clear();\n this.dispatchEvent(\n new CustomEvent('cancel', { bubbles: true, composed: true }),\n );\n };\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n /** A reply the assistant drafted: marked until the person edits or sends it, with why. */\n private renderSuggestion() {\n if (!this.suggestionVisible) return nothing;\n return html`<div class=\"suggestion\">\n <wc-ai-badge\n kind=\"draft\"\n dismissible\n @dismiss=${(event: Event) => {\n event.stopPropagation();\n this.dismissSuggestion();\n }}\n >${this.i18n.t('aiSuggestedReply')}</wc-ai-badge\n >\n ${this.suggestionReason\n ? html`<span class=\"suggestion-reason\">${this.suggestionReason}</span>`\n : nothing}\n </div>`;\n }\n\n render() {\n const { editor, open, validationText } = this;\n const canSend =\n !!this.value.trim() && !this.disabled && !this.readonly && !this.loading;\n return html`<div\n class=${classMap({\n composer: true,\n open,\n focused: this.editorFocused,\n invalid: this.error || !!validationText,\n })}\n >\n <slot name=\"avatar\"></slot>\n <div class=\"box\">\n ${this.renderSuggestion()} ${this.renderEditorArea()}\n <div class=\"footer\" ?hidden=${!open}>\n ${editor && !this.hideToolbar\n ? html`<wc-toolbar\n class=\"toolbar\"\n variant=\"flat\"\n aria-label=${this.i18n.t('formattingToolbar')}\n @mousedown=${this.keepSelection}\n >${this.renderTools(editor)}</wc-toolbar\n >`\n : nothing}\n <slot name=\"start\"></slot>\n <span class=\"spacer\"></span>\n ${this.dismissible\n ? html`<wc-button\n class=\"cancel\"\n variant=\"text\"\n size=\"sm\"\n ?disabled=${this.loading}\n @click=${this.cancel}\n >${this.i18n.t('commentCancel')}</wc-button\n >`\n : nothing}\n <wc-button\n class=\"send\"\n size=\"sm\"\n ?loading=${this.loading}\n ?disabled=${!canSend}\n @click=${() => this.submit()}\n >${this.submitLabel || this.i18n.t('commentSend')}</wc-button\n >\n </div>\n </div>\n </div>\n ${validationText || (this.error && this.errorText)\n ? html`<div class=\"error-text\" role=\"alert\">\n ${this.error ? this.errorText : validationText}\n </div>`\n : nothing}\n ${this.renderPopups()}`;\n }\n}\n"],"names":["nothing","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,SAAS,EAAE,cAAc,EAAE;AACpC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIhB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACP,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAKH,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA0B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AA1BrB,eAAe,GAAA,UAAA,CAAA;IAD3B;AACY,CAAA,EAAA,eAAe,CA8N3B;;;;"}
|
|
1
|
+
{"version":3,"file":"comment-composer.js","sources":["../../src/comment-composer/comment-composer.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { Extension, type Editor, type Extensions } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\nimport type { BlockCommand } from '@/__internal/rich-text/commands.js';\nimport { extractMentions } from '@/__internal/rich-text/markdown-lexer.js';\nimport type { RichTextMention } from '@/__internal/rich-text/mention.js';\n\nimport styles from './comment-composer.scss';\n\n/** `detail` of `submit`: the Markdown and the mentions in it. */\nexport interface CommentComposerSubmitDetail {\n value: string;\n mentions: RichTextMention[];\n}\n\n/**\n * @label Comment Composer\n * @tag wc-comment-composer\n * @rawTag comment-composer\n *\n * @summary A box for writing a comment in rich text, with mentions, that sends it with a button or Ctrl+Enter.\n * @overview\n * <p>The composer is where people write a comment or a work note, such as at the bottom of a ticket's\n * discussion. It starts as a one-line box; focusing it opens the editor and a footer with the\n * formatting tools and <strong>Send</strong>. Comments are Markdown: bold, italic, strikethrough,\n * code, links, lists, checklists, quotes and code blocks, but no headings or tables.</p>\n *\n * <p><strong>Send</strong> or Ctrl+Enter (Cmd+Enter on a Mac) fires a cancelable\n * <code>submit</code> with the Markdown in <code>detail.value</code> and the people it mentions in\n * <code>detail.mentions</code>. Unless the event is cancelled the composer empties; cancel it to keep\n * the text, for example while a request fails. Set <code>loading</code> while the comment is being\n * saved. <code>dismissible</code> adds a <strong>Cancel</strong> button, and Escape, that empty the\n * composer and fire <code>cancel</code>; use it for reply and edit composers.</p>\n *\n * <p>Mentions work as on <code>wc-markdown-editor</code>: answer <code>search</code> by setting\n * <code>suggestions</code>. Inside <code>wc-discussion</code>, set the suggestions on the discussion\n * instead and it passes them to whichever composer asked.</p>\n *\n * <p>Put controls of your own in the footer with the <code>start</code> slot, such as a select for\n * <em>Comment</em> or <em>Work note</em>, or an attach button, and an avatar before the box with\n * the <code>avatar</code> slot. The composer is form-associated, so it also works as the\n * \"Additional comments\" field of a form.</p>\n *\n * @slot avatar - Shown before the box, such as the current person's `wc-avatar`.\n * @slot start - Controls in the footer after the formatting tools, such as a visibility select or an attach button.\n *\n * @cssprop --comment-composer-background - Background of the box.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string, mentions: {id: string, label: string, trigger: string}[]}>} submit - Cancelable. The person sent the comment.\n * @fires {CustomEvent} cancel - The person pressed Cancel or Escape in a `dismissible` composer.\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-comment-composer placeholder=\"Add a comment\"></wc-comment-composer>\n * ```\n * @tags input editor collaboration\n */\n@IndividualComponent\nexport class CommentComposer extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Properties ────────────────────────────────────────────────────────────\n\n /** Text of the send button. Defaults to \"Send\". */\n @property({ type: String, attribute: 'submit-label' })\n submitLabel = '';\n\n /** Shows the comment is being saved: Send shows progress and does nothing. */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /** Keeps the composer open even when it is empty and not focused. */\n @property({ type: Boolean, reflect: true })\n expanded = false;\n\n /** Adds a Cancel button, and Escape, that empty the composer and fire `cancel`. */\n @property({ type: Boolean })\n dismissible = false;\n\n // ── State ─────────────────────────────────────────────────────────────────\n\n /** Whether focus is in the composer. */\n @state() private active = false;\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'comment' as const;\n\n protected readonly sourceLanguage = 'markdown' as const;\n\n protected readonly sourceIcon = 'markdown';\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.rows = 3;\n this.addEventListener('focusin', () => {\n this.active = true;\n });\n this.addEventListener('focusout', (event: FocusEvent) => {\n const next = event.relatedTarget as Node | null;\n if (next && (next === this || this.contains(next))) return;\n this.active = false;\n });\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n /** Sends the comment, as Send does. */\n submit() {\n const value = this.currentValue();\n if (!value.trim() || this.loading || this.disabled || this.readonly) {\n return;\n }\n // Sending is the person's confirmation of a reply the assistant drafted.\n this.acceptSuggestion('submit');\n const accepted = this.dispatchEvent(\n new CustomEvent<CommentComposerSubmitDetail>('submit', {\n detail: { value, mentions: extractMentions(value) },\n bubbles: true,\n composed: true,\n cancelable: true,\n }),\n );\n if (accepted) this.clear();\n }\n\n /** Empties the composer. */\n clear() {\n this.value = '';\n }\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected get showBlockHandle(): boolean {\n return false;\n }\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getMarkdown();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'markdown' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('commentComposerLabel');\n }\n\n /** A comment has no use for a divider. */\n protected toolbarBlocks(editor: Editor): BlockCommand[] {\n return super.toolbarBlocks(editor).filter(block => block.id !== 'divider');\n }\n\n protected extraExtensions(): Extensions {\n return [\n Extension.create({\n name: 'peacockComposerKeys',\n addKeyboardShortcuts: () => ({\n 'Mod-Enter': () => {\n this.submit();\n return true;\n },\n Escape: () => {\n if (\n !this.dismissible ||\n this.mentions.visible ||\n this.slash.visible\n ) {\n return false;\n }\n this.cancel();\n return true;\n },\n }),\n }),\n ];\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n /** The value, including typing the editor has not reported yet. */\n private currentValue(): string {\n const { editor } = this;\n return editor\n ? this.normalizeValue(this.readFromEditor(editor))\n : this.value;\n }\n\n private get open(): boolean {\n return this.expanded || this.active || !!this.value.trim();\n }\n\n private cancel = () => {\n this.clear();\n this.dispatchEvent(\n new CustomEvent('cancel', { bubbles: true, composed: true }),\n );\n };\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n /** A reply the assistant drafted: marked until the person edits or sends it, with why. */\n private renderSuggestion() {\n if (!this.suggestionVisible) return nothing;\n return html`<div class=\"suggestion\">\n <wc-ai-badge\n kind=\"draft\"\n dismissible\n @dismiss=${(event: Event) => {\n event.stopPropagation();\n this.dismissSuggestion();\n }}\n >${this.i18n.t('aiSuggestedReply')}</wc-ai-badge\n >\n ${this.suggestionReason\n ? html`<span class=\"suggestion-reason\">${this.suggestionReason}</span>`\n : nothing}\n </div>`;\n }\n\n render() {\n const { editor, open, validationText } = this;\n const canSend =\n !!this.value.trim() && !this.disabled && !this.readonly && !this.loading;\n return html`<div\n class=${classMap({\n composer: true,\n open,\n focused: this.editorFocused,\n invalid: this.error || !!validationText,\n })}\n >\n <slot name=\"avatar\"></slot>\n <div class=\"box\">\n ${this.renderSuggestion()} ${this.renderEditorArea()}\n <div class=\"footer\" ?hidden=${!open}>\n ${editor && !this.hideToolbar\n ? html`<wc-toolbar\n class=\"toolbar\"\n variant=\"flat\"\n aria-label=${this.i18n.t('formattingToolbar')}\n @mousedown=${this.keepSelection}\n >${this.renderTools(editor)}</wc-toolbar\n >`\n : nothing}\n <slot name=\"start\"></slot>\n <span class=\"spacer\"></span>\n ${this.dismissible\n ? html`<wc-button\n class=\"cancel\"\n variant=\"text\"\n size=\"sm\"\n ?disabled=${this.loading}\n @click=${this.cancel}\n >${this.i18n.t('commentCancel')}</wc-button\n >`\n : nothing}\n <wc-button\n class=\"send\"\n size=\"sm\"\n ?loading=${this.loading}\n ?disabled=${!canSend}\n @click=${() => this.submit()}\n >${this.submitLabel || this.i18n.t('commentSend')}</wc-button\n >\n </div>\n </div>\n </div>\n ${validationText || (this.error && this.errorText)\n ? html`<div class=\"error-text\" role=\"alert\">\n ${this.error ? this.errorText : validationText}\n </div>`\n : nothing}\n ${this.renderPopups()}`;\n }\n}\n"],"names":["nothing","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACzC,gBAAA;AACT,cAAED,CAAO;AACT,MAAA,EAAA,IAAI,CAAC,YAAY,EAAE,CAAA,CAAE;IAC3B;;AA5NA;AAEO,eAAA,CAAA,MAAM,GAAG,CAACG,QAAM,CAAC;AAMxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE;AACpC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIhB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACP,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAKH,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA0B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AA1BrB,eAAe,GAAA,UAAA,CAAA;IAD3B;AACY,CAAA,EAAA,eAAe,CA8N3B;;;;"}
|
|
@@ -2,7 +2,7 @@ import { i, _ as __decorate, I as IndividualComponent, A, b } from './Individual
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { A as AiController } from './ai-controller-DR_Tg0sN.js';
|
|
4
4
|
import { s as sparkle } from './sparkle-BmtM0vbq.js';
|
|
5
|
-
import { a as CbGroupBase } from './cb-group-base-
|
|
5
|
+
import { a as CbGroupBase } from './cb-group-base-CZLzCnXK.js';
|
|
6
6
|
import { c as css_248z$1 } from './cb-group-base-BBDUgxne.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
import './state-BCeDVCI9.js';
|
|
@@ -11,8 +11,8 @@ import './base-Cl6v8-BZ.js';
|
|
|
11
11
|
import './class-map-NDIkZErE.js';
|
|
12
12
|
import './directive-ZPhl09Yt.js';
|
|
13
13
|
import './style-map-CHOg6N_R.js';
|
|
14
|
-
import './i18n-controller-
|
|
15
|
-
import './strings-
|
|
14
|
+
import './i18n-controller-CH4e9sju.js';
|
|
15
|
+
import './strings-o6v6Hrmn.js';
|
|
16
16
|
|
|
17
17
|
var css_248z = i`.describe {
|
|
18
18
|
display: flex;
|
package/dist/confirm-dialog.js
CHANGED
|
@@ -3,12 +3,12 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import { O as OverlayController } from './overlay-controller-BOk-kfil.js';
|
|
8
8
|
import { c as css_248z$1 } from './modal-B78gUfEO.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
|
-
import './strings-
|
|
11
|
+
import './strings-o6v6Hrmn.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
13
|
|
|
14
14
|
var css_248z = i`/*
|
package/dist/copy-button.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
|
-
import { I as I18nController } from './i18n-controller-
|
|
4
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
5
5
|
import { w as writeClipboardText, t as textToCopyFrom } from './clipboard-C7hBdUXP.js';
|
|
6
|
-
import './strings-
|
|
6
|
+
import './strings-o6v6Hrmn.js';
|
|
7
7
|
import './locale-DEsJZCQG.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = i`* {
|
package/dist/currency-field.js
CHANGED
|
@@ -3,14 +3,14 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import { w as warnOnce } from './warn-once-BNxX1Y98.js';
|
|
8
|
-
import { B as BaseField } from './BaseField-
|
|
8
|
+
import { B as BaseField } from './BaseField-D8ByB0l3.js';
|
|
9
9
|
import './base-Cl6v8-BZ.js';
|
|
10
10
|
import './directive-ZPhl09Yt.js';
|
|
11
|
-
import './strings-
|
|
11
|
+
import './strings-o6v6Hrmn.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
|
-
import './BaseInput-
|
|
13
|
+
import './BaseInput-xCHvT4AN.js';
|
|
14
14
|
import './element-internals-QME0yEz4.js';
|
|
15
15
|
import './form-associated-BHbg72PG.js';
|
|
16
16
|
import './suggestion-controller-7YRQqkaI.js';
|
|
@@ -6800,6 +6800,19 @@
|
|
|
6800
6800
|
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
6801
6801
|
}
|
|
6802
6802
|
},
|
|
6803
|
+
{
|
|
6804
|
+
"name": "show-readonly-badge",
|
|
6805
|
+
"type": {
|
|
6806
|
+
"text": "boolean"
|
|
6807
|
+
},
|
|
6808
|
+
"default": "false",
|
|
6809
|
+
"description": "Shows a \"Read only\" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`.",
|
|
6810
|
+
"fieldName": "showReadonlyBadge",
|
|
6811
|
+
"inheritedFrom": {
|
|
6812
|
+
"name": "RichTextInput",
|
|
6813
|
+
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
6814
|
+
}
|
|
6815
|
+
},
|
|
6803
6816
|
{
|
|
6804
6817
|
"name": "maxlength",
|
|
6805
6818
|
"type": {
|
|
@@ -12336,7 +12349,7 @@
|
|
|
12336
12349
|
"tag": "wc-html-editor",
|
|
12337
12350
|
"rawTag": "html-editor",
|
|
12338
12351
|
"summary": "A rich-text field whose value is HTML, with the same toolbar and mentions as the Markdown editor.",
|
|
12339
|
-
"overview": "<p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n<code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\nmentions and a <strong>View source</strong> button that shows the HTML in\n<code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\nMarkdown cannot, so the HTML editor offers them.</p>\n\n<p>Get and set the HTML through <code>value</code>; an empty editor has the value\n<code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\nvalue are dropped when it loads.</p>\n\n<p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\ndefault) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n<code>suggestions</code>. A mention is stored as\n<code><span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\">@Ana Lima</span></code>.</p>\n\n<p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n<code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n<code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>",
|
|
12352
|
+
"overview": "<p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n<code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\nmentions and a <strong>View source</strong> button that shows the HTML in\n<code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\nMarkdown cannot, so the HTML editor offers them.</p>\n\n<p>Get and set the HTML through <code>value</code>; an empty editor has the value\n<code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\nvalue are dropped when it loads.</p>\n\n<p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\ndefault) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n<code>suggestions</code>. A mention is stored as\n<code><span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\">@Ana Lima</span></code>.</p>\n\n<p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n<code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n<code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>\n\n<p><strong>Read-only and disabled.</strong> <code>readonly</code> keeps the text at full contrast\nand leaves only <strong>View source</strong> in the toolbar, which shows the HTML read-only.\n<code>disabled</code> dims the toolbar and the text. <code>show-readonly-badge</code> adds a\nlock badge to the toolbar in either state.</p>",
|
|
12340
12353
|
"cssprop": "--mention-list-max-height - Maximum height of the mention suggestion list.",
|
|
12341
12354
|
"fires": "mention - Dispatched when a suggestion is inserted as a mention.",
|
|
12342
12355
|
"example": "```html\n<wc-html-editor\n label=\"Email body\"\n value=\"<p>Hello <strong>world</strong></p>\"\n></wc-html-editor>\n```",
|
|
@@ -12577,6 +12590,19 @@
|
|
|
12577
12590
|
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
12578
12591
|
}
|
|
12579
12592
|
},
|
|
12593
|
+
{
|
|
12594
|
+
"name": "show-readonly-badge",
|
|
12595
|
+
"type": {
|
|
12596
|
+
"text": "boolean"
|
|
12597
|
+
},
|
|
12598
|
+
"default": "false",
|
|
12599
|
+
"description": "Shows a \"Read only\" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`.",
|
|
12600
|
+
"fieldName": "showReadonlyBadge",
|
|
12601
|
+
"inheritedFrom": {
|
|
12602
|
+
"name": "RichTextInput",
|
|
12603
|
+
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
12604
|
+
}
|
|
12605
|
+
},
|
|
12580
12606
|
{
|
|
12581
12607
|
"name": "maxlength",
|
|
12582
12608
|
"type": {
|
|
@@ -15245,7 +15271,7 @@
|
|
|
15245
15271
|
"tag": "wc-markdown-editor",
|
|
15246
15272
|
"rawTag": "markdown-editor",
|
|
15247
15273
|
"summary": "A rich-text field whose value is Markdown: people format text as they type, and can view the Markdown source.",
|
|
15248
|
-
"overview": "<p>Use it where a form needs more than a textarea, such as a description, notes or a release\nnote. People edit formatted text directly; the value is Markdown, so it stores as plain text and\nshows the same way in <code>wc-markdown</code>.</p>\n\n<ul>\n<li><strong>Toolbar.</strong> Text style, bold, italic, strikethrough, inline code, link, lists,\nchecklist, quote, code block, table, divider and mention. While the caret is in a table, a\n<em>Table</em> menu adds and removes rows and columns. <code>hide-toolbar</code> hides it.</li>\n<li><strong>Selection bubble.</strong> Selecting text shows the inline formats and link.</li>\n<li><strong>Slash menu.</strong> Typing <code>/</code> inserts a block; Markdown shortcuts such\nas <code>## </code>, <code>- </code> and <code>**bold**</code> work too.</li>\n<li><strong>Block handle.</strong> Hovering a block shows a handle to drag it and a + to insert\none below.</li>\n<li><strong>View source.</strong> The last toolbar button shows the Markdown, editable, in\n<code>wc-code-editor</code>.</li>\n</ul>\n\n<p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\ndefault) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n<code>suggestions</code>, and <code>suggestions-loading</code> while you look. A chosen mention is\nstored as <code>[@Ana Lima](mention:usr_142)</code> and fires <code>mention</code>. Set\n<code>triggers=\"\"</code> to turn mentions off.</p>\n\n<p>The editor is form-associated. It fires <code>input</code> with <code>{ value }</code> as the\ncontent changes (after <code>debounce</code> milliseconds without typing) and <code>change</code>\nwhen focus leaves after an edit. <code>required</code> blocks an empty submit, and\n<code>maxlength</code> limits the number of characters and shows a count.</p>\n\n<p><code>rows</code> sets the height of the empty editor in lines; it grows with the text, up to\n<code>max-rows</code> if set, and then scrolls.</p>",
|
|
15274
|
+
"overview": "<p>Use it where a form needs more than a textarea, such as a description, notes or a release\nnote. People edit formatted text directly; the value is Markdown, so it stores as plain text and\nshows the same way in <code>wc-markdown</code>.</p>\n\n<ul>\n<li><strong>Toolbar.</strong> Text style, bold, italic, strikethrough, inline code, link, lists,\nchecklist, quote, code block, table, divider and mention. While the caret is in a table, a\n<em>Table</em> menu adds and removes rows and columns. <code>hide-toolbar</code> hides it.</li>\n<li><strong>Selection bubble.</strong> Selecting text shows the inline formats and link.</li>\n<li><strong>Slash menu.</strong> Typing <code>/</code> inserts a block; Markdown shortcuts such\nas <code>## </code>, <code>- </code> and <code>**bold**</code> work too.</li>\n<li><strong>Block handle.</strong> Hovering a block shows a handle to drag it and a + to insert\none below.</li>\n<li><strong>View source.</strong> The last toolbar button shows the Markdown, editable, in\n<code>wc-code-editor</code>.</li>\n</ul>\n\n<p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\ndefault) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n<code>suggestions</code>, and <code>suggestions-loading</code> while you look. A chosen mention is\nstored as <code>[@Ana Lima](mention:usr_142)</code> and fires <code>mention</code>. Set\n<code>triggers=\"\"</code> to turn mentions off.</p>\n\n<p>The editor is form-associated. It fires <code>input</code> with <code>{ value }</code> as the\ncontent changes (after <code>debounce</code> milliseconds without typing) and <code>change</code>\nwhen focus leaves after an edit. <code>required</code> blocks an empty submit, and\n<code>maxlength</code> limits the number of characters and shows a count.</p>\n\n<p><code>rows</code> sets the height of the empty editor in lines; it grows with the text, up to\n<code>max-rows</code> if set, and then scrolls.</p>\n\n<p><strong>Read-only and disabled.</strong> <code>readonly</code> keeps the text at full contrast\nand leaves only <strong>View source</strong> in the toolbar, which shows the Markdown read-only.\n<code>disabled</code> dims the toolbar and the text. <code>show-readonly-badge</code> adds a\nlock badge to the toolbar in either state.</p>",
|
|
15249
15275
|
"cssprop": "--mention-list-max-height - Maximum height of the mention suggestion list.",
|
|
15250
15276
|
"fires": "mention - Dispatched when a suggestion is inserted as a mention.",
|
|
15251
15277
|
"example": "```html\n<wc-markdown-editor\n label=\"Description\"\n value=\"## Steps\\n\\n1. Open **billing**\"\n></wc-markdown-editor>\n```",
|
|
@@ -15486,6 +15512,19 @@
|
|
|
15486
15512
|
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
15487
15513
|
}
|
|
15488
15514
|
},
|
|
15515
|
+
{
|
|
15516
|
+
"name": "show-readonly-badge",
|
|
15517
|
+
"type": {
|
|
15518
|
+
"text": "boolean"
|
|
15519
|
+
},
|
|
15520
|
+
"default": "false",
|
|
15521
|
+
"description": "Shows a \"Read only\" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`.",
|
|
15522
|
+
"fieldName": "showReadonlyBadge",
|
|
15523
|
+
"inheritedFrom": {
|
|
15524
|
+
"name": "RichTextInput",
|
|
15525
|
+
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
15526
|
+
}
|
|
15527
|
+
},
|
|
15489
15528
|
{
|
|
15490
15529
|
"name": "maxlength",
|
|
15491
15530
|
"type": {
|
|
@@ -19799,6 +19838,19 @@
|
|
|
19799
19838
|
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
19800
19839
|
}
|
|
19801
19840
|
},
|
|
19841
|
+
{
|
|
19842
|
+
"name": "show-readonly-badge",
|
|
19843
|
+
"type": {
|
|
19844
|
+
"text": "boolean"
|
|
19845
|
+
},
|
|
19846
|
+
"default": "false",
|
|
19847
|
+
"description": "Shows a \"Read only\" badge in the toolbar while the editor is read-only or disabled. Not shown with `hide-toolbar`.",
|
|
19848
|
+
"fieldName": "showReadonlyBadge",
|
|
19849
|
+
"inheritedFrom": {
|
|
19850
|
+
"name": "RichTextInput",
|
|
19851
|
+
"module": "src/__internal/rich-text/rich-text-input.ts"
|
|
19852
|
+
}
|
|
19853
|
+
},
|
|
19802
19854
|
{
|
|
19803
19855
|
"name": "maxlength",
|
|
19804
19856
|
"type": {
|