@neovici/cosmoz-omnitable 12.28.0 → 13.0.0

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,4 +1,4 @@
1
- import { component } from 'haunted';
1
+ import { component } from '@pionjs/pion';
2
2
  import { nothing } from 'lit-html';
3
3
 
4
4
  const GroupRow = ({ column, item, selected, folded, group }) => {
@@ -1,4 +1,4 @@
1
- import { html, component } from 'haunted';
1
+ import { html, component } from '@pionjs/pion';
2
2
  import { repeat } from 'lit-html/directives/repeat.js';
3
3
  import './lib/cosmoz-omnitable-resize-nub';
4
4
  import { render } from './lib/settings/cosmoz-omnitable-sort-group';
@@ -1,4 +1,4 @@
1
- import { component, html } from 'haunted';
1
+ import { component, html } from '@pionjs/pion';
2
2
 
3
3
  const OmnitableItemExpandLine = ({ column }) => html`
4
4
  <style>
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable object-curly-newline */
2
- import { component, useEffect } from 'haunted';
2
+ import { component, useEffect } from '@pionjs/pion';
3
3
  import { html, nothing } from 'lit-html';
4
4
  import './cosmoz-omnitable-item-expand-line';
5
5
  import { notifyResize } from './lib/utils';
@@ -1,4 +1,4 @@
1
- import { component, html } from 'haunted';
1
+ import { component, html } from '@pionjs/pion';
2
2
  import { repeat } from 'lit-html/directives/repeat.js';
3
3
 
4
4
  const
@@ -21,7 +21,7 @@ import { html } from 'lit-html';
21
21
  import { guard } from 'lit-html/directives/guard.js';
22
22
 
23
23
  import { useOmnitable } from './lib/use-omnitable';
24
- import { component } from 'haunted';
24
+ import { component } from '@pionjs/pion';
25
25
  import { renderHeader } from './lib/render-header';
26
26
  import { renderFooter } from './lib/render-footer';
27
27
  import { renderList } from './lib/render-list';
@@ -1,4 +1,4 @@
1
- import { html } from 'haunted';
1
+ import { html } from '@pionjs/pion';
2
2
  import { layout } from './layout';
3
3
 
4
4
  const
@@ -1,4 +1,4 @@
1
- import { useEffect, component } from 'haunted';
1
+ import { useEffect, component } from '@pionjs/pion';
2
2
  import { nothing } from 'lit-html';
3
3
 
4
4
  const
@@ -1,4 +1,4 @@
1
- import { html, component } from 'haunted';
1
+ import { html, component } from '@pionjs/pion';
2
2
  import { _ } from '@neovici/cosmoz-i18next';
3
3
  import { isEmpty } from '@neovici/cosmoz-utils/template';
4
4
  import { defaultPlacement } from '@neovici/cosmoz-dropdown';
@@ -1,4 +1,4 @@
1
- import { html } from 'haunted';
1
+ import { html } from '@pionjs/pion';
2
2
  import { ifDefined } from 'lit-html/directives/if-defined.js';
3
3
  import { triangle } from '../icons';
4
4
 
@@ -1,4 +1,4 @@
1
- import { createContext, useContext, useMemo } from 'haunted';
1
+ import { createContext, useContext, useMemo } from '@pionjs/pion';
2
2
  import local from './local';
3
3
 
4
4
  export const DriverContext = createContext(local),
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useState } from 'haunted';
1
+ import { useCallback, useEffect, useState } from '@pionjs/pion';
2
2
  import { normalizeStore } from './normalize';
3
3
  import { useDriver } from './drivers';
4
4
 
@@ -1,4 +1,4 @@
1
- import { useCallback } from 'haunted';
1
+ import { useCallback } from '@pionjs/pion';
2
2
  import { useMeta } from '@neovici/cosmoz-utils/hooks/use-meta';
3
3
 
4
4
  const parseIndex = (str) => {
@@ -1,4 +1,4 @@
1
- import { useMemo, useState, useRef, useCallback } from 'haunted';
1
+ import { useMemo, useState, useRef, useCallback } from '@pionjs/pion';
2
2
 
3
3
  import useSavedSettings from './use-saved-settings';
4
4
  import normalize, { sgProps } from './normalize';
@@ -1,4 +1,4 @@
1
- import { useState } from 'haunted';
1
+ import { useState } from '@pionjs/pion';
2
2
  import { useTrackSize } from './use-track-size';
3
3
 
4
4
  export const useCanvasWidth = host => {
@@ -1,4 +1,4 @@
1
- import { useEffect, useLayoutEffect, useState } from 'haunted';
1
+ import { useEffect, useLayoutEffect, useState } from '@pionjs/pion';
2
2
  import { memooize } from '@neovici/cosmoz-utils/memoize';
3
3
 
4
4
  const columnSymbol = Symbol('column'),
@@ -1,4 +1,4 @@
1
- import { useLayoutEffect, useMemo } from 'haunted';
1
+ import { useLayoutEffect, useMemo } from '@pionjs/pion';
2
2
  import { toCss } from './compute-layout';
3
3
  import { useResizableColumns } from './use-resizable-columns';
4
4
  import { useCanvasWidth } from './use-canvas-width';
@@ -1,4 +1,4 @@
1
- import { useCallback, useState } from 'haunted';
1
+ import { useCallback, useState } from '@pionjs/pion';
2
2
  import { navigate } from '@neovici/cosmoz-router';
3
3
  import { identity, invoke } from '@neovici/cosmoz-utils/function';
4
4
 
package/lib/use-header.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable max-lines-per-function */
2
- import { useEffect, useMemo } from 'haunted';
2
+ import { useEffect, useMemo } from '@pionjs/pion';
3
3
 
4
4
  export const useHeader = ({
5
5
  host,
package/lib/use-layout.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useMemo } from 'haunted';
1
+ import { useMemo } from '@pionjs/pion';
2
2
  import { computeLayout } from './compute-layout';
3
3
 
4
4
  export const useLayout = ({ canvasWidth, groupOnColumn, config }) => useMemo(() => {
package/lib/use-list.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable max-lines-per-function */
2
- import { html, useCallback, useEffect, useMemo, useRef } from 'haunted';
2
+ import { html, useCallback, useEffect, useMemo, useRef } from '@pionjs/pion';
3
3
  import { indexSymbol } from './utils';
4
4
  import { isEmpty } from '@neovici/cosmoz-utils/template';
5
5
  import { onItemChange as _onItemChange } from './utils-data';
@@ -29,6 +29,7 @@ const _getGroupRowClasses = (folded) =>
29
29
  <input
30
30
  class="checkbox"
31
31
  type="checkbox"
32
+ part="checkbox"
32
33
  .checked=${selected}
33
34
  .dataItem=${item}
34
35
  @input=${onCheckboxChange}
@@ -157,7 +158,7 @@ export const useList = ({
157
158
  item: e.currentTarget.dataItem,
158
159
  index: e.currentTarget.dataIndex,
159
160
  },
160
- })
161
+ }),
161
162
  );
162
163
  }, []);
163
164
 
@@ -169,7 +170,7 @@ export const useList = ({
169
170
  const { groupOnColumn } = sortAndGroupOptions,
170
171
  onItemChange = useCallback(
171
172
  (column, item) => (value) => _onItemChange(host, column, item, value),
172
- []
173
+ [],
173
174
  );
174
175
 
175
176
  return {
@@ -201,7 +202,7 @@ export const useList = ({
201
202
  dataIsValid,
202
203
  groupOnColumn,
203
204
  onItemChange,
204
- ]
205
+ ],
205
206
  ),
206
207
  renderGroup: useMemo(
207
208
  () =>
@@ -210,7 +211,7 @@ export const useList = ({
210
211
  dataIsValid,
211
212
  groupOnColumn,
212
213
  }),
213
- [onCheckboxChange, dataIsValid, groupOnColumn]
214
+ [onCheckboxChange, dataIsValid, groupOnColumn],
214
215
  ),
215
216
  };
216
217
  };
@@ -1,4 +1,4 @@
1
- import { useState } from 'haunted';
1
+ import { useState } from '@pionjs/pion';
2
2
  import { useProcessedItems } from './use-processed-items';
3
3
  import { useFastLayout } from './use-fast-layout';
4
4
  import { useSettings } from './settings';
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useMemo } from 'haunted';
1
+ import { useCallback, useEffect, useMemo } from '@pionjs/pion';
2
2
  import { invoke } from '@neovici/cosmoz-utils/function';
3
3
  import { genericSorter } from './generic-sorter';
4
4
  import { columnSymbol } from './use-dom-columns';
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable max-lines-per-function */
2
2
  import { useImperativeApi } from '@neovici/cosmoz-utils/hooks/use-imperative-api';
3
- import { useEffect, useMemo } from 'haunted';
3
+ import { useEffect, useMemo } from '@pionjs/pion';
4
4
  import { useNotifyProperty } from '@neovici/cosmoz-utils/hooks/use-notify-property';
5
5
 
6
6
  const mkNapi = (host) => {
@@ -1,4 +1,4 @@
1
- import { useEffect, useRef } from 'haunted';
1
+ import { useEffect, useRef } from '@pionjs/pion';
2
2
 
3
3
  export const useResizableColumns = ({
4
4
  host,
@@ -5,7 +5,7 @@ import {
5
5
  useContext,
6
6
  useCallback,
7
7
  useEffect,
8
- } from 'haunted';
8
+ } from '@pionjs/pion';
9
9
  import { useHashState } from './use-hash-state';
10
10
 
11
11
  const parseBool = (bool) => [true, 'true', 1, 'yes', 'on'].includes(bool),
@@ -16,7 +16,7 @@ const parseBool = (bool) => [true, 'true', 1, 'yes', 'on'].includes(bool),
16
16
  setter(value);
17
17
  setSettings((s) => ({ ...s, [name]: value }));
18
18
  },
19
- [setter, name, setSettings]
19
+ [setter, name, setSettings],
20
20
  );
21
21
 
22
22
  // eslint-disable-next-line max-lines-per-function
@@ -25,7 +25,7 @@ export const useSortAndGroupOptions = (
25
25
  hashParam,
26
26
  settings,
27
27
  setSettings,
28
- resetRef
28
+ resetRef,
29
29
  ) => {
30
30
  const [sortOn, setSortOn] = useHashState(settings.sortOn, hashParam, {
31
31
  suffix: '-sortOn',
@@ -36,7 +36,7 @@ export const useSortAndGroupOptions = (
36
36
  {
37
37
  suffix: '-descending',
38
38
  read: boolParam,
39
- }
39
+ },
40
40
  ),
41
41
  [groupOn, setGroupOn] = useHashState(settings.groupOn, hashParam, {
42
42
  suffix: '-groupOn',
@@ -44,15 +44,15 @@ export const useSortAndGroupOptions = (
44
44
  [groupOnDescending, setGroupOnDescending] = useHashState(
45
45
  settings.groupOnDescending,
46
46
  hashParam,
47
- { suffix: '-groupOnDescending', read: boolParam }
47
+ { suffix: '-groupOnDescending', read: boolParam },
48
48
  ),
49
49
  sortOnColumn = useMemo(
50
50
  () => columns.find((column) => column.name === sortOn),
51
- [columns, sortOn]
51
+ [columns, sortOn],
52
52
  ),
53
53
  groupOnColumn = useMemo(
54
54
  () => columns.find((column) => column.name === groupOn),
55
- [columns, groupOn]
55
+ [columns, groupOn],
56
56
  ),
57
57
  sortAndGroup_ = {
58
58
  groupOn,
@@ -61,7 +61,7 @@ export const useSortAndGroupOptions = (
61
61
  setGroupOnDescending: useSettingsState(
62
62
  setGroupOnDescending,
63
63
  'groupOnDescending',
64
- setSettings
64
+ setSettings,
65
65
  ),
66
66
 
67
67
  sortOn,
@@ -70,7 +70,7 @@ export const useSortAndGroupOptions = (
70
70
  setDescending: useSettingsState(
71
71
  setDescending,
72
72
  'descending',
73
- setSettings
73
+ setSettings,
74
74
  ),
75
75
 
76
76
  columns,
@@ -100,5 +100,5 @@ customElements.define(
100
100
  'sort-and-group-consumer',
101
101
  component(({ render }) => render(useContext(SortAndGroupContext)), {
102
102
  useShadowDOM: false,
103
- })
103
+ }),
104
104
  );
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'haunted';
1
+ import { useEffect } from '@pionjs/pion';
2
2
 
3
3
  export const useTrackSize = (host, setCanvasWidth) =>
4
4
  useEffect(() => {
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useRef, useState } from 'haunted';
1
+ import { useCallback, useEffect, useRef, useState } from '@pionjs/pion';
2
2
 
3
3
  export const isCloseEnough = (a = 0, b = 0) => Math.abs(a - b) < 0.1,
4
4
  // eslint-disable-next-line max-lines-per-function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "12.28.0",
3
+ "version": "13.0.0",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"
@@ -59,17 +59,18 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@neovici/cosmoz-autocomplete": "^6.0.0 || ^7.0.0",
63
- "@neovici/cosmoz-bottom-bar": "^6.0.0",
62
+ "@neovici/cosmoz-autocomplete": "^8.0.0",
63
+ "@neovici/cosmoz-bottom-bar": "^7.0.0",
64
64
  "@neovici/cosmoz-collapse": "^1.1.0",
65
- "@neovici/cosmoz-datetime-input": "^3.0.3",
66
- "@neovici/cosmoz-dropdown": "^3.0.0",
67
- "@neovici/cosmoz-grouped-list": "^6.0.0",
65
+ "@neovici/cosmoz-datetime-input": "^4.0.0",
66
+ "@neovici/cosmoz-dropdown": "^4.0.0",
67
+ "@neovici/cosmoz-grouped-list": "^7.0.0",
68
68
  "@neovici/cosmoz-i18next": "^3.1.1",
69
- "@neovici/cosmoz-input": "^3.15.0",
70
- "@neovici/cosmoz-router": "^10.0.0",
71
- "@neovici/cosmoz-utils": "^5.16.0",
69
+ "@neovici/cosmoz-input": "^4.0.0",
70
+ "@neovici/cosmoz-router": "^11.0.0",
71
+ "@neovici/cosmoz-utils": "^6.0.0",
72
72
  "@neovici/nullxlsx": "^3.0.0",
73
+ "@pionjs/pion": "^2.0.0",
73
74
  "@polymer/iron-icon": "^3.0.0",
74
75
  "@polymer/iron-icons": "^3.0.0",
75
76
  "@polymer/paper-dropdown-menu": "^3.2.0",
@@ -77,15 +78,14 @@
77
78
  "@polymer/paper-spinner": "^3.0.0",
78
79
  "@polymer/polymer": "^3.3.0",
79
80
  "file-saver-es": "^2.0.0",
80
- "haunted": "^5.0.0",
81
- "lit-html": "^2.0.0"
81
+ "lit-html": "^2.0.0 || ^3.0.0"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@commitlint/cli": "^18.0.0",
85
85
  "@commitlint/config-conventional": "^18.0.0",
86
86
  "@neovici/cfg": "^1.18.0",
87
- "@neovici/cosmoz-viewinfo": "^3.1.0",
88
- "@open-wc/testing": "^3.0.0",
87
+ "@neovici/cosmoz-viewinfo": "^4.0.0",
88
+ "@open-wc/testing": "^4.0.0",
89
89
  "@polymer/iron-test-helpers": "^3.0.0",
90
90
  "@polymer/paper-button": "^3.0.0",
91
91
  "@polymer/paper-item": "^3.0.0",
@@ -1,5 +1,5 @@
1
1
  import { tagged as css } from '@neovici/cosmoz-utils';
2
- import { html, component } from 'haunted';
2
+ import { html, component } from '@pionjs/pion';
3
3
 
4
4
  const styles = css`
5
5
  :host {