ods-component-lib 1.18.6 → 1.18.8

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.
@@ -1,6 +1,6 @@
1
1
  import { Alert, AutoComplete, Button, Dropdown, Calendar, Card as Card$1, Checkbox, DatePicker, Divider, Input, Form, Image, InputNumber, List, Modal, notification, Radio, Rate, Select, Space, Spin, Switch, Tabs, Table, Tag, Timeline, TimePicker, Typography, theme } from 'antd';
2
2
  import styled, { ThemeProvider } from 'styled-components';
3
- import React, { useState, useRef, useEffect } from 'react';
3
+ import React, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
4
4
  import Marquee from 'react-fast-marquee';
5
5
  import Card from 'antd/es/card/Card';
6
6
  import { EyeTwoTone, EyeInvisibleOutlined, FrownOutlined, MehOutlined, SmileOutlined, HeartOutlined, UserOutlined, LockOutlined } from '@ant-design/icons';
@@ -16532,13 +16532,589 @@ function _finallyRethrows(body, finalizer) {
16532
16532
  return finalizer(false, result);
16533
16533
  }
16534
16534
 
16535
+ /**
16536
+ * Checks if `value` is the
16537
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
16538
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
16539
+ *
16540
+ * @static
16541
+ * @memberOf _
16542
+ * @since 0.1.0
16543
+ * @category Lang
16544
+ * @param {*} value The value to check.
16545
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
16546
+ * @example
16547
+ *
16548
+ * _.isObject({});
16549
+ * // => true
16550
+ *
16551
+ * _.isObject([1, 2, 3]);
16552
+ * // => true
16553
+ *
16554
+ * _.isObject(_.noop);
16555
+ * // => true
16556
+ *
16557
+ * _.isObject(null);
16558
+ * // => false
16559
+ */
16560
+ function isObject(value) {
16561
+ var type = typeof value;
16562
+ return value != null && (type == 'object' || type == 'function');
16563
+ }
16564
+
16565
+ var isObject_1 = isObject;
16566
+
16567
+ /** Detect free variable `global` from Node.js. */
16568
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
16569
+
16570
+ var _freeGlobal = freeGlobal;
16571
+
16572
+ /** Detect free variable `self`. */
16573
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
16574
+
16575
+ /** Used as a reference to the global object. */
16576
+ var root = _freeGlobal || freeSelf || Function('return this')();
16577
+
16578
+ var _root = root;
16579
+
16580
+ /**
16581
+ * Gets the timestamp of the number of milliseconds that have elapsed since
16582
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
16583
+ *
16584
+ * @static
16585
+ * @memberOf _
16586
+ * @since 2.4.0
16587
+ * @category Date
16588
+ * @returns {number} Returns the timestamp.
16589
+ * @example
16590
+ *
16591
+ * _.defer(function(stamp) {
16592
+ * console.log(_.now() - stamp);
16593
+ * }, _.now());
16594
+ * // => Logs the number of milliseconds it took for the deferred invocation.
16595
+ */
16596
+ var now = function() {
16597
+ return _root.Date.now();
16598
+ };
16599
+
16600
+ var now_1 = now;
16601
+
16602
+ /** Used to match a single whitespace character. */
16603
+ var reWhitespace = /\s/;
16604
+
16605
+ /**
16606
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
16607
+ * character of `string`.
16608
+ *
16609
+ * @private
16610
+ * @param {string} string The string to inspect.
16611
+ * @returns {number} Returns the index of the last non-whitespace character.
16612
+ */
16613
+ function trimmedEndIndex(string) {
16614
+ var index = string.length;
16615
+
16616
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
16617
+ return index;
16618
+ }
16619
+
16620
+ var _trimmedEndIndex = trimmedEndIndex;
16621
+
16622
+ /** Used to match leading whitespace. */
16623
+ var reTrimStart = /^\s+/;
16624
+
16625
+ /**
16626
+ * The base implementation of `_.trim`.
16627
+ *
16628
+ * @private
16629
+ * @param {string} string The string to trim.
16630
+ * @returns {string} Returns the trimmed string.
16631
+ */
16632
+ function baseTrim(string) {
16633
+ return string
16634
+ ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')
16635
+ : string;
16636
+ }
16637
+
16638
+ var _baseTrim = baseTrim;
16639
+
16640
+ /** Built-in value references. */
16641
+ var Symbol$1 = _root.Symbol;
16642
+
16643
+ var _Symbol = Symbol$1;
16644
+
16645
+ /** Used for built-in method references. */
16646
+ var objectProto = Object.prototype;
16647
+
16648
+ /** Used to check objects for own properties. */
16649
+ var hasOwnProperty = objectProto.hasOwnProperty;
16650
+
16651
+ /**
16652
+ * Used to resolve the
16653
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
16654
+ * of values.
16655
+ */
16656
+ var nativeObjectToString = objectProto.toString;
16657
+
16658
+ /** Built-in value references. */
16659
+ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
16660
+
16661
+ /**
16662
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
16663
+ *
16664
+ * @private
16665
+ * @param {*} value The value to query.
16666
+ * @returns {string} Returns the raw `toStringTag`.
16667
+ */
16668
+ function getRawTag(value) {
16669
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
16670
+ tag = value[symToStringTag];
16671
+
16672
+ try {
16673
+ value[symToStringTag] = undefined;
16674
+ var unmasked = true;
16675
+ } catch (e) {}
16676
+
16677
+ var result = nativeObjectToString.call(value);
16678
+ if (unmasked) {
16679
+ if (isOwn) {
16680
+ value[symToStringTag] = tag;
16681
+ } else {
16682
+ delete value[symToStringTag];
16683
+ }
16684
+ }
16685
+ return result;
16686
+ }
16687
+
16688
+ var _getRawTag = getRawTag;
16689
+
16690
+ /** Used for built-in method references. */
16691
+ var objectProto$1 = Object.prototype;
16692
+
16693
+ /**
16694
+ * Used to resolve the
16695
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
16696
+ * of values.
16697
+ */
16698
+ var nativeObjectToString$1 = objectProto$1.toString;
16699
+
16700
+ /**
16701
+ * Converts `value` to a string using `Object.prototype.toString`.
16702
+ *
16703
+ * @private
16704
+ * @param {*} value The value to convert.
16705
+ * @returns {string} Returns the converted string.
16706
+ */
16707
+ function objectToString(value) {
16708
+ return nativeObjectToString$1.call(value);
16709
+ }
16710
+
16711
+ var _objectToString = objectToString;
16712
+
16713
+ /** `Object#toString` result references. */
16714
+ var nullTag = '[object Null]',
16715
+ undefinedTag = '[object Undefined]';
16716
+
16717
+ /** Built-in value references. */
16718
+ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
16719
+
16720
+ /**
16721
+ * The base implementation of `getTag` without fallbacks for buggy environments.
16722
+ *
16723
+ * @private
16724
+ * @param {*} value The value to query.
16725
+ * @returns {string} Returns the `toStringTag`.
16726
+ */
16727
+ function baseGetTag(value) {
16728
+ if (value == null) {
16729
+ return value === undefined ? undefinedTag : nullTag;
16730
+ }
16731
+ return (symToStringTag$1 && symToStringTag$1 in Object(value))
16732
+ ? _getRawTag(value)
16733
+ : _objectToString(value);
16734
+ }
16735
+
16736
+ var _baseGetTag = baseGetTag;
16737
+
16738
+ /**
16739
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
16740
+ * and has a `typeof` result of "object".
16741
+ *
16742
+ * @static
16743
+ * @memberOf _
16744
+ * @since 4.0.0
16745
+ * @category Lang
16746
+ * @param {*} value The value to check.
16747
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
16748
+ * @example
16749
+ *
16750
+ * _.isObjectLike({});
16751
+ * // => true
16752
+ *
16753
+ * _.isObjectLike([1, 2, 3]);
16754
+ * // => true
16755
+ *
16756
+ * _.isObjectLike(_.noop);
16757
+ * // => false
16758
+ *
16759
+ * _.isObjectLike(null);
16760
+ * // => false
16761
+ */
16762
+ function isObjectLike(value) {
16763
+ return value != null && typeof value == 'object';
16764
+ }
16765
+
16766
+ var isObjectLike_1 = isObjectLike;
16767
+
16768
+ /** `Object#toString` result references. */
16769
+ var symbolTag = '[object Symbol]';
16770
+
16771
+ /**
16772
+ * Checks if `value` is classified as a `Symbol` primitive or object.
16773
+ *
16774
+ * @static
16775
+ * @memberOf _
16776
+ * @since 4.0.0
16777
+ * @category Lang
16778
+ * @param {*} value The value to check.
16779
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
16780
+ * @example
16781
+ *
16782
+ * _.isSymbol(Symbol.iterator);
16783
+ * // => true
16784
+ *
16785
+ * _.isSymbol('abc');
16786
+ * // => false
16787
+ */
16788
+ function isSymbol(value) {
16789
+ return typeof value == 'symbol' ||
16790
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
16791
+ }
16792
+
16793
+ var isSymbol_1 = isSymbol;
16794
+
16795
+ /** Used as references for various `Number` constants. */
16796
+ var NAN = 0 / 0;
16797
+
16798
+ /** Used to detect bad signed hexadecimal string values. */
16799
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
16800
+
16801
+ /** Used to detect binary string values. */
16802
+ var reIsBinary = /^0b[01]+$/i;
16803
+
16804
+ /** Used to detect octal string values. */
16805
+ var reIsOctal = /^0o[0-7]+$/i;
16806
+
16807
+ /** Built-in method references without a dependency on `root`. */
16808
+ var freeParseInt = parseInt;
16809
+
16810
+ /**
16811
+ * Converts `value` to a number.
16812
+ *
16813
+ * @static
16814
+ * @memberOf _
16815
+ * @since 4.0.0
16816
+ * @category Lang
16817
+ * @param {*} value The value to process.
16818
+ * @returns {number} Returns the number.
16819
+ * @example
16820
+ *
16821
+ * _.toNumber(3.2);
16822
+ * // => 3.2
16823
+ *
16824
+ * _.toNumber(Number.MIN_VALUE);
16825
+ * // => 5e-324
16826
+ *
16827
+ * _.toNumber(Infinity);
16828
+ * // => Infinity
16829
+ *
16830
+ * _.toNumber('3.2');
16831
+ * // => 3.2
16832
+ */
16833
+ function toNumber(value) {
16834
+ if (typeof value == 'number') {
16835
+ return value;
16836
+ }
16837
+ if (isSymbol_1(value)) {
16838
+ return NAN;
16839
+ }
16840
+ if (isObject_1(value)) {
16841
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
16842
+ value = isObject_1(other) ? (other + '') : other;
16843
+ }
16844
+ if (typeof value != 'string') {
16845
+ return value === 0 ? value : +value;
16846
+ }
16847
+ value = _baseTrim(value);
16848
+ var isBinary = reIsBinary.test(value);
16849
+ return (isBinary || reIsOctal.test(value))
16850
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
16851
+ : (reIsBadHex.test(value) ? NAN : +value);
16852
+ }
16853
+
16854
+ var toNumber_1 = toNumber;
16855
+
16856
+ /** Error message constants. */
16857
+ var FUNC_ERROR_TEXT = 'Expected a function';
16858
+
16859
+ /* Built-in method references for those with the same name as other `lodash` methods. */
16860
+ var nativeMax = Math.max,
16861
+ nativeMin = Math.min;
16862
+
16863
+ /**
16864
+ * Creates a debounced function that delays invoking `func` until after `wait`
16865
+ * milliseconds have elapsed since the last time the debounced function was
16866
+ * invoked. The debounced function comes with a `cancel` method to cancel
16867
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
16868
+ * Provide `options` to indicate whether `func` should be invoked on the
16869
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
16870
+ * with the last arguments provided to the debounced function. Subsequent
16871
+ * calls to the debounced function return the result of the last `func`
16872
+ * invocation.
16873
+ *
16874
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
16875
+ * invoked on the trailing edge of the timeout only if the debounced function
16876
+ * is invoked more than once during the `wait` timeout.
16877
+ *
16878
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
16879
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
16880
+ *
16881
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
16882
+ * for details over the differences between `_.debounce` and `_.throttle`.
16883
+ *
16884
+ * @static
16885
+ * @memberOf _
16886
+ * @since 0.1.0
16887
+ * @category Function
16888
+ * @param {Function} func The function to debounce.
16889
+ * @param {number} [wait=0] The number of milliseconds to delay.
16890
+ * @param {Object} [options={}] The options object.
16891
+ * @param {boolean} [options.leading=false]
16892
+ * Specify invoking on the leading edge of the timeout.
16893
+ * @param {number} [options.maxWait]
16894
+ * The maximum time `func` is allowed to be delayed before it's invoked.
16895
+ * @param {boolean} [options.trailing=true]
16896
+ * Specify invoking on the trailing edge of the timeout.
16897
+ * @returns {Function} Returns the new debounced function.
16898
+ * @example
16899
+ *
16900
+ * // Avoid costly calculations while the window size is in flux.
16901
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
16902
+ *
16903
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
16904
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
16905
+ * 'leading': true,
16906
+ * 'trailing': false
16907
+ * }));
16908
+ *
16909
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
16910
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
16911
+ * var source = new EventSource('/stream');
16912
+ * jQuery(source).on('message', debounced);
16913
+ *
16914
+ * // Cancel the trailing debounced invocation.
16915
+ * jQuery(window).on('popstate', debounced.cancel);
16916
+ */
16917
+ function debounce(func, wait, options) {
16918
+ var lastArgs,
16919
+ lastThis,
16920
+ maxWait,
16921
+ result,
16922
+ timerId,
16923
+ lastCallTime,
16924
+ lastInvokeTime = 0,
16925
+ leading = false,
16926
+ maxing = false,
16927
+ trailing = true;
16928
+
16929
+ if (typeof func != 'function') {
16930
+ throw new TypeError(FUNC_ERROR_TEXT);
16931
+ }
16932
+ wait = toNumber_1(wait) || 0;
16933
+ if (isObject_1(options)) {
16934
+ leading = !!options.leading;
16935
+ maxing = 'maxWait' in options;
16936
+ maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;
16937
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
16938
+ }
16939
+
16940
+ function invokeFunc(time) {
16941
+ var args = lastArgs,
16942
+ thisArg = lastThis;
16943
+
16944
+ lastArgs = lastThis = undefined;
16945
+ lastInvokeTime = time;
16946
+ result = func.apply(thisArg, args);
16947
+ return result;
16948
+ }
16949
+
16950
+ function leadingEdge(time) {
16951
+ // Reset any `maxWait` timer.
16952
+ lastInvokeTime = time;
16953
+ // Start the timer for the trailing edge.
16954
+ timerId = setTimeout(timerExpired, wait);
16955
+ // Invoke the leading edge.
16956
+ return leading ? invokeFunc(time) : result;
16957
+ }
16958
+
16959
+ function remainingWait(time) {
16960
+ var timeSinceLastCall = time - lastCallTime,
16961
+ timeSinceLastInvoke = time - lastInvokeTime,
16962
+ timeWaiting = wait - timeSinceLastCall;
16963
+
16964
+ return maxing
16965
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
16966
+ : timeWaiting;
16967
+ }
16968
+
16969
+ function shouldInvoke(time) {
16970
+ var timeSinceLastCall = time - lastCallTime,
16971
+ timeSinceLastInvoke = time - lastInvokeTime;
16972
+
16973
+ // Either this is the first call, activity has stopped and we're at the
16974
+ // trailing edge, the system time has gone backwards and we're treating
16975
+ // it as the trailing edge, or we've hit the `maxWait` limit.
16976
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
16977
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
16978
+ }
16979
+
16980
+ function timerExpired() {
16981
+ var time = now_1();
16982
+ if (shouldInvoke(time)) {
16983
+ return trailingEdge(time);
16984
+ }
16985
+ // Restart the timer.
16986
+ timerId = setTimeout(timerExpired, remainingWait(time));
16987
+ }
16988
+
16989
+ function trailingEdge(time) {
16990
+ timerId = undefined;
16991
+
16992
+ // Only invoke if we have `lastArgs` which means `func` has been
16993
+ // debounced at least once.
16994
+ if (trailing && lastArgs) {
16995
+ return invokeFunc(time);
16996
+ }
16997
+ lastArgs = lastThis = undefined;
16998
+ return result;
16999
+ }
17000
+
17001
+ function cancel() {
17002
+ if (timerId !== undefined) {
17003
+ clearTimeout(timerId);
17004
+ }
17005
+ lastInvokeTime = 0;
17006
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
17007
+ }
17008
+
17009
+ function flush() {
17010
+ return timerId === undefined ? result : trailingEdge(now_1());
17011
+ }
17012
+
17013
+ function debounced() {
17014
+ var time = now_1(),
17015
+ isInvoking = shouldInvoke(time);
17016
+
17017
+ lastArgs = arguments;
17018
+ lastThis = this;
17019
+ lastCallTime = time;
17020
+
17021
+ if (isInvoking) {
17022
+ if (timerId === undefined) {
17023
+ return leadingEdge(lastCallTime);
17024
+ }
17025
+ if (maxing) {
17026
+ // Handle invocations in a tight loop.
17027
+ clearTimeout(timerId);
17028
+ timerId = setTimeout(timerExpired, wait);
17029
+ return invokeFunc(lastCallTime);
17030
+ }
17031
+ }
17032
+ if (timerId === undefined) {
17033
+ timerId = setTimeout(timerExpired, wait);
17034
+ }
17035
+ return result;
17036
+ }
17037
+ debounced.cancel = cancel;
17038
+ debounced.flush = flush;
17039
+ return debounced;
17040
+ }
17041
+
17042
+ var debounce_1 = debounce;
17043
+
17044
+ /** Error message constants. */
17045
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
17046
+
17047
+ /**
17048
+ * Creates a throttled function that only invokes `func` at most once per
17049
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
17050
+ * method to cancel delayed `func` invocations and a `flush` method to
17051
+ * immediately invoke them. Provide `options` to indicate whether `func`
17052
+ * should be invoked on the leading and/or trailing edge of the `wait`
17053
+ * timeout. The `func` is invoked with the last arguments provided to the
17054
+ * throttled function. Subsequent calls to the throttled function return the
17055
+ * result of the last `func` invocation.
17056
+ *
17057
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
17058
+ * invoked on the trailing edge of the timeout only if the throttled function
17059
+ * is invoked more than once during the `wait` timeout.
17060
+ *
17061
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
17062
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
17063
+ *
17064
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
17065
+ * for details over the differences between `_.throttle` and `_.debounce`.
17066
+ *
17067
+ * @static
17068
+ * @memberOf _
17069
+ * @since 0.1.0
17070
+ * @category Function
17071
+ * @param {Function} func The function to throttle.
17072
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
17073
+ * @param {Object} [options={}] The options object.
17074
+ * @param {boolean} [options.leading=true]
17075
+ * Specify invoking on the leading edge of the timeout.
17076
+ * @param {boolean} [options.trailing=true]
17077
+ * Specify invoking on the trailing edge of the timeout.
17078
+ * @returns {Function} Returns the new throttled function.
17079
+ * @example
17080
+ *
17081
+ * // Avoid excessively updating the position while scrolling.
17082
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
17083
+ *
17084
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
17085
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
17086
+ * jQuery(element).on('click', throttled);
17087
+ *
17088
+ * // Cancel the trailing throttled invocation.
17089
+ * jQuery(window).on('popstate', throttled.cancel);
17090
+ */
17091
+ function throttle(func, wait, options) {
17092
+ var leading = true,
17093
+ trailing = true;
17094
+
17095
+ if (typeof func != 'function') {
17096
+ throw new TypeError(FUNC_ERROR_TEXT$1);
17097
+ }
17098
+ if (isObject_1(options)) {
17099
+ leading = 'leading' in options ? !!options.leading : leading;
17100
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
17101
+ }
17102
+ return debounce_1(func, wait, {
17103
+ 'leading': leading,
17104
+ 'maxWait': wait,
17105
+ 'trailing': trailing
17106
+ });
17107
+ }
17108
+
17109
+ var throttle_1 = throttle;
17110
+
16535
17111
  var exportFormats$3 = ['xlsx'];
