@revolist/revogrid 4.3.0-next.0 → 4.3.0-next.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.
Files changed (56) hide show
  1. package/custom-element/_baseIteratee.js +1 -1
  2. package/custom-element/_stringToPath.js +1 -1
  3. package/custom-element/columnService.js +1 -1
  4. package/custom-element/consts.js +1 -1
  5. package/custom-element/data.store.js +1 -1
  6. package/custom-element/debounce.js +1 -1
  7. package/custom-element/index.d.ts +16 -0
  8. package/custom-element/index.js +14 -1
  9. package/custom-element/index.js.map +1 -1
  10. package/custom-element/isObject.js +1 -1
  11. package/custom-element/isSymbol.js +1 -1
  12. package/custom-element/lodash.js +1 -1
  13. package/custom-element/revo-grid.js +60 -4
  14. package/custom-element/revo-grid.js.map +1 -1
  15. package/custom-element/revogr-clipboard.js +0 -1
  16. package/custom-element/revogr-clipboard.js.map +1 -1
  17. package/custom-element/revogr-data2.js +1 -2
  18. package/custom-element/revogr-data2.js.map +1 -1
  19. package/custom-element/revogr-edit2.js +1 -2
  20. package/custom-element/revogr-edit2.js.map +1 -1
  21. package/custom-element/revogr-filter-panel.js +0 -1
  22. package/custom-element/revogr-filter-panel.js.map +1 -1
  23. package/custom-element/revogr-focus2.js +0 -1
  24. package/custom-element/revogr-focus2.js.map +1 -1
  25. package/custom-element/revogr-header2.js +1 -2
  26. package/custom-element/revogr-header2.js.map +1 -1
  27. package/custom-element/revogr-order-editor2.js +1 -2
  28. package/custom-element/revogr-order-editor2.js.map +1 -1
  29. package/custom-element/revogr-overlay-selection2.js +1 -2
  30. package/custom-element/revogr-overlay-selection2.js.map +1 -1
  31. package/custom-element/revogr-row-headers2.js +1 -2
  32. package/custom-element/revogr-row-headers2.js.map +1 -1
  33. package/custom-element/revogr-scroll-virtual2.js +0 -1
  34. package/custom-element/revogr-scroll-virtual2.js.map +1 -1
  35. package/custom-element/revogr-temp-range2.js +0 -1
  36. package/custom-element/revogr-temp-range2.js.map +1 -1
  37. package/custom-element/revogr-viewport-scroll2.js +1 -2
  38. package/custom-element/revogr-viewport-scroll2.js.map +1 -1
  39. package/custom-element/toNumber.js +1 -1
  40. package/dist/cjs/revo-grid_11.cjs.entry.js +0 -1
  41. package/dist/cjs/revo-grid_11.cjs.entry.js.map +1 -1
  42. package/dist/collection/components/revoGrid/revo-grid.js +0 -1
  43. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  44. package/dist/esm/revo-grid_11.entry.js +0 -1
  45. package/dist/esm/revo-grid_11.entry.js.map +1 -1
  46. package/dist/loader/cdn.js +5 -0
  47. package/dist/loader/index.cjs.js +5 -0
  48. package/dist/loader/index.d.ts +21 -0
  49. package/dist/loader/index.es2017.js +5 -0
  50. package/dist/loader/index.js +6 -0
  51. package/dist/loader/package.json +11 -0
  52. package/dist/revo-grid/revo-grid_11.entry.js +1 -1
  53. package/dist/revo-grid/revo-grid_11.entry.js.map +1 -1
  54. package/package.json +2 -2
  55. package/custom-element/themeService.js +0 -65
  56. package/custom-element/themeService.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  * Built by Revolist
3
3
  */
4
4
  import { h as _SetCache, e as eq_1, _ as _getTag, d as isBuffer_1, j as _Stack, k as _stringToPath, f as isLength_1, i as isArguments_1 } from './_stringToPath.js';
5
- import { d as _root, f as _Symbol, a as isObjectLike_1, i as isObject_1 } from './isObject.js';
5
+ import { b as _root, f as _Symbol, i as isObjectLike_1, a as isObject_1 } from './isObject.js';
6
6
  import { a as isArray_1, k as keys_1, c as isTypedArray_1, b as _isIndex } from './keys.js';
7
7
  import { i as isSymbol_1 } from './isSymbol.js';
8
8
  import { _ as _arrayMap } from './consts.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { a as isObjectLike_1, _ as _baseGetTag, c as createCommonjsModule, d as _root, e as _freeGlobal, i as isObject_1 } from './isObject.js';
