@fluffjs/fluff 0.2.2 → 0.2.4
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 +1 -1
- package/{src/runtime → runtime}/FluffBase.d.ts +1 -0
- package/{src/runtime → runtime}/FluffBase.js +20 -5
- package/runtime/tests/createPropertyUnwrapNativeTestComponents.d.ts +4 -0
- package/runtime/tests/createPropertyUnwrapNativeTestComponents.js +23 -0
- package/{src/runtime → runtime}/tests/typeguards.d.ts +21 -0
- package/runtime/tests/typeguards.js +66 -0
- package/src/runtime/tests/typeguards.js +0 -18
- /package/{src/decorators → decorators}/Component.d.ts +0 -0
- /package/{src/decorators → decorators}/Component.js +0 -0
- /package/{src/decorators → decorators}/HostBinding.d.ts +0 -0
- /package/{src/decorators → decorators}/HostBinding.js +0 -0
- /package/{src/decorators → decorators}/HostListener.d.ts +0 -0
- /package/{src/decorators → decorators}/HostListener.js +0 -0
- /package/{src/decorators → decorators}/Input.d.ts +0 -0
- /package/{src/decorators → decorators}/Input.js +0 -0
- /package/{src/decorators → decorators}/InputOutputHelper.d.ts +0 -0
- /package/{src/decorators → decorators}/InputOutputHelper.js +0 -0
- /package/{src/decorators → decorators}/LinkedProperty.d.ts +0 -0
- /package/{src/decorators → decorators}/LinkedProperty.js +0 -0
- /package/{src/decorators → decorators}/MetadataArrayHelper.d.ts +0 -0
- /package/{src/decorators → decorators}/MetadataArrayHelper.js +0 -0
- /package/{src/decorators → decorators}/Output.d.ts +0 -0
- /package/{src/decorators → decorators}/Output.js +0 -0
- /package/{src/decorators → decorators}/Pipe.d.ts +0 -0
- /package/{src/decorators → decorators}/Pipe.js +0 -0
- /package/{src/decorators → decorators}/Reactive.d.ts +0 -0
- /package/{src/decorators → decorators}/Reactive.js +0 -0
- /package/{src/decorators → decorators}/ViewChild.d.ts +0 -0
- /package/{src/decorators → decorators}/ViewChild.js +0 -0
- /package/{src/decorators → decorators}/Watch.d.ts +0 -0
- /package/{src/decorators → decorators}/Watch.js +0 -0
- /package/{src/enums → enums}/Direction.d.ts +0 -0
- /package/{src/enums → enums}/Direction.js +0 -0
- /package/{src/index.d.ts → index.d.ts} +0 -0
- /package/{src/index.js → index.js} +0 -0
- /package/{src/interfaces → interfaces}/BreakMarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/BreakMarkerConfig.js +0 -0
- /package/{src/interfaces → interfaces}/FluffHostElement.d.ts +0 -0
- /package/{src/interfaces → interfaces}/FluffHostElement.js +0 -0
- /package/{src/interfaces → interfaces}/ForMarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/ForMarkerConfig.js +0 -0
- /package/{src/interfaces → interfaces}/IfMarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/IfMarkerConfig.js +0 -0
- /package/{src/interfaces → interfaces}/MarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/MarkerConfig.js +0 -0
- /package/{src/interfaces → interfaces}/OnDestroy.d.ts +0 -0
- /package/{src/interfaces → interfaces}/OnDestroy.js +0 -0
- /package/{src/interfaces → interfaces}/OnInit.d.ts +0 -0
- /package/{src/interfaces → interfaces}/OnInit.js +0 -0
- /package/{src/interfaces → interfaces}/PropertyChain.d.ts +0 -0
- /package/{src/interfaces → interfaces}/PropertyChain.js +0 -0
- /package/{src/interfaces → interfaces}/RenderContext.d.ts +0 -0
- /package/{src/interfaces → interfaces}/RenderContext.js +0 -0
- /package/{src/interfaces → interfaces}/Subscription.d.ts +0 -0
- /package/{src/interfaces → interfaces}/Subscription.js +0 -0
- /package/{src/interfaces → interfaces}/SwitchMarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/SwitchMarkerConfig.js +0 -0
- /package/{src/interfaces → interfaces}/TextMarkerConfig.d.ts +0 -0
- /package/{src/interfaces → interfaces}/TextMarkerConfig.js +0 -0
- /package/{src/runtime → runtime}/BreakController.d.ts +0 -0
- /package/{src/runtime → runtime}/BreakController.js +0 -0
- /package/{src/runtime → runtime}/FluffElement.d.ts +0 -0
- /package/{src/runtime → runtime}/FluffElement.js +0 -0
- /package/{src/runtime → runtime}/FluffElementImpl.d.ts +0 -0
- /package/{src/runtime → runtime}/FluffElementImpl.js +0 -0
- /package/{src/runtime → runtime}/FluffMarkers.d.ts +0 -0
- /package/{src/runtime → runtime}/FluffMarkers.js +0 -0
- /package/{src/runtime → runtime}/ForController.d.ts +0 -0
- /package/{src/runtime → runtime}/ForController.js +0 -0
- /package/{src/runtime → runtime}/IfController.d.ts +0 -0
- /package/{src/runtime → runtime}/IfController.js +0 -0
- /package/{src/runtime → runtime}/MarkerConfigGuards.d.ts +0 -0
- /package/{src/runtime → runtime}/MarkerConfigGuards.js +0 -0
- /package/{src/runtime → runtime}/MarkerController.d.ts +0 -0
- /package/{src/runtime → runtime}/MarkerController.js +0 -0
- /package/{src/runtime → runtime}/MarkerManager.d.ts +0 -0
- /package/{src/runtime → runtime}/MarkerManager.js +0 -0
- /package/{src/runtime → runtime}/MarkerManagerInterface.d.ts +0 -0
- /package/{src/runtime → runtime}/MarkerManagerInterface.js +0 -0
- /package/{src/runtime → runtime}/ScopeRegistry.d.ts +0 -0
- /package/{src/runtime → runtime}/ScopeRegistry.js +0 -0
- /package/{src/runtime → runtime}/SwitchController.d.ts +0 -0
- /package/{src/runtime → runtime}/SwitchController.js +0 -0
- /package/{src/runtime → runtime}/TextController.d.ts +0 -0
- /package/{src/runtime → runtime}/TextController.js +0 -0
- /package/{src/runtime → runtime}/tests/DirectOutputChild.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/DirectOutputChild.js +0 -0
- /package/{src/runtime → runtime}/tests/DirectOutputParent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/DirectOutputParent.js +0 -0
- /package/{src/runtime → runtime}/tests/TaskStats.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TaskStats.js +0 -0
- /package/{src/runtime → runtime}/tests/TestChildTasksListComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestChildTasksListComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestDirectChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestDirectChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestDirectParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestDirectParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForReinsertBindsInputParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForReinsertBindsInputParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForTextMarkerCollisionNoTrackParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForTextMarkerCollisionNoTrackParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForTextMarkerCollisionParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForTextMarkerCollisionParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestForUnsubscribeNestedParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestForUnsubscribeNestedParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestGetterReactivityComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestGetterReactivityComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestIfReinsertBindsInputChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestIfReinsertBindsInputChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestIfReinsertBindsInputParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestIfReinsertBindsInputParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestIfUnsubscribeNestedParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestIfUnsubscribeNestedParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestInterpolationNestedPropertyComponentBase.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestInterpolationNestedPropertyComponentBase.js +0 -0
- /package/{src/runtime → runtime}/tests/TestInterpolationNestedPropertyContainerClass.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestInterpolationNestedPropertyContainerClass.js +0 -0
- /package/{src/runtime → runtime}/tests/TestLateDefineForChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestLateDefineForChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestLateDefineForComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestLateDefineForComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestNullInputTextComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestNullInputTextComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestOutputBindingChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestOutputBindingChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestOutputBindingParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestOutputBindingParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestParentBindsTasksComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestParentBindsTasksComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyBindingPipeChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyBindingPipeChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyBindingPipeParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyBindingPipeParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapContainerClass.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapContainerClass.js +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestPropertyUnwrapParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchReinsertBindsInputChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchReinsertBindsInputChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchReinsertBindsInputParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchReinsertBindsInputParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchUnsubscribeNestedParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestSwitchUnsubscribeNestedParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestTemplateNestedMarkersComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestTemplateNestedMarkersComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedGrandchildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedGrandchildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedParentBaseComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestUnsubscribeNestedParentBaseComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyChildComponent2.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyChildComponent2.js +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyContainerClass.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyContainerClass.js +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyParentComponent2.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/TestWatchNestedPropertyParentComponent2.js +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapTestComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPipeUnwrapTestComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPropBindChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPropBindChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPropBindParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPropBindParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPropertyBindingPipeChildComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPropertyBindingPipeChildComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createPropertyBindingPipeParentComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createPropertyBindingPipeParentComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationNestedPropertyComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationNestedPropertyComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationPipeComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationPipeComponent.js +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationPipeWithArgsComponent.d.ts +0 -0
- /package/{src/runtime → runtime}/tests/createTestInterpolationPipeWithArgsComponent.js +0 -0
- /package/{src/utils → utils}/DomUtils.d.ts +0 -0
- /package/{src/utils → utils}/DomUtils.js +0 -0
- /package/{src/utils → utils}/Property.d.ts +0 -0
- /package/{src/utils → utils}/Property.js +0 -0
- /package/{src/utils → utils}/Publisher.d.ts +0 -0
- /package/{src/utils → utils}/Publisher.js +0 -0
package/package.json
CHANGED
|
@@ -42,6 +42,7 @@ export declare abstract class FluffBase extends HTMLElement {
|
|
|
42
42
|
private __subscribeToNestedChain;
|
|
43
43
|
protected __getReactivePropFromScope(propName: string, scope: Scope): Property<unknown> | undefined;
|
|
44
44
|
protected __setChildProperty(el: Element, propName: string, value: unknown): void;
|
|
45
|
+
private __unwrap;
|
|
45
46
|
private __applyPropertyBindingWithScope;
|
|
46
47
|
private __applyEventBindingWithScope;
|
|
47
48
|
private __applyOutputBinding;
|
|
@@ -156,7 +156,13 @@ export class FluffBase extends HTMLElement {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
else if (
|
|
159
|
+
else if (first in scope.locals) {
|
|
160
|
+
const localValue = scope.locals[first];
|
|
161
|
+
if (localValue !== null && localValue !== undefined && rest.length > 0) {
|
|
162
|
+
this.__subscribeToNestedChain(localValue, rest, callback, addSub);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (!(first in scope.host)) {
|
|
160
166
|
console.warn(`Binding dependency "${first}" not found on component ${scope.host.constructor.name}`);
|
|
161
167
|
}
|
|
162
168
|
}
|
|
@@ -220,12 +226,21 @@ export class FluffBase extends HTMLElement {
|
|
|
220
226
|
if (prop instanceof Property) {
|
|
221
227
|
prop.setValue(value, true);
|
|
222
228
|
}
|
|
223
|
-
else if (
|
|
229
|
+
else if (el instanceof FluffBase) {
|
|
224
230
|
Reflect.set(el, propName, value);
|
|
225
231
|
}
|
|
232
|
+
else if (propName in el && el instanceof HTMLElement) {
|
|
233
|
+
Reflect.set(el, propName, this.__unwrap(value));
|
|
234
|
+
}
|
|
226
235
|
else {
|
|
227
|
-
el.setAttribute(propName, String(value));
|
|
236
|
+
el.setAttribute(propName, String(this.__unwrap(value)));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
__unwrap(value) {
|
|
240
|
+
if (value instanceof Property) {
|
|
241
|
+
return value.getValue();
|
|
228
242
|
}
|
|
243
|
+
return value;
|
|
229
244
|
}
|
|
230
245
|
__applyPropertyBindingWithScope(el, binding, scope, subscriptions) {
|
|
231
246
|
const tagName = el.tagName.toLowerCase();
|
|
@@ -343,7 +358,7 @@ export class FluffBase extends HTMLElement {
|
|
|
343
358
|
throw new Error(`Class binding for ${binding.n} is missing exprId`);
|
|
344
359
|
}
|
|
345
360
|
const fn = this.__getCompiledExprFn(binding.e);
|
|
346
|
-
const value = fn(this, scope.locals);
|
|
361
|
+
const value = this.__unwrap(fn(this, scope.locals));
|
|
347
362
|
if (value) {
|
|
348
363
|
el.classList.add(binding.n);
|
|
349
364
|
}
|
|
@@ -365,7 +380,7 @@ export class FluffBase extends HTMLElement {
|
|
|
365
380
|
throw new Error(`Style binding for ${binding.n} is missing exprId`);
|
|
366
381
|
}
|
|
367
382
|
const fn = this.__getCompiledExprFn(binding.e);
|
|
368
|
-
const value = fn(this, scope.locals);
|
|
383
|
+
const value = this.__unwrap(fn(this, scope.locals));
|
|
369
384
|
if (this.__hasStyle(el)) {
|
|
370
385
|
el.style.setProperty(binding.n, String(value));
|
|
371
386
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function createClassBindingTestComponent(): CustomElementConstructor;
|
|
2
|
+
export declare function createStyleBindingTestComponent(): CustomElementConstructor;
|
|
3
|
+
export declare function createPropertyBindingTestComponent(): CustomElementConstructor;
|
|
4
|
+
export declare function createAttributeBindingTestComponent(): CustomElementConstructor;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FluffElement } from '../FluffElement.js';
|
|
2
|
+
function createTestComponent(html) {
|
|
3
|
+
return class extends FluffElement {
|
|
4
|
+
__render() {
|
|
5
|
+
this.__getShadowRoot().innerHTML = html;
|
|
6
|
+
}
|
|
7
|
+
__setupBindings() {
|
|
8
|
+
this.__processBindings();
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function createClassBindingTestComponent() {
|
|
13
|
+
return createTestComponent('<div data-lid="l0">test</div>');
|
|
14
|
+
}
|
|
15
|
+
export function createStyleBindingTestComponent() {
|
|
16
|
+
return createTestComponent('<div data-lid="l0">test</div>');
|
|
17
|
+
}
|
|
18
|
+
export function createPropertyBindingTestComponent() {
|
|
19
|
+
return createTestComponent('<button data-lid="l0">test</button>');
|
|
20
|
+
}
|
|
21
|
+
export function createAttributeBindingTestComponent() {
|
|
22
|
+
return createTestComponent('<div data-lid="l0">test</div>');
|
|
23
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Property } from '../../utils/Property.js';
|
|
1
2
|
import type { TestLateDefineForColumn } from './TestLateDefineForComponent.js';
|
|
2
3
|
import type { TestTask } from './TestNullInputTextComponent.js';
|
|
3
4
|
export declare function hasItem(t: unknown): t is {
|
|
@@ -18,3 +19,23 @@ export declare function hasValue(t: unknown): t is {
|
|
|
18
19
|
export declare function hasTaskId(e: unknown): e is {
|
|
19
20
|
taskId: number;
|
|
20
21
|
};
|
|
22
|
+
export declare function hasItemSelected(obj: unknown): obj is {
|
|
23
|
+
item: {
|
|
24
|
+
selected: Property<boolean>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare function hasItemColor(obj: unknown): obj is {
|
|
28
|
+
item: {
|
|
29
|
+
color: Property<string>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare function hasItemDisabled(obj: unknown): obj is {
|
|
33
|
+
item: {
|
|
34
|
+
disabled: Property<boolean>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare function hasItemValue(obj: unknown): obj is {
|
|
38
|
+
item: {
|
|
39
|
+
value: Property<string>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function hasItem(t) {
|
|
2
|
+
return t !== null && typeof t === 'object' && 'item' in t;
|
|
3
|
+
}
|
|
4
|
+
export function hasItemName(t) {
|
|
5
|
+
return t !== null && typeof t === 'object' && 'itemName' in t && typeof t.itemName === 'string';
|
|
6
|
+
}
|
|
7
|
+
export function hasTask(t) {
|
|
8
|
+
return t !== null && typeof t === 'object' && 'task' in t;
|
|
9
|
+
}
|
|
10
|
+
export function isLateDefineForColumn(l) {
|
|
11
|
+
return l !== null && typeof l === 'object' && 'column' in l;
|
|
12
|
+
}
|
|
13
|
+
export function hasValue(t) {
|
|
14
|
+
return t !== null && typeof t === 'object' && 'value' in t && typeof t.value === 'string';
|
|
15
|
+
}
|
|
16
|
+
export function hasTaskId(e) {
|
|
17
|
+
return e !== null && typeof e === 'object' && 'taskId' in e && typeof e.taskId === 'number';
|
|
18
|
+
}
|
|
19
|
+
export function hasItemSelected(obj) {
|
|
20
|
+
if (obj === null || typeof obj !== 'object')
|
|
21
|
+
return false;
|
|
22
|
+
if (!('item' in obj))
|
|
23
|
+
return false;
|
|
24
|
+
const { item } = obj;
|
|
25
|
+
if (item === null || typeof item !== 'object')
|
|
26
|
+
return false;
|
|
27
|
+
if (!('selected' in item))
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function hasItemColor(obj) {
|
|
32
|
+
if (obj === null || typeof obj !== 'object')
|
|
33
|
+
return false;
|
|
34
|
+
if (!('item' in obj))
|
|
35
|
+
return false;
|
|
36
|
+
const { item } = obj;
|
|
37
|
+
if (item === null || typeof item !== 'object')
|
|
38
|
+
return false;
|
|
39
|
+
if (!('color' in item))
|
|
40
|
+
return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
export function hasItemDisabled(obj) {
|
|
44
|
+
if (obj === null || typeof obj !== 'object')
|
|
45
|
+
return false;
|
|
46
|
+
if (!('item' in obj))
|
|
47
|
+
return false;
|
|
48
|
+
const { item } = obj;
|
|
49
|
+
if (item === null || typeof item !== 'object')
|
|
50
|
+
return false;
|
|
51
|
+
if (!('disabled' in item))
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
export function hasItemValue(obj) {
|
|
56
|
+
if (obj === null || typeof obj !== 'object')
|
|
57
|
+
return false;
|
|
58
|
+
if (!('item' in obj))
|
|
59
|
+
return false;
|
|
60
|
+
const { item } = obj;
|
|
61
|
+
if (item === null || typeof item !== 'object')
|
|
62
|
+
return false;
|
|
63
|
+
if (!('value' in item))
|
|
64
|
+
return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function hasItem(t) {
|
|
2
|
-
return t !== null && typeof t === 'object' && 'item' in t;
|
|
3
|
-
}
|
|
4
|
-
export function hasItemName(t) {
|
|
5
|
-
return t !== null && typeof t === 'object' && 'itemName' in t && typeof t.itemName === 'string';
|
|
6
|
-
}
|
|
7
|
-
export function hasTask(t) {
|
|
8
|
-
return t !== null && typeof t === 'object' && 'task' in t;
|
|
9
|
-
}
|
|
10
|
-
export function isLateDefineForColumn(l) {
|
|
11
|
-
return l !== null && typeof l === 'object' && 'column' in l;
|
|
12
|
-
}
|
|
13
|
-
export function hasValue(t) {
|
|
14
|
-
return t !== null && typeof t === 'object' && 'value' in t && typeof t.value === 'string';
|
|
15
|
-
}
|
|
16
|
-
export function hasTaskId(e) {
|
|
17
|
-
return e !== null && typeof e === 'object' && 'taskId' in e && typeof e.taskId === 'number';
|
|
18
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src/runtime → runtime}/tests/TestForTextMarkerCollisionNoTrackParentComponent.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|