16536
17112
  var totalPageCount = 1;
16537
17113
  var loadedPageCount = 1;
16538
17114
  var totalRecordCount = 0;
16539
17115
  var useToken$1 = theme.useToken;
16540
17116
  var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16541
- var _props$axiosRequest2, _props$selectOptions, _props$selectOptions$, _props$selectOptions2, _props$selectOptions$2, _props$selectOptions3;
17117
+ var _props$axiosRequest2, _props$axiosRequest4, _props$axiosRequest5, _props$axiosRequest6, _props$axiosRequest7, _props$axiosRequest8, _props$axiosRequest9, _props$selectOptions, _props$selectOptions$, _props$selectOptions2, _props$selectOptions$2, _props$selectOptions3;
16542
17118
  var _useToken = useToken$1(),
16543
17119
  token = _useToken.token;
16544
17120
  var _useState = useState([]),
@@ -16551,12 +17127,6 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16551
17127
  var gridRef = useRef(null);
16552
17128
  var _useState3 = useState(0),
16553
17129
  filteredRowCount = _useState3[0];
16554
- var _useState4 = useState([]),
16555
- kebabMenuButtons = _useState4[0],
16556
- setKebabMenuButtons = _useState4[1];
16557
- var _useState5 = useState([]),
16558
- actionButtons = _useState5[0],
16559
- setActionButtons = _useState5[1];
16560
17130
  var headers = new Headers({
16561
17131
  'Content-Type': 'application/json',
16562
17132
  'Authorization': 'Bearer ' + (props.axiosRequest ? props.axiosRequest.token : ""),
@@ -16564,22 +17134,41 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16564
17134
  });
