@revolist/revogrid 3.2.13 → 3.2.14

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.
Files changed (55) hide show
  1. package/custom-element/_baseIteratee.js +2070 -0
  2. package/custom-element/columnService.js +743 -0
  3. package/custom-element/consts.js +46 -0
  4. package/custom-element/data.store.js +545 -0
  5. package/custom-element/debounce.js +217 -0
  6. package/custom-element/dimension.helpers.js +340 -0
  7. package/custom-element/each.js +180 -0
  8. package/custom-element/filter.button.js +36 -0
  9. package/custom-element/identity.js +26 -0
  10. package/custom-element/index.d.ts +15 -98
  11. package/custom-element/index.js +15 -29221
  12. package/custom-element/isSymbol.js +220 -0
  13. package/custom-element/keys.js +561 -0
  14. package/custom-element/localScrollService.js +86 -0
  15. package/custom-element/revo-grid.d.ts +11 -0
  16. package/custom-element/revo-grid.js +3662 -0
  17. package/custom-element/revogr-clipboard.d.ts +11 -0
  18. package/custom-element/revogr-clipboard.js +72 -0
  19. package/custom-element/revogr-data.d.ts +11 -0
  20. package/custom-element/revogr-data.js +9 -0
  21. package/custom-element/revogr-data2.js +171 -0
  22. package/custom-element/revogr-edit.d.ts +11 -0
  23. package/custom-element/revogr-edit.js +9 -0
  24. package/custom-element/revogr-edit2.js +402 -0
  25. package/custom-element/revogr-filter-panel.d.ts +11 -0
  26. package/custom-element/revogr-filter-panel.js +308 -0
  27. package/custom-element/revogr-focus.d.ts +11 -0
  28. package/custom-element/revogr-focus.js +9 -0
  29. package/custom-element/revogr-focus2.js +64 -0
  30. package/custom-element/revogr-header.d.ts +11 -0
  31. package/custom-element/revogr-header.js +9 -0
  32. package/custom-element/revogr-header2.js +591 -0
  33. package/custom-element/revogr-order-editor.d.ts +11 -0
  34. package/custom-element/revogr-order-editor.js +9 -0
  35. package/custom-element/revogr-order-editor2.js +190 -0
  36. package/custom-element/revogr-overlay-selection.d.ts +11 -0
  37. package/custom-element/revogr-overlay-selection.js +9 -0
  38. package/custom-element/revogr-overlay-selection2.js +741 -0
  39. package/custom-element/revogr-row-headers.d.ts +11 -0
  40. package/custom-element/revogr-row-headers.js +9 -0
  41. package/custom-element/revogr-row-headers2.js +403 -0
  42. package/custom-element/revogr-scroll-virtual.d.ts +11 -0
  43. package/custom-element/revogr-scroll-virtual.js +9 -0
  44. package/custom-element/revogr-scroll-virtual2.js +135 -0
  45. package/custom-element/revogr-temp-range.d.ts +11 -0
  46. package/custom-element/revogr-temp-range.js +9 -0
  47. package/custom-element/revogr-temp-range2.js +17275 -0
  48. package/custom-element/revogr-viewport-scroll.d.ts +11 -0
  49. package/custom-element/revogr-viewport-scroll.js +9 -0
  50. package/custom-element/revogr-viewport-scroll2.js +367 -0
  51. package/custom-element/selection.utils.js +106 -0
  52. package/custom-element/toInteger.js +107 -0
  53. package/custom-element/toNumber.js +105 -0
  54. package/custom-element/utils.js +69 -0
  55. package/package.json +2 -2
