@orangelogic/design-system 2.149.0 → 2.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{AxisLabelRadial.BVjTmOAK.js → AxisLabelRadial.lE2gKah-.js} +1 -1
- package/library/chunks/{BaseColumnSeries.CBs_QAAc.js → BaseColumnSeries.B57B3iHh.js} +1 -1
- package/library/chunks/{CandlestickSeries.Cx0wpT9T.js → CandlestickSeries.CmmI426l.js} +2 -2
- package/library/chunks/{Circle.CPg-MUlK.js → Circle.DAhHYhrc.js} +1 -1
- package/library/chunks/{ColumnSeries.CGSxIqPG.js → ColumnSeries.DBgXk-b4.js} +2 -2
- package/library/chunks/{EditableAxisLabel.BE0SAubP.js → EditableAxisLabel.C6H99qiS.js} +2 -2
- package/library/chunks/{EditableLabel.L5NEdtkw.js → EditableLabel.B7HB7Cu4.js} +1 -1
- package/library/chunks/{Gradient.oQ6wJQll.js → Gradient.DHhBnhFd.js} +1 -1
- package/library/chunks/{LinearGradient.CEimwU0Q.js → LinearGradient.CGx00O8B.js} +2 -2
- package/library/chunks/{Picture.BfLKhIYn.js → Picture.DYltTVSo.js} +1 -1
- package/library/chunks/{Polygon.iNK22k_h.js → Polygon.BCrxKagx.js} +1 -1
- package/library/chunks/{ProgressPie.Bcqzaeqx.js → ProgressPie.CXksPJFv.js} +5 -5
- package/library/chunks/{RadialLabel.a3toiXax.js → RadialLabel.BYH69FGU.js} +1 -1
- package/library/chunks/{Scrollbar.CAoY7xcW.js → Scrollbar.DEv50o4R.js} +1 -1
- package/library/chunks/{Slice.DLvisUPP.js → Slice.C5lVu2g_.js} +1 -1
- package/library/chunks/{Slider.syeHIyBN.js → Slider.BX8g2iGv.js} +1 -1
- package/library/chunks/{SpriteResizer.BDWAslnu.js → SpriteResizer.CfIBMSp3.js} +1 -1
- package/library/chunks/{Triangle.adLo6odq.js → Triangle.CNY8-QfL.js} +1 -1
- package/library/chunks/{ZoomTools.4NFU6RVT.js → ZoomTools.6jZrzA7x.js} +1 -1
- package/library/chunks/{_baseIteratee.CzjK3VFY.js → _baseIteratee.BdKyHJ5i.js} +2 -2
- package/library/chunks/{_baseUniq.CoXu-orP.js → _baseUniq.je-HWbb3.js} +1 -1
- package/library/chunks/{_baseXor.DRclcoaa.js → _baseXor.VohG8cOH.js} +4 -4
- package/library/chunks/{am-chart.Bf-o9SaR.js → am-chart.CqdmTS0P.js} +252 -252
- package/library/chunks/{animation.BSFdTpqz.js → animation.S74lUDDc.js} +1 -1
- package/library/chunks/{asset-link-format.Cfj8l9X6.js → asset-link-format.Bctc22QM.js} +208 -187
- package/library/chunks/{button.Dxb7AACZ.js → button.8syoJXYs.js} +4 -4
- package/library/chunks/{capitalize.DKzUtjlF.js → capitalize.BTYI3NfM.js} +1 -1
- package/library/chunks/{checkbox.aQnF4Zc3.js → checkbox.3i2j3PHc.js} +3 -3
- package/library/chunks/{color-swatch-group.CLoDU6aG.js → color-swatch-group.BX90sRwa.js} +2297 -2218
- package/library/chunks/{color-swatch.D1HqWocK.js → color-swatch.BhBZe8OE.js} +2 -2
- package/library/chunks/{colorPicker.fDJa_Rz5.js → colorPicker.GYgA76kc.js} +5 -5
- package/library/chunks/{confirm-popover.Cb-pC5oI.js → confirm-popover.BFBhjDQ9.js} +3 -3
- package/library/chunks/{content-builder.DZRw6hpX.js → content-builder.BU8X7I6V.js} +1 -1
- package/library/chunks/{dialog.DK0ZZQY3.js → dialog.DIXmnVis.js} +3 -3
- package/library/chunks/{document-viewer.Cr7ARRer.js → document-viewer.DzwB_FfN.js} +9 -9
- package/library/chunks/{dom.CU_mBy9D.js → dom.C5aVLhKS.js} +29 -22
- package/library/chunks/{dot-pagination.CjZm-pju.js → dot-pagination.BdZc-K0r.js} +2 -2
- package/library/chunks/{endpoints.Bn_YviaU.js → endpoints.CwgTrs4A.js} +88 -88
- package/library/chunks/{exporting.Co0vJIff.js → exporting.DQhKH1BX.js} +2 -2
- package/library/chunks/{flow.0ah2v6L5.js → flow.hz0UDjCb.js} +5 -5
- package/library/chunks/{folder-select.DHnp7EO0.js → folder-select.TPHiDGrX.js} +8 -8
- package/library/chunks/{form.BSqXLytJ.js → form.CP9KLGjF.js} +1 -1
- package/library/chunks/{gantt.CPSE8Grs.js → gantt.tu-w6fQ5.js} +8 -8
- package/library/chunks/{header.B4IwSY-l.js → header.DpBmcfR_.js} +2 -2
- package/library/chunks/{hierarchy.Dlq2MwWz.js → hierarchy.CTnBzzmQ.js} +5 -5
- package/library/chunks/{hub-connection.CIUZJBdQ.js → hub-connection.CA_wS_wh.js} +1 -1
- package/library/chunks/{i18n.S781IU3H.js → i18n.Bchq8v1d.js} +41 -5
- package/library/chunks/{icon-button.B-GBGmBo.js → icon-button.DbVIFgu7.js} +2 -2
- package/library/chunks/{icon.CsF1BoUl.js → icon.mxNZ85k0.js} +1 -1
- package/library/chunks/{iframe.BLb7TAM7.js → iframe.DcHjOcLG.js} +2 -2
- package/library/chunks/{image.C1a_eXtI.js → image.DYRVQgG1.js} +3 -3
- package/library/chunks/{index.q6xCNzcK.js → index.BVDhdCk-.js} +17 -17
- package/library/chunks/{input.eQ-tc3ew.js → input.BcyLZUmv.js} +4 -4
- package/library/chunks/{json.lgvYjT5K.js → json.D7WeFaJm.js} +3 -3
- package/library/chunks/{map.Cz4qZnZB.js → map.BjtxEozr.js} +2 -2
- package/library/chunks/{option.Bo4ryyg8.js → option.qN3aaqVI.js} +3 -3
- package/library/chunks/{pagination.vaTRiEs-.js → pagination.Cupa46TN.js} +6 -6
- package/library/chunks/{percent.TSAQO6y8.js → percent.D_CkaRGb.js} +3 -3
- package/library/chunks/{radar.mnUjkEJF.js → radar.BMKaNvJH.js} +4 -4
- package/library/chunks/{sliceGrouper.B9Hml2R8.js → sliceGrouper.C-t5ZRrz.js} +1 -1
- package/library/chunks/{stock.CSGPjDQK.js → stock.vF_pji1F.js} +9 -9
- package/library/chunks/{string.BmBJ_BLT.js → string.BhJ0Zogu.js} +104 -59
- package/library/chunks/{tab-group.Owu-XQzM.js → tab-group.kSg5_10g.js} +5 -5
- package/library/chunks/{timeline.CzbNFkA3.js → timeline.gWu0up6r.js} +5 -5
- package/library/chunks/{toString.bJgZMf_C.js → toString.Dcbz5jVT.js} +1 -1
- package/library/chunks/{toast.NfNkPs5d.js → toast.TDU3wVhq.js} +1 -1
- package/library/chunks/{tree.BYD88cAs.js → tree.BDAj1Xs2.js} +4 -4
- package/library/chunks/{venn.Cq0RJAER.js → venn.BVBe-JXs.js} +1 -1
- package/library/chunks/{watch.K-dbDP6P.js → watch.DOt4Mabe.js} +32 -31
- package/library/chunks/{wc.Cae1yJ4l.js → wc.DTNpfIc1.js} +1 -1
- package/library/chunks/{xy.CseMLD2I.js → xy.BNgyrwGD.js} +10 -10
- package/library/components/alert.js +3 -3
- package/library/components/am-chart.js +2 -2
- package/library/components/animated-image.js +2 -2
- package/library/components/animation.js +2 -2
- package/library/components/array-line-clamp.js +1 -1
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +20 -20
- package/library/components/audio.js +3 -3
- package/library/components/avatar.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb-item.js +1 -1
- package/library/components/breadcrumb.js +2 -2
- package/library/components/button.js +5 -5
- package/library/components/checkbox.js +4 -4
- package/library/components/color-picker.js +6 -6
- package/library/components/color-swatch-group.js +6 -6
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +3 -3
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +3 -3
- package/library/components/dialog.js +4 -4
- package/library/components/diff.js +2 -2
- package/library/components/divider.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +3 -3
- package/library/components/drawer.js +4 -4
- package/library/components/dropdown.js +3 -3
- package/library/components/dynamic-select.js +14 -11
- package/library/components/e-chart.js +2 -2
- package/library/components/element-clamp.js +3 -3
- package/library/components/file-on-demand.js +14 -14
- package/library/components/folder-select.js +7 -7
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +2 -2
- package/library/components/grid-item.js +1 -1
- package/library/components/header.js +3 -3
- package/library/components/hub-connection.js +2 -2
- package/library/components/icon-button.js +3 -3
- package/library/components/icon.js +2 -2
- package/library/components/iframe.js +3 -3
- package/library/components/image-comparer.js +3 -3
- package/library/components/image.js +4 -4
- package/library/components/include.js +1 -1
- package/library/components/input.js +5 -5
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +1 -1
- package/library/components/masonry.js +3 -3
- package/library/components/menu-item.js +3 -3
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +3 -3
- package/library/components/mutation-observer.js +1 -1
- package/library/components/option.js +4 -4
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/qr-code.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/radio.js +2 -2
- package/library/components/range.js +3 -3
- package/library/components/rating.js +3 -3
- package/library/components/relative-time.js +1 -1
- package/library/components/resize-observer.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +4 -4
- package/library/components/sidebar.js +3 -3
- package/library/components/size-input-group.js +4 -4
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +2 -2
- package/library/components/step.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/stepper.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +6 -6
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +3 -3
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +2 -2
- package/library/components/tree-item.js +5 -5
- package/library/components/tree.js +3 -3
- package/library/components/typeface.js +3 -3
- package/library/components/types.js +31532 -30154
- package/library/components/video.js +3 -3
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-xml-editor-asset-type-change.d.ts +8 -0
- package/library/packages/events/src/cx-xml-editor-change.d.ts +8 -0
- package/library/packages/events/src/cx-xml-editor-element-action.d.ts +11 -0
- package/library/packages/events/src/cx-xml-editor-element-expand-toggle.d.ts +8 -0
- package/library/packages/events/src/cx-xml-editor-notify.d.ts +11 -0
- package/library/packages/events/src/cx-xml-editor-packet-change.d.ts +11 -0
- package/library/packages/events/src/events.d.ts +6 -0
- package/library/packages/hybrid/table-core/src/table/table-data-loader.d.ts +2 -2
- package/library/packages/hybrid/table-core/src/table/table.d.ts +8 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +6 -1
- package/library/packages/molecules/src/annotator/annotator.d.ts +12 -0
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +9 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/type-subtype-select/type-subtype-select.d.ts +64 -0
- package/library/packages/molecules/src/type-subtype-select/type-subtype-select.styles.d.ts +2 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +5 -4
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +5 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +4 -6
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/organisms/src/xml-editor/components/asset-type/asset-type.d.ts +38 -0
- package/library/packages/organisms/src/xml-editor/components/asset-type/asset-type.styles.d.ts +2 -0
- package/library/packages/organisms/src/xml-editor/components/element-tag/element-tag.d.ts +66 -0
- package/library/packages/organisms/src/xml-editor/components/element-tag/element-tag.styles.d.ts +2 -0
- package/library/packages/organisms/src/xml-editor/components/packet-editor/packet-editor.d.ts +78 -0
- package/library/packages/organisms/src/xml-editor/components/packet-editor/packet-editor.styles.d.ts +2 -0
- package/library/packages/organisms/src/xml-editor/components/viewer/viewer.d.ts +37 -0
- package/library/packages/organisms/src/xml-editor/components/viewer/viewer.styles.d.ts +2 -0
- package/library/packages/organisms/src/xml-editor/xml-editor.d.ts +75 -0
- package/library/packages/organisms/src/xml-editor/xml-editor.data.d.ts +23 -0
- package/library/packages/organisms/src/xml-editor/xml-editor.styles.d.ts +2 -0
- package/library/packages/services/src/api/endpoints.d.ts +3 -0
- package/library/packages/services/src/api/metadata/metadata.d.ts +14 -1
- package/library/packages/services/src/api/metadata/metadata.types.d.ts +37 -1
- package/library/packages/types/src/content-builder.d.ts +8 -1
- package/library/packages/types/src/xml-editor.d.ts +108 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +36 -0
- package/library/packages/utils/src/dom/dom.d.ts +3 -0
- package/library/packages/utils/src/string/string.d.ts +11 -0
- package/library/react-web-component.d.ts +73 -5
- package/library/utils.js +148 -144
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { _ as kd, a as Sa, b as Be, c as Je } from "../chunks/inheritsLoose.BuSn_CvZ.js";
|
|
2
2
|
import { c as ps, a as Bn } from "../chunks/_commonjsHelpers.DQNKXVTB.js";
|
|
3
3
|
import { r as Sb } from "../chunks/___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
|
|
4
|
-
import { C as Cb } from "../chunks/image.
|
|
4
|
+
import { C as Cb } from "../chunks/image.DYRVQgG1.js";
|
|
5
5
|
import Mb from "./resize-observer.js";
|
|
6
6
|
import { r as Db, R as Pb, a as Rp, b as Lb } from "../chunks/resizable-component.styles.CAfXABBc.js";
|
|
7
7
|
import { c as Rb } from "../chunks/component.styles.CRO4Odto.js";
|
|
8
8
|
import { b as Ib } from "../chunks/browser.BHOCIF_A.js";
|
|
9
9
|
import { c as Ob } from "../chunks/custom-element.L4WJXn1j.js";
|
|
10
|
-
import { L as kb } from "../chunks/i18n.
|
|
11
|
-
import { w as Ki } from "../chunks/watch.
|
|
10
|
+
import { L as kb } from "../chunks/i18n.Bchq8v1d.js";
|
|
11
|
+
import { w as Ki } from "../chunks/watch.DOt4Mabe.js";
|
|
12
12
|
import { i as Bb, x as Qc } from "../chunks/lit-element.jLBm65_O.js";
|
|
13
13
|
import { n as Ri } from "../chunks/lib-cortex-element.CVMmyPMC.js";
|
|
14
14
|
import { r as yn } from "../chunks/state.CSDxrqLd.js";
|
package/library/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { XmlEditorElementActionKind, XmlEditorTag } from '../../types/src/xml-editor';
|
|
2
|
+
|
|
3
|
+
export type CxXmlEditorElementActionEvent = CustomEvent<{
|
|
4
|
+
action: XmlEditorElementActionKind;
|
|
5
|
+
name: XmlEditorTag;
|
|
6
|
+
}>;
|
|
7
|
+
declare global {
|
|
8
|
+
interface GlobalEventHandlersEventMap {
|
|
9
|
+
'cx-xml-editor-element-action': CxXmlEditorElementActionEvent;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { XmlEditorNotifyType } from '../../types/src/xml-editor';
|
|
2
|
+
|
|
3
|
+
export type CxXmlEditorNotifyEvent = CustomEvent<{
|
|
4
|
+
message: string;
|
|
5
|
+
type: XmlEditorNotifyType;
|
|
6
|
+
}>;
|
|
7
|
+
declare global {
|
|
8
|
+
interface GlobalEventHandlersEventMap {
|
|
9
|
+
'cx-xml-editor-notify': CxXmlEditorNotifyEvent;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { XmlEditorPacketActionType, XmlEditorPacketPayload } from '../../types/src/xml-editor';
|
|
2
|
+
|
|
3
|
+
export type CxXmlEditorPacketChangeEvent = CustomEvent<{
|
|
4
|
+
payload: XmlEditorPacketPayload;
|
|
5
|
+
type: XmlEditorPacketActionType;
|
|
6
|
+
}>;
|
|
7
|
+
declare global {
|
|
8
|
+
interface GlobalEventHandlersEventMap {
|
|
9
|
+
'cx-xml-editor-packet-change': CxXmlEditorPacketChangeEvent;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -232,3 +232,9 @@ export * from './cx-video-editor-track-click';
|
|
|
232
232
|
export * from './cx-video-editor-transition-click';
|
|
233
233
|
export * from './cx-video-thumbnail-resolved';
|
|
234
234
|
export * from './cx-view-logs';
|
|
235
|
+
export * from './cx-xml-editor-asset-type-change';
|
|
236
|
+
export * from './cx-xml-editor-change';
|
|
237
|
+
export * from './cx-xml-editor-element-action';
|
|
238
|
+
export * from './cx-xml-editor-element-expand-toggle';
|
|
239
|
+
export * from './cx-xml-editor-notify';
|
|
240
|
+
export * from './cx-xml-editor-packet-change';
|
|
@@ -2,8 +2,8 @@ import { ColumnDefinition, TableDataFormat } from '../../../../types/src/table';
|
|
|
2
2
|
|
|
3
3
|
export type StreamChunkCallback = (rows: Array<Record<string, unknown>>) => Promise<void>;
|
|
4
4
|
export declare function parseCsvStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number): Promise<number>;
|
|
5
|
-
export declare function parseXmlStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number): Promise<number>;
|
|
6
|
-
export declare function parseJsonStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number): Promise<number>;
|
|
5
|
+
export declare function parseXmlStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number, urlPath?: string): Promise<number>;
|
|
6
|
+
export declare function parseJsonStream(raw: string, onColumns: (columns: ColumnDefinition[]) => void, onChunk: StreamChunkCallback, chunkSize?: number, urlPath?: string): Promise<number>;
|
|
7
7
|
export interface ParsedTableData {
|
|
8
8
|
columns: ColumnDefinition[];
|
|
9
9
|
data: Array<Record<string, unknown>>;
|
|
@@ -801,6 +801,14 @@ export default class CxTable extends CortexElement {
|
|
|
801
801
|
dateFilterCompareFormat: DateFilterCompareFormat;
|
|
802
802
|
/** Format of the data at dataUrl. Use 'auto' to detect from URL extension or Content-Type header. */
|
|
803
803
|
dataFormat: TableDataFormat;
|
|
804
|
+
/**
|
|
805
|
+
* Dot- or slash-notation path (e.g. `data.items` or `result/rows/0/list`) to the row data within
|
|
806
|
+
* a `dataUrl` response, for payloads that don't already match the default shape:
|
|
807
|
+
* - `json`: not already a bare array or a `{ columns, data }` envelope.
|
|
808
|
+
* - `xml`: not already a bare element list or a `{ columns, rows }` envelope.
|
|
809
|
+
* Has no effect on `csv` data.
|
|
810
|
+
*/
|
|
811
|
+
dataUrlPath: string;
|
|
804
812
|
/**
|
|
805
813
|
* When true, a `dataUrl` load keeps existing `columns` as-is instead of auto-populating them
|
|
806
814
|
* from the loaded file's headers. Has no effect when `columns` is empty — auto-detection still
|
|
@@ -2,7 +2,7 @@ import { default as Filter } from '../modules/Filter/Filter';
|
|
|
2
2
|
import { default as Page } from '../modules/Page/Page';
|
|
3
3
|
import { default as SelectRow } from '../modules/SelectRow/SelectRow';
|
|
4
4
|
import { default as Tabulator } from './Tabulator';
|
|
5
|
-
import { GroupArg, GroupValuesArg, ITabulatorFull, Options, SheetLookup, SortDirection, Sorter, SpreadsheetComponent } from './types';
|
|
5
|
+
import { GroupArg, GroupValuesArg, ICellComponent, ITabulatorFull, Options, SheetLookup, SortDirection, Sorter, SpreadsheetComponent, ValidationSummary } from './types';
|
|
6
6
|
|
|
7
7
|
declare class TabulatorFull extends Tabulator implements ITabulatorFull {
|
|
8
8
|
static extendModule(...args: Parameters<typeof Tabulator._extendModule>): void;
|
|
@@ -50,5 +50,10 @@ declare class TabulatorFull extends Tabulator implements ITabulatorFull {
|
|
|
50
50
|
deselectRow: SelectRow['deselectRows'];
|
|
51
51
|
toggleSelectRow: SelectRow['toggleRow'];
|
|
52
52
|
setSort: (sortList: string | Sorter[], dir?: SortDirection) => void;
|
|
53
|
+
validate: () => true | ICellComponent[];
|
|
54
|
+
validateAsync: () => Promise<ValidationSummary>;
|
|
55
|
+
getValidationSummary: () => ValidationSummary;
|
|
56
|
+
getInvalidCells: () => ICellComponent[];
|
|
57
|
+
clearCellValidation: (cells?: ICellComponent | ICellComponent[]) => void;
|
|
53
58
|
}
|
|
54
59
|
export default TabulatorFull;
|
|
@@ -73,6 +73,18 @@ export default class CxAnnotator extends CortexElement {
|
|
|
73
73
|
private handleMarkerCreate;
|
|
74
74
|
private handleMarkerChange;
|
|
75
75
|
private handleMarkerDelete;
|
|
76
|
+
/**
|
|
77
|
+
* Re-arms the armed drawing tool when the pointer re-enters the marker area.
|
|
78
|
+
*
|
|
79
|
+
* MarkerJS 3 requires an explicit `createMarker()` call to (re)enter drawing
|
|
80
|
+
* mode. When the pointer leaves the marker area (e.g. the user clicks the
|
|
81
|
+
* video controls to play/pause) and comes back while a tool is still armed,
|
|
82
|
+
* the previously armed "new" marker no longer reacts to the first click,
|
|
83
|
+
* forcing an extra activating click. Re-creating the marker of the current
|
|
84
|
+
* type on re-entry restores the "sticky tool" feel of the legacy MarkerJS 2
|
|
85
|
+
* UI so the next click draws immediately.
|
|
86
|
+
*/
|
|
87
|
+
private handlePointerEnter;
|
|
76
88
|
private handleKeydown;
|
|
77
89
|
private handleToolClick;
|
|
78
90
|
private handleAddArrowClick;
|
|
@@ -136,6 +136,15 @@ export default class CxDynamicSelect extends CortexElement {
|
|
|
136
136
|
* @returns The value
|
|
137
137
|
*/
|
|
138
138
|
getOptionValue: (option: HTMLElement) => string;
|
|
139
|
+
/**
|
|
140
|
+
* Optional override for the label shown in the closed select's display text (and used for text-based matching)
|
|
141
|
+
* when `columns` (table mode) is set. Table mode otherwise derives the label from the first rendered `<td>`;
|
|
142
|
+
* provide this to use a different column, or to combine several columns into one summary (e.g. "A -> B").
|
|
143
|
+
*
|
|
144
|
+
* @param option The option to get the label for
|
|
145
|
+
* @returns The label
|
|
146
|
+
*/
|
|
147
|
+
getOptionLabel?: (option: HTMLElement) => string;
|
|
139
148
|
/**
|
|
140
149
|
*
|
|
141
150
|
* current = whether the option is currently focused on e.g via keyboard
|
|
@@ -40,6 +40,7 @@ export { default as CxStatCard } from './stat-card/stat-card';
|
|
|
40
40
|
export { default as CxStepperWizard } from './stepper-wizard/stepper-wizard';
|
|
41
41
|
export { default as CxStorybook } from './storybook/storybook';
|
|
42
42
|
export { default as CxTypeface } from './typeface/typeface';
|
|
43
|
+
export { default as CxTypeSubtypeSelect } from './type-subtype-select/type-subtype-select';
|
|
43
44
|
export { default as CxAssetFormatPicker } from './asset-format-picker/asset-format-picker';
|
|
44
45
|
export { default as CxInputDatePicker } from './input-date-picker/input-date-picker';
|
|
45
46
|
export { default as CxInputDateRangePicker } from './input-date-range-picker/input-date-range-picker';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
|
|
3
|
+
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
|
|
4
|
+
import { default as CxOption } from '../../../atoms/src/components/option/option.ts';
|
|
5
|
+
import { default as CxSelect } from '../../../atoms/src/components/select/select.ts';
|
|
6
|
+
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
7
|
+
import { TypeSubtypeOption, TypeSubtypeSelectRow } from '../../../types/src/type-subtype-select';
|
|
8
|
+
import { CSSResultGroup } from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @summary Cascading type/subtype picker. Renders one or more rows of a
|
|
12
|
+
* "type" select and a dependent "subtype" select (disabled until a type is
|
|
13
|
+
* chosen). In `multiple` mode, rows can be added and removed with `+` / `-`
|
|
14
|
+
* controls. The emitted `value` is a space-separated list of one token per
|
|
15
|
+
* row, each token being `{type}.{subtype}`. In single mode, exactly one row
|
|
16
|
+
* is rendered and `value` is that row's single token.
|
|
17
|
+
*
|
|
18
|
+
* @event cx-change - Emitted whenever the selected type/subtype rows change.
|
|
19
|
+
*/
|
|
20
|
+
export default class CxTypeSubtypeSelect extends CortexElement {
|
|
21
|
+
static readonly styles: CSSResultGroup;
|
|
22
|
+
static readonly dependencies: {
|
|
23
|
+
'cx-button': typeof CxButton;
|
|
24
|
+
'cx-icon': typeof CxIcon;
|
|
25
|
+
'cx-icon-button': typeof CxIconButton;
|
|
26
|
+
'cx-option': typeof CxOption;
|
|
27
|
+
'cx-select': typeof CxSelect;
|
|
28
|
+
};
|
|
29
|
+
/** Encodes one row's type/subtype pair into the token format used by `value`. */
|
|
30
|
+
static encodeRowToken(row: TypeSubtypeSelectRow): string;
|
|
31
|
+
/** Decodes one `value` token back into its type/subtype pair. */
|
|
32
|
+
static decodeRowToken(token: string): TypeSubtypeSelectRow;
|
|
33
|
+
private readonly localize;
|
|
34
|
+
/** Available types, each with its own list of subtypes. */
|
|
35
|
+
options: TypeSubtypeOption[];
|
|
36
|
+
/** When true, allows multiple type/subtype rows (add with `+`, remove with `-`). */
|
|
37
|
+
multiple: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Space-separated row tokens, each `{type}.{subtype}`. In single mode,
|
|
40
|
+
* holds at most one token.
|
|
41
|
+
*/
|
|
42
|
+
value: string;
|
|
43
|
+
/** When true, each row's type select participates in native form validation. */
|
|
44
|
+
required: boolean;
|
|
45
|
+
/** Editable rows, derived from `value` whenever it changes externally. */
|
|
46
|
+
private rows;
|
|
47
|
+
/** Row ids are only used for keyed rendering; they never leave the component. */
|
|
48
|
+
private rowIds;
|
|
49
|
+
syncRowsFromValue(): void;
|
|
50
|
+
private subOptionsFor;
|
|
51
|
+
private applyRows;
|
|
52
|
+
private rowIndexOf;
|
|
53
|
+
private handleTypeChange;
|
|
54
|
+
private handleSubtypeChange;
|
|
55
|
+
private handleAddRowClick;
|
|
56
|
+
private handleRemoveRowClick;
|
|
57
|
+
private renderRow;
|
|
58
|
+
render(): import('lit').TemplateResult<1>;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface HTMLElementTagNameMap {
|
|
62
|
+
'cx-type-subtype-select': CxTypeSubtypeSelect;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -196,6 +196,12 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
196
196
|
* been applied yet.
|
|
197
197
|
*/
|
|
198
198
|
get lastAppliedCropUnit(): Unit;
|
|
199
|
+
/**
|
|
200
|
+
* The focus mode of the last applied crop transformation, for the no-asset case only.
|
|
201
|
+
* Reflects whatever focus mode the last committed Crop transformation used, or 'manual'
|
|
202
|
+
* when nothing has been applied yet.
|
|
203
|
+
*/
|
|
204
|
+
get lastAppliedCropFocusMode(): string;
|
|
199
205
|
/**
|
|
200
206
|
* Checks if the crop apply button should be disabled.
|
|
201
207
|
* This is determined by comparing the current crop size with the last crop size.
|
|
@@ -41,7 +41,7 @@ export type CxAssetLinkFormatCropFocusModeChangeEvent = CustomEvent<{
|
|
|
41
41
|
* @event `cx-asset-link-format-crop-apply` - Emitted when the crop settings are applied.
|
|
42
42
|
* @event `cx-asset-link-format-crop-auto` - Emitted when the auto cropping is applied.
|
|
43
43
|
*
|
|
44
|
-
* @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.).
|
|
44
|
+
* @property {boolean} no-ratio-modes - When true, hides the ratio mode select (Free, Widescreen, Square, etc.) and the unit select (Pixels / Aspect Ratio).
|
|
45
45
|
*/
|
|
46
46
|
export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
47
47
|
static readonly styles: CSSResultGroup;
|
|
@@ -109,9 +109,10 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
|
109
109
|
*/
|
|
110
110
|
disabledApply: boolean;
|
|
111
111
|
/**
|
|
112
|
-
* Whether to hide the ratio mode select (Free, Widescreen, Square, etc.)
|
|
113
|
-
* Useful when no asset is attached yet, since
|
|
114
|
-
* without known dimensions only produces tiny,
|
|
112
|
+
* Whether to hide the ratio mode select (Free, Widescreen, Square, etc.) and the
|
|
113
|
+
* unit select (Pixels / Aspect Ratio). Useful when no asset is attached yet, since
|
|
114
|
+
* switching between ratios or units without known dimensions only produces tiny,
|
|
115
|
+
* meaningless pixel values.
|
|
115
116
|
*/
|
|
116
117
|
noRatioModes: boolean;
|
|
117
118
|
/**
|
|
@@ -27,6 +27,8 @@ export type CxAssetLinkFormatResizeApplyEvent = CustomEvent<{
|
|
|
27
27
|
* @summary The `cx-asset-link-format-resize` component is used to define resize values for an asset link.
|
|
28
28
|
*
|
|
29
29
|
* @event `cx-asset-link-format-resize-change` - Emitted when the resize values are changed.
|
|
30
|
+
*
|
|
31
|
+
* @property {boolean} no-ratio-modes - When true, hides the unit select (Pixels / Aspect Ratio).
|
|
30
32
|
*/
|
|
31
33
|
export default class CxAssetLinkFormatResize extends CortexElement {
|
|
32
34
|
static readonly styles: CSSResultGroup;
|
|
@@ -104,6 +106,12 @@ export default class CxAssetLinkFormatResize extends CortexElement {
|
|
|
104
106
|
* @default false
|
|
105
107
|
*/
|
|
106
108
|
loading: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether to hide the unit select (Pixels / Aspect Ratio). Useful when no asset is
|
|
111
|
+
* attached yet, since switching between units without known dimensions only
|
|
112
|
+
* produces tiny, meaningless pixel values.
|
|
113
|
+
*/
|
|
114
|
+
noRatioModes: boolean;
|
|
107
115
|
/**
|
|
108
116
|
* Whether to keep the aspect ratio when changing width or height.
|
|
109
117
|
* This is used to automatically adjust the other dimension when one is changed.
|
|
@@ -10,6 +10,8 @@ export declare class ConfigFormController implements ReactiveController {
|
|
|
10
10
|
private readonly pendingGalleryPickerSaves;
|
|
11
11
|
private readonly fontFamiliesCache;
|
|
12
12
|
private readonly pendingFontFamilyFetches;
|
|
13
|
+
private readonly typeSubtypeOptionsCache;
|
|
14
|
+
private readonly pendingTypeSubtypeOptionsFetches;
|
|
13
15
|
constructor(host: ReactiveControllerHost & CxConfigForm);
|
|
14
16
|
hostConnected(): void;
|
|
15
17
|
/**
|
package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import { default as CxPaddingInputGroup } from '../../../../../molecules/src/pad
|
|
|
40
40
|
import { default as CxPositionPicker } from '../../../../../molecules/src/position-picker/position-picker.ts';
|
|
41
41
|
import { default as CxShadowInputGroup } from '../../../../../molecules/src/shadow-input-group/shadow-input-group.ts';
|
|
42
42
|
import { default as CxSizeInputGroup } from '../../../../../molecules/src/size-input-group/size-input-group.ts';
|
|
43
|
+
import { default as CxTypeSubtypeSelect } from '../../../../../molecules/src/type-subtype-select/type-subtype-select.ts';
|
|
43
44
|
import { default as CxAssetTransformationDialog } from '../../../asset-transformation-dialog/asset-transformation-dialog.ts';
|
|
44
45
|
import { AssetFormatValue } from '../../../../../types/src/asset-format-picker';
|
|
45
46
|
import { Asset, AssetTypeString, EditorMode, PropertyConfig } from '../../../../../types/src/content-builder';
|
|
@@ -125,6 +126,7 @@ export default class CxConfigForm extends CortexElement {
|
|
|
125
126
|
'cx-tab-panel': typeof CxTabPanel;
|
|
126
127
|
'cx-textarea': typeof CxTextarea;
|
|
127
128
|
'cx-tooltip': typeof CxTooltip;
|
|
129
|
+
'cx-type-subtype-select': typeof CxTypeSubtypeSelect;
|
|
128
130
|
'cx-typography': typeof CxTypography;
|
|
129
131
|
'cx-visually-hidden': typeof CxVisuallyHidden;
|
|
130
132
|
};
|
|
@@ -74,7 +74,7 @@ export default class StyleController {
|
|
|
74
74
|
checkedValue?: string | boolean;
|
|
75
75
|
children?: PropertyConfig[];
|
|
76
76
|
clearable?: boolean;
|
|
77
|
-
controlType: "asset-transformation" | "bicolor-picker" | "border-input-group" | "button-group" | "checkbox" | "checkbox-group" | "color-swatch-picker" | "corner-position-input-group" | "dam-custom-toolbar-buttons" | "download-format-picker" | "file" | "folder-picker" | "gallery-picker" | "group" | "group-heading" | "icon-picker" | "image-picker" | "info-text" | "input" | "list-editor" | "all-picker" | "other-picker" | "padding-input-group" | "page-picker" | "placeholder" | "position-picker" | "radio-card-group" | "radio-group" | "select" | "shadow-input-group" | "size-input-group" | "switch" | "table" | "text" | "audio-picker" | "asset-format-picker" | "font-picker" | "video-picker";
|
|
77
|
+
controlType: "asset-transformation" | "bicolor-picker" | "border-input-group" | "button-group" | "checkbox" | "checkbox-group" | "color-swatch-picker" | "corner-position-input-group" | "dam-custom-toolbar-buttons" | "download-format-picker" | "file" | "folder-picker" | "gallery-picker" | "group" | "group-heading" | "icon-picker" | "image-picker" | "info-text" | "input" | "list-editor" | "all-picker" | "other-picker" | "padding-input-group" | "page-picker" | "placeholder" | "position-picker" | "radio-card-group" | "radio-group" | "select" | "shadow-input-group" | "size-input-group" | "switch" | "table" | "text" | "type-subtype-select" | "audio-picker" | "asset-format-picker" | "font-picker" | "video-picker";
|
|
78
78
|
cornerStyleKey?: {
|
|
79
79
|
offsetX: string;
|
|
80
80
|
offsetY: string;
|
|
@@ -166,6 +166,10 @@ export default class StyleController {
|
|
|
166
166
|
translatable?: boolean;
|
|
167
167
|
translateGroup?: string;
|
|
168
168
|
type: "attribute" | "property" | "style" | "decorative";
|
|
169
|
+
typeSubtypeSelectConfigs?: {
|
|
170
|
+
api: () => Promise<import('../../../types/src/type-subtype-select').TypeSubtypeOption[]>;
|
|
171
|
+
multiple?: boolean;
|
|
172
|
+
};
|
|
169
173
|
uncheckedValue?: string | boolean;
|
|
170
174
|
useSearchTerm?: boolean;
|
|
171
175
|
width?: ((record: Record<string, unknown>) => string | number) | string | number;
|
|
@@ -17,6 +17,7 @@ import { CxAssetRequestStatusEvent, CxChangeEvent, CxRequestCloseEvent } from '.
|
|
|
17
17
|
import { default as CxConfirmPopover } from '../../../molecules/src/confirm-popover/confirm-popover.ts';
|
|
18
18
|
import { default as CxDynamicSelect } from '../../../molecules/src/dynamic-select/dynamic-select.ts';
|
|
19
19
|
import { default as CxIconPicker } from '../../../molecules/src/icon-picker/icon-picker.ts';
|
|
20
|
+
import { default as CxTypeSubtypeSelect } from '../../../molecules/src/type-subtype-select/type-subtype-select.ts';
|
|
20
21
|
import { Option } from '../../../types/src/content-builder';
|
|
21
22
|
import { DamCustomToolbarButton } from '../../../types/src/dam-view';
|
|
22
23
|
import { CSSResultGroup } from 'lit';
|
|
@@ -59,6 +60,7 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
59
60
|
'cx-radio-group': typeof CxRadioGroup;
|
|
60
61
|
'cx-select': typeof CxSelect;
|
|
61
62
|
'cx-space': typeof CxSpace;
|
|
63
|
+
'cx-type-subtype-select': typeof CxTypeSubtypeSelect;
|
|
62
64
|
'cx-typography': typeof CxTypography;
|
|
63
65
|
};
|
|
64
66
|
private readonly localize;
|
|
@@ -120,6 +122,7 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
120
122
|
private availableButtonsApi;
|
|
121
123
|
private get pageSelectColumns();
|
|
122
124
|
private get addSelectColumns();
|
|
125
|
+
private get typeSubtypeOptions();
|
|
123
126
|
handleCreateNewClick(): void;
|
|
124
127
|
handleAvailableButtonSelect(event: CustomEvent<Option>): void;
|
|
125
128
|
handleListEditorEdit(event: CxListEditorRowActionEvent): void;
|
|
@@ -141,17 +144,12 @@ export default class CxDamCustomToolbarButtonsEditor extends CortexElement {
|
|
|
141
144
|
handleFormIdChange(event: CustomEvent<Option>): void;
|
|
142
145
|
handlePageChange(event: CxChangeEvent): void;
|
|
143
146
|
handleSpaceIdChange(event: CustomEvent<Option>): void;
|
|
144
|
-
|
|
145
|
-
handleRecordSubTypeChange(event: CxChangeEvent): void;
|
|
147
|
+
handleRecordTypeSubtypeChange(event: CxChangeEvent): void;
|
|
146
148
|
handleAccessLevelChange(event: CustomEvent<Option>): void;
|
|
147
149
|
handleConfigureWorkflowClick(): Promise<void>;
|
|
148
150
|
handleSaveClick(): void;
|
|
149
151
|
handleDialogFormSubmit(event: SubmitEvent): void;
|
|
150
152
|
private loadSubTypesIfNeeded;
|
|
151
|
-
/** Returns the `typeLabel` key (underscored) that matches a given `typeDbBOName`. */
|
|
152
|
-
private findTypeKeyByDbBOName;
|
|
153
|
-
/** Picks the wildcard subTypeValue (or first available) for a given `typeDbBOName`. */
|
|
154
|
-
private findDefaultSubTypeFor;
|
|
155
153
|
private createNewButton;
|
|
156
154
|
private updateEditedItem;
|
|
157
155
|
/**
|
|
@@ -24,3 +24,4 @@ export { default as CxTemplateSwitcher } from './template-switcher/template-swit
|
|
|
24
24
|
export { default as CxTextToSpeech } from './text-to-speech/text-to-speech';
|
|
25
25
|
export { default as CxVideoChaptersManager } from './video-chapters-manager/video-chapters-manager';
|
|
26
26
|
export { default as CxVideoEditor } from './video-editor/video-editor';
|
|
27
|
+
export { default as CxXmlEditor } from './xml-editor/xml-editor';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as CxOption } from '../../../../../atoms/src/components/option/option.ts';
|
|
2
|
+
import { default as CxSelect } from '../../../../../atoms/src/components/select/select.ts';
|
|
3
|
+
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
4
|
+
import { CSSResultGroup } from 'lit';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @summary Two cascading selects (Type -> Subtype) that together produce a single fully-qualified
|
|
8
|
+
* `DO_DOCUMENTS.<typeDbBOName>.<subTypeValue>` asset-type path, used by `packet-editor`'s TypeFilters rows.
|
|
9
|
+
*
|
|
10
|
+
* @event cx-xml-editor-asset-type-change - Emitted with the fully-qualified asset-type path once both selections resolve.
|
|
11
|
+
*/
|
|
12
|
+
export default class CxXmlEditorAssetType extends CortexElement {
|
|
13
|
+
#private;
|
|
14
|
+
static readonly styles: CSSResultGroup;
|
|
15
|
+
static readonly dependencies: {
|
|
16
|
+
'cx-option': typeof CxOption;
|
|
17
|
+
'cx-select': typeof CxSelect;
|
|
18
|
+
};
|
|
19
|
+
private readonly localize;
|
|
20
|
+
/** The fully-qualified asset-type path currently selected (e.g. `DO_DOCUMENTS.Image_DbBO.Image_Default`). */
|
|
21
|
+
value: string;
|
|
22
|
+
/** Subtypes grouped by type label, then by subtype label, as produced by `apiGetSubTypesWithWildcard`. */
|
|
23
|
+
subTypesMap: Record<string, Record<string, {
|
|
24
|
+
subTypeValue: string;
|
|
25
|
+
typeDbBOName: string;
|
|
26
|
+
}>>;
|
|
27
|
+
/** The currently selected type label (first select's value). */
|
|
28
|
+
private typeValue;
|
|
29
|
+
/** The currently selected subtype label (second select's value). */
|
|
30
|
+
private subTypeValue;
|
|
31
|
+
handleValueChange(): void;
|
|
32
|
+
render(): import('lit').TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
'cx-xml-editor-asset-type': CxXmlEditorAssetType;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
|
|
3
|
+
import { default as CxIconButton } from '../../../../../atoms/src/components/icon-button/icon-button.ts';
|
|
4
|
+
import { default as CxTooltip } from '../../../../../atoms/src/components/tooltip/tooltip.ts';
|
|
5
|
+
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
|
|
6
|
+
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
7
|
+
import { XmlEditorElement, XmlEditorTag } from '../../../../../types/src/xml-editor';
|
|
8
|
+
import { CSSResultGroup } from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @summary One row of the Fetch Rules tree: the tag's title/order, expand/collapse control, a hover action menu
|
|
12
|
+
* (edit attributes / add / copy / paste / delete), and — for `Packet` — the slotted `packet-editor`. Children render
|
|
13
|
+
* through the default slot as nested `cx-xml-editor-element-tag` instances.
|
|
14
|
+
*
|
|
15
|
+
* @slot (default) - Nested `cx-xml-editor-element-tag` rows for this element's children.
|
|
16
|
+
* @slot packet-editor - The `cx-xml-editor-packet-editor` shown in place while a `Packet` row is expanded.
|
|
17
|
+
*
|
|
18
|
+
* @event cx-xml-editor-element-action - Emitted (not composed) when a hover-menu action is triggered.
|
|
19
|
+
* @event cx-xml-editor-element-expand-toggle - Emitted (not composed) when the expand/collapse control is toggled.
|
|
20
|
+
*/
|
|
21
|
+
export default class CxXmlEditorElementTag extends CortexElement {
|
|
22
|
+
#private;
|
|
23
|
+
static readonly styles: CSSResultGroup;
|
|
24
|
+
static readonly dependencies: {
|
|
25
|
+
'cx-button': typeof CxButton;
|
|
26
|
+
'cx-icon': typeof CxIcon;
|
|
27
|
+
'cx-icon-button': typeof CxIconButton;
|
|
28
|
+
'cx-tooltip': typeof CxTooltip;
|
|
29
|
+
'cx-typography': typeof CxTypography;
|
|
30
|
+
};
|
|
31
|
+
/** The direct child tag name for a given parent tag (e.g. `FetchRules` -> `Generation`). */
|
|
32
|
+
private static getDirectChildName;
|
|
33
|
+
private readonly localize;
|
|
34
|
+
/** The tree node this row renders. */
|
|
35
|
+
self: XmlEditorElement;
|
|
36
|
+
/**
|
|
37
|
+
* The parent element that owns this row. Threaded through as a plain property (rather than closed over per-row)
|
|
38
|
+
* so the host can read `event.target.self` / `.parent` from a single bound listener instead of allocating a new
|
|
39
|
+
* per-node arrow function on every render (which `lit/no-template-arrow` disallows).
|
|
40
|
+
*/
|
|
41
|
+
parent?: XmlEditorElement;
|
|
42
|
+
/** The tag name for this row. */
|
|
43
|
+
name: XmlEditorTag;
|
|
44
|
+
/** Whether this row is currently expanded. */
|
|
45
|
+
expanded: boolean;
|
|
46
|
+
/** 1-based order label shown next to the tag name (e.g. `1` or `1.2`). */
|
|
47
|
+
order: string;
|
|
48
|
+
/** Whether this row is the tree's root (suppresses copy/delete/paste and draws no border). */
|
|
49
|
+
isRoot: boolean;
|
|
50
|
+
canAdd: boolean;
|
|
51
|
+
canEdit: boolean;
|
|
52
|
+
canCopy: boolean;
|
|
53
|
+
canPaste: boolean;
|
|
54
|
+
canDelete: boolean;
|
|
55
|
+
/** Hover-driven visibility of the action menu, independent of the always-visible Packet editing state. */
|
|
56
|
+
private showMenu;
|
|
57
|
+
handleNameChange(): void;
|
|
58
|
+
handleIsRootChange(): void;
|
|
59
|
+
private handleActionButtonClick;
|
|
60
|
+
render(): import('lit').TemplateResult<1>;
|
|
61
|
+
}
|
|
62
|
+
declare global {
|
|
63
|
+
interface HTMLElementTagNameMap {
|
|
64
|
+
'cx-xml-editor-element-tag': CxXmlEditorElementTag;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { default as CxButton } from '../../../../../atoms/src/components/button/button.ts';
|
|
2
|
+
import { default as CxCheckbox } from '../../../../../atoms/src/components/checkbox/checkbox.ts';
|
|
3
|
+
import { default as CxDivider } from '../../../../../atoms/src/components/divider/divider.ts';
|
|
4
|
+
import { default as CxGrid } from '../../../../../atoms/src/components/grid/grid.ts';
|
|
5
|
+
import { default as CxGridItem } from '../../../../../atoms/src/components/grid-item/grid-item.ts';
|
|
6
|
+
import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
|
|
7
|
+
import { default as CxIconButton } from '../../../../../atoms/src/components/icon-button/icon-button.ts';
|
|
8
|
+
import { default as CxInput } from '../../../../../atoms/src/components/input/input.ts';
|
|
9
|
+
import { default as CxTooltip } from '../../../../../atoms/src/components/tooltip/tooltip.ts';
|
|
10
|
+
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
|
|
11
|
+
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
12
|
+
import { default as CxDynamicSelect } from '../../../../../molecules/src/dynamic-select/dynamic-select.ts';
|
|
13
|
+
import { XmlEditorElement, XmlEditorRelationData, XmlEditorSameFieldData, XmlEditorSortOrderData, XmlEditorSubTypeData } from '../../../../../types/src/xml-editor';
|
|
14
|
+
import { CSSResultGroup } from 'lit';
|
|
15
|
+
import { default as CxXmlEditorAssetType } from '../asset-type/asset-type';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @summary The Packet node editor: explore rules (ancestors/descendants/self/relations/same-field/similarity),
|
|
19
|
+
* asset-type filters, additional Search API filters, and order-by/limit — the in-place expanded editor for the
|
|
20
|
+
* `Packet` tag rendered by `element-tag`.
|
|
21
|
+
*
|
|
22
|
+
* @event cx-xml-editor-packet-change - Emitted with the ported `PacketAction`/`XmlEditorPacketPayload` protocol for every mutation.
|
|
23
|
+
*/
|
|
24
|
+
export default class CxXmlEditorPacketEditor extends CortexElement {
|
|
25
|
+
#private;
|
|
26
|
+
static readonly styles: CSSResultGroup;
|
|
27
|
+
static readonly dependencies: {
|
|
28
|
+
'cx-button': typeof CxButton;
|
|
29
|
+
'cx-checkbox': typeof CxCheckbox;
|
|
30
|
+
'cx-divider': typeof CxDivider;
|
|
31
|
+
'cx-dynamic-select': typeof CxDynamicSelect;
|
|
32
|
+
'cx-grid': typeof CxGrid;
|
|
33
|
+
'cx-grid-item': typeof CxGridItem;
|
|
34
|
+
'cx-icon': typeof CxIcon;
|
|
35
|
+
'cx-icon-button': typeof CxIconButton;
|
|
36
|
+
'cx-input': typeof CxInput;
|
|
37
|
+
'cx-tooltip': typeof CxTooltip;
|
|
38
|
+
'cx-typography': typeof CxTypography;
|
|
39
|
+
'cx-xml-editor-asset-type': typeof CxXmlEditorAssetType;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Maps enabled relations into `cx-dynamic-select` options + table columns (replaces React `Relation.tsx`).
|
|
43
|
+
* Column headers are supplied by the caller (which owns a `LocalizeController`) rather than hardcoded here.
|
|
44
|
+
*/
|
|
45
|
+
private static mapRelationsToOptions;
|
|
46
|
+
/** Maps sort orders into `cx-dynamic-select` options + table columns (replaces React `OrderBy.tsx`). */
|
|
47
|
+
private static mapSortOrdersToOptions;
|
|
48
|
+
/** Maps same-field candidates into `cx-dynamic-select` options + table columns (replaces React `SameField.tsx`). */
|
|
49
|
+
private static mapSameFieldsToOptions;
|
|
50
|
+
private readonly localize;
|
|
51
|
+
/** The `Packet` element being edited. */
|
|
52
|
+
value: XmlEditorElement;
|
|
53
|
+
enabledRelations: XmlEditorRelationData[];
|
|
54
|
+
subTypes: XmlEditorSubTypeData[];
|
|
55
|
+
subTypesMap: Record<string, Record<string, {
|
|
56
|
+
subTypeValue: string;
|
|
57
|
+
typeDbBOName: string;
|
|
58
|
+
}>>;
|
|
59
|
+
sortOrders: XmlEditorSortOrderData[];
|
|
60
|
+
sameFields: XmlEditorSameFieldData[];
|
|
61
|
+
/** Whether the "Assets that share the same value on field" row is expanded even without a stored value yet. */
|
|
62
|
+
private enabledSameField;
|
|
63
|
+
private updateExtraFiltersDebounced;
|
|
64
|
+
private updateLimitDebounced;
|
|
65
|
+
/**
|
|
66
|
+
* `cx-dynamic-select`'s `getOptionLabel` override for the Relation picker — matches the tooltip and the original
|
|
67
|
+
* React `Relation.tsx` (which set the same override directly on its `cx-select` ref): "parentRole -> childRole"
|
|
68
|
+
* read from the 3rd/4th `<td>`, per `mapRelationsToOptions`'s column order, instead of the table mode default of
|
|
69
|
+
* just the first column's text.
|
|
70
|
+
*/
|
|
71
|
+
private getRelationOptionLabel;
|
|
72
|
+
render(): import('lit').TemplateResult<1>;
|
|
73
|
+
}
|
|
74
|
+
declare global {
|
|
75
|
+
interface HTMLElementTagNameMap {
|
|
76
|
+
'cx-xml-editor-packet-editor': CxXmlEditorPacketEditor;
|
|
77
|
+
}
|
|
78
|
+
}
|