4
+ import { i as isObjectLike_1, _ as _baseGetTag, c as createCommonjsModule, b as _root, e as _freeGlobal, a as isObject_1 } from './isObject.js';
5
5
 
6
6
  /** `Object#toString` result references. */
7
7
  var argsTag$1 = '[object Arguments]';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { h } from '@stencil/core/internal/client';
5
5
  import { c as createStore, d as setStore, b as getVisibleSourceItem, g as getSourceItem, s as setSourceByVirtualIndex } from './data.store.js';
6
- import { G as GRID_INTERNALS, C as CELL_CLASS, D as DISABLED_CLASS } from './consts.js';
6
+ import { G as GRID_INTERNALS, i as CELL_CLASS, j as DISABLED_CLASS } from './consts.js';
7
7
  import { l as lodash } from './lodash.js';
8
8
 
9
9
  const GROUP_DEPTH = `${GRID_INTERNALS}-depth`;
@@ -45,6 +45,6 @@ const EDIT_INPUT_WR = 'edit-input-wrapper';
45
45
  const DRAGG_TEXT = 'Draggable item';
46
46
  const GRID_INTERNALS = '__rvgr';
47
47
 
48
- export { CELL_CLASS as C, DISABLED_CLASS as D, EDIT_INPUT_WR as E, FOCUS_CLASS as F, GRID_INTERNALS as G, HEADER_CLASS as H, MIN_COL_SIZE as M, RESIZE_INTERVAL as R, SELECTION_BORDER_CLASS as S, TMP_SELECTION_BG_CLASS as T, UUID as U, _arrayMap as _, DRAGGABLE_CLASS as a, DRAG_ICON_CLASS as b, DATA_COL as c, DATA_ROW as d, HEADER_SORTABLE_CLASS as e, HEADER_ROW_CLASS as f, HEADER_ACTUAL_ROW_CLASS as g, DRAGG_TEXT as h, CELL_HANDLER_CLASS as i, ROW_HEADER_TYPE as j };
48
+ export { CELL_HANDLER_CLASS as C, DRAGGABLE_CLASS as D, EDIT_INPUT_WR as E, FOCUS_CLASS as F, GRID_INTERNALS as G, HEADER_CLASS as H, MIN_COL_SIZE as M, RESIZE_INTERVAL as R, SELECTION_BORDER_CLASS as S, TMP_SELECTION_BG_CLASS as T, UUID as U, _arrayMap as _, DRAG_ICON_CLASS as a, DATA_COL as b, DATA_ROW as c, HEADER_SORTABLE_CLASS as d, HEADER_ROW_CLASS as e, HEADER_ACTUAL_ROW_CLASS as f, DRAGG_TEXT as g, ROW_HEADER_TYPE as h, CELL_CLASS as i, DISABLED_CLASS as j };
49
49
 
50
50
  //# sourceMappingURL=consts.js.map
@@ -6,7 +6,7 @@ import { t as toInteger_1, _ as _baseFindIndex, a as toFinite_1 } from './toInte
6
6
  import { _ as _baseIteratee } from './_baseIteratee.js';
7
7
  import { e as eq_1 } from './_stringToPath.js';
8
8
  import { i as isArrayLike_1, b as _isIndex } from './keys.js';
9
- import { i as isObject_1 } from './isObject.js';
9
+ import { a as isObject_1 } from './isObject.js';
10
10
 
11
11
  /* Built-in method references for those with the same name as other `lodash` methods. */
12
12
  var nativeMax$1 = Math.max;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { d as _root, i as isObject_1 } from './isObject.js';
4
+ import { b as _root, a as isObject_1 } from './isObject.js';
5
5
  import { t as toNumber_1 } from './toNumber.js';
6
6
 
7
7
  /**
@@ -1,3 +1,18 @@
1
+ /* RevoGrid custom elements */
2
+ export { RevoGridComponent as RevoGrid } from '../dist/types/components/revoGrid/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 { RevoEdit 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/selectionFocus/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/selectionTempRange/revogr-temp-range';
14
+ export { RevogrViewportScroll as RevogrViewportScroll } from '../dist/types/components/scroll/revogr-viewport-scroll';
15
+
1
16
  /**
2
17
  * Used to manually set the base path where assets can be found.
3
18
  * If the script is used as "module", it's recommended to use "import.meta.url",
@@ -25,3 +40,4 @@ export interface SetPlatformOptions {
25
40
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
26
41
  }
27
42
  export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
43
+ export * from '../dist/types';
@@ -3,7 +3,20 @@
3
3
  */
