@neovici/cosmoz-utils 6.9.0 → 6.10.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,2 +1 @@
1
1
  export * from './cz-spinner';
2
- export * from './cz-icon';
@@ -1,2 +1 @@
1
1
  export * from './cz-spinner';
2
- export * from './cz-icon';
@@ -6,6 +6,7 @@ export declare function constant(): () => undefined;
6
6
  export declare function constant<T>(v: T): () => T;
7
7
  export declare const constTrue: () => true, constUndefined: () => undefined, noop: () => undefined, identity: <T>(obj: T) => T, or: <A, F extends OrFn<A>>(...fns: F[]) => (...args: A[]) => boolean;
8
8
  export declare const once: <A extends Arr, R, F extends OnceFn<A, R> = OnceFn<A, R>>(fn: F, check?: OnceCheckFn<A>) => (...args: A) => any;
9
- export declare function invoke<A, R, F extends (...args: A[]) => R>(fn: F, ...args: A[]): ReturnType<F>;
10
- export declare function invoke<F>(fn: F, ...args: unknown[]): F;
9
+ export type InvokedType<T> = T extends (...args: any[]) => infer R ? R : T;
10
+ export type InvokedParameters<F> = F extends (...args: infer A) => any ? A : never;
11
+ export declare function invoke<F>(fn: F, ...args: InvokedParameters<F>): InvokedType<F>;
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "6.9.0",
3
+ "version": "6.10.0",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",
@@ -1,8 +0,0 @@
1
- import { svg } from 'lit-html';
2
- interface Ico {
3
- icon?: ReturnType<typeof svg>;
4
- width?: number;
5
- height?: number;
6
- }
7
- export declare const arrowDropDown: import("lit-html").TemplateResult<2>, cancel: import("lit-html").TemplateResult<2>, check: import("lit-html").TemplateResult<2>, clear: import("lit-html").TemplateResult<2>, warning: import("lit-html").TemplateResult<2>, undo: import("lit-html").TemplateResult<2>, edit: import("lit-html").TemplateResult<2>, rightArrow: import("lit-html").TemplateResult<2>, leftArrow: import("lit-html").TemplateResult<2>, download: import("lit-html").TemplateResult<2>, print: import("lit-html").TemplateResult<2>, renderIcon: ({ icon, width, height }?: Ico) => import("lit-html").TemplateResult<1>;
8
- export {};
@@ -1,15 +0,0 @@
1
- import { html, svg } from 'lit-html';
2
- import { ifDefined } from 'lit-html/directives/if-defined.js';
3
- import { component } from '@pionjs/pion';
4
- export const arrowDropDown = svg `<path d="M7 10l5 5 5-5z"></path>`, cancel = svg `<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path>`, check = svg `<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path>`, clear = svg `<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>`, warning = svg `<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" fill="currentColor"></path>`, undo = svg `<path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path>`, edit = svg `<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path>`, rightArrow = svg `<path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" fill="currentColor"></path>`, leftArrow = svg `<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" fill="currentColor"></path>`, download = svg `<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" fill="currentColor"></path>`, print = svg `<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z" fill="currentColor"></path>`, renderIcon = ({ icon, width = 24, height } = {}) => html `<svg
5
- viewBox="0 0 24 24"
6
- preserveAspectRatio="xMidYMid meet"
7
- focusable="false"
8
- width=${width}
9
- height=${ifDefined(height)}
10
- >
11
- ${icon}
12
- </svg>`;
13
- customElements.define('cz-icon', component(renderIcon, {
14
- observedAttributes: ['width', 'height'],
15
- }));