@reactive-web-components/rwc 2.51.7 → 2.51.9
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.
- package/package.json +32 -5
- package/main.d.ts +0 -0
- package/reactive-web-component.C6ivwJzW.js +0 -916
- package/reactive-web-component.D9B4LRRS.umd.cjs +0 -2
- package/shared/constants/constants.d.ts +0 -2
- package/shared/index.d.ts +0 -2
- package/shared/types/base-element.d.ts +0 -1
- package/shared/types/element.d.ts +0 -191
- package/shared/types/index.d.ts +0 -3
- package/shared/types/list.type.d.ts +0 -7
- package/shared/utils/helpers.d.ts +0 -7
- package/shared/utils/html-decorators/html-property.d.ts +0 -6
- package/shared/utils/html-decorators/index.d.ts +0 -1
- package/shared/utils/html-elements/__tests__/element.test.d.ts +0 -1
- package/shared/utils/html-elements/base-element.d.ts +0 -33
- package/shared/utils/html-elements/custom-element.d.ts +0 -11
- package/shared/utils/html-elements/element-helper.d.ts +0 -21
- package/shared/utils/html-elements/element.d.ts +0 -84
- package/shared/utils/html-elements/index.d.ts +0 -4
- package/shared/utils/html-fabric/custom-fabric.d.ts +0 -3
- package/shared/utils/html-fabric/fabric.d.ts +0 -67
- package/shared/utils/html-fabric/fn-component.d.ts +0 -5
- package/shared/utils/html-fabric/index.d.ts +0 -3
- package/shared/utils/index.d.ts +0 -5
- package/shared/utils/routing/router.d.ts +0 -10
- package/shared/utils/signal/helpers.types.d.ts +0 -3
- package/shared/utils/signal/index.d.ts +0 -3
- package/shared/utils/signal/signal.d.ts +0 -18
- package/shared/utils/signal/signal.type.d.ts +0 -18
- package/shared/utils/signal/utils.d.ts +0 -10
- package/test-components/examples/button/button.d.ts +0 -12
- package/test-components/examples/counter.d.ts +0 -15
- package/test-components/examples/test-list/dynamic-items-test.d.ts +0 -17
- package/test-components/examples/test-list/example.list.d.ts +0 -26
- package/test-components/examples/useCustomComponent.d.ts +0 -21
- package/test-components/examples/when.d.ts +0 -6
- package/test-components/tab-bar.d.ts +0 -23
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UnwrapPromise } from './helpers.types';
|
|
2
|
-
export interface SignalUpdateFunc<T> {
|
|
3
|
-
(v: Readonly<T>): T;
|
|
4
|
-
}
|
|
5
|
-
export type CompareFn<T> = (oldValue: T, newValue: T) => boolean;
|
|
6
|
-
export interface ReactiveSignal<T> {
|
|
7
|
-
(): T;
|
|
8
|
-
oldValue: Readonly<T>;
|
|
9
|
-
initValue: Readonly<T>;
|
|
10
|
-
set(value: T): void;
|
|
11
|
-
forceSet(value: T): void;
|
|
12
|
-
setCompareFn(compareFn: CompareFn<T>): ReactiveSignal<T>;
|
|
13
|
-
update(cb: SignalUpdateFunc<T>): void;
|
|
14
|
-
clearSubscribers(): void;
|
|
15
|
-
peek(): Readonly<T>;
|
|
16
|
-
pipe<R>(fn: (sg: T) => R): ReactiveSignal<R extends Promise<any> ? UnwrapPromise<R> : UnwrapSignal<R>>;
|
|
17
|
-
}
|
|
18
|
-
export type UnwrapSignal<T> = T extends ReactiveSignal<infer U> ? U : T;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReactiveSignal, UnwrapSignal } from './signal.type';
|
|
2
|
-
/**
|
|
3
|
-
* Универсальная функция для двустороннего связывания двух реактивных сигналов из rwc
|
|
4
|
-
* @param signalA Первый сигнал
|
|
5
|
-
* @param signalB Второй сигнал
|
|
6
|
-
*/
|
|
7
|
-
export declare function bindReactiveSignals<T>(signalA: ReactiveSignal<T>, signalB: ReactiveSignal<T>): void;
|
|
8
|
-
export declare function forkJoin<T extends readonly ReactiveSignal<unknown>[]>(...signals: T): ReactiveSignal<{
|
|
9
|
-
[K in keyof T]: UnwrapSignal<T[K]>;
|
|
10
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ChildrenContent } from '../../../shared/types';
|
|
2
|
-
import { BaseElement } from '../../../shared/utils/html-elements';
|
|
3
|
-
export declare class Button extends BaseElement {
|
|
4
|
-
static styles: string;
|
|
5
|
-
render(): import('../../../shared/types').ComponentConfig<HTMLButtonElement>;
|
|
6
|
-
}
|
|
7
|
-
export declare const ButtonComp: (config?: ChildrenContent<Button> | import('../../../shared/types').ComponentInitConfig<Button> | undefined, ...content: ChildrenContent<Button>[]) => import('../../../shared/types').CustomComponentConfig<Button>;
|
|
8
|
-
export declare const buttonCompTest: (...content: ChildrenContent<HTMLElement>[]) => import('../../../shared/types').ComponentConfig<HTMLButtonElement>;
|
|
9
|
-
export declare class ButtonTest extends BaseElement {
|
|
10
|
-
static styles: string;
|
|
11
|
-
render(): import('../../../shared/types').ComponentConfig<HTMLDivElement>;
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '../../shared/utils';
|
|
2
|
-
declare class Counter extends BaseElement {
|
|
3
|
-
countState: import('../../shared/utils').ReactiveSignal<number>;
|
|
4
|
-
countChange: import('../../shared').EventEmitter<number>;
|
|
5
|
-
testProperty: import('../../shared/utils').ReactiveSignal<number>;
|
|
6
|
-
position: import('../../shared/utils').ReactiveSignal<"bottom" | "top">;
|
|
7
|
-
rootStyle: Promise<typeof import("*?inline")>;
|
|
8
|
-
render(): import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
9
|
-
}
|
|
10
|
-
export declare const CounterComponent: (config?: import('../../shared').ChildrenContent<Counter> | import('../../shared').ComponentInitConfig<Counter> | undefined, ...content: import('../../shared').ChildrenContent<Counter>[]) => import('../../shared').CustomComponentConfig<Counter>;
|
|
11
|
-
declare class TestCounter extends BaseElement {
|
|
12
|
-
render(): import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
13
|
-
}
|
|
14
|
-
export declare const TestComponent: (config?: import('../../shared').ChildrenContent<TestCounter> | import('../../shared').ComponentInitConfig<TestCounter> | undefined, ...content: import('../../shared').ChildrenContent<TestCounter>[]) => import('../../shared').CustomComponentConfig<TestCounter>;
|
|
15
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '../../../shared/utils';
|
|
2
|
-
export declare class DynamicItemsTestComponent extends BaseElement {
|
|
3
|
-
items: import('../../../shared/utils').ReactiveSignal<{
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
}[]>;
|
|
7
|
-
test: import('../../../shared/utils').ReactiveSignal<number>;
|
|
8
|
-
render(): import('../../../shared').ComponentConfig<HTMLDivElement>;
|
|
9
|
-
}
|
|
10
|
-
export declare const DynamicItemsTest: (config?: import('../../../shared').ChildrenContent<DynamicItemsTestComponent> | import('../../../shared').ComponentInitConfig<DynamicItemsTestComponent> | undefined, ...content: import('../../../shared').ChildrenContent<DynamicItemsTestComponent>[]) => import('../../../shared').CustomComponentConfig<DynamicItemsTestComponent>;
|
|
11
|
-
export declare class DynamicTestDemo extends BaseElement {
|
|
12
|
-
items: import('../../../shared/utils').ReactiveSignal<{
|
|
13
|
-
id: number;
|
|
14
|
-
name: string;
|
|
15
|
-
}[]>;
|
|
16
|
-
render(): import('../../../shared').ComponentConfig<HTMLDivElement>;
|
|
17
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentConfig } from '../../../shared/types';
|
|
2
|
-
import { BaseElement } from '../../../shared/utils';
|
|
3
|
-
export declare class ExampleListComponent extends BaseElement {
|
|
4
|
-
slotContext: {
|
|
5
|
-
item: import('../../../shared/utils').ReactiveSignal<{
|
|
6
|
-
id: number;
|
|
7
|
-
name: string;
|
|
8
|
-
} | null>;
|
|
9
|
-
};
|
|
10
|
-
slotTemplate: Partial<{
|
|
11
|
-
item: (slotCtx: {
|
|
12
|
-
id: number;
|
|
13
|
-
name: string;
|
|
14
|
-
}) => ComponentConfig<any> | null;
|
|
15
|
-
indexTemplate: (slotCtx: number) => ComponentConfig<any>;
|
|
16
|
-
}>;
|
|
17
|
-
items: import('../../../shared/utils').ReactiveSignal<{
|
|
18
|
-
id: number;
|
|
19
|
-
name: string;
|
|
20
|
-
}[]>;
|
|
21
|
-
testEvent: import('../../../shared/types').EventEmitter<void>;
|
|
22
|
-
render(): ComponentConfig<HTMLDivElement>;
|
|
23
|
-
}
|
|
24
|
-
export declare class ExampleListTest extends BaseElement {
|
|
25
|
-
render(): ComponentConfig<HTMLDivElement>;
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '../../shared/utils/html-elements/base-element';
|
|
2
|
-
declare class CounterComponent extends BaseElement {
|
|
3
|
-
count: import('../../shared').ReactiveSignal<number>;
|
|
4
|
-
onCountChange: Event;
|
|
5
|
-
increment(): void;
|
|
6
|
-
render(): import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
7
|
-
}
|
|
8
|
-
export declare const Counter: (config?: import('../../shared').ChildrenContent<CounterComponent> | import('../../shared').ComponentInitConfig<CounterComponent> | undefined, ...content: import('../../shared').ChildrenContent<CounterComponent>[]) => import('../../shared').CustomComponentConfig<CounterComponent>;
|
|
9
|
-
declare class UserCardComponent extends BaseElement {
|
|
10
|
-
name: import('../../shared').ReactiveSignal<string>;
|
|
11
|
-
age: import('../../shared').ReactiveSignal<number>;
|
|
12
|
-
render(): import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
13
|
-
}
|
|
14
|
-
export declare const UserCard: (config?: import('../../shared').ChildrenContent<UserCardComponent> | import('../../shared').ComponentInitConfig<UserCardComponent> | undefined, ...content: import('../../shared').ChildrenContent<UserCardComponent>[]) => import('../../shared').CustomComponentConfig<UserCardComponent>;
|
|
15
|
-
declare class SecretComponent extends BaseElement {
|
|
16
|
-
message: import('../../shared').ReactiveSignal<string>;
|
|
17
|
-
render(): import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
18
|
-
}
|
|
19
|
-
export declare const Secret: (config?: import('../../shared').ChildrenContent<SecretComponent> | import('../../shared').ComponentInitConfig<SecretComponent> | undefined, ...content: import('../../shared').ChildrenContent<SecretComponent>[]) => import('../../shared').CustomComponentConfig<SecretComponent>;
|
|
20
|
-
export declare const Examples: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
21
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const StaticWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
2
|
-
export declare const ReactiveWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
3
|
-
export declare const FunctionWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
4
|
-
export declare const NestedWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
5
|
-
export declare const SingleContentWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
6
|
-
export declare const ArrayContentWhenExample: () => import('../../shared').ComponentConfig<HTMLDivElement>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '../shared/utils/html-elements';
|
|
2
|
-
export declare class TabBar extends BaseElement {
|
|
3
|
-
rootStyle: Promise<typeof import("*?inline")>[];
|
|
4
|
-
activeTab: import('../shared/utils').ReactiveSignal<number>;
|
|
5
|
-
testEvent: import('../shared').EventEmitter<number>;
|
|
6
|
-
testInject: import('../shared/utils').ReactiveSignal<string | null>;
|
|
7
|
-
connectedCallback(): void;
|
|
8
|
-
render(): import('../shared').ComponentConfig<HTMLDivElement>;
|
|
9
|
-
}
|
|
10
|
-
export declare const TabBarComp: (config?: import('../shared').ChildrenContent<TabBar> | import('../shared').ComponentInitConfig<TabBar> | undefined, ...content: import('../shared').ChildrenContent<TabBar>[]) => import('../shared').CustomComponentConfig<TabBar>;
|
|
11
|
-
export declare class TabBarTestItem extends BaseElement {
|
|
12
|
-
render(): import('../shared').ComponentConfig<HTMLDivElement>;
|
|
13
|
-
}
|
|
14
|
-
export declare const TabBarTestItemComp: (config?: import('../shared').ChildrenContent<TabBarTestItem> | import('../shared').ComponentInitConfig<TabBarTestItem> | undefined, ...content: import('../shared').ChildrenContent<TabBarTestItem>[]) => import('../shared').CustomComponentConfig<TabBarTestItem>;
|
|
15
|
-
export declare class TabBarTest extends BaseElement {
|
|
16
|
-
activeTabNumber: import('../shared/utils').ReactiveSignal<number>;
|
|
17
|
-
items: import('../shared/utils').ReactiveSignal<string[]>;
|
|
18
|
-
providers: {
|
|
19
|
-
testProvider: import('../shared/utils').ReactiveSignal<string>;
|
|
20
|
-
};
|
|
21
|
-
render(): import('../shared').ComponentConfig<HTMLDivElement>;
|
|
22
|
-
}
|
|
23
|
-
export declare const TabBarTestComp: (config?: import('../shared').ChildrenContent<TabBarTest> | import('../shared').ComponentInitConfig<TabBarTest> | undefined, ...content: import('../shared').ChildrenContent<TabBarTest>[]) => import('../shared').CustomComponentConfig<TabBarTest>;
|