@orangelogic/design-system 2.150.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.CrSdl1zX.js → asset-link-format.Bctc22QM.js} +13 -13
- package/library/chunks/{button.BHIyGIB2.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.BB8EmEAc.js → color-swatch-group.BX90sRwa.js} +2293 -2213
- package/library/chunks/{color-swatch.B2qHfRcj.js → color-swatch.BhBZe8OE.js} +2 -2
- package/library/chunks/{colorPicker.fDJa_Rz5.js → colorPicker.GYgA76kc.js} +5 -5
- package/library/chunks/{confirm-popover.CYIZynVQ.js → confirm-popover.BFBhjDQ9.js} +3 -3
- package/library/chunks/{content-builder.DZRw6hpX.js → content-builder.BU8X7I6V.js} +1 -1
- package/library/chunks/{dialog.CwkvxMDM.js → dialog.DIXmnVis.js} +3 -3
- package/library/chunks/{document-viewer.B9C_4TEb.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.DQNVHzNH.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.BnvzmNLY.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.DwmSpdtF.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.BwXikn4k.js → i18n.Bchq8v1d.js} +40 -5
- package/library/chunks/{icon-button.Bwv0pBA9.js → icon-button.DbVIFgu7.js} +2 -2
- package/library/chunks/{icon.CsF1BoUl.js → icon.mxNZ85k0.js} +1 -1
- package/library/chunks/{iframe.5FgxxThO.js → iframe.DcHjOcLG.js} +2 -2
- package/library/chunks/{image.C-rHqDVB.js → image.DYRVQgG1.js} +3 -3
- package/library/chunks/{index.q6xCNzcK.js → index.BVDhdCk-.js} +17 -17
- package/library/chunks/{input.D28SuP1Z.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.BQt-5Vdg.js → option.qN3aaqVI.js} +3 -3
- package/library/chunks/{pagination.B8l2Cvm9.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.C4u2fCN7.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.C9d7pyKM.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 +31242 -29963
- 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/molecules/src/annotator/annotator.d.ts +12 -0
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +9 -0
- 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/xml-editor.d.ts +108 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +35 -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 +39 -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
|
|
@@ -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
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as CxIconButton } from '../../../../../atoms/src/components/icon-button/icon-button.ts';
|
|
2
|
+
import { default as CxTooltip } from '../../../../../atoms/src/components/tooltip/tooltip.ts';
|
|
3
|
+
import { default as CxTypography } from '../../../../../atoms/src/components/typography/typography.ts';
|
|
4
|
+
import { default as CortexElement } from '../../../../../base/src/cortex-element.ts';
|
|
5
|
+
import { XmlEditorTreeNode } from '../../../../../types/src/xml-editor';
|
|
6
|
+
import { CSSResultGroup } from 'lit';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @summary Read-only debug preview of the current Fetch Rules tree as raw XML, with a pretty-print / minify toggle.
|
|
10
|
+
*/
|
|
11
|
+
export default class CxXmlEditorViewer extends CortexElement {
|
|
12
|
+
#private;
|
|
13
|
+
static readonly styles: CSSResultGroup;
|
|
14
|
+
static readonly dependencies: {
|
|
15
|
+
'cx-icon-button': typeof CxIconButton;
|
|
16
|
+
'cx-tooltip': typeof CxTooltip;
|
|
17
|
+
'cx-typography': typeof CxTypography;
|
|
18
|
+
};
|
|
19
|
+
/** Serializes a `XmlEditorTreeNode` to a single-line (minified) XML string, the sibling of `convertToIndentXMLForDownload`. */
|
|
20
|
+
private static convertToXMLForDownload;
|
|
21
|
+
/**
|
|
22
|
+
* Serializes a `XmlEditorTreeNode` back to a pretty-printed XML string. Also called by `cx-xml-editor` (persisted
|
|
23
|
+
* `value` / clipboard copy), which is why this stays `static` rather than an instance-only method.
|
|
24
|
+
*/
|
|
25
|
+
static convertToIndentXMLForDownload(data: XmlEditorTreeNode, xml: string[], indent: string): string[];
|
|
26
|
+
private readonly localize;
|
|
27
|
+
/** The Fetch Rules tree to preview. */
|
|
28
|
+
xml: XmlEditorTreeNode;
|
|
29
|
+
/** Whether the preview is pretty-printed (indented) rather than minified. */
|
|
30
|
+
private indented;
|
|
31
|
+
render(): import('lit').TemplateResult<1>;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'cx-xml-editor-viewer': CxXmlEditorViewer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
|
|
2
|
+
import { XmlEditorElement, XmlEditorNodeType, XmlEditorTreeNode } from '../../../types/src/xml-editor';
|
|
3
|
+
import { CSSResultGroup, TemplateResult } from 'lit';
|
|
4
|
+
import { default as CxXmlEditorElementTag } from './components/element-tag/element-tag';
|
|
5
|
+
import { default as CxXmlEditorPacketEditor } from './components/packet-editor/packet-editor';
|
|
6
|
+
import { default as CxXmlEditorViewer } from './components/viewer/viewer';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @summary Structured tree editor for the `<FetchRules>` XML rule schema: expand/collapse, add/copy/paste/delete
|
|
10
|
+
* elements, edit `Packet` search rules, and preview the resulting XML. Replaces the legacy React `orangelogic-react-xmleditor`
|
|
11
|
+
* component; the host page owns persistence and listens for `cx-xml-editor-change`.
|
|
12
|
+
*
|
|
13
|
+
* @event cx-xml-editor-change - Emitted with the serialized XML string after every tree mutation.
|
|
14
|
+
* @event cx-xml-editor-notify - Emitted with a short user-facing message (e.g. after copying a node to the clipboard).
|
|
15
|
+
*/
|
|
16
|
+
export default class CxXmlEditor extends CortexElement {
|
|
17
|
+
#private;
|
|
18
|
+
static readonly styles: CSSResultGroup;
|
|
19
|
+
static readonly dependencies: {
|
|
20
|
+
'cx-xml-editor-element-tag': typeof CxXmlEditorElementTag;
|
|
21
|
+
'cx-xml-editor-packet-editor': typeof CxXmlEditorPacketEditor;
|
|
22
|
+
'cx-xml-editor-viewer': typeof CxXmlEditorViewer;
|
|
23
|
+
};
|
|
24
|
+
/** Tags whose direct text content becomes a `Text`-node child, mirroring the ported schema's `TEXT_TAGS` set. */
|
|
25
|
+
private static readonly TEXT_TAGS;
|
|
26
|
+
static findElementIndex(parent: XmlEditorElement, key: string, value: XmlEditorElement): number;
|
|
27
|
+
static getNewElement(key: string, type: XmlEditorNodeType, attributes?: {
|
|
28
|
+
[id: string]: string;
|
|
29
|
+
}): XmlEditorElement;
|
|
30
|
+
static deleteElement(parent: XmlEditorElement, key: string, value: XmlEditorElement): XmlEditorTreeNode | null;
|
|
31
|
+
/** Parses a Fetch Rules XML string into a `XmlEditorTreeNode`, or `null` if `xmlString` is empty or malformed. */
|
|
32
|
+
static loadXML(xmlString: string): XmlEditorTreeNode | null;
|
|
33
|
+
private static isTextTag;
|
|
34
|
+
private static getDirectParentName;
|
|
35
|
+
private static traverseXMLElements;
|
|
36
|
+
private static appendTextNode;
|
|
37
|
+
private static appendElementNode;
|
|
38
|
+
private static removeEmptyElements;
|
|
39
|
+
private apiGetAllAliasFields;
|
|
40
|
+
private apiGetAllSearchableFieldsForCurrentUser;
|
|
41
|
+
private apiGetEnabledRelations;
|
|
42
|
+
private apiGetSortOrders;
|
|
43
|
+
private apiGetSubTypesWithWildcard;
|
|
44
|
+
/** The initial Fetch Rules XML. Subsequent edits are reported via `cx-xml-editor-change`, not by re-setting this. */
|
|
45
|
+
value: string;
|
|
46
|
+
/** Shows the raw-XML debug preview below the tree when true. */
|
|
47
|
+
debug: boolean;
|
|
48
|
+
/** The parsed Fetch Rules tree currently rendered. `null` until the initial XML has been parsed. */
|
|
49
|
+
private tree;
|
|
50
|
+
/** The node most recently copied via the tree's hover menu, available for a single paste. */
|
|
51
|
+
private copiedNode;
|
|
52
|
+
private referenceDataLoading;
|
|
53
|
+
private enabledRelations;
|
|
54
|
+
private sortOrders;
|
|
55
|
+
private subTypes;
|
|
56
|
+
private subTypesMap;
|
|
57
|
+
private metadataFields;
|
|
58
|
+
private sameFields;
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Parses `value` into `tree` — both for the initial render and whenever a host reassigns `value` after connection
|
|
62
|
+
* (e.g. once async data finishes loading). Deliberately not `waitUntilFirstUpdate`: a host that sets `value`
|
|
63
|
+
* synchronously right after creating the element (still before this element's first Lit update flushes) needs
|
|
64
|
+
* that assignment picked up on the first update too, not skipped as though it were the property's own default.
|
|
65
|
+
*/
|
|
66
|
+
handleValueChange(): void;
|
|
67
|
+
private updateTree;
|
|
68
|
+
private refreshTree;
|
|
69
|
+
render(): TemplateResult<1>;
|
|
70
|
+
}
|
|
71
|
+
declare global {
|
|
72
|
+
interface HTMLElementTagNameMap {
|
|
73
|
+
'cx-xml-editor': CxXmlEditor;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { XmlEditorElement, XmlEditorElementActionKind, XmlEditorTag } from '../../../types/src/xml-editor';
|
|
2
|
+
|
|
3
|
+
export declare const Default: {
|
|
4
|
+
ElementName: string;
|
|
5
|
+
Tab: string;
|
|
6
|
+
TextName: string;
|
|
7
|
+
XML: Record<string, XmlEditorElement>;
|
|
8
|
+
};
|
|
9
|
+
export declare const DefaultXMLString = "\n<FetchRules>\n <Generation>\n <Packet>\n <Relations>\n </Relations>\n </Packet>\n </Generation>\n</FetchRules>\n";
|
|
10
|
+
export declare const TagMap: {
|
|
11
|
+
[id in XmlEditorTag]?: {
|
|
12
|
+
attributes?: string[];
|
|
13
|
+
children?: XmlEditorTag[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const AttributeDefaultValue: {
|
|
17
|
+
[key: string]: string[];
|
|
18
|
+
};
|
|
19
|
+
export declare const TagActionMap: {
|
|
20
|
+
[id in XmlEditorTag]?: {
|
|
21
|
+
[action in XmlEditorElementActionKind]?: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -25,6 +25,9 @@ export declare enum DASHBOARD_API_ENDPOINT {
|
|
|
25
25
|
GET_DASHBOARD_LIST = "webapi/extensibility/integrations/businessintelligence/getlistdashboards_41JI_v1"
|
|
26
26
|
}
|
|
27
27
|
export declare enum METADATA_API_ENDPOINT {
|
|
28
|
+
GET_ALL_ALIAS_FIELDS = "webapi/objectmanagement/metadata/fields/getallaliasfields_4C3_v1",
|
|
29
|
+
GET_ALL_SEARCHABLE_FIELDS_FOR_CURRENT_USER = "webapi/objectmanagement/metadata/fields/getallsearchablefieldsforcurrentuser_241_v1",
|
|
30
|
+
GET_ENABLED_RELATIONS = "webapi/objectmanagement/relations/getenabledrelations_49S_v1",
|
|
28
31
|
GET_SEARCHABLE_FIELDS = "webapi/objectmanagement/metadata/fields/getallobjectfieldsforcurrentuser_4C2_v2",
|
|
29
32
|
GET_SORT_ORDERS = "webapi/objectmanagement/sortorders_49V_v1",
|
|
30
33
|
GET_SUBTYPES_WITH_WILDCARD = "webapi/document/doctype/subtypeswithwildcard_4A5_v1"
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import { GetSearchableFieldListResponse, GetSortOrdersResponse, GetSubTypesWithWildcardResponse } from './metadata.types';
|
|
1
|
+
import { GetAllAliasFieldsResponse, GetAllSearchableFieldsForCurrentUserResponse, GetEnabledRelationsResponse, GetSearchableFieldListResponse, GetSortOrdersResponse, GetSubTypesWithWildcardResponse } from './metadata.types';
|
|
2
2
|
|
|
3
3
|
export declare function apiGetSearchableFieldList(): Promise<never[] | GetSearchableFieldListResponse>;
|
|
4
4
|
export declare function apiGetSortOrders(): Promise<GetSortOrdersResponse>;
|
|
5
|
+
/**
|
|
6
|
+
* Derives both shapes the UI needs from a single pass over the same `subtypeswithwildcard` payload: `grouped` for
|
|
7
|
+
* the cascading Type -> Subtype selects, `flat` for flows that need a plain fully-qualified list (e.g. picking the
|
|
8
|
+
* first wildcard subtype for a new TypeFilters row). Previously these were two separate requests to the same URL,
|
|
9
|
+
* which required distinct axios-cache-interceptor request ids to avoid the cache treating them as one.
|
|
10
|
+
*/
|
|
5
11
|
export declare function apiGetSubTypesWithWildcard(): Promise<GetSubTypesWithWildcardResponse>;
|
|
12
|
+
export declare function apiGetAllAliasFields(): Promise<GetAllAliasFieldsResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Mirrors the React `mapSameFields` transform (`{ value, text }[]` -> `{ id, label }[]`). Not to be confused with
|
|
15
|
+
* `apiGetSearchableFieldList`, which hits the unrelated `getallobjectfieldsforcurrentuser_4C2_v2` endpoint.
|
|
16
|
+
*/
|
|
17
|
+
export declare function apiGetAllSearchableFieldsForCurrentUser(): Promise<GetAllSearchableFieldsForCurrentUserResponse>;
|
|
18
|
+
export declare function apiGetEnabledRelations(): Promise<GetEnabledRelationsResponse>;
|
|
@@ -32,7 +32,16 @@ export type SubTypeOption = {
|
|
|
32
32
|
* Outer key: `typeLabel` with spaces replaced by underscores (e.g. `Machine_learning_model`).
|
|
33
33
|
* Inner key: `label` with spaces replaced by underscores (e.g. `All_Folders`).
|
|
34
34
|
*/
|
|
35
|
-
export type
|
|
35
|
+
export type GroupedSubTypes = Record<string, Record<string, SubTypeOption>>;
|
|
36
|
+
/**
|
|
37
|
+
* Both shapes derived from the same `subtypeswithwildcard` payload in a single pass: `grouped` for the cascading
|
|
38
|
+
* Type -> Subtype selects, `flat` (fully-qualified `DO_DOCUMENTS.<typeDbBOName>.<value>` paths, mirroring the React
|
|
39
|
+
* `concatSubTypes` transform) for flows that need a plain list, e.g. picking the first wildcard subtype.
|
|
40
|
+
*/
|
|
41
|
+
export type GetSubTypesWithWildcardResponse = {
|
|
42
|
+
flat: SubTypeData[];
|
|
43
|
+
grouped: GroupedSubTypes;
|
|
44
|
+
};
|
|
36
45
|
export type SortOrderDto = {
|
|
37
46
|
description: string;
|
|
38
47
|
id: string;
|
|
@@ -51,3 +60,30 @@ export type GetSortOrdersRawResponse = {
|
|
|
51
60
|
sortOrders: SortOrderDto[];
|
|
52
61
|
};
|
|
53
62
|
export type GetSortOrdersResponse = SortOrderDto[];
|
|
63
|
+
export type GetAllAliasFieldsRawResponse = {
|
|
64
|
+
listFields: string[];
|
|
65
|
+
};
|
|
66
|
+
export type GetAllAliasFieldsResponse = string[];
|
|
67
|
+
export type GetAllSearchableFieldsForCurrentUserRawResponse = {
|
|
68
|
+
listFields: Array<{
|
|
69
|
+
text: string;
|
|
70
|
+
value: string;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
export type GetAllSearchableFieldsForCurrentUserResponse = Array<{
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
}>;
|
|
77
|
+
export type EnabledRelationDto = {
|
|
78
|
+
childRole: string;
|
|
79
|
+
childType: string;
|
|
80
|
+
description: string;
|
|
81
|
+
id: string;
|
|
82
|
+
linkType: string;
|
|
83
|
+
parentRole: string;
|
|
84
|
+
parentType: string;
|
|
85
|
+
};
|
|
86
|
+
export type GetEnabledRelationsRawResponse = {
|
|
87
|
+
enabledRelations: EnabledRelationDto[];
|
|
88
|
+
};
|
|
89
|
+
export type GetEnabledRelationsResponse = EnabledRelationDto[];
|