16565
17135
  useEffect(function () {
16566
17136
  var _props$axiosRequest;
16567
- if (props.isApplyButtonClicked && (_props$axiosRequest = props.axiosRequest) !== null && _props$axiosRequest !== void 0 && _props$axiosRequest.requestData) {
17137
+ if (Object.keys((_props$axiosRequest = props.axiosRequest) === null || _props$axiosRequest === void 0 ? void 0 : _props$axiosRequest.requestData).length > 0) {
16568
17138
  totalPageCount = 1;
16569
17139
  loadedPageCount = 1;
16570
17140
  totalRecordCount = 0;
16571
17141
  setData([]);
16572
17142
  fetchData();
16573
17143
  }
16574
- }, [props.isApplyButtonClicked, (_props$axiosRequest2 = props.axiosRequest) === null || _props$axiosRequest2 === void 0 ? void 0 : _props$axiosRequest2.requestData]);
17144
+ }, [(_props$axiosRequest2 = props.axiosRequest) === null || _props$axiosRequest2 === void 0 ? void 0 : _props$axiosRequest2.requestData]);
16575
17145
  useEffect(function () {
16576
17146
  locale(localStorage.getItem("locale"));
16577
17147
  loadMessages(JSON.parse(localStorage.getItem("localTranslation")));
17148
+ if (gridRef.current) {
17149
+ gridRef.current.instance.updateDimensions();
17150
+ }
16578
17151
  }, []);
