@sankhyalabs/ezui 5.17.2 → 5.18.0-dev.1

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.
@@ -54112,7 +54112,7 @@ var __spread$1$1 = function () {
54112
54112
  };
54113
54113
  // creates JavaScript vanilla Grid, including JavaScript (ag-stack) components, which can
54114
54114
  // be wrapped by the framework wrappers
54115
- var Grid = /** @class */ (function () {
54115
+ var Grid$1 = /** @class */ (function () {
54116
54116
  function Grid(eGridDiv, gridOptions, params) {
54117
54117
  if (!gridOptions) {
54118
54118
  console.error('AG Grid: no gridOptions provided to the grid');
@@ -106455,7 +106455,7 @@ var DetailCellRenderer = /** @class */ (function (_super) {
106455
106455
  var frameworkComponentWrapper = this.context.getBean('frameworkComponentWrapper');
106456
106456
  var frameworkOverrides = this.getFrameworkOverrides();
106457
106457
  // tslint:disable-next-line
106458
- new Grid(this.eDetailGrid, gridOptions, {
106458
+ new Grid$1(this.eDetailGrid, gridOptions, {
106459
106459
  frameworkOverrides: frameworkOverrides,
106460
106460
  providedBeanInstances: {
106461
106461
  agGridReact: agGridReactCloned,
@@ -124731,10 +124731,10 @@ class AgGridController {
124731
124731
  this.setOptionsSupress(this._gridOptions);
124732
124732
  this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
124733
124733
  if (this._enterprise) {
124734
- this._grid = new Grid(container, this._gridOptions);
124734
+ this._grid = new Grid$1(container, this._gridOptions);
124735
124735
  }
124736
124736
  else {
124737
- this._grid = new Grid(container, this._gridOptions);
124737
+ this._grid = new Grid$1(container, this._gridOptions);
124738
124738
  }
124739
124739
  container.addEventListener('focusout', (event) => {
124740
124740
  if (!container.contains(event.relatedTarget))
@@ -127735,6 +127735,788 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
127735
127735
  static get style() { return ezSkeletonCss; }
127736
127736
  };
127737
127737
 
127738
+ const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);padding:var(--space--nano);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow)}";
127739
+
127740
+ const SplitItem = class extends HTMLElement$1 {
127741
+ constructor() {
127742
+ super();
127743
+ this.__registerHost();
127744
+ }
127745
+ render() {
127746
+ return (h(Host, { class: 'box_split-item' }));
127747
+ }
127748
+ static get style() { return ezSplitItemCss; }
127749
+ };
127750
+
127751
+ var numeric = function (value, unit) { return Number(value.slice(0, -1 * unit.length)); };
127752
+
127753
+ var parseValue = function (value) {
127754
+ if (value.endsWith('px'))
127755
+ { return { value: value, type: 'px', numeric: numeric(value, 'px') } }
127756
+ if (value.endsWith('fr'))
127757
+ { return { value: value, type: 'fr', numeric: numeric(value, 'fr') } }
127758
+ if (value.endsWith('%'))
127759
+ { return { value: value, type: '%', numeric: numeric(value, '%') } }
127760
+ if (value === 'auto') { return { value: value, type: 'auto' } }
127761
+ return null
127762
+ };
127763
+
127764
+ var parse = function (rule) { return rule.split(' ').map(parseValue); };
127765
+
127766
+ var getSizeAtTrack = function (index, tracks, gap, end) {
127767
+ if ( gap === void 0 ) { gap = 0; }
127768
+ if ( end === void 0 ) { end = false; }
127769
+
127770
+ var newIndex = end ? index + 1 : index;
127771
+ var trackSum = tracks
127772
+ .slice(0, newIndex)
127773
+ .reduce(function (accum, value) { return accum + value.numeric; }, 0);
127774
+ var gapSum = gap ? index * gap : 0;
127775
+
127776
+ return trackSum + gapSum
127777
+ };
127778
+
127779
+ var getStyles = function (rule, ownRules, matchedRules) { return ownRules.concat( matchedRules)
127780
+ .map(function (r) { return r.style[rule]; })
127781
+ .filter(function (style) { return style !== undefined && style !== ''; }); };
127782
+
127783
+ var getGapValue = function (unit, size) {
127784
+ if (size.endsWith(unit)) {
127785
+ return Number(size.slice(0, -1 * unit.length))
127786
+ }
127787
+ return null
127788
+ };
127789
+
127790
+ var firstNonZero = function (tracks) {
127791
+ // eslint-disable-next-line no-plusplus
127792
+ for (var i = 0; i < tracks.length; i++) {
127793
+ if (tracks[i].numeric > 0) {
127794
+ return i
127795
+ }
127796
+ }
127797
+ return null
127798
+ };
127799
+
127800
+ var NOOP = function () { return false; };
127801
+
127802
+ var defaultWriteStyle = function (element, gridTemplateProp, style) {
127803
+ // eslint-disable-next-line no-param-reassign
127804
+ element.style[gridTemplateProp] = style;
127805
+ };
127806
+
127807
+ var getOption = function (options, propName, def) {
127808
+ var value = options[propName];
127809
+ if (value !== undefined) {
127810
+ return value
127811
+ }
127812
+ return def
127813
+ };
127814
+
127815
+ function getMatchedCSSRules (el) {
127816
+ var ref;
127817
+
127818
+ return (ref = [])
127819
+ .concat.apply(
127820
+ ref, Array.from(el.ownerDocument.styleSheets).map(function (s) {
127821
+ var rules = [];
127822
+
127823
+ try {
127824
+ rules = Array.from(s.cssRules || []);
127825
+ } catch (e) {
127826
+ // Ignore results on security error
127827
+ }
127828
+
127829
+ return rules
127830
+ })
127831
+ )
127832
+ .filter(function (r) {
127833
+ var matches = false;
127834
+ try {
127835
+ matches = el.matches(r.selectorText);
127836
+ } catch (e) {
127837
+ // Ignore matching erros
127838
+ }
127839
+
127840
+ return matches
127841
+ });
127842
+ }
127843
+
127844
+ var gridTemplatePropColumns = 'grid-template-columns';
127845
+ var gridTemplatePropRows = 'grid-template-rows';
127846
+
127847
+ var Gutter = function Gutter(direction, options, parentOptions) {
127848
+ this.direction = direction;
127849
+ this.element = options.element;
127850
+ this.track = options.track;
127851
+
127852
+ if (direction === 'column') {
127853
+ this.gridTemplateProp = gridTemplatePropColumns;
127854
+ this.gridGapProp = 'grid-column-gap';
127855
+ this.cursor = getOption(
127856
+ parentOptions,
127857
+ 'columnCursor',
127858
+ getOption(parentOptions, 'cursor', 'col-resize')
127859
+ );
127860
+ this.snapOffset = getOption(
127861
+ parentOptions,
127862
+ 'columnSnapOffset',
127863
+ getOption(parentOptions, 'snapOffset', 30)
127864
+ );
127865
+ this.dragInterval = getOption(
127866
+ parentOptions,
127867
+ 'columnDragInterval',
127868
+ getOption(parentOptions, 'dragInterval', 1)
127869
+ );
127870
+ this.clientAxis = 'clientX';
127871
+ this.optionStyle = getOption(parentOptions, 'gridTemplateColumns');
127872
+ } else if (direction === 'row') {
127873
+ this.gridTemplateProp = gridTemplatePropRows;
127874
+ this.gridGapProp = 'grid-row-gap';
127875
+ this.cursor = getOption(
127876
+ parentOptions,
127877
+ 'rowCursor',
127878
+ getOption(parentOptions, 'cursor', 'row-resize')
127879
+ );
127880
+ this.snapOffset = getOption(
127881
+ parentOptions,
127882
+ 'rowSnapOffset',
127883
+ getOption(parentOptions, 'snapOffset', 30)
127884
+ );
127885
+ this.dragInterval = getOption(
127886
+ parentOptions,
127887
+ 'rowDragInterval',
127888
+ getOption(parentOptions, 'dragInterval', 1)
127889
+ );
127890
+ this.clientAxis = 'clientY';
127891
+ this.optionStyle = getOption(parentOptions, 'gridTemplateRows');
127892
+ }
127893
+
127894
+ this.onDragStart = getOption(parentOptions, 'onDragStart', NOOP);
127895
+ this.onDragEnd = getOption(parentOptions, 'onDragEnd', NOOP);
127896
+ this.onDrag = getOption(parentOptions, 'onDrag', NOOP);
127897
+ this.writeStyle = getOption(
127898
+ parentOptions,
127899
+ 'writeStyle',
127900
+ defaultWriteStyle
127901
+ );
127902
+
127903
+ this.startDragging = this.startDragging.bind(this);
127904
+ this.stopDragging = this.stopDragging.bind(this);
127905
+ this.drag = this.drag.bind(this);
127906
+
127907
+ this.minSizeStart = options.minSizeStart;
127908
+ this.minSizeEnd = options.minSizeEnd;
127909
+
127910
+ if (options.element) {
127911
+ this.element.addEventListener('mousedown', this.startDragging);
127912
+ this.element.addEventListener('touchstart', this.startDragging);
127913
+ }
127914
+ };
127915
+
127916
+ Gutter.prototype.getDimensions = function getDimensions () {
127917
+ var ref = this.grid.getBoundingClientRect();
127918
+ var width = ref.width;
127919
+ var height = ref.height;
127920
+ var top = ref.top;
127921
+ var bottom = ref.bottom;
127922
+ var left = ref.left;
127923
+ var right = ref.right;
127924
+
127925
+ if (this.direction === 'column') {
127926
+ this.start = top;
127927
+ this.end = bottom;
127928
+ this.size = height;
127929
+ } else if (this.direction === 'row') {
127930
+ this.start = left;
127931
+ this.end = right;
127932
+ this.size = width;
127933
+ }
127934
+ };
127935
+
127936
+ Gutter.prototype.getSizeAtTrack = function getSizeAtTrack$1 (track, end) {
127937
+ return getSizeAtTrack(
127938
+ track,
127939
+ this.computedPixels,
127940
+ this.computedGapPixels,
127941
+ end
127942
+ )
127943
+ };
127944
+
127945
+ Gutter.prototype.getSizeOfTrack = function getSizeOfTrack (track) {
127946
+ return this.computedPixels[track].numeric
127947
+ };
127948
+
127949
+ Gutter.prototype.getRawTracks = function getRawTracks () {
127950
+ var tracks = getStyles(
127951
+ this.gridTemplateProp,
127952
+ [this.grid],
127953
+ getMatchedCSSRules(this.grid)
127954
+ );
127955
+ if (!tracks.length) {
127956
+ if (this.optionStyle) { return this.optionStyle }
127957
+
127958
+ throw Error('Unable to determine grid template tracks from styles.')
127959
+ }
127960
+ return tracks[0]
127961
+ };
127962
+
127963
+ Gutter.prototype.getGap = function getGap () {
127964
+ var gap = getStyles(
127965
+ this.gridGapProp,
127966
+ [this.grid],
127967
+ getMatchedCSSRules(this.grid)
127968
+ );
127969
+ if (!gap.length) {
127970
+ return null
127971
+ }
127972
+ return gap[0]
127973
+ };
127974
+
127975
+ Gutter.prototype.getRawComputedTracks = function getRawComputedTracks () {
127976
+ return window.getComputedStyle(this.grid)[this.gridTemplateProp]
127977
+ };
127978
+
127979
+ Gutter.prototype.getRawComputedGap = function getRawComputedGap () {
127980
+ return window.getComputedStyle(this.grid)[this.gridGapProp]
127981
+ };
127982
+
127983
+ Gutter.prototype.setTracks = function setTracks (raw) {
127984
+ this.tracks = raw.split(' ');
127985
+ this.trackValues = parse(raw);
127986
+ };
127987
+
127988
+ Gutter.prototype.setComputedTracks = function setComputedTracks (raw) {
127989
+ this.computedTracks = raw.split(' ');
127990
+ this.computedPixels = parse(raw);
127991
+ };
127992
+
127993
+ Gutter.prototype.setGap = function setGap (raw) {
127994
+ this.gap = raw;
127995
+ };
127996
+
127997
+ Gutter.prototype.setComputedGap = function setComputedGap (raw) {
127998
+ this.computedGap = raw;
127999
+ this.computedGapPixels = getGapValue('px', this.computedGap) || 0;
128000
+ };
128001
+
128002
+ Gutter.prototype.getMousePosition = function getMousePosition (e) {
128003
+ if ('touches' in e) { return e.touches[0][this.clientAxis] }
128004
+ return e[this.clientAxis]
128005
+ };
128006
+
128007
+ Gutter.prototype.startDragging = function startDragging (e) {
128008
+ if ('button' in e && e.button !== 0) {
128009
+ return
128010
+ }
128011
+
128012
+ // Don't actually drag the element. We emulate that in the drag function.
128013
+ e.preventDefault();
128014
+
128015
+ if (this.element) {
128016
+ this.grid = this.element.parentNode;
128017
+ } else {
128018
+ this.grid = e.target.parentNode;
128019
+ }
128020
+
128021
+ this.getDimensions();
128022
+ this.setTracks(this.getRawTracks());
128023
+ this.setComputedTracks(this.getRawComputedTracks());
128024
+ this.setGap(this.getGap());
128025
+ this.setComputedGap(this.getRawComputedGap());
128026
+
128027
+ var trackPercentage = this.trackValues.filter(
128028
+ function (track) { return track.type === '%'; }
128029
+ );
128030
+ var trackFr = this.trackValues.filter(function (track) { return track.type === 'fr'; });
128031
+
128032
+ this.totalFrs = trackFr.length;
128033
+
128034
+ if (this.totalFrs) {
128035
+ var track = firstNonZero(trackFr);
128036
+
128037
+ if (track !== null) {
128038
+ this.frToPixels =
128039
+ this.computedPixels[track].numeric / trackFr[track].numeric;
128040
+ }
128041
+ }
128042
+
128043
+ if (trackPercentage.length) {
128044
+ var track$1 = firstNonZero(trackPercentage);
128045
+
128046
+ if (track$1 !== null) {
128047
+ this.percentageToPixels =
128048
+ this.computedPixels[track$1].numeric /
128049
+ trackPercentage[track$1].numeric;
128050
+ }
128051
+ }
128052
+
128053
+ // get start of gutter track
128054
+ var gutterStart = this.getSizeAtTrack(this.track, false) + this.start;
128055
+ this.dragStartOffset = this.getMousePosition(e) - gutterStart;
128056
+
128057
+ this.aTrack = this.track - 1;
128058
+
128059
+ if (this.track < this.tracks.length - 1) {
128060
+ this.bTrack = this.track + 1;
128061
+ } else {
128062
+ throw Error(
128063
+ ("Invalid track index: " + (this.track) + ". Track must be between two other tracks and only " + (this.tracks.length) + " tracks were found.")
128064
+ )
128065
+ }
128066
+
128067
+ this.aTrackStart = this.getSizeAtTrack(this.aTrack, false) + this.start;
128068
+ this.bTrackEnd = this.getSizeAtTrack(this.bTrack, true) + this.start;
128069
+
128070
+ // Set the dragging property of the pair object.
128071
+ this.dragging = true;
128072
+
128073
+ // All the binding. `window` gets the stop events in case we drag out of the elements.
128074
+ window.addEventListener('mouseup', this.stopDragging);
128075
+ window.addEventListener('touchend', this.stopDragging);
128076
+ window.addEventListener('touchcancel', this.stopDragging);
128077
+ window.addEventListener('mousemove', this.drag);
128078
+ window.addEventListener('touchmove', this.drag);
128079
+
128080
+ // Disable selection. Disable!
128081
+ this.grid.addEventListener('selectstart', NOOP);
128082
+ this.grid.addEventListener('dragstart', NOOP);
128083
+
128084
+ this.grid.style.userSelect = 'none';
128085
+ this.grid.style.webkitUserSelect = 'none';
128086
+ this.grid.style.MozUserSelect = 'none';
128087
+ this.grid.style.pointerEvents = 'none';
128088
+
128089
+ // Set the cursor at multiple levels
128090
+ this.grid.style.cursor = this.cursor;
128091
+ window.document.body.style.cursor = this.cursor;
128092
+
128093
+ this.onDragStart(this.direction, this.track);
128094
+ };
128095
+
128096
+ Gutter.prototype.stopDragging = function stopDragging () {
128097
+ this.dragging = false;
128098
+
128099
+ // Remove the stored event listeners. This is why we store them.
128100
+ this.cleanup();
128101
+
128102
+ this.onDragEnd(this.direction, this.track);
128103
+
128104
+ if (this.needsDestroy) {
128105
+ if (this.element) {
128106
+ this.element.removeEventListener(
128107
+ 'mousedown',
128108
+ this.startDragging
128109
+ );
128110
+ this.element.removeEventListener(
128111
+ 'touchstart',
128112
+ this.startDragging
128113
+ );
128114
+ }
128115
+ this.destroyCb();
128116
+ this.needsDestroy = false;
128117
+ this.destroyCb = null;
128118
+ }
128119
+ };
128120
+
128121
+ Gutter.prototype.drag = function drag (e) {
128122
+ var mousePosition = this.getMousePosition(e);
128123
+
128124
+ var gutterSize = this.getSizeOfTrack(this.track);
128125
+ var minMousePosition =
128126
+ this.aTrackStart +
128127
+ this.minSizeStart +
128128
+ this.dragStartOffset +
128129
+ this.computedGapPixels;
128130
+ var maxMousePosition =
128131
+ this.bTrackEnd -
128132
+ this.minSizeEnd -
128133
+ this.computedGapPixels -
128134
+ (gutterSize - this.dragStartOffset);
128135
+ var minMousePositionOffset = minMousePosition + this.snapOffset;
128136
+ var maxMousePositionOffset = maxMousePosition - this.snapOffset;
128137
+
128138
+ if (mousePosition < minMousePositionOffset) {
128139
+ mousePosition = minMousePosition;
128140
+ }
128141
+
128142
+ if (mousePosition > maxMousePositionOffset) {
128143
+ mousePosition = maxMousePosition;
128144
+ }
128145
+
128146
+ if (mousePosition < minMousePosition) {
128147
+ mousePosition = minMousePosition;
128148
+ } else if (mousePosition > maxMousePosition) {
128149
+ mousePosition = maxMousePosition;
128150
+ }
128151
+
128152
+ var aTrackSize =
128153
+ mousePosition -
128154
+ this.aTrackStart -
128155
+ this.dragStartOffset -
128156
+ this.computedGapPixels;
128157
+ var bTrackSize =
128158
+ this.bTrackEnd -
128159
+ mousePosition +
128160
+ this.dragStartOffset -
128161
+ gutterSize -
128162
+ this.computedGapPixels;
128163
+
128164
+ if (this.dragInterval > 1) {
128165
+ var aTrackSizeIntervaled =
128166
+ Math.round(aTrackSize / this.dragInterval) * this.dragInterval;
128167
+ bTrackSize -= aTrackSizeIntervaled - aTrackSize;
128168
+ aTrackSize = aTrackSizeIntervaled;
128169
+ }
128170
+
128171
+ if (aTrackSize < this.minSizeStart) {
128172
+ aTrackSize = this.minSizeStart;
128173
+ }
128174
+
128175
+ if (bTrackSize < this.minSizeEnd) {
128176
+ bTrackSize = this.minSizeEnd;
128177
+ }
128178
+
128179
+ if (this.trackValues[this.aTrack].type === 'px') {
128180
+ this.tracks[this.aTrack] = aTrackSize + "px";
128181
+ } else if (this.trackValues[this.aTrack].type === 'fr') {
128182
+ if (this.totalFrs === 1) {
128183
+ this.tracks[this.aTrack] = '1fr';
128184
+ } else {
128185
+ var targetFr = aTrackSize / this.frToPixels;
128186
+ this.tracks[this.aTrack] = targetFr + "fr";
128187
+ }
128188
+ } else if (this.trackValues[this.aTrack].type === '%') {
128189
+ var targetPercentage = aTrackSize / this.percentageToPixels;
128190
+ this.tracks[this.aTrack] = targetPercentage + "%";
128191
+ }
128192
+
128193
+ if (this.trackValues[this.bTrack].type === 'px') {
128194
+ this.tracks[this.bTrack] = bTrackSize + "px";
128195
+ } else if (this.trackValues[this.bTrack].type === 'fr') {
128196
+ if (this.totalFrs === 1) {
128197
+ this.tracks[this.bTrack] = '1fr';
128198
+ } else {
128199
+ var targetFr$1 = bTrackSize / this.frToPixels;
128200
+ this.tracks[this.bTrack] = targetFr$1 + "fr";
128201
+ }
128202
+ } else if (this.trackValues[this.bTrack].type === '%') {
128203
+ var targetPercentage$1 = bTrackSize / this.percentageToPixels;
128204
+ this.tracks[this.bTrack] = targetPercentage$1 + "%";
128205
+ }
128206
+
128207
+ var style = this.tracks.join(' ');
128208
+ this.writeStyle(this.grid, this.gridTemplateProp, style);
128209
+ this.onDrag(this.direction, this.track, style);
128210
+ };
128211
+
128212
+ Gutter.prototype.cleanup = function cleanup () {
128213
+ window.removeEventListener('mouseup', this.stopDragging);
128214
+ window.removeEventListener('touchend', this.stopDragging);
128215
+ window.removeEventListener('touchcancel', this.stopDragging);
128216
+ window.removeEventListener('mousemove', this.drag);
128217
+ window.removeEventListener('touchmove', this.drag);
128218
+
128219
+ if (this.grid) {
128220
+ this.grid.removeEventListener('selectstart', NOOP);
128221
+ this.grid.removeEventListener('dragstart', NOOP);
128222
+
128223
+ this.grid.style.userSelect = '';
128224
+ this.grid.style.webkitUserSelect = '';
128225
+ this.grid.style.MozUserSelect = '';
128226
+ this.grid.style.pointerEvents = '';
128227
+
128228
+ this.grid.style.cursor = '';
128229
+ }
128230
+
128231
+ window.document.body.style.cursor = '';
128232
+ };
128233
+
128234
+ Gutter.prototype.destroy = function destroy (immediate, cb) {
128235
+ if ( immediate === void 0 ) immediate = true;
128236
+
128237
+ if (immediate || this.dragging === false) {
128238
+ this.cleanup();
128239
+ if (this.element) {
128240
+ this.element.removeEventListener(
128241
+ 'mousedown',
128242
+ this.startDragging
128243
+ );
128244
+ this.element.removeEventListener(
128245
+ 'touchstart',
128246
+ this.startDragging
128247
+ );
128248
+ }
128249
+
128250
+ if (cb) {
128251
+ cb();
128252
+ }
128253
+ } else {
128254
+ this.needsDestroy = true;
128255
+ if (cb) {
128256
+ this.destroyCb = cb;
128257
+ }
128258
+ }
128259
+ };
128260
+
128261
+ var getTrackOption = function (options, track, defaultValue) {
128262
+ if (track in options) {
128263
+ return options[track]
128264
+ }
128265
+
128266
+ return defaultValue
128267
+ };
128268
+
128269
+ var createGutter = function (direction, options) { return function (gutterOptions) {
128270
+ if (gutterOptions.track < 1) {
128271
+ throw Error(
128272
+ ("Invalid track index: " + (gutterOptions.track) + ". Track must be between two other tracks.")
128273
+ )
128274
+ }
128275
+
128276
+ var trackMinSizes =
128277
+ direction === 'column'
128278
+ ? options.columnMinSizes || {}
128279
+ : options.rowMinSizes || {};
128280
+ var trackMinSize = direction === 'column' ? 'columnMinSize' : 'rowMinSize';
128281
+
128282
+ return new Gutter(
128283
+ direction,
128284
+ Object.assign({}, {minSizeStart: getTrackOption(
128285
+ trackMinSizes,
128286
+ gutterOptions.track - 1,
128287
+ getOption(
128288
+ options,
128289
+ trackMinSize,
128290
+ getOption(options, 'minSize', 0)
128291
+ )
128292
+ ),
128293
+ minSizeEnd: getTrackOption(
128294
+ trackMinSizes,
128295
+ gutterOptions.track + 1,
128296
+ getOption(
128297
+ options,
128298
+ trackMinSize,
128299
+ getOption(options, 'minSize', 0)
128300
+ )
128301
+ )},
128302
+ gutterOptions),
128303
+ options
128304
+ )
128305
+ }; };
128306
+
128307
+ var Grid = function Grid(options) {
128308
+ var this$1 = this;
128309
+
128310
+ this.columnGutters = {};
128311
+ this.rowGutters = {};
128312
+
128313
+ this.options = Object.assign({}, {columnGutters: options.columnGutters || [],
128314
+ rowGutters: options.rowGutters || [],
128315
+ columnMinSizes: options.columnMinSizes || {},
128316
+ rowMinSizes: options.rowMinSizes || {}},
128317
+ options);
128318
+
128319
+ this.options.columnGutters.forEach(function (gutterOptions) {
128320
+ this$1.columnGutters[gutterOptions.track] = createGutter(
128321
+ 'column',
128322
+ this$1.options
128323
+ )(gutterOptions);
128324
+ });
128325
+
128326
+ this.options.rowGutters.forEach(function (gutterOptions) {
128327
+ this$1.rowGutters[gutterOptions.track] = createGutter(
128328
+ 'row',
128329
+ this$1.options
128330
+ )(gutterOptions);
128331
+ });
128332
+ };
128333
+
128334
+ Grid.prototype.addColumnGutter = function addColumnGutter (element, track) {
128335
+ if (this.columnGutters[track]) {
128336
+ this.columnGutters[track].destroy();
128337
+ }
128338
+
128339
+ this.columnGutters[track] = createGutter(
128340
+ 'column',
128341
+ this.options
128342
+ )({
128343
+ element: element,
128344
+ track: track,
128345
+ });
128346
+ };
128347
+
128348
+ Grid.prototype.addRowGutter = function addRowGutter (element, track) {
128349
+ if (this.rowGutters[track]) {
128350
+ this.rowGutters[track].destroy();
128351
+ }
128352
+
128353
+ this.rowGutters[track] = createGutter(
128354
+ 'row',
128355
+ this.options
128356
+ )({
128357
+ element: element,
128358
+ track: track,
128359
+ });
128360
+ };
128361
+
128362
+ Grid.prototype.removeColumnGutter = function removeColumnGutter (track, immediate) {
128363
+ var this$1 = this;
128364
+ if ( immediate === void 0 ) immediate = true;
128365
+
128366
+ if (this.columnGutters[track]) {
128367
+ this.columnGutters[track].destroy(immediate, function () {
128368
+ delete this$1.columnGutters[track];
128369
+ });
128370
+ }
128371
+ };
128372
+
128373
+ Grid.prototype.removeRowGutter = function removeRowGutter (track, immediate) {
128374
+ var this$1 = this;
128375
+ if ( immediate === void 0 ) immediate = true;
128376
+
128377
+ if (this.rowGutters[track]) {
128378
+ this.rowGutters[track].destroy(immediate, function () {
128379
+ delete this$1.rowGutters[track];
128380
+ });
128381
+ }
128382
+ };
128383
+
128384
+ Grid.prototype.handleDragStart = function handleDragStart (e, direction, track) {
128385
+ if (direction === 'column') {
128386
+ if (this.columnGutters[track]) {
128387
+ this.columnGutters[track].destroy();
128388
+ }
128389
+
128390
+ this.columnGutters[track] = createGutter(
128391
+ 'column',
128392
+ this.options
128393
+ )({
128394
+ track: track,
128395
+ });
128396
+ this.columnGutters[track].startDragging(e);
128397
+ } else if (direction === 'row') {
128398
+ if (this.rowGutters[track]) {
128399
+ this.rowGutters[track].destroy();
128400
+ }
128401
+
128402
+ this.rowGutters[track] = createGutter(
128403
+ 'row',
128404
+ this.options
128405
+ )({
128406
+ track: track,
128407
+ });
128408
+ this.rowGutters[track].startDragging(e);
128409
+ }
128410
+ };
128411
+
128412
+ Grid.prototype.destroy = function destroy (immediate) {
128413
+ var this$1 = this;
128414
+ if ( immediate === void 0 ) immediate = true;
128415
+
128416
+ Object.keys(this.columnGutters).forEach(function (track) { return this$1.columnGutters[track].destroy(immediate, function () {
128417
+ delete this$1.columnGutters[track];
128418
+ }); }
128419
+ );
128420
+ Object.keys(this.rowGutters).forEach(function (track) { return this$1.rowGutters[track].destroy(immediate, function () {
128421
+ delete this$1.rowGutters[track];
128422
+ }); }
128423
+ );
128424
+ };
128425
+
128426
+ function index (options) { return new Grid(options); }
128427
+
128428
+ const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent}";
128429
+
128430
+ const SplitPanel = class extends HTMLElement$1 {
128431
+ constructor() {
128432
+ super();
128433
+ this.__registerHost();
128434
+ this._items = [];
128435
+ this.direction = 'column';
128436
+ }
128437
+ componentDidLoad() {
128438
+ this._panelID = StringUtils$1.generateUUID();
128439
+ this._element.dataset.panelId = this._panelID;
128440
+ let itemsElements = Array.from(this._element.children);
128441
+ this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
128442
+ let trackCount = 1;
128443
+ this._items.forEach((item, index) => {
128444
+ item.dataset.trackNumber = trackCount.toString();
128445
+ if (this._items.length > 1 && index != this._items.length - 1) {
128446
+ this.addItemGutter(item);
128447
+ }
128448
+ trackCount += 2;
128449
+ });
128450
+ this.initSplit();
128451
+ }
128452
+ initSplit() {
128453
+ if (!this._items.length) {
128454
+ return;
128455
+ }
128456
+ this._element.style[this.direction == 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
128457
+ index(this.getGutters());
128458
+ }
128459
+ getGutters() {
128460
+ const gutters = {
128461
+ columnGutters: [],
128462
+ rowGutters: []
128463
+ };
128464
+ if (!this._items.length) {
128465
+ return gutters;
128466
+ }
128467
+ const proToChange = this.direction == 'row' ? 'rowGutters' : 'columnGutters';
128468
+ this._items.forEach((item, index) => {
128469
+ if (index == this._items.length - 1)
128470
+ return;
128471
+ let gutterTrack = item.dataset.trackNumber;
128472
+ if (index === (this._items.length - 1)) {
128473
+ gutterTrack = this._items.length.toString();
128474
+ }
128475
+ gutters[proToChange].push({
128476
+ track: Number(gutterTrack),
128477
+ element: this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${item.dataset.trackNumber}"]`)
128478
+ });
128479
+ });
128480
+ return gutters;
128481
+ }
128482
+ addItemGutter(item) {
128483
+ const gutter = document.createElement('div');
128484
+ gutter.classList.add("ez-split-gutter");
128485
+ gutter.classList.add(this.direction);
128486
+ gutter.dataset.itemTrack = `${item.dataset.trackNumber}`;
128487
+ gutter.dataset.trackNumber = (Number(item.dataset.trackNumber) + 1).toString();
128488
+ item.parentNode.insertBefore(gutter, item.nextSibling);
128489
+ }
128490
+ getElementStyle() {
128491
+ const style = {
128492
+ 'display': "grid",
128493
+ 'height': '100%',
128494
+ 'width': '100%'
128495
+ };
128496
+ return style;
128497
+ }
128498
+ getGridTemplate() {
128499
+ let template = '';
128500
+ this._items.forEach((_col, index) => {
128501
+ if (index === this._items.length - 1) {
128502
+ template += ` 1fr`;
128503
+ return;
128504
+ }
128505
+ if (index === 0) {
128506
+ template += `1fr 5px`;
128507
+ return;
128508
+ }
128509
+ template += ` 1fr 5px`;
128510
+ });
128511
+ return template;
128512
+ }
128513
+ render() {
128514
+ return (h(Host, { style: this.getElementStyle() }));
128515
+ }
128516
+ get _element() { return this; }
128517
+ static get style() { return ezSplitPanelCss; }
128518
+ };
128519
+
127738
128520
  const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--tabselector--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Roboto\");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}";
127739
128521
 
127740
128522
  const EzTabselector$1 = class extends HTMLElement$1 {
@@ -129971,6 +130753,8 @@ const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller
129971
130753
  const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"]}]);
129972
130754
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
129973
130755
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
130756
+ const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [0,"ez-split-item"]);
130757
+ const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1]}]);
129974
130758
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
129975
130759
  const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
129976
130760
  const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
@@ -130022,6 +130806,8 @@ const defineCustomElements = (opts) => {
130022
130806
  EzSearch,
130023
130807
  EzSidebarButton,
130024
130808
  EzSkeleton,
130809
+ EzSplitItem,
130810
+ EzSplitPanel,
130025
130811
  EzTabselector,
130026
130812
  EzTextArea,
130027
130813
  EzTextEdit,
@@ -130041,4 +130827,4 @@ const defineCustomElements = (opts) => {
130041
130827
  }
130042
130828
  };
130043
130829
 
130044
- export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
130830
+ export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };