@servicetitan/dte-unlayer 0.109.0 → 0.111.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/dist/editor-core-source.d.ts +1 -1
- package/dist/editor-core-source.d.ts.map +1 -1
- package/dist/editor-core-source.js +1 -1
- package/dist/editor-core-source.js.map +1 -1
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/unlayer-interface.d.ts +1 -0
- package/dist/unlayer-interface.d.ts.map +1 -1
- package/dist/unlayer-interface.js.map +1 -1
- package/dist/unlayer.d.ts +1 -1
- package/dist/unlayer.d.ts.map +1 -1
- package/dist/unlayer.js +8 -6
- package/dist/unlayer.js.map +1 -1
- package/package.json +1 -1
- package/src/editor-core-source.ts +1 -1
- package/src/editor.tsx +1 -1
- package/src/unlayer-interface.tsx +1 -0
- package/src/unlayer.tsx +9 -6
package/src/editor.tsx
CHANGED
|
@@ -109,7 +109,7 @@ export const UnlayerEditor = forwardRef<UnlayerRef, UnlayerEditorProps>((props,
|
|
|
109
109
|
<div style={{ minHeight, display: 'flex' }}>
|
|
110
110
|
{!isReady && <p className="c-red-500">error loading editor</p>}
|
|
111
111
|
<div id={props.id ?? 'editor'} style={style} ref={containerRef} />
|
|
112
|
-
<DisplayConditionModal schema={props.opts.schema} />
|
|
112
|
+
{props.opts.displayConditions && <DisplayConditionModal schema={props.opts.schema} />}
|
|
113
113
|
</div>
|
|
114
114
|
);
|
|
115
115
|
});
|
|
@@ -77,6 +77,7 @@ export interface CreateUnlayerEditorProps {
|
|
|
77
77
|
hideAllTools?: boolean;
|
|
78
78
|
hideContentControls?: boolean;
|
|
79
79
|
hideBodyMenuItem?: boolean;
|
|
80
|
+
displayConditions?: boolean;
|
|
80
81
|
enableHTMLEditing?: boolean;
|
|
81
82
|
enableHTMLEditingReadonly?: boolean;
|
|
82
83
|
imageValidation?: {
|
package/src/unlayer.tsx
CHANGED
|
@@ -167,6 +167,7 @@ export const createUnlayerEditor = (
|
|
|
167
167
|
{
|
|
168
168
|
customCSS,
|
|
169
169
|
customJS,
|
|
170
|
+
displayConditions,
|
|
170
171
|
eSignFieldTypes,
|
|
171
172
|
eSignRecipients,
|
|
172
173
|
enableHTMLEditing,
|
|
@@ -350,12 +351,14 @@ export const createUnlayerEditor = (
|
|
|
350
351
|
|
|
351
352
|
document.getElementById = currentFind;
|
|
352
353
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
if (displayConditions) {
|
|
355
|
+
result.registerCallback(
|
|
356
|
+
'displayCondition',
|
|
357
|
+
function (data: any, done: (condition: any) => void) {
|
|
358
|
+
emitDisplayCondition({ data, done });
|
|
359
|
+
},
|
|
360
|
+
);
|
|
361
|
+
}
|
|
359
362
|
|
|
360
363
|
return result;
|
|
361
364
|
};
|