@neovici/cosmoz-omnitable 12.7.1 → 12.7.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.
@@ -8,7 +8,7 @@ import {
8
8
  html, nothing
9
9
  } from 'lit-html';
10
10
  import { get } from '@polymer/polymer/lib/utils/path';
11
- import { memooize } from './lib/memoize';
11
+ import { memooize } from '@neovici/cosmoz-utils/memoize';
12
12
 
13
13
  const
14
14
  computeValue = (value, source) =>
@@ -1,5 +1,5 @@
1
1
  import { useEffect, useLayoutEffect, useState } from 'haunted';
2
- import { memooize } from './memoize';
2
+ import { memooize } from '@neovici/cosmoz-utils/memoize';
3
3
 
4
4
  const columnSymbol = Symbol('column'),
5
5
  verifyColumnSetup = (columns) => {
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { get } from '@polymer/polymer/lib/utils/path';
3
- import { memoooize } from './memoize';
3
+ import { memoooize } from '@neovici/cosmoz-utils/memoize';
4
4
 
5
5
  export const
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "12.7.1",
3
+ "version": "12.7.2",
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"
@@ -67,7 +67,7 @@
67
67
  "@neovici/cosmoz-grouped-list": "^6.0.0",
68
68
  "@neovici/cosmoz-i18next": "^3.1.1",
69
69
  "@neovici/cosmoz-router": "^10.0.0",
70
- "@neovici/cosmoz-utils": "^5.0.0",
70
+ "@neovici/cosmoz-utils": "^5.12.1",
71
71
  "@neovici/nullxlsx": "^3.0.0",
72
72
  "@polymer/iron-icon": "^3.0.0",
73
73
  "@polymer/iron-icons": "^3.0.0",
package/lib/memoize.js DELETED
@@ -1,54 +0,0 @@
1
- export const
2
- memoize = fn => {
3
- let
4
- lastArg,
5
- lastResult;
6
- return function (arg) {
7
- if (lastArg === arg) {
8
- return lastResult;
9
- }
10
-
11
- const result = fn(arg);
12
- lastResult = result;
13
- lastArg = arg;
14
- return result;
15
- };
16
- },
17
-
18
- memooize = fn => {
19
- let
20
- lastArg1,
21
- lastArg2,
22
- lastResult;
23
- return function (arg1, arg2) {
24
- if (lastArg1 === arg1 && lastArg2 === arg2) {
25
- return lastResult;
26
- }
27
-
28
- const result = fn(arg1, arg2);
29
- lastResult = result;
30
- lastArg1 = arg1;
31
- lastArg2 = arg2;
32
- return result;
33
- };
34
- },
35
-
36
- memoooize = fn => {
37
- let
38
- lastArg1,
39
- lastArg2,
40
- lastArg3,
41
- lastResult;
42
- return function (arg1, arg2, arg3) {
43
- if (lastArg1 === arg1 && lastArg2 === arg2 && lastArg3 === arg3) {
44
- return lastResult;
45
- }
46
-
47
- const result = fn(arg1, arg2, arg3);
48
- lastResult = result;
49
- lastArg1 = arg1;
50
- lastArg2 = arg2;
51
- lastArg3 = arg3;
52
- return result;
53
- };
54
- };