@@ -0,0 +1,180 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ import { k as keys_1, i as isArrayLike_1, a as isArray_1 } from './keys.js';
5
+ import { i as identity_1 } from './identity.js';
6
+
7
+ /**
8
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
9
+ *
10
+ * @private
11
+ * @param {boolean} [fromRight] Specify iterating from right to left.
12
+ * @returns {Function} Returns the new base function.
13
+ */
14
+ function createBaseFor(fromRight) {
15
+ return function(object, iteratee, keysFunc) {
16
+ var index = -1,
17
+ iterable = Object(object),
18
+ props = keysFunc(object),
19
+ length = props.length;
20
+
21
+ while (length--) {
22
+ var key = props[fromRight ? length : ++index];
23
+ if (iteratee(iterable[key], key, iterable) === false) {
24
+ break;
25
+ }
26
+ }
27
+ return object;
28
+ };
29
+ }
30
+
31
+ var _createBaseFor = createBaseFor;
32
+
33
+ /**
34
+ * The base implementation of `baseForOwn` which iterates over `object`
35
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
36
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
37
+ *
38
+ * @private
39
+ * @param {Object} object The object to iterate over.
40
+ * @param {Function} iteratee The function invoked per iteration.
41
+ * @param {Function} keysFunc The function to get the keys of `object`.
42
+ * @returns {Object} Returns `object`.
43
+ */
44
+ var baseFor = _createBaseFor();
45
+
46
+ var _baseFor = baseFor;
47
+
48
+ /**
49
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
50
+ *
51
+ * @private
52
+ * @param {Object} object The object to iterate over.
53
+ * @param {Function} iteratee The function invoked per iteration.
54
+ * @returns {Object} Returns `object`.
55
+ */
56
+ function baseForOwn(object, iteratee) {
57
+ return object && _baseFor(object, iteratee, keys_1);
58
+ }
59
+
60
+ var _baseForOwn = baseForOwn;
61
+
62
+ /**
63
+ * Creates a `baseEach` or `baseEachRight` function.
64
+ *
65
+ * @private
66
+ * @param {Function} eachFunc The function to iterate over a collection.
67
+ * @param {boolean} [fromRight] Specify iterating from right to left.
68
+ * @returns {Function} Returns the new base function.
69
+ */
70
+ function createBaseEach(eachFunc, fromRight) {
71
+ return function(collection, iteratee) {
72
+ if (collection == null) {
73
+ return collection;
74
+ }
75
+ if (!isArrayLike_1(collection)) {
76
+ return eachFunc(collection, iteratee);
77
+ }
78
+ var length = collection.length,
79
+ index = fromRight ? length : -1,
80
+ iterable = Object(collection);
81
+
82
+ while ((fromRight ? index-- : ++index < length)) {
83
+ if (iteratee(iterable[index], index, iterable) === false) {
84
+ break;
85
+ }
86
+ }
87
+ return collection;
88
+ };
89
+ }
90
+
91
+ var _createBaseEach = createBaseEach;
92
+
93
+ /**
94
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
95
+ *
96
+ * @private
97
+ * @param {Array|Object} collection The collection to iterate over.
98
+ * @param {Function} iteratee The function invoked per iteration.
99
+ * @returns {Array|Object} Returns `collection`.
100
+ */
101
+ var baseEach = _createBaseEach(_baseForOwn);
102
+
103
+ var _baseEach = baseEach;
104
+
105
+ /**
106
+ * A specialized version of `_.forEach` for arrays without support for
107
+ * iteratee shorthands.
108
+ *
109
+ * @private
110
+ * @param {Array} [array] The array to iterate over.
111
+ * @param {Function} iteratee The function invoked per iteration.
112
+ * @returns {Array} Returns `array`.
113
+ */
114
+ function arrayEach(array, iteratee) {
115
+ var index = -1,
116
+ length = array == null ? 0 : array.length;
117
+
118
+ while (++index < length) {
119
+ if (iteratee(array[index], index, array) === false) {
120
+ break;
121
+ }
122
+ }
123
+ return array;
124
+ }
125
+
126
+ var _arrayEach = arrayEach;
127
+
128
+ /**
129
+ * Casts `value` to `identity` if it's not a function.
130
+ *
131
+ * @private
132
+ * @param {*} value The value to inspect.
133
+ * @returns {Function} Returns cast function.
134
+ */
135
+ function castFunction(value) {
136
+ return typeof value == 'function' ? value : identity_1;
137
+ }
138
+
139
+ var _castFunction = castFunction;
140
+
141
+ /**
142
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
143
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
144
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
145
+ *
146
+ * **Note:** As with other "Collections" methods, objects with a "length"
147
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
148
+ * or `_.forOwn` for object iteration.
149
+ *
150
+ * @static
151
+ * @memberOf _
152
+ * @since 0.1.0
153
+ * @alias each
154
+ * @category Collection
155
+ * @param {Array|Object} collection The collection to iterate over.
156
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
157
+ * @returns {Array|Object} Returns `collection`.
158
+ * @see _.forEachRight
159
+ * @example
160
+ *
161
+ * _.forEach([1, 2], function(value) {
162
+ * console.log(value);
163
+ * });
164
+ * // => Logs `1` then `2`.
165
+ *
166
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
167
+ * console.log(key);
168
+ * });
169
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
170
+ */
171
+ function forEach(collection, iteratee) {
172
+ var func = isArray_1(collection) ? _arrayEach : _baseEach;
173
+ return func(collection, _castFunction(iteratee));
174
+ }
175
+
176
+ var forEach_1 = forEach;
177
+
178
+ var each = forEach_1;
179
+
180
+ export { _baseEach as _, each as e };
@@ -0,0 +1,36 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ import { h } from '@stencil/core/internal/client';
5
+
6
+ const FILTER_BUTTON_CLASS = 'rv-filter';
7
+ const FILTER_BUTTON_ACTIVE = 'active';
8
+ const FILTER_PROP = 'hasFilter';
9
+ const AND_OR_BUTTON = 'and-or-button';
10
+ const TRASH_BUTTON = 'trash-button';
11
+ const FilterButton = ({ column }) => {
12
+ return (h("span", null,
13
+ h("button", { class: {
14
+ [FILTER_BUTTON_CLASS]: true,
15
+ [FILTER_BUTTON_ACTIVE]: column && !!column[FILTER_PROP],
16
+ } },
17
+ h("svg", { class: "filter-img", viewBox: "0 0 64 64" },
18
+ h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" },
19
+ h("path", { d: "M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z", fill: "currentColor" }))))));
20
+ };
21
+ const TrashButton = () => {
22
+ return (h("div", { class: { [TRASH_BUTTON]: true } },
23
+ h("svg", { class: "trash-img", viewBox: "0 0 24 24" },
24
+ h("path", { fill: "currentColor", d: "M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" }))));
25
+ };
26
+ const AndOrButton = ({ isAnd }) => {
27
+ return h("button", { class: { [AND_OR_BUTTON]: true, 'light revo-button': true } }, isAnd ? 'and' : 'or');
28
+ };
29
+ function isFilterBtn(e) {
30
+ if (e.classList.contains(FILTER_BUTTON_CLASS)) {
31
+ return true;
32
+ }
33
+ return e === null || e === void 0 ? void 0 : e.closest(`.${FILTER_BUTTON_CLASS}`);
34
+ }
35
+
36
+ export { AndOrButton as A, FILTER_PROP as F, TrashButton as T, FilterButton as a, isFilterBtn as i };
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Built by Revolist
3
+ */
4
+ /**
5
+ * This method returns the first argument it receives.
6
+ *
7
+ * @static
8
+ * @since 0.1.0
9
+ * @memberOf _
10
+ * @category Util
11
+ * @param {*} value Any value.
12
+ * @returns {*} Returns `value`.
13
+ * @example
14
+ *
15
+ * var object = { 'a': 1 };
16
+ *
17
+ * console.log(_.identity(object) === object);
18
+ * // => true
19
+ */
20
+ function identity(value) {
21
+ return value;
22
+ }
23
+
24
+ var identity_1 = identity;
25
+
26
+ export { identity_1 as i };
@@ -1,96 +1,17 @@
1
- /* RevoGrid custom elements bundle */
2
-
3
- import type { Components, JSX } from "../dist/types/interfaces";
4
-
5
- interface RevoGrid extends Components.RevoGrid, HTMLElement {}
6
- export const RevoGrid: {
7
- prototype: RevoGrid;
8
- new (): RevoGrid;
9
- };
10
-
11
- interface RevogrClipboard extends Components.RevogrClipboard, HTMLElement {}
12
- export const RevogrClipboard: {
13
- prototype: RevogrClipboard;
14
- new (): RevogrClipboard;
15
- };
16
-
17
- interface RevogrData extends Components.RevogrData, HTMLElement {}
18
- export const RevogrData: {
19
- prototype: RevogrData;
20
- new (): RevogrData;
21
- };
22
-
23
- interface RevogrEdit extends Components.RevogrEdit, HTMLElement {}
24
- export const RevogrEdit: {
25
- prototype: RevogrEdit;
26
- new (): RevogrEdit;
27
- };
28
-
29
- interface RevogrFilterPanel extends Components.RevogrFilterPanel, HTMLElement {}
30
- export const RevogrFilterPanel: {
31
- prototype: RevogrFilterPanel;
32
- new (): RevogrFilterPanel;
33
- };
34
-
35
- interface RevogrFocus extends Components.RevogrFocus, HTMLElement {}
36
- export const RevogrFocus: {
37
- prototype: RevogrFocus;
38
- new (): RevogrFocus;
39
- };
40
-
41
- interface RevogrHeader extends Components.RevogrHeader, HTMLElement {}
42
- export const RevogrHeader: {
43
- prototype: RevogrHeader;
44
- new (): RevogrHeader;
45
- };
46
-
47
- interface RevogrOrderEditor extends Components.RevogrOrderEditor, HTMLElement {}
48
- export const RevogrOrderEditor: {
49
- prototype: RevogrOrderEditor;
50
- new (): RevogrOrderEditor;
51
- };
52
-
53
- interface RevogrOverlaySelection extends Components.RevogrOverlaySelection, HTMLElement {}
54
- export const RevogrOverlaySelection: {
55
- prototype: RevogrOverlaySelection;
56
- new (): RevogrOverlaySelection;
57
- };
58
-
59
- interface RevogrRowHeaders extends Components.RevogrRowHeaders, HTMLElement {}
60
- export const RevogrRowHeaders: {
61
- prototype: RevogrRowHeaders;
62
- new (): RevogrRowHeaders;
63
- };
64
-
65
- interface RevogrScrollVirtual extends Components.RevogrScrollVirtual, HTMLElement {}
66
- export const RevogrScrollVirtual: {
67
- prototype: RevogrScrollVirtual;
68
- new (): RevogrScrollVirtual;
69
- };
70
-
71
- interface RevogrTempRange extends Components.RevogrTempRange, HTMLElement {}
72
- export const RevogrTempRange: {
73
- prototype: RevogrTempRange;
74
- new (): RevogrTempRange;
75
- };
76
-
77
- interface RevogrViewportScroll extends Components.RevogrViewportScroll, HTMLElement {}
78
- export const RevogrViewportScroll: {
79
- prototype: RevogrViewportScroll;
80
- new (): RevogrViewportScroll;
81
- };
82
-
83
- /**
84
- * Utility to define all custom elements within this package using the tag name provided in the component's source.
85
- * When defining each custom element, it will also check it's safe to define by:
86
- *
87
- * 1. Ensuring the "customElements" registry is available in the global context (window).
88
- * 2. The component tag name is not already defined.
89
- *
90
- * Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)
91
- * method instead to define custom elements individually, or to provide a different tag name.
92
- */
93
- export declare const defineCustomElements: (opts?: any) => void;
1
+ /* RevoGrid custom elements */
2
+ export { RevoGridComponent as RevoGrid } from '../dist/types/components/revo-grid/revo-grid';
3
+ export { Clipboard as RevogrClipboard } from '../dist/types/components/clipboard/revogr-clipboard';
4
+ export { RevogrData as RevogrData } from '../dist/types/components/data/revogr-data';
5
+ export { Edit as RevogrEdit } from '../dist/types/components/overlay/revogr-edit';
6
+ export { FilterPanel as RevogrFilterPanel } from '../dist/types/plugins/filter/filter.pop';
7
+ export { RevogrFocus as RevogrFocus } from '../dist/types/components/selection-focus/revogr-focus';
8
+ export { RevogrHeaderComponent as RevogrHeader } from '../dist/types/components/header/revogr-header';
9
+ export { OrderEditor as RevogrOrderEditor } from '../dist/types/components/order/revogr-order-editor';
10
+ export { OverlaySelection as RevogrOverlaySelection } from '../dist/types/components/overlay/revogr-overlay-selection';
11
+ export { RevogrRowHeaders as RevogrRowHeaders } from '../dist/types/components/rowHeaders/revogr-row-headers';
12
+ export { RevogrScrollVirtual as RevogrScrollVirtual } from '../dist/types/components/scrollable/revogr-scroll-virtual';
13
+ export { RevogrFocus as RevogrTempRange } from '../dist/types/components/selection-temp-range/revogr-temp-range';
14
+ export { RevogrViewportScroll as RevogrViewportScroll } from '../dist/types/components/scroll/revogr-viewport-scroll';
94
15
 
95
16
  /**
96
17
  * Used to manually set the base path where assets can be found.
@@ -99,7 +20,7 @@ export declare const defineCustomElements: (opts?: any) => void;
99
20
  * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
100
21
  * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
101
22
  * But do note that this configuration depends on how your script is bundled, or lack of
102
- * bunding, and where your assets can be loaded from. Additionally custom bundling
23
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
103
24
  * will have to ensure the static assets are copied to its build directory.
104
25
  */
105
26
  export declare const setAssetPath: (path: string) => void;
@@ -108,10 +29,6 @@ export interface SetPlatformOptions {
108
29
  raf?: (c: FrameRequestCallback) => number;
109
30
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
110
31
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
111
- ce?: (eventName: string, opts?: any) => CustomEvent;
112
32
  }
113
33
  export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
114
-
115
- export type { Components, JSX };
116
-
117
34
  export * from '../dist/types';