16579
- useEffect(function () {
16580
- if (props.actionButtonGroup.length >= 2) {
16581
- setActionButtons(props.actionButtonGroup.slice(0, 2));
16582
- setKebabMenuButtons(props.actionButtonGroup.slice(2, props.actionButtonGroup.length));
17152
+ var actionButtons = useMemo(function () {
17153
+ if (props.actionButtonGroup) {
17154
+ if (props.actionButtonGroup.length >= 2 && !props.edit) {
17155
+ return props.actionButtonGroup.slice(0, 2);
17156
+ } else {
17157
+ return props.actionButtonGroup;
17158
+ }
17159
+ } else {
17160
+ return [];
17161
+ }
17162
+ }, [props.actionButtonGroup]);
17163
+ var kebabMenuButtons = useMemo(function () {
17164
+ if (props.actionButtonGroup) {
17165
+ if (props.actionButtonGroup.length >= 2 && !props.edit) {
17166
+ return props.actionButtonGroup.slice(2, props.actionButtonGroup.length);
17167
+ } else {
17168
+ return [];
17169
+ }
17170
+ } else {
17171
+ return [];
16583
17172
  }
16584
17173
  }, [props.actionButtonGroup]);
16585
17174
  var handleRef = function handleRef(instance) {
@@ -16587,8 +17176,10 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16587
17176
  gridRef.current = instance;
16588
17177
  }
16589
17178
  };
16590
- var fetchData = function fetchData() {
17179
+ var fetchData = useCallback(function () {
16591
17180
  try {
17181
+ var _props$axiosRequest3;
17182
+ if (Object.keys((_props$axiosRequest3 = props.axiosRequest) === null || _props$axiosRequest3 === void 0 ? void 0 : _props$axiosRequest3.requestData).length === 0) return Promise.resolve();
16592
17183
  setIsLoading(true);
16593
17184
  var _temp2 = function () {
16594
17185
  if (props.isServerSide) {
@@ -16630,22 +17221,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16630
17221
  } catch (e) {
16631
17222
  return Promise.reject(e);
16632
17223
  }
16633
- };
16634
- var onContentReady = function onContentReady(e) {
16635
- setTimeout(function () {
16636
- var dxScrollable = e.component.getScrollable();
16637
- if (dxScrollable != null) {
16638
- dxScrollable.off("scroll");
16639
- dxScrollable.on("scroll", function (args) {
16640
- if (args.reachedBottom) {
16641
- debugger;
16642
- getServerSide("reachedBottom");
16643
- }
16644
- });
16645
- }
16646
- }, 10);
16647
- };
16648
- var onEditorPreparing = function onEditorPreparing(e) {
17224
+ }, [(_props$axiosRequest4 = props.axiosRequest) === null || _props$axiosRequest4 === void 0 ? void 0 : _props$axiosRequest4.requestData, (_props$axiosRequest5 = props.axiosRequest) === null || _props$axiosRequest5 === void 0 ? void 0 : _props$axiosRequest5.apiUrl, (_props$axiosRequest6 = props.axiosRequest) === null || _props$axiosRequest6 === void 0 ? void 0 : _props$axiosRequest6.environmentUrl, (_props$axiosRequest7 = props.axiosRequest) === null || _props$axiosRequest7 === void 0 ? void 0 : _props$axiosRequest7.requestQueryString, (_props$axiosRequest8 = props.axiosRequest) === null || _props$axiosRequest8 === void 0 ? void 0 : _props$axiosRequest8.requestType, props.pageSize, props.isServerSide]);
17225
+ var onEditorPreparing = useCallback(function (e) {
16649
17226
  if (e.row !== undefined && e.parentType === 'dataRow') {
16650
17227
  if (props.isServerSide) {
16651
17228
  var disableScrolling = function disableScrolling() {
@@ -16658,19 +17235,34 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16658
17235
  e.editorOptions.onFocusOut = enableScrolling;
16659
17236
  }
16660
17237
  }
16661
- };
16662
- var getServerSide = function getServerSide(type) {
16663
- if (type === "reachedBottom") {
16664
- if (totalPageCount <= loadedPageCount) {
16665
- return Promise.resolve();
16666
- } else {
16667
- loadedPageCount = loadedPageCount + 1;
16668
- fetchData();
16669
- }
17238
+ }, [props.isServerSide]);
17239
+ var getServerSide = useCallback(function (type) {
17240
+ try {
17241
+ var run = throttle_1(function (type) {
17242
+ try {
17243
+ return Promise.resolve(function () {
17244
+ if (type === "reachedBottom") {
17245
+ return function () {
17246
+ if (totalPageCount <= loadedPageCount) {} else {
17247
+ loadedPageCount = loadedPageCount + 1;
17248
+ return Promise.resolve(fetchData()).then(function () {});
17249
+ }
17250
+ }();
17251
+ }
17252
+ }());
17253
+ } catch (e) {
17254
+ return Promise.reject(e);
17255
+ }
17256
+ }, 5000, {
17257
+ trailing: false
17258
+ });
17259
+ run(type);
17260
+ return Promise.resolve();
17261
+ } catch (e) {
17262
+ return Promise.reject(e);
16670
17263
  }
16671
- return Promise.resolve();
16672
- };
16673
- var onExporting = function onExporting(e) {
17264
+ }, [totalPageCount, loadedPageCount, fetchData]);
17265
+ var onExporting = useCallback(function (e) {
16674
17266
  if (e.format === 'xlsx') {
16675
17267
  var workbook = new Workbook();
16676
17268
  exportDataGrid({
@@ -16694,8 +17286,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16694
17286
  doc.save(fileName + '.pdf');
16695
17287
  });
16696
17288
  }
16697
- };
16698
- var customLoad = function customLoad() {
17289
+ }, [fileName]);
17290
+ var customLoad = useCallback(function () {
16699
17291
  var state = JSON.parse(localStorage.getItem(props.exportFileName + "Storage"));
16700
17292
  if (localStorage.getItem(props.exportFileName + "Storage")) {
16701
17293
  state.selectedRowKeys = [];
@@ -16706,8 +17298,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16706
17298
  };
16707
17299
  }
16708
17300
  return state;
16709
- };
16710
- var customSave = function customSave(state) {
17301
+ }, [props.filterEnabledShow]);
17302
+ var customSave = useCallback(function (state) {
16711
17303
  state.selectedRowKeys = [];
16712
17304
  if (props.filterEnabledShow) state.filterPanel = {
16713
17305
  filterEnabled: false
@@ -16715,8 +17307,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16715
17307
  filterEnabled: true
16716
17308
  };
16717
17309
  localStorage.setItem(props.exportFileName + "Storage", JSON.stringify(state));
16718
- };
16719
- var onEditorPrepared = function onEditorPrepared(info) {
17310
+ }, [props.filterEnabledShow]);
17311
+ var onEditorPrepared = useCallback(function (info) {
16720
17312
  if (info.parentType === 'filterRow' && info.editorName === "dxSelectBox" && info.dataField === "IsActive") {
16721
17313
  if (info.dataSource != null && info.dataSource.length > 0) {
16722
17314
  info.showAllText = info.dataSource.find(function (i) {
@@ -16730,8 +17322,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16730
17322
  }).label;
16731
17323
  }
16732
17324
  }
16733
- };
16734
- var renderTotal = function renderTotal() {
17325
+ }, []);
17326
+ var renderTotal = useCallback(function () {
16735
17327
  var totalloaded = 0;
16736
17328
  if (data.length < 50) {
16737
17329
  totalloaded = data.length;
@@ -16745,15 +17337,15 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16745
17337
  result = totalRecordCount > 0 ? totalloaded + " Loaded - " + totalRecordCount + " Total" : "";
16746
17338
  }
16747
17339
  return result;
16748
- };
16749
- var renderTotalPaging = function renderTotalPaging() {
17340
+ }, [data, filteredRowCount, loadedPageCount, props.pageSize, totalRecordCount]);
17341
+ var renderTotalPaging = useCallback(function () {
16750
17342
  var result = "";
16751
17343
  if (totalPageCount > 1) {
16752
17344
  result = loadedPageCount + " / " + totalPageCount;
16753
17345
  }
16754
17346
  return result;
16755
- };
16756
- var actionCellRender = function actionCellRender() {
17347
+ }, [loadedPageCount, totalPageCount]);
17348
+ var actionCellRender = useMemo(function () {
16757
17349
  return React.createElement(DropDownButton, {
16758
17350
  icon: server_browser.renderToString(React.createElement(DynamicIcon, {
16759
17351
  iconName: 'kebabMenu'
@@ -16763,11 +17355,45 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16763
17355
  return e.itemData.onClick();
16764
17356
  }
16765
17357
  });
17358
+ }, [kebabMenuButtons]);
17359
+ var onScrollEnd = useCallback(function () {
17360
+ getServerSide("reachedBottom");
17361
+ }, [(_props$axiosRequest9 = props.axiosRequest) === null || _props$axiosRequest9 === void 0 ? void 0 : _props$axiosRequest9.requestData, getServerSide]);
17362
+ var handleScroll = function handleScroll(e) {
17363
+ var run = debounce_1(function (e) {
17364
+ var _scrollable$scrollTop, _scrollable$clientHei, _scrollable$scrollHei;
17365
+ var scrollable = e.target;
17366
+ var top = (_scrollable$scrollTop = scrollable === null || scrollable === void 0 ? void 0 : scrollable.scrollTop) != null ? _scrollable$scrollTop : 0;
17367
+ var height = (_scrollable$clientHei = scrollable === null || scrollable === void 0 ? void 0 : scrollable.clientHeight) != null ? _scrollable$clientHei : 0;
17368
+ var scrollHeight = (_scrollable$scrollHei = scrollable === null || scrollable === void 0 ? void 0 : scrollable.scrollHeight) != null ? _scrollable$scrollHei : 0;
17369
+ var maxHeight = Math.max(top, height, scrollHeight) - 1;
17370
+ var reachedBottom = Math.ceil(top + height) >= maxHeight;
17371
+ console.log("reachedBottom", Math.ceil(top + height), maxHeight, reachedBottom);
17372
+ var lastScrollTop = 0;
17373
+ if (top < lastScrollTop) {
17374
+ return;
17375
+ }
17376
+ lastScrollTop = top <= 0 ? 0 : top;
17377
+ if (reachedBottom) {
17378
+ onScrollEnd();
17379
+ }
17380
+ }, 200);
17381
+ run(e);
16766
17382
  };
17383
+ useEffect(function () {
17384
+ var scrollable = document.querySelector('.dx-scrollable-container');
17385
+ if (scrollable) {
17386
+ scrollable.addEventListener('scrollend', handleScroll);
17387
+ }
17388
+ return function () {
17389
+ if (scrollable) {
17390
+ scrollable.removeEventListener('scrollend', handleScroll);
17391
+ }
17392
+ };
17393
+ }, [data.length]);
16767
17394
  return React.createElement(React.Fragment, null, React.createElement(DataGrid$1, {
16768
17395
  keyExpr: props.keyExpr,
16769
17396
  dataSource: props.isServerSide ? data : props.dataSource,
16770
- onContentReady: onContentReady,
16771
17397
  showBorders: true,
16772
17398
  columnAutoWidth: false,
16773
17399
  onEditorPreparing: onEditorPreparing,
@@ -16800,9 +17426,7 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16800
17426
  key: col.dataField
16801
17427
  }, col, {
16802
17428
  minWidth: 180
16803
- }), col.required && React.createElement(RequiredRule, {
16804
- message: col.requiredMessage
16805
- }), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
17429
+ }), col.lookUp && React.createElement(Lookup, Object.assign({}, col.lookUp)), col.dataField === 'IsActive' && React.createElement(HeaderFilter, {
16806
17430
  dataSource: [{
16807
17431
  text: 'Active',
16808
17432
  value: true
@@ -16815,10 +17439,10 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16815
17439
  dataField: "Actions",
16816
17440
  fixed: true,
16817
17441
  allowSorting: false,
16818
- caption: "Actions",
17442
+ caption: props.actionButtonGroupCaption,
16819
17443
  type: "buttons",
16820
17444
  showInColumnChooser: false
16821
- }, actionButtons.map(function (buttonItem) {
17445
+ }, !props.edit && actionButtons.map(function (buttonItem) {
16822
17446
  return React.createElement(Button$1, {
16823
17447
  hint: buttonItem.hint,
16824
17448
  visible: buttonItem.visible,
@@ -16828,6 +17452,8 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16828
17452
  })),
16829
17453
  onClick: buttonItem.onClick
16830
17454
  });
17455
+ }), props.edit && actionButtons.map(function (buttonItem) {
17456
+ return React.createElement(Button$1, Object.assign({}, buttonItem));
16831
17457
  })), kebabMenuButtons.length > 0 && React.createElement(Column, {
16832
17458
  dataField: "Actionss",
16833
17459
  fixed: true,
@@ -16835,7 +17461,9 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16835
17461
  caption: "",
16836
17462
  type: "buttons",
16837
17463
  showInColumnChooser: false,
16838
- cellRender: actionCellRender
17464
+ cellRender: function cellRender() {
17465
+ return actionCellRender;
17466
+ }
16839
17467
  }), props.edit && React.createElement(Editing, {
16840
17468
  mode: props.edit.mode,
16841
17469
  allowUpdating: props.edit.allowUpdating,
@@ -16953,7 +17581,6 @@ var OdsRemoteDataGrid = function OdsRemoteDataGrid(props) {
16953
17581
  customSave: customSave
16954
17582
  })));
16955
17583
  };
16956
- var OdsRemoteDataGrid$1 = React.memo(OdsRemoteDataGrid);
16957
17584
 
16958
- export { DxTreeList, DxTreeView, OdsAlert, OdsAutoComplete, OdsBannerAlert, OdsBasicForm, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse, OdsCustomMultiSelect, OdsDataGrid, OdsDataGridNew, OdsDateRangePicker, OdsDateRangePicker as OdsDatepicker, OdsDisplayGrid, OdsDivider, OdsCollapse as OdsDropdown, OdsDropdownButton, OdsImage, OdsInput, OdsInputNumber, OdsLink, OdsList, OdsLogin, OdsMessage, OdsModal, OdsNotification, OdsParagraph, OdsPassword, OdsPhoneInput, OdsProfDataGrid, OdsRadio, OdsRadioGroup, OdsRangeTimepicker, OdsRate, OdsRemoteDataGrid$1 as OdsRemoteDataGrid, OdsSearch, OdsSelect, OdsSelectableTable, OdsSpin, OdsSwitch, OdsTab, OdsBasicTable as OdsTable, OdsTag, OdsText, OdsTextArea, OdsTimeline, OdsTimepicker, OdsTitle };
17585
+ export { DxTreeList, DxTreeView, OdsAlert, OdsAutoComplete, OdsBannerAlert, OdsBasicForm, OdsBasicTable, OdsButton, OdsCalendar, OdsCard, OdsCheckbox, OdsCheckboxGroup, OdsCollapse, OdsCustomMultiSelect, OdsDataGrid, OdsDataGridNew, OdsDateRangePicker, OdsDateRangePicker as OdsDatepicker, OdsDisplayGrid, OdsDivider, OdsCollapse as OdsDropdown, OdsDropdownButton, OdsImage, OdsInput, OdsInputNumber, OdsLink, OdsList, OdsLogin, OdsMessage, OdsModal, OdsNotification, OdsParagraph, OdsPassword, OdsPhoneInput, OdsProfDataGrid, OdsRadio, OdsRadioGroup, OdsRangeTimepicker, OdsRate, OdsRemoteDataGrid, OdsSearch, OdsSelect, OdsSelectableTable, OdsSpin, OdsSwitch, OdsTab, OdsBasicTable as OdsTable, OdsTag, OdsText, OdsTextArea, OdsTimeline, OdsTimepicker, OdsTitle };
16959
17586
  //# sourceMappingURL=index.modern.js.map