4
4
  import { setMode } from '@stencil/core/internal/client';
5
5
  export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
6
- import { T as ThemeService } from './themeService.js';
6
+ import { T as ThemeService } from './revo-grid.js';
7
+ export { RevoGrid, defineCustomElement as defineCustomElementRevoGrid } from './revo-grid.js';
8
+ export { RevogrClipboard, defineCustomElement as defineCustomElementRevogrClipboard } from './revogr-clipboard.js';
9
+ export { RevogrData, defineCustomElement as defineCustomElementRevogrData } from './revogr-data.js';
10
+ export { RevogrEdit, defineCustomElement as defineCustomElementRevogrEdit } from './revogr-edit.js';
11
+ export { RevogrFilterPanel, defineCustomElement as defineCustomElementRevogrFilterPanel } from './revogr-filter-panel.js';
12
+ export { RevogrFocus, defineCustomElement as defineCustomElementRevogrFocus } from './revogr-focus.js';
13
+ export { RevogrHeader, defineCustomElement as defineCustomElementRevogrHeader } from './revogr-header.js';
14
+ export { RevogrOrderEditor, defineCustomElement as defineCustomElementRevogrOrderEditor } from './revogr-order-editor.js';
15
+ export { RevogrOverlaySelection, defineCustomElement as defineCustomElementRevogrOverlaySelection } from './revogr-overlay-selection.js';
16
+ export { RevogrRowHeaders, defineCustomElement as defineCustomElementRevogrRowHeaders } from './revogr-row-headers.js';
17
+ export { RevogrScrollVirtual, defineCustomElement as defineCustomElementRevogrScrollVirtual } from './revogr-scroll-virtual.js';
18
+ export { RevogrTempRange, defineCustomElement as defineCustomElementRevogrTempRange } from './revogr-temp-range.js';
19
+ export { RevogrViewportScroll, defineCustomElement as defineCustomElementRevogrViewportScroll } from './revogr-viewport-scroll.js';
7
20
 
