jaxs 0.9.0 → 0.9.1
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/dist/jaxs.d.ts +54 -48
- package/dist/jaxs.js +312 -298
- package/dist/jaxs.umd.cjs +252 -241
- package/package.json +1 -1
package/dist/jaxs.d.ts
CHANGED
|
@@ -43,6 +43,16 @@ export declare namespace appBuilding {
|
|
|
43
43
|
export { App }
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export declare const ArrayModifiers: {
|
|
47
|
+
remove: <T>(originalCollection: T[], itemToRemove: T) => T[]
|
|
48
|
+
removeBy: <T>(
|
|
49
|
+
originalCollection: T[],
|
|
50
|
+
matcherFunction: (value: T) => boolean,
|
|
51
|
+
) => T[]
|
|
52
|
+
insertAt: <T>(originalCollection: T[], index: number, item: T) => T[]
|
|
53
|
+
appendIfUnique: <T>(originalCollection: T[], item: T) => T[]
|
|
54
|
+
}
|
|
55
|
+
|
|
46
56
|
declare type AttributeInstructionData = {
|
|
47
57
|
name: string
|
|
48
58
|
value: string
|
|
@@ -65,6 +75,15 @@ declare type BindParams<T, U> = {
|
|
|
65
75
|
|
|
66
76
|
declare type BindSubscriptionList = string[]
|
|
67
77
|
|
|
78
|
+
export declare const BooleanStore: {
|
|
79
|
+
toggle: (store: Store<boolean>) => void
|
|
80
|
+
setTrue: (store: Store<boolean>) => void
|
|
81
|
+
setFalse: (store: Store<boolean>) => void
|
|
82
|
+
reset: (store: Store<boolean>) => void
|
|
83
|
+
isTrue: (store: Store<boolean>) => boolean
|
|
84
|
+
isFalse: (store: Store<boolean>) => boolean
|
|
85
|
+
}
|
|
86
|
+
|
|
68
87
|
declare class Bound<ATTRIBUTES, STATE_MAP> {
|
|
69
88
|
Template: Template<ATTRIBUTES>
|
|
70
89
|
viewModel: ViewModel<ATTRIBUTES, STATE_MAP>
|
|
@@ -420,6 +439,23 @@ declare type ListenerKit<T> = {
|
|
|
420
439
|
payload: T
|
|
421
440
|
}
|
|
422
441
|
|
|
442
|
+
export declare const ListStore: {
|
|
443
|
+
push: <T>(store: Store<T[]>, element: T) => void
|
|
444
|
+
pop: <T>(store: Store<T[]>) => T
|
|
445
|
+
unshift: <T>(store: Store<T[]>, element: T) => void
|
|
446
|
+
shift: <T>(store: Store<T[]>) => T
|
|
447
|
+
sortBy: <T>(store: Store<T[]>, sorter: StoreListSorterFunction<T>) => void
|
|
448
|
+
insertAt: <T>(store: Store<T[]>, index: number, item: T) => void
|
|
449
|
+
remove: <T>(store: Store<T[]>, value: T) => void
|
|
450
|
+
removeBy: <T>(
|
|
451
|
+
store: Store<T[]>,
|
|
452
|
+
matcherFunction: (value: T) => boolean,
|
|
453
|
+
) => void
|
|
454
|
+
reset: <T>(store: Store<T[]>) => void
|
|
455
|
+
includes: <T>(store: Store<T[]>, value: T) => boolean
|
|
456
|
+
appendIfUnique: <T>(store: Store<T[]>, item: T) => void
|
|
457
|
+
}
|
|
458
|
+
|
|
423
459
|
declare const locationChangeEvent = 'navigation:location-change'
|
|
424
460
|
|
|
425
461
|
export declare namespace messageBus {
|
|
@@ -514,6 +550,18 @@ declare type ReactSourceObject = {
|
|
|
514
550
|
columnNumber: string
|
|
515
551
|
}
|
|
516
552
|
|
|
553
|
+
export declare const RecordStore: {
|
|
554
|
+
reset: <T>(store: Store<T>) => void
|
|
555
|
+
resetAttribute: <T>(store: Store<T>, name: keyof T) => void
|
|
556
|
+
updateAttribute: <T>(
|
|
557
|
+
store: Store<T>,
|
|
558
|
+
name: keyof T,
|
|
559
|
+
value: T[keyof T],
|
|
560
|
+
) => void
|
|
561
|
+
updateAttributes: <T>(store: Store<T>, values: Partial<T>) => void
|
|
562
|
+
attributeTruthy: <T>(store: Store<T>, name: keyof T) => boolean
|
|
563
|
+
}
|
|
564
|
+
|
|
517
565
|
declare type RemoveInstructionData = {
|
|
518
566
|
name: string
|
|
519
567
|
isSvg?: boolean
|
|
@@ -615,7 +663,7 @@ export declare class State {
|
|
|
615
663
|
}
|
|
616
664
|
|
|
617
665
|
export declare namespace state {
|
|
618
|
-
export { eventName, State, createState, Store
|
|
666
|
+
export { eventName, State, createState, Store }
|
|
619
667
|
}
|
|
620
668
|
|
|
621
669
|
declare type StateTransactionUpdater = (collection: StoresCollection) => void
|
|
@@ -667,6 +715,8 @@ declare class StoreUpdaterBoolean {
|
|
|
667
715
|
toggle(): void
|
|
668
716
|
setTrue(): void
|
|
669
717
|
setFalse(): void
|
|
718
|
+
isTrue(): boolean
|
|
719
|
+
isFalse(): boolean
|
|
670
720
|
}
|
|
671
721
|
|
|
672
722
|
declare class StoreUpdaterList<T> {
|
|
@@ -683,6 +733,8 @@ declare class StoreUpdaterList<T> {
|
|
|
683
733
|
insertAt(index: number, item: T): void
|
|
684
734
|
remove(value: T): void
|
|
685
735
|
removeBy(matcherFunction: (value: T) => boolean): void
|
|
736
|
+
includes(value: T): boolean
|
|
737
|
+
appendIfUnique(item: T): void
|
|
686
738
|
}
|
|
687
739
|
|
|
688
740
|
declare class StoreUpdaterObject<T extends object> {
|
|
@@ -697,6 +749,7 @@ declare class StoreUpdaterObject<T extends object> {
|
|
|
697
749
|
isValueType(key: keyof T, value: any): boolean
|
|
698
750
|
resetAttribute(name: keyof T): void
|
|
699
751
|
updateAttributes(values: Partial<T>): void
|
|
752
|
+
attributeTruthy(name: keyof T): boolean
|
|
700
753
|
}
|
|
701
754
|
|
|
702
755
|
declare type StoreUpdaterOrValue<T> = UpdaterValue<T> | StoreDataUpdater<T>
|
|
@@ -730,59 +783,12 @@ export declare type TypedTemplate<T> = (props: Props<T>) => Renderable
|
|
|
730
783
|
|
|
731
784
|
declare type Unsubscribe = () => void
|
|
732
785
|
|
|
733
|
-
export declare const Update: {
|
|
734
|
-
RecordStore: {
|
|
735
|
-
reset: <T>(store: Store<T>) => void
|
|
736
|
-
resetAttribute: <T>(store: Store<T>, name: keyof T) => void
|
|
737
|
-
updateAttribute: <T>(
|
|
738
|
-
store: Store<T>,
|
|
739
|
-
name: keyof T,
|
|
740
|
-
value: T[keyof T],
|
|
741
|
-
) => void
|
|
742
|
-
updateAttributes: <T>(store: Store<T>, values: Partial<T>) => void
|
|
743
|
-
}
|
|
744
|
-
BooleanStore: {
|
|
745
|
-
toggle: (store: Store<boolean>) => void
|
|
746
|
-
setTrue: (store: Store<boolean>) => void
|
|
747
|
-
setFalse: (store: Store<boolean>) => void
|
|
748
|
-
reset: (store: Store<boolean>) => void
|
|
749
|
-
}
|
|
750
|
-
ListStore: {
|
|
751
|
-
push: <T>(store: Store<T[]>, element: T) => void
|
|
752
|
-
pop: <T>(store: Store<T[]>) => T
|
|
753
|
-
unshift: <T>(store: Store<T[]>, element: T) => void
|
|
754
|
-
shift: <T>(store: Store<T[]>) => T
|
|
755
|
-
sortBy: <T>(store: Store<T[]>, sorter: StoreListSorterFunction<T>) => void
|
|
756
|
-
insertAt: <T>(store: Store<T[]>, index: number, item: T) => void
|
|
757
|
-
remove: <T>(store: Store<T[]>, value: T) => void
|
|
758
|
-
removeBy: <T>(
|
|
759
|
-
store: Store<T[]>,
|
|
760
|
-
matcherFunction: (value: T) => boolean,
|
|
761
|
-
) => void
|
|
762
|
-
reset: <T>(store: Store<T[]>) => void
|
|
763
|
-
}
|
|
764
|
-
ArrayModifiers: {
|
|
765
|
-
remove: <T>(originalCollection: T[], itemToRemove: T) => T[]
|
|
766
|
-
removeBy: <T>(
|
|
767
|
-
originalCollection: T[],
|
|
768
|
-
matcherFunction: (value: T) => boolean,
|
|
769
|
-
) => T[]
|
|
770
|
-
insertAt: <T>(originalCollection: T[], index: number, item: T) => T[]
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
786
|
declare type UpdateEventInstructionData = {
|
|
775
787
|
name: string
|
|
776
788
|
sourceValue: EventListener
|
|
777
789
|
targetValue: EventListener
|
|
778
790
|
}
|
|
779
791
|
|
|
780
|
-
declare const updaters: {
|
|
781
|
-
object: <T extends Object>(store: Store<T>) => StoreUpdaterObject<T>
|
|
782
|
-
list: <T>(store: Store<T[]>) => StoreUpdaterList<T>
|
|
783
|
-
boolean: (store: Store<boolean>) => StoreUpdaterBoolean
|
|
784
|
-
}
|
|
785
|
-
|
|
786
792
|
declare type UpdaterValue<T> = boolean | T | T[]
|
|
787
793
|
|
|
788
794
|
declare type ViewModel<ATTRIBUTES, STORE_MAP> = (
|