fit-ui 2.10.1 → 2.10.2
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/Fit.UI.js +28 -7
- package/dist/Fit.UI.min.js +1 -1
- package/package.json +1 -1
package/dist/Fit.UI.js
CHANGED
|
@@ -682,7 +682,7 @@ Fit._internal =
|
|
|
682
682
|
{
|
|
683
683
|
Core:
|
|
684
684
|
{
|
|
685
|
-
VersionInfo: { Major: 2, Minor: 10, Patch:
|
|
685
|
+
VersionInfo: { Major: 2, Minor: 10, Patch: 2 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
|
|
@@ -16377,6 +16377,15 @@ Fit.Controls.DialogEditor = function(ctlId)
|
|
|
16377
16377
|
ed.Height(100, "%");
|
|
16378
16378
|
ed.Render(me.GetContentDomElement());
|
|
16379
16379
|
|
|
16380
|
+
// Performance optimization:
|
|
16381
|
+
// The editor internally fires OnChange on every change which is expensive.
|
|
16382
|
+
// By configuring OnChange debouncing, we can greatly increase performance,
|
|
16383
|
+
// especially for large documents, which is what DialogEditor is intended for.
|
|
16384
|
+
// The only downside to this is that ControlBase will not be able to update IsDirty
|
|
16385
|
+
// and IsValid state in the control's data-dirty and data-valid DOM attributes.
|
|
16386
|
+
// Control will always fire OnChange immediately when the editor lose focus though.
|
|
16387
|
+
ed.DebounceOnChange(5000); // Only process OnChange every 5 seconds - we don't rely on OnChange or the data-dirty and data-valid attributes
|
|
16388
|
+
|
|
16380
16389
|
// me.Modal(true);
|
|
16381
16390
|
// me.Maximizable(true);
|
|
16382
16391
|
// me.Dismissible(true);
|
|
@@ -22359,6 +22368,7 @@ Fit.Controls.Input = function(ctlId)
|
|
|
22359
22368
|
var designEditorHeightMonitorId = -1;
|
|
22360
22369
|
var designEditorActiveToolbarPanel = null; // { DomElement: HTMLElement, UnlockFocusStateIfEmojiPanelIsClosed: function, CloseEmojiPanel: function }
|
|
22361
22370
|
var designEditorDetached = null; // { IsActive: boolean, GetValue: function, SetVisible: function, SetEnabled: function, Focus: function, Reload: function, Open: function, Close: function, Dispose: function }
|
|
22371
|
+
var designEditorClearPlaceholder = true;
|
|
22362
22372
|
//var htmlWrappedInParagraph = false;
|
|
22363
22373
|
var wasAutoChangedToMultiLineMode = false; // Used to revert to single line if multi line was automatically enabled along with DesignMode(true), Maximizable(true), or Resizable(true)
|
|
22364
22374
|
var minimizeHeight = -1;
|
|
@@ -22388,6 +22398,12 @@ Fit.Controls.Input = function(ctlId)
|
|
|
22388
22398
|
input.spellcheck = true;
|
|
22389
22399
|
input.onkeyup = function()
|
|
22390
22400
|
{
|
|
22401
|
+
if (designEditorClearPlaceholder === true)
|
|
22402
|
+
{
|
|
22403
|
+
designEditorClearPlaceholder = false; // Prevent additional calls to updateDesignEditorPlaceholder - it retrieves editor value which is expensive
|
|
22404
|
+
updateDesignEditorPlaceholder(true); // Clear placeholder
|
|
22405
|
+
}
|
|
22406
|
+
|
|
22391
22407
|
if (debounceOnChangeTimeout === -1)
|
|
22392
22408
|
{
|
|
22393
22409
|
fireOnChange();
|
|
@@ -22457,12 +22473,12 @@ Fit.Controls.Input = function(ctlId)
|
|
|
22457
22473
|
fireOnChange(); // Only fires OnChange if value has actually changed
|
|
22458
22474
|
});
|
|
22459
22475
|
|
|
22460
|
-
me.OnFocus(function()
|
|
22476
|
+
me.OnFocus(function(sender)
|
|
22461
22477
|
{
|
|
22462
22478
|
restoreHiddenToolbarInDesignEditor(); // Make toolbar appear if currently hidden
|
|
22463
|
-
updateDesignEditorPlaceholder(true); // Clear placeholder text
|
|
22479
|
+
//updateDesignEditorPlaceholder(true); // Clear placeholder text
|
|
22464
22480
|
});
|
|
22465
|
-
me.OnBlur(function()
|
|
22481
|
+
me.OnBlur(function(sender)
|
|
22466
22482
|
{
|
|
22467
22483
|
restoreDesignEditorButtons(); // Restore (enable) editor's toolbar buttons in case they were temporarily disabled
|
|
22468
22484
|
updateDesignEditorPlaceholder(); // Show placeholder text if control value is empty
|
|
@@ -22943,7 +22959,7 @@ Fit.Controls.Input = function(ctlId)
|
|
|
22943
22959
|
});
|
|
22944
22960
|
}
|
|
22945
22961
|
|
|
22946
|
-
me = orgVal = preVal = input = cmdResize = designEditor = designEditorDom = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorReloadConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize = designEditorMustReloadWhenReady = designEditorMustDisposeWhenReady = designEditorUpdateSizeDebouncer = designEditorHeightMonitorId = designEditorActiveToolbarPanel = designEditorDetached /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = locale = null;
|
|
22962
|
+
me = orgVal = preVal = input = cmdResize = designEditor = designEditorDom = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorReloadConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize = designEditorMustReloadWhenReady = designEditorMustDisposeWhenReady = designEditorUpdateSizeDebouncer = designEditorHeightMonitorId = designEditorActiveToolbarPanel = designEditorDetached = designEditorClearPlaceholder /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = locale = null;
|
|
22947
22963
|
|
|
22948
22964
|
base();
|
|
22949
22965
|
});
|
|
@@ -24970,11 +24986,11 @@ Fit.Controls.Input = function(ctlId)
|
|
|
24970
24986
|
// Hide editor toolbar if configured to do so
|
|
24971
24987
|
hideToolbarInDesignMode();
|
|
24972
24988
|
}
|
|
24973
|
-
else
|
|
24989
|
+
/*else
|
|
24974
24990
|
{
|
|
24975
24991
|
// Remove placeholder if initially focused
|
|
24976
24992
|
updateDesignEditorPlaceholder(true);
|
|
24977
|
-
}
|
|
24993
|
+
}*/
|
|
24978
24994
|
|
|
24979
24995
|
// Make editor visible - postpone to allow editor to first calculate auto grow height
|
|
24980
24996
|
// so the user will not see the chrome (borders) of the editor increase its height.
|
|
@@ -25453,6 +25469,11 @@ Fit.Controls.Input = function(ctlId)
|
|
|
25453
25469
|
|
|
25454
25470
|
var val = clearPlaceholder !== true && me.Value() === "" ? me.Placeholder() : "";
|
|
25455
25471
|
Fit.Dom.Data(designEditorDom.Editable, "placeholder", val || null);
|
|
25472
|
+
|
|
25473
|
+
if (val !== "")
|
|
25474
|
+
{
|
|
25475
|
+
designEditorClearPlaceholder = true;
|
|
25476
|
+
}
|
|
25456
25477
|
}
|
|
25457
25478
|
}
|
|
25458
25479
|
|