8
21
  setMode(elm => {
9
22
  let theme = elm.theme || elm.getAttribute('theme');
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;;;AAGA,OAAO,CAAC,GAAG;EACT,IAAI,KAAK,GAAwB;EACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;IAC7B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;GACtB;EAED;EACA,IAAI,WAAW,KAAK,KAAK,EAAE;IACzB,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE;GAC3B;EACD;AACF,CAAC,CAAC","names":[],"sources":["./src/global/global.ts"],"sourcesContent":["import { setMode } from '@stencil/core';\nimport ThemeService from '../themeManager/themeService';\n\nsetMode(elm => {\n let theme: string | undefined = (elm as any).theme || elm.getAttribute('theme');\n if (typeof theme === 'string') {\n theme = theme.trim();\n }\n\n const parsedTheme = ThemeService.getTheme(theme);\n if (parsedTheme !== theme) {\n elm.setAttribute('theme', parsedTheme);\n }\n return parsedTheme;\n});\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;AAGA,OAAO,CAAC,GAAG;EACT,IAAI,KAAK,GAAwB;EACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;IAC7B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;GACtB;EAED;EACA,IAAI,WAAW,KAAK,KAAK,EAAE;IACzB,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE;GAC3B;EACD;AACF,CAAC,CAAC","names":[],"sources":["./src/global/global.ts"],"sourcesContent":["import { setMode } from '@stencil/core';\nimport ThemeService from '../themeManager/themeService';\n\nsetMode(elm => {\n let theme: string | undefined = (elm as any).theme || elm.getAttribute('theme');\n if (typeof theme === 'string') {\n theme = theme.trim();\n }\n\n const parsedTheme = ThemeService.getTheme(theme);\n if (parsedTheme !== theme) {\n elm.setAttribute('theme', parsedTheme);\n }\n return parsedTheme;\n});\n"],"version":3}
@@ -190,6 +190,6 @@ function isObject(value) {
190
190
 
191
191
  var isObject_1 = isObject;
192
192
 
193
- export { _baseGetTag as _, isObjectLike_1 as a, commonjsGlobal as b, createCommonjsModule as c, _root as d, _freeGlobal as e, _Symbol as f, isObject_1 as i };
193
+ export { _baseGetTag as _, isObject_1 as a, _root as b, createCommonjsModule as c, commonjsGlobal as d, _freeGlobal as e, _Symbol as f, isObjectLike_1 as i };
194
194
 
195
195
  //# sourceMappingURL=isObject.js.map
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { a as isObjectLike_1, _ as _baseGetTag } from './isObject.js';
4
+ import { i as isObjectLike_1, _ as _baseGetTag } from './isObject.js';
5
5
 
6
6
  /** `Object#toString` result references. */
7
7
  var symbolTag = '[object Symbol]';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built by Revolist
3
3
  */
4
- import { c as createCommonjsModule, b as commonjsGlobal } from './isObject.js';
4
+ import { c as createCommonjsModule, d as commonjsGlobal } from './isObject.js';
5
5
 
6
6
  var lodash = createCommonjsModule(function (module, exports) {
7
7
  (function() {
@@ -10,7 +10,6 @@ import { f as findIndex_1, g as getSourceItem, a as getSourceItemVirtualIndexByP
10
10
  import { _ as _arrayMap, R as RESIZE_INTERVAL, U as UUID } from './consts.js';
11
11
  import { l as lodash } from './lodash.js';
12
12
  import { V as ViewportStore, c as calculateRowHeaderSize, d as defineCustomElement$5 } from './revogr-row-headers2.js';
13
- import { T as ThemeService } from './themeService.js';
14
13
  import { t as timeout, g as getScrollbarWidth } from './index2.js';
15
14
  import { F as FILTER_PROP, i as isFilterBtn } from './filter.button.js';
16
15
  import { _ as _getTag } from './_stringToPath.js';
@@ -27,6 +26,65 @@ import { d as defineCustomElement$6 } from './revogr-overlay-selection2.js';
27
26
  import { d as defineCustomElement$4 } from './revogr-scroll-virtual2.js';
28
27
  import { d as defineCustomElement$3 } from './revogr-temp-range2.js';
29
28
 
29
+ class ThemeCompact {
30
+ constructor() {
31
+ this.defaultRowSize = 32;
32
+ }
33
+ }
34
+
35
+ class ThemeDefault {
36
+ constructor() {
37
+ this.defaultRowSize = 27;
38
+ }
39
+ }
40
+
41
+ class ThemeMaterial {
42
+ constructor() {
43
+ this.defaultRowSize = 42;
44
+ }
45
+ }
46
+
47
+ const DEFAULT_THEME = 'default';
48
+ const allowedThemes = [DEFAULT_THEME, 'material', 'compact', 'darkMaterial', 'darkCompact'];
49
+ class ThemeService {
50
+ get theme() {
51
+ return this.currentTheme;
52
+ }
53
+ get rowSize() {
54
+ return this.customRowSize || this.currentTheme.defaultRowSize;
55
+ }
56
+ set rowSize(size) {
57
+ this.customRowSize = size;
58
+ }
59
+ constructor(cfg) {
60
+ this.customRowSize = 0;
61
+ this.customRowSize = cfg.rowSize;
62
+ this.register('default');
63
+ }
64
+ register(theme) {
65
+ const parsedTheme = ThemeService.getTheme(theme);
66
+ switch (parsedTheme) {
67
+ case 'material':
68
+ case 'darkMaterial':
69
+ this.currentTheme = new ThemeMaterial();
70
+ break;
71
+ case 'compact':
72
+ case 'darkCompact':
73
+ this.currentTheme = new ThemeCompact();
74
+ break;
75
+ default:
76
+ this.currentTheme = new ThemeDefault();
77
+ break;
78
+ }
79
+ }
80
+ static getTheme(theme) {
81
+ if (allowedThemes.indexOf(theme) > -1) {
82
+ return theme;
83
+ }
84
+ return DEFAULT_THEME;
85
+ }
86
+ }
87
+
30
88
  /**
31
89
  * Creates a `_.find` or `_.findLast` function.
32
90
  *
@@ -3487,7 +3545,6 @@ const RevoGridComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
3487
3545
  }
3488
3546
  }
3489
3547
  columnChanged(newVal = []) {
3490
- console.log('columns', newVal);
3491
3548
  // clear existing data
3492
3549
  this.dimensionProvider.drop();
3493
3550
  const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
@@ -3845,11 +3902,10 @@ function defineCustomElement$1() {
3845
3902
  break;
3846
3903
  } });
3847
3904
  }
3848
- defineCustomElement$1();
3849
3905
 
3850
3906
  const RevoGrid = RevoGridComponent;
3851
3907
  const defineCustomElement = defineCustomElement$1;
3852
3908
 
3853
- export { RevoGrid, defineCustomElement };
3909
+ export { RevoGrid, ThemeService as T, defineCustomElement };
3854
3910
 
3855
3911
  //# sourceMappingURL=revo-grid.js.map