@zealicsolutions/web-ui 1.0.140-beta.220 → 1.0.140-beta.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helpers/utils.d.ts +20 -7
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/_virtual/index3.js +1 -1
- package/dist/esm/_virtual/index4.js +1 -1
- package/dist/esm/helpers/utils.d.ts +20 -7
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +1 -1
- package/dist/esm/molecules/MoleculeSkeletons/MoleculeSkeletons.js +1 -1
- package/dist/esm/molecules/MoleculeSkeletons/MoleculeSkeletons.js.map +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Accordion/Accordion.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Menu/Menu.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/MenuList/MenuList.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Select/SelectInput.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/SpeedDial/SpeedDial.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/Tabs/Tabs.js +1 -1
- package/dist/esm/node_modules/@mui/material/esm/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/dist/esm/node_modules/@mui/material/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/classnames/index.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/arrows.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/dots.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/inner-slider.js +1 -1
- package/dist/esm/node_modules/react-slick/lib/track.js +1 -1
- package/package.json +1 -1
|
@@ -70,10 +70,16 @@ export interface ResolvedDataDrivenLink {
|
|
|
70
70
|
*
|
|
71
71
|
* ## Data-Driven Link Resolution
|
|
72
72
|
*
|
|
73
|
-
* ### Link Type Detection
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
73
|
+
* ### Link Type Detection (Priority Order)
|
|
74
|
+
* 1. **Data-driven type**: If `dataDrivenLinkType` is configured AND has data:
|
|
75
|
+
* - References a picklist value: `{ id, code, label }`
|
|
76
|
+
* - Internal: `code === "internal"` or `label === "Internal"`
|
|
77
|
+
* - External: `code === "external"` or `label === "External"`
|
|
78
|
+
*
|
|
79
|
+
* 2. **Smart inference**: If type not resolved from data (field not connected or no data):
|
|
80
|
+
* - Only `externalLinkFieldId` configured → inferred as **external**
|
|
81
|
+
* - Only `internalLinkFieldId` configured → inferred as **internal**
|
|
82
|
+
* - Both configured without type data → link disabled (cannot infer)
|
|
77
83
|
*
|
|
78
84
|
* ### Internal Links
|
|
79
85
|
* Uses `internalLinkFieldId` to get the target page ID:
|
|
@@ -92,8 +98,15 @@ export interface ResolvedDataDrivenLink {
|
|
|
92
98
|
* @returns Resolved link details or null if link cannot be resolved (disabled state)
|
|
93
99
|
*
|
|
94
100
|
* @example
|
|
95
|
-
* // External URL
|
|
96
|
-
* // Data: {
|
|
101
|
+
* // External URL with data-driven type
|
|
102
|
+
* // Data: { linkTypeField: { code: 'external' }, urlField: { value: 'https://example.com' } }
|
|
103
|
+
* const result = resolveDataDrivenLink(link, data);
|
|
104
|
+
* // Returns: { destination: 'https://example.com', isExternal: true }
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // External URL with smart inference (no dataDrivenLinkType connected)
|
|
108
|
+
* // Config: { externalLinkFieldId: 'urlField' } (no internalLinkFieldId)
|
|
109
|
+
* // Data: { urlField: { value: 'https://example.com' } }
|
|
97
110
|
* const result = resolveDataDrivenLink(link, data);
|
|
98
111
|
* // Returns: { destination: 'https://example.com', isExternal: true }
|
|
99
112
|
*
|
|
@@ -101,7 +114,7 @@ export interface ResolvedDataDrivenLink {
|
|
|
101
114
|
* // Internal page with internalTaskTagId
|
|
102
115
|
* // Data: { internalLinkFieldId: { id: '777a77bc-a0d4-4bdd-933b-9a343daa7891' } }
|
|
103
116
|
* const result = resolveDataDrivenLink(link, data);
|
|
104
|
-
* // Returns: { destination: '?internalTaskTagId=777a77bc-...', isExternal: false,
|
|
117
|
+
* // Returns: { destination: '?internalTaskTagId=777a77bc-...', isExternal: false, webpageAlias: '777a77bc-...' }
|
|
105
118
|
*/
|
|
106
119
|
export declare const resolveDataDrivenLink: (link: LinkProperties, rawItemDataByDmfId: Record<string, unknown> | undefined) => ResolvedDataDrivenLink | null;
|
|
107
120
|
export declare const addInternalParamsToCurrentLink: (internalLink?: Nullable<string>, isPreview?: boolean) => string | undefined;
|