grainjs 0.1.0 → 1.0.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.
- package/README.md +54 -9
- package/dist/cjs/index.d.ts +6 -2
- package/dist/cjs/index.js +24 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/PriorityQueue.d.ts +1 -1
- package/dist/cjs/lib/PriorityQueue.js +1 -0
- package/dist/cjs/lib/PriorityQueue.js.map +1 -1
- package/dist/cjs/lib/_computed_queue.d.ts +18 -0
- package/dist/cjs/lib/_computed_queue.js +6 -1
- package/dist/cjs/lib/_computed_queue.js.map +1 -1
- package/dist/cjs/lib/binding.d.ts +16 -10
- package/dist/cjs/lib/binding.js +22 -27
- package/dist/cjs/lib/binding.js.map +1 -1
- package/dist/cjs/lib/browserGlobals.d.ts +4 -1
- package/dist/cjs/lib/browserGlobals.js +2 -0
- package/dist/cjs/lib/browserGlobals.js.map +1 -1
- package/dist/cjs/lib/computed.d.ts +11 -7
- package/dist/cjs/lib/computed.js +16 -0
- package/dist/cjs/lib/computed.js.map +1 -1
- package/dist/cjs/lib/dispose.d.ts +106 -14
- package/dist/cjs/lib/dispose.js +76 -11
- package/dist/cjs/lib/dispose.js.map +1 -1
- package/dist/cjs/lib/dom.d.ts +21 -17
- package/dist/cjs/lib/dom.js +33 -26
- package/dist/cjs/lib/dom.js.map +1 -1
- package/dist/cjs/lib/domComponent.d.ts +71 -0
- package/dist/cjs/lib/domComponent.js +15 -0
- package/dist/cjs/lib/domComponent.js.map +1 -0
- package/dist/cjs/lib/domComputed.d.ts +89 -0
- package/dist/cjs/lib/domComputed.js +92 -0
- package/dist/cjs/lib/domComputed.js.map +1 -0
- package/dist/cjs/lib/{_domDispose.d.ts → domDispose.d.ts} +12 -2
- package/dist/cjs/lib/{_domDispose.js → domDispose.js} +21 -8
- package/dist/cjs/lib/domDispose.js.map +1 -0
- package/dist/cjs/lib/{_domForEach.d.ts → domForEach.d.ts} +2 -2
- package/dist/cjs/lib/domForEach.js +72 -0
- package/dist/cjs/lib/domForEach.js.map +1 -0
- package/dist/cjs/lib/{_domImpl.d.ts → domImpl.d.ts} +15 -12
- package/dist/cjs/lib/{_domImpl.js → domImpl.js} +23 -6
- package/dist/cjs/lib/domImpl.js.map +1 -0
- package/dist/cjs/lib/{_domMethods.d.ts → domMethods.d.ts} +27 -62
- package/dist/cjs/lib/{_domMethods.js → domMethods.js} +21 -76
- package/dist/cjs/lib/domMethods.js.map +1 -0
- package/dist/cjs/lib/domevent.d.ts +32 -21
- package/dist/cjs/lib/domevent.js +33 -12
- package/dist/cjs/lib/domevent.js.map +1 -1
- package/dist/cjs/lib/emit.d.ts +25 -2
- package/dist/cjs/lib/emit.js +3 -1
- package/dist/cjs/lib/emit.js.map +1 -1
- package/dist/cjs/lib/kowrap.d.ts +45 -3
- package/dist/cjs/lib/kowrap.js +93 -10
- package/dist/cjs/lib/kowrap.js.map +1 -1
- package/dist/cjs/lib/obsArray.d.ts +8 -8
- package/dist/cjs/lib/obsArray.js +1 -0
- package/dist/cjs/lib/obsArray.js.map +1 -1
- package/dist/cjs/lib/observable.d.ts +6 -1
- package/dist/cjs/lib/observable.js +11 -2
- package/dist/cjs/lib/observable.js.map +1 -1
- package/dist/cjs/lib/pureComputed.d.ts +3 -3
- package/dist/cjs/lib/pureComputed.js +2 -1
- package/dist/cjs/lib/pureComputed.js.map +1 -1
- package/dist/cjs/lib/styled.d.ts +76 -11
- package/dist/cjs/lib/styled.js +55 -23
- package/dist/cjs/lib/styled.js.map +1 -1
- package/dist/cjs/lib/subscribe.d.ts +15 -6
- package/dist/cjs/lib/subscribe.js +6 -2
- package/dist/cjs/lib/subscribe.js.map +1 -1
- package/dist/cjs/lib/util.js +1 -0
- package/dist/cjs/lib/util.js.map +1 -1
- package/dist/cjs/lib/widgets/input.d.ts +2 -2
- package/dist/cjs/lib/widgets/input.js +2 -2
- package/dist/cjs/lib/widgets/input.js.map +1 -1
- package/dist/cjs/lib/widgets/select.d.ts +1 -1
- package/dist/cjs/lib/widgets/select.js +1 -0
- package/dist/cjs/lib/widgets/select.js.map +1 -1
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/PriorityQueue.js.map +1 -1
- package/dist/esm/lib/_computed_queue.js +5 -1
- package/dist/esm/lib/_computed_queue.js.map +1 -1
- package/dist/esm/lib/binding.js +20 -27
- package/dist/esm/lib/binding.js.map +1 -1
- package/dist/esm/lib/browserGlobals.js +1 -0
- package/dist/esm/lib/browserGlobals.js.map +1 -1
- package/dist/esm/lib/computed.js +15 -0
- package/dist/esm/lib/computed.js.map +1 -1
- package/dist/esm/lib/dispose.js +74 -11
- package/dist/esm/lib/dispose.js.map +1 -1
- package/dist/esm/lib/dom.js +21 -17
- package/dist/esm/lib/dom.js.map +1 -1
- package/dist/esm/lib/domComponent.js +11 -0
- package/dist/esm/lib/domComponent.js.map +1 -0
- package/dist/esm/lib/domComputed.js +84 -0
- package/dist/esm/lib/domComputed.js.map +1 -0
- package/dist/esm/lib/{_domDispose.js → domDispose.js} +19 -8
- package/dist/esm/lib/domDispose.js.map +1 -0
- package/dist/esm/lib/domForEach.js +68 -0
- package/dist/esm/lib/domForEach.js.map +1 -0
- package/dist/esm/lib/{_domImpl.js → domImpl.js} +20 -4
- package/dist/esm/lib/domImpl.js.map +1 -0
- package/dist/esm/lib/{_domMethods.js → domMethods.js} +8 -63
- package/dist/esm/lib/domMethods.js.map +1 -0
- package/dist/esm/lib/domevent.js +30 -11
- package/dist/esm/lib/domevent.js.map +1 -1
- package/dist/esm/lib/emit.js +2 -1
- package/dist/esm/lib/emit.js.map +1 -1
- package/dist/esm/lib/kowrap.js +90 -10
- package/dist/esm/lib/kowrap.js.map +1 -1
- package/dist/esm/lib/obsArray.js.map +1 -1
- package/dist/esm/lib/observable.js +9 -1
- package/dist/esm/lib/observable.js.map +1 -1
- package/dist/esm/lib/pureComputed.js +1 -1
- package/dist/esm/lib/pureComputed.js.map +1 -1
- package/dist/esm/lib/styled.js +52 -22
- package/dist/esm/lib/styled.js.map +1 -1
- package/dist/esm/lib/subscribe.js +5 -2
- package/dist/esm/lib/subscribe.js.map +1 -1
- package/dist/esm/lib/util.js.map +1 -1
- package/dist/esm/lib/widgets/input.js +1 -2
- package/dist/esm/lib/widgets/input.js.map +1 -1
- package/dist/esm/lib/widgets/select.js.map +1 -1
- package/dist/grain-full.debug.js +1627 -1222
- package/dist/grain-full.min.js +1 -1
- package/dist/grain-full.min.js.map +1 -1
- package/index.ts +6 -2
- package/lib/_computed_queue.ts +7 -1
- package/lib/binding.ts +33 -28
- package/lib/browserGlobals.ts +3 -1
- package/lib/computed.ts +37 -7
- package/lib/dispose.ts +81 -33
- package/lib/dom.ts +24 -18
- package/lib/domComponent.ts +89 -0
- package/lib/domComputed.ts +146 -0
- package/lib/{_domDispose.ts → domDispose.ts} +26 -8
- package/lib/{_domForEach.ts → domForEach.ts} +12 -11
- package/lib/{_domImpl.ts → domImpl.ts} +36 -30
- package/lib/{_domMethods.ts → domMethods.ts} +33 -103
- package/lib/domevent.ts +59 -22
- package/lib/emit.ts +2 -1
- package/lib/kowrap.ts +109 -11
- package/lib/obsArray.ts +2 -2
- package/lib/observable.ts +10 -2
- package/lib/pureComputed.ts +7 -6
- package/lib/styled.ts +65 -39
- package/lib/subscribe.ts +24 -8
- package/lib/widgets/input.ts +9 -7
- package/lib/widgets/select.ts +3 -3
- package/package.json +41 -42
- package/dist/cjs/lib/_domComponent.d.ts +0 -84
- package/dist/cjs/lib/_domComponent.js +0 -160
- package/dist/cjs/lib/_domComponent.js.map +0 -1
- package/dist/cjs/lib/_domDispose.js.map +0 -1
- package/dist/cjs/lib/_domForEach.js +0 -71
- package/dist/cjs/lib/_domForEach.js.map +0 -1
- package/dist/cjs/lib/_domImpl.js.map +0 -1
- package/dist/cjs/lib/_domMethods.js.map +0 -1
- package/dist/esm/lib/_domComponent.js +0 -155
- package/dist/esm/lib/_domComponent.js.map +0 -1
- package/dist/esm/lib/_domDispose.js.map +0 -1
- package/dist/esm/lib/_domForEach.js +0 -68
- package/dist/esm/lib/_domForEach.js.map +0 -1
- package/dist/esm/lib/_domImpl.js.map +0 -1
- package/dist/esm/lib/_domMethods.js.map +0 -1
- package/lib/_domComponent.ts +0 -167
package/lib/widgets/input.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* General INPUT widget.
|
|
3
3
|
*/
|
|
4
|
-
import {bundleChanges, dom,
|
|
4
|
+
import {bundleChanges, dom, IDomArgs, Observable, subscribe} from '../../index';
|
|
5
5
|
|
|
6
6
|
export interface IInputOptions {
|
|
7
7
|
onInput?: boolean; // If set, update the observable on every keystroke.
|
|
@@ -27,11 +27,13 @@ export interface IInputOptions {
|
|
|
27
27
|
* input(obs, {isValid: isValidObs}, {type: 'email', placeholder: 'Your email...'});
|
|
28
28
|
* input(obs, {onInput: true}, {type: 'text'});
|
|
29
29
|
*/
|
|
30
|
-
export function input(
|
|
30
|
+
export function input(
|
|
31
|
+
obs: Observable<string>, options: IInputOptions, ...args: IDomArgs<HTMLInputElement>
|
|
32
|
+
): HTMLInputElement {
|
|
33
|
+
|
|
31
34
|
const isValid = options.isValid;
|
|
32
35
|
|
|
33
|
-
function setValue(
|
|
34
|
-
const elem = _elem as HTMLInputElement;
|
|
36
|
+
function setValue(elem: HTMLInputElement) {
|
|
35
37
|
bundleChanges(() => {
|
|
36
38
|
obs.set(elem.value);
|
|
37
39
|
if (isValid) { isValid.set(elem.validity.valid); }
|
|
@@ -41,11 +43,11 @@ export function input(obs: Observable<string>, options: IInputOptions, ...args:
|
|
|
41
43
|
return dom('input', ...args,
|
|
42
44
|
dom.prop('value', obs),
|
|
43
45
|
(isValid ?
|
|
44
|
-
(elem
|
|
45
|
-
subscribe(obs, (use) => isValid.set(
|
|
46
|
+
(elem) => dom.autoDisposeElem(elem,
|
|
47
|
+
subscribe(obs, (use) => isValid.set(elem.checkValidity()))) :
|
|
46
48
|
null),
|
|
47
49
|
options.onInput ? dom.on('input', (e, elem) => setValue(elem)) : null,
|
|
48
50
|
dom.on('change', (e, elem) => setValue(elem)),
|
|
49
51
|
dom.onKeyPress({Enter: (e, elem) => setValue(elem)}),
|
|
50
|
-
)
|
|
52
|
+
);
|
|
51
53
|
}
|
package/lib/widgets/select.ts
CHANGED
|
@@ -65,15 +65,15 @@ export function select<T>(obs: Observable<T>, optionArray: MaybeObsArray<IOption
|
|
|
65
65
|
|
|
66
66
|
// When obs changes, update select's value; we do it after <options> have been created.
|
|
67
67
|
// Note that autoDisposeElem ensures the subscription is disposed with the 'select' element.
|
|
68
|
-
(elem
|
|
68
|
+
(elem) => dom.autoDisposeElem(elem, subscribe(obs, (use, obsValue) => {
|
|
69
69
|
const arr = unwrapMaybeObsArray(optionArray);
|
|
70
70
|
const index = arr.findIndex((item) => getOptionValue(item) === obsValue);
|
|
71
|
-
|
|
71
|
+
elem.selectedIndex = index + 1; // +1 for default option
|
|
72
72
|
})),
|
|
73
73
|
|
|
74
74
|
// When user picks a new item, use its value to update the observable.
|
|
75
75
|
dom.on('change', (e, elem) => {
|
|
76
|
-
const index =
|
|
76
|
+
const index = elem.selectedIndex;
|
|
77
77
|
const item = unwrapMaybeObsArray(optionArray)[index - 1]; // -1 for default option
|
|
78
78
|
// It should be impossible for the user to select an invalid option, but check just in case.
|
|
79
79
|
if (item !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grainjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "JS library from Grist Labs",
|
|
5
5
|
"main": "dist/cjs/index",
|
|
6
6
|
"module": "dist/esm/index",
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "bash build.sh",
|
|
10
10
|
"watch": "tsc -w",
|
|
11
|
-
"test": "nyc mocha -R list test/lib
|
|
12
|
-
"test-memory": "mocha -R list -gc test/lib
|
|
13
|
-
"test-timing": "TIMING_TESTS=1 mocha -R list test/lib
|
|
11
|
+
"test": "nyc mocha -R list 'test/lib/*.{js,ts}' && npm run test-types && npm run test-browser-headless",
|
|
12
|
+
"test-memory": "mocha -R list --expose-gc --gc-global 'test/lib/*.{js,ts}'",
|
|
13
|
+
"test-timing": "TIMING_TESTS=1 mocha -R list 'test/lib/*.{js,ts}'",
|
|
14
14
|
"build-demo": "browserify demo/celsius_grain/index.js -d | uglifyjs --source-map 'content=inline,url=build-index.js.map' -o demo/celsius_grain/build-index.js",
|
|
15
|
-
"test-manual": "webpack-
|
|
16
|
-
"test-browser": "mocha test/
|
|
17
|
-
"test-browser
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
15
|
+
"test-manual": "webpack-dev-server --config test/fixtures/webpack.config.js",
|
|
16
|
+
"test-browser-headless": "MOCHA_WEBDRIVER_ARGS='--no-sandbox --disable-gpu' MOCHA_WEBDRIVER_HEADLESS=1 mocha 'test/browser/*.{js,ts}'",
|
|
17
|
+
"test-browser": "mocha 'test/browser/*.{js,ts}'",
|
|
18
|
+
"test-browser-debug": "mocha --bail --no-exit 'test/browser/*.{js,ts}'",
|
|
19
|
+
"test-types": "dtslint --localTs node_modules/typescript/lib --expectOnly test/types",
|
|
20
|
+
"prepack": "npm run build && npm test"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"grist",
|
|
@@ -57,39 +57,38 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/chai": "^4.
|
|
61
|
-
"@types/chai-as-promised": "^7.1.
|
|
62
|
-
"@types/jsdom": "^
|
|
63
|
-
"@types/lodash": "^4.14.
|
|
64
|
-
"@types/mocha": "^2.2
|
|
65
|
-
"@types/node": "^
|
|
66
|
-
"@types/selenium-webdriver": "^
|
|
67
|
-
"@types/sinon": "^
|
|
68
|
-
"browserify": "^
|
|
69
|
-
"chai": "^4.
|
|
60
|
+
"@types/chai": "^4.2.18",
|
|
61
|
+
"@types/chai-as-promised": "^7.1.4",
|
|
62
|
+
"@types/jsdom": "^16.2.11",
|
|
63
|
+
"@types/lodash": "^4.14.170",
|
|
64
|
+
"@types/mocha": "^8.2.2",
|
|
65
|
+
"@types/node": "^15.12.2",
|
|
66
|
+
"@types/selenium-webdriver": "^4.0.13",
|
|
67
|
+
"@types/sinon": "^10.0.2",
|
|
68
|
+
"browserify": "^17.0.0",
|
|
69
|
+
"chai": "^4.3.4",
|
|
70
70
|
"chai-as-promised": "^7.1.1",
|
|
71
|
-
"chromedriver": "^
|
|
72
|
-
"create-react-app": "^
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"mocha
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"selenium-webdriver": "^4.0.0-
|
|
83
|
-
"sinon": "^
|
|
84
|
-
"ts-loader": "^
|
|
85
|
-
"ts-node": "^
|
|
86
|
-
"tslint": "^
|
|
87
|
-
"
|
|
88
|
-
"typescript": "^
|
|
71
|
+
"chromedriver": "^91.0.0",
|
|
72
|
+
"create-react-app": "^4.0.3",
|
|
73
|
+
"dtslint": "^4.1.0",
|
|
74
|
+
"fastpriorityqueue": "^0.7.1",
|
|
75
|
+
"geckodriver": "^2.0.0",
|
|
76
|
+
"jsdom": "16.6.0",
|
|
77
|
+
"knockout": "^3.5.1",
|
|
78
|
+
"lodash": "^4.17.21",
|
|
79
|
+
"mocha": "^9.0.0",
|
|
80
|
+
"mocha-webdriver": "^0.2.9",
|
|
81
|
+
"nyc": "^15.1.0",
|
|
82
|
+
"selenium-webdriver": "^4.0.0-beta.4",
|
|
83
|
+
"sinon": "^11.1.1",
|
|
84
|
+
"ts-loader": "^9.2.3",
|
|
85
|
+
"ts-node": "^10.0.0",
|
|
86
|
+
"tslint": "^6.1.3",
|
|
87
|
+
"typescript": "~4.3.2",
|
|
88
|
+
"typescript-tslint-plugin": "^1.0.1",
|
|
89
89
|
"uglify-es": "^3.2.0",
|
|
90
|
-
"webpack": "^
|
|
91
|
-
"webpack-cli": "^
|
|
92
|
-
"webpack-
|
|
93
|
-
"webpack-serve": "^2.0.2"
|
|
90
|
+
"webpack": "^5.38.1",
|
|
91
|
+
"webpack-cli": "^4.7.2",
|
|
92
|
+
"webpack-dev-server": "^3.11.2"
|
|
94
93
|
}
|
|
95
94
|
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { DomElementMethod } from './_domImpl';
|
|
2
|
-
import { Disposable, IDisposableOwner } from './dispose';
|
|
3
|
-
export interface IComponentClassType<T> {
|
|
4
|
-
new (...args: any[]): T;
|
|
5
|
-
create(owner: Element | IDisposableOwner | null, ...args: any[]): T;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A UI component should extend this base class and implement a constructor that creates some DOM
|
|
9
|
-
* and calls this.setContent() with it. Compared to a simple function returning DOM (a
|
|
10
|
-
* "functional" component), a "class" component makes it easier to organize code into methods.
|
|
11
|
-
*
|
|
12
|
-
* In addition, a "class" component may be disposed to remove it from the DOM, although this is
|
|
13
|
-
* uncommon since a UI component is normally owned by its containing DOM.
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class Component extends Disposable {
|
|
16
|
-
/**
|
|
17
|
-
* Create a component using Foo.create(owner, ...args) similarly to creating any other
|
|
18
|
-
* Disposable object. The difference is that `owner` may be a DOM Element, and the content set
|
|
19
|
-
* by the constructor's setContent() call will be appended to and owned by that owner element.
|
|
20
|
-
*
|
|
21
|
-
* If the owner is not an Element, works like a regular Disposable. To add such a component to
|
|
22
|
-
* DOM, use the mount() method.
|
|
23
|
-
*/
|
|
24
|
-
static create<T extends Component>(this: IComponentClassType<T>, owner: Element | IDisposableOwner | null, ...args: any[]): T;
|
|
25
|
-
private _markerPre;
|
|
26
|
-
private _markerPost;
|
|
27
|
-
private _contentToMount;
|
|
28
|
-
constructor();
|
|
29
|
-
/**
|
|
30
|
-
* Inserts the content of this component into a parent DOM element.
|
|
31
|
-
*/
|
|
32
|
-
mount(elem: Element): void;
|
|
33
|
-
/**
|
|
34
|
-
* Components should call setContent() with their DOM content, typically in the constructor. If
|
|
35
|
-
* called outside the constructor, setContent() will replace previously set DOM. It accepts any
|
|
36
|
-
* DOM Node; use dom.frag() to insert multiple nodes together.
|
|
37
|
-
*/
|
|
38
|
-
protected setContent(content: Node): void;
|
|
39
|
-
/**
|
|
40
|
-
* Detaches and disposes the DOM created and attached in mount().
|
|
41
|
-
*/
|
|
42
|
-
private _unmount();
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Construct and insert a UI component into the given DOM element. The component must extend
|
|
46
|
-
* dom.Component, and should build DOM and call setContent(DOM) in the constructor. DOM may be any
|
|
47
|
-
* Node. Use dom.frag() to insert multiple nodes together.
|
|
48
|
-
*
|
|
49
|
-
* Logically, the parent `elem` owns the created component, and the component owns the DOM set by
|
|
50
|
-
* setContent(). If the parent is disposed, so is the component and its DOM. If the component is
|
|
51
|
-
* somehow disposed directly, then its DOM is disposed and removed from `elem`.
|
|
52
|
-
*
|
|
53
|
-
* Note the correct usage:
|
|
54
|
-
*
|
|
55
|
-
* dom('div', dom.create(Comp1), dom.create(Comp2, ...args))
|
|
56
|
-
*
|
|
57
|
-
* To understand why the syntax is such, consider a potential alterntive such as:
|
|
58
|
-
*
|
|
59
|
-
* dom('div', _insert_(new Comp1()), _insert_(new Comp2(...args))
|
|
60
|
-
*
|
|
61
|
-
* In both cases, the constructor for Comp1 runs before the constructor for Comp2. What happens
|
|
62
|
-
* when Comp2's constructor throws an exception? In the second case, nothing yet owns the
|
|
63
|
-
* created Comp1 component, and it will never get cleaned up. In the first, correct case,
|
|
64
|
-
* dom('div') element gets ownership of it early enough and will dispose it.
|
|
65
|
-
*
|
|
66
|
-
* @param {Element} elem: The element to which to append the newly constructed component.
|
|
67
|
-
* @param {Class} ComponentClass: The component class to instantiate. It must extend
|
|
68
|
-
* dom.Component(...) and implement the render() method.
|
|
69
|
-
* @param {Objects} ...args: Arguments to the Component's constructor.
|
|
70
|
-
*/
|
|
71
|
-
export declare function create<T extends Component>(cls: IComponentClassType<T>, ...args: any[]): DomElementMethod;
|
|
72
|
-
/**
|
|
73
|
-
* If you need to initialize a component after creation, you may do it in the middle of a dom()
|
|
74
|
-
* call using createInit(), in which the last of args is initFunc: a function called with the
|
|
75
|
-
* constructed instance of the component:
|
|
76
|
-
* dom.createInit(MyComponent, ...args, c => {
|
|
77
|
-
* c.addChild(...);
|
|
78
|
-
* c.setOption(...);
|
|
79
|
-
* });
|
|
80
|
-
* The benefit of such inline construction is that the component is owned by the dom element as
|
|
81
|
-
* soon as it's created, so an exception in the init function or later among dom()'s arguments
|
|
82
|
-
* will trigger a cleanup.
|
|
83
|
-
*/
|
|
84
|
-
export declare function createInit<T>(cls: IComponentClassType<T>, ...args: any[]): DomElementMethod;
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Implementation of UI components that can be inserted into dom(). See documentation for
|
|
4
|
-
* createElem() and create().
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const _domDispose_1 = require("./_domDispose");
|
|
8
|
-
const _domImpl_1 = require("./_domImpl");
|
|
9
|
-
const _domMethods_1 = require("./_domMethods");
|
|
10
|
-
const dispose_1 = require("./dispose");
|
|
11
|
-
// Use the browser globals in a way that allows replacing them with mocks in tests.
|
|
12
|
-
const browserGlobals_1 = require("./browserGlobals");
|
|
13
|
-
/**
|
|
14
|
-
* Helper that takes ownership of a component by mounting it to a parent element.
|
|
15
|
-
*/
|
|
16
|
-
class DomOwner {
|
|
17
|
-
constructor(_parentElem) {
|
|
18
|
-
this._parentElem = _parentElem;
|
|
19
|
-
}
|
|
20
|
-
autoDispose(comp) { comp.mount(this._parentElem); }
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A UI component should extend this base class and implement a constructor that creates some DOM
|
|
24
|
-
* and calls this.setContent() with it. Compared to a simple function returning DOM (a
|
|
25
|
-
* "functional" component), a "class" component makes it easier to organize code into methods.
|
|
26
|
-
*
|
|
27
|
-
* In addition, a "class" component may be disposed to remove it from the DOM, although this is
|
|
28
|
-
* uncommon since a UI component is normally owned by its containing DOM.
|
|
29
|
-
*/
|
|
30
|
-
class Component extends dispose_1.Disposable {
|
|
31
|
-
constructor() {
|
|
32
|
-
super();
|
|
33
|
-
this._markerPre = browserGlobals_1.G.document.createComment('A');
|
|
34
|
-
this._markerPost = browserGlobals_1.G.document.createComment('B');
|
|
35
|
-
this._contentToMount = null;
|
|
36
|
-
// If the containing DOM is disposed, it will dispose all of our DOM (included among children
|
|
37
|
-
// of the containing DOM). Let it also dispose this Component when it gets to _markerPost.
|
|
38
|
-
// Since _unmount() is unnecessary here, we skip its work by unseting _markerPre/_markerPost.
|
|
39
|
-
_domDispose_1.onDisposeElem(this._markerPost, () => {
|
|
40
|
-
this._markerPre = this._markerPost = undefined;
|
|
41
|
-
this.dispose();
|
|
42
|
-
});
|
|
43
|
-
// When the component is disposed, unmount the DOM we created (i.e. dispose and remove).
|
|
44
|
-
// Except that we skip this as unnecessary when the disposal is triggered by containing DOM.
|
|
45
|
-
this.onDispose(this._unmount, this);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Create a component using Foo.create(owner, ...args) similarly to creating any other
|
|
49
|
-
* Disposable object. The difference is that `owner` may be a DOM Element, and the content set
|
|
50
|
-
* by the constructor's setContent() call will be appended to and owned by that owner element.
|
|
51
|
-
*
|
|
52
|
-
* If the owner is not an Element, works like a regular Disposable. To add such a component to
|
|
53
|
-
* DOM, use the mount() method.
|
|
54
|
-
*/
|
|
55
|
-
// TODO add typescript overloads for strict argument checks.
|
|
56
|
-
static create(owner, ...args) {
|
|
57
|
-
const _owner = owner instanceof browserGlobals_1.G.Element ? new DomOwner(owner) : owner;
|
|
58
|
-
return dispose_1.Disposable.create.call(this, _owner, ...args);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Inserts the content of this component into a parent DOM element.
|
|
62
|
-
*/
|
|
63
|
-
mount(elem) {
|
|
64
|
-
// Insert the result of setContent() into the given parent element. Note that mount() must
|
|
65
|
-
// only ever be called once. It is normally called as part of .create().
|
|
66
|
-
if (!this._markerPost) {
|
|
67
|
-
throw new Error('Component mount() called when already disposed');
|
|
68
|
-
}
|
|
69
|
-
if (this._markerPost.parentNode) {
|
|
70
|
-
throw new Error('Component mount() called twice');
|
|
71
|
-
}
|
|
72
|
-
_domImpl_1.update(elem, this._markerPre, this._contentToMount, this._markerPost);
|
|
73
|
-
this._contentToMount = null;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Components should call setContent() with their DOM content, typically in the constructor. If
|
|
77
|
-
* called outside the constructor, setContent() will replace previously set DOM. It accepts any
|
|
78
|
-
* DOM Node; use dom.frag() to insert multiple nodes together.
|
|
79
|
-
*/
|
|
80
|
-
setContent(content) {
|
|
81
|
-
if (this._markerPost) {
|
|
82
|
-
if (this._markerPost.parentNode) {
|
|
83
|
-
// Component is already mounted. Replace previous content.
|
|
84
|
-
_domMethods_1.replaceContent(this._markerPre, this._markerPost, content);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
// Component is created but not yet mounted. Save the content for the mount() call.
|
|
88
|
-
this._contentToMount = content;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Detaches and disposes the DOM created and attached in mount().
|
|
94
|
-
*/
|
|
95
|
-
_unmount() {
|
|
96
|
-
// Dispose the owned content, and remove it from the DOM. The conditional skips the work when
|
|
97
|
-
// the unmounting is triggered by the disposal of the containing DOM.
|
|
98
|
-
if (this._markerPost && this._markerPost.parentNode) {
|
|
99
|
-
const elem = this._markerPost.parentNode;
|
|
100
|
-
_domMethods_1.replaceContent(this._markerPre, this._markerPost, null);
|
|
101
|
-
elem.removeChild(this._markerPre);
|
|
102
|
-
elem.removeChild(this._markerPost);
|
|
103
|
-
}
|
|
104
|
-
this._markerPre = this._markerPost = undefined;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
exports.Component = Component;
|
|
108
|
-
/**
|
|
109
|
-
* Construct and insert a UI component into the given DOM element. The component must extend
|
|
110
|
-
* dom.Component, and should build DOM and call setContent(DOM) in the constructor. DOM may be any
|
|
111
|
-
* Node. Use dom.frag() to insert multiple nodes together.
|
|
112
|
-
*
|
|
113
|
-
* Logically, the parent `elem` owns the created component, and the component owns the DOM set by
|
|
114
|
-
* setContent(). If the parent is disposed, so is the component and its DOM. If the component is
|
|
115
|
-
* somehow disposed directly, then its DOM is disposed and removed from `elem`.
|
|
116
|
-
*
|
|
117
|
-
* Note the correct usage:
|
|
118
|
-
*
|
|
119
|
-
* dom('div', dom.create(Comp1), dom.create(Comp2, ...args))
|
|
120
|
-
*
|
|
121
|
-
* To understand why the syntax is such, consider a potential alterntive such as:
|
|
122
|
-
*
|
|
123
|
-
* dom('div', _insert_(new Comp1()), _insert_(new Comp2(...args))
|
|
124
|
-
*
|
|
125
|
-
* In both cases, the constructor for Comp1 runs before the constructor for Comp2. What happens
|
|
126
|
-
* when Comp2's constructor throws an exception? In the second case, nothing yet owns the
|
|
127
|
-
* created Comp1 component, and it will never get cleaned up. In the first, correct case,
|
|
128
|
-
* dom('div') element gets ownership of it early enough and will dispose it.
|
|
129
|
-
*
|
|
130
|
-
* @param {Element} elem: The element to which to append the newly constructed component.
|
|
131
|
-
* @param {Class} ComponentClass: The component class to instantiate. It must extend
|
|
132
|
-
* dom.Component(...) and implement the render() method.
|
|
133
|
-
* @param {Objects} ...args: Arguments to the Component's constructor.
|
|
134
|
-
*/
|
|
135
|
-
// TODO add typescript overloads for strict argument checks.
|
|
136
|
-
function create(cls, ...args) {
|
|
137
|
-
return (elem) => { cls.create(elem, ...args); };
|
|
138
|
-
}
|
|
139
|
-
exports.create = create;
|
|
140
|
-
/**
|
|
141
|
-
* If you need to initialize a component after creation, you may do it in the middle of a dom()
|
|
142
|
-
* call using createInit(), in which the last of args is initFunc: a function called with the
|
|
143
|
-
* constructed instance of the component:
|
|
144
|
-
* dom.createInit(MyComponent, ...args, c => {
|
|
145
|
-
* c.addChild(...);
|
|
146
|
-
* c.setOption(...);
|
|
147
|
-
* });
|
|
148
|
-
* The benefit of such inline construction is that the component is owned by the dom element as
|
|
149
|
-
* soon as it's created, so an exception in the init function or later among dom()'s arguments
|
|
150
|
-
* will trigger a cleanup.
|
|
151
|
-
*/
|
|
152
|
-
function createInit(cls, ...args) {
|
|
153
|
-
return (elem) => {
|
|
154
|
-
const initFunc = args.pop();
|
|
155
|
-
const c = cls.create(elem, ...args);
|
|
156
|
-
initFunc(c);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
exports.createInit = createInit;
|
|
160
|
-
//# sourceMappingURL=_domComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_domComponent.js","sourceRoot":"","sources":["../../../lib/_domComponent.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,+CAA4C;AAC5C,yCAAoD;AACpD,+CAA6C;AAC7C,uCAAuD;AAEvD,mFAAmF;AACnF,qDAAmC;AAQnC;;GAEG;AACH;IACE,YAAoB,WAAoB;QAApB,gBAAW,GAAX,WAAW,CAAS;IAAG,CAAC;IACrC,WAAW,CAAC,IAAe,IAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAC5E;AAED;;;;;;;GAOG;AACH,eAAgC,SAAQ,oBAAU;IAoBhD;QACE,KAAK,EAAE,CAAC;QALF,eAAU,GAAS,kBAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACjD,gBAAW,GAAS,kBAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAClD,oBAAe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AAC,CAAC;IACpC,IAAI,YAAY,EAAE;QAChB,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;KAC7C;AACH,CAAC;AAND,sCAMC;AACD,mBAA0B,YAAuB;IAC/C,OAAO,CAAC,IAAU,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC3D,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,yBAAgC,IAAU,EAAE,UAA4B;IACtE,IAAI,UAAU,EAAE;QACd,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;KACjD;AACH,CAAC;AAJD,0CAIC;AACD,qBAA4B,UAA4B;IACtD,IAAI,UAAU,EAAE;QACd,OAAO,CAAC,IAAU,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;KAC1D;AACH,CAAC;AAJD,kCAIC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const _domDispose_1 = require("./_domDispose");
|
|
4
|
-
const _domImpl_1 = require("./_domImpl");
|
|
5
|
-
const _domMethods_1 = require("./_domMethods");
|
|
6
|
-
const obsArray_1 = require("./obsArray");
|
|
7
|
-
// Use the browser globals in a way that allows replacing them with mocks in tests.
|
|
8
|
-
const browserGlobals_1 = require("./browserGlobals");
|
|
9
|
-
/**
|
|
10
|
-
* Creates DOM elements for each element of an observable array. As the array is changed, children
|
|
11
|
-
* are added or removed. This works for any array-valued observable, and for obsArray() and
|
|
12
|
-
* computedArray() it works more efficiently for simple changes.
|
|
13
|
-
*
|
|
14
|
-
* The given itemCreateFunc() should return a single DOM node for each item, or null to skip that
|
|
15
|
-
* item. It is called for new items whenever they are spliced in, or the array replaced. The
|
|
16
|
-
* forEach() owns the created nodes, and runs domDispose() on them when they are spliced out.
|
|
17
|
-
*
|
|
18
|
-
* If the created nodes are removed from their parent externally, forEach() will cope with it, but
|
|
19
|
-
* will consider these elements as no longer owned, and will not run domDispose() on them.
|
|
20
|
-
*
|
|
21
|
-
* Note that itemCreateFunc() does not receive an index: an index would only be correct at the
|
|
22
|
-
* time the item is created, and would not reflect further changes to the array.
|
|
23
|
-
*
|
|
24
|
-
* If you'd like to map the DOM node back to its source item, use dom.data() and dom.getData() in
|
|
25
|
-
* itemCreateFunc().
|
|
26
|
-
*/
|
|
27
|
-
function forEach(obsArray, itemCreateFunc) {
|
|
28
|
-
return (elem) => {
|
|
29
|
-
const markerPre = browserGlobals_1.G.document.createComment('a');
|
|
30
|
-
const markerPost = browserGlobals_1.G.document.createComment('b');
|
|
31
|
-
elem.appendChild(markerPre);
|
|
32
|
-
elem.appendChild(markerPost);
|
|
33
|
-
if (Array.isArray(obsArray)) {
|
|
34
|
-
_domMethods_1.replaceContent(markerPre, markerPost, obsArray.map(itemCreateFunc));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const nodes = obsArray_1.computedArray(obsArray, itemCreateFunc);
|
|
38
|
-
nodes.addListener((newArr, oldArr, splice) => {
|
|
39
|
-
if (splice) {
|
|
40
|
-
// Remove the elements that are gone.
|
|
41
|
-
for (const node of splice.deleted) {
|
|
42
|
-
if (node && node.parentNode === elem) {
|
|
43
|
-
_domDispose_1.domDispose(node);
|
|
44
|
-
elem.removeChild(node);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (splice.numAdded > 0) {
|
|
48
|
-
// Find a valid child immediately following the spliced out portion, for DOM insertion.
|
|
49
|
-
const endIndex = splice.start + splice.numAdded;
|
|
50
|
-
let nextElem = markerPost;
|
|
51
|
-
for (let i = endIndex; i < newArr.length; i++) {
|
|
52
|
-
const node = newArr[i];
|
|
53
|
-
if (node && node.parentNode === elem) {
|
|
54
|
-
nextElem = node;
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// Insert the new elements.
|
|
59
|
-
const content = _domImpl_1.frag(newArr.slice(splice.start, endIndex));
|
|
60
|
-
elem.insertBefore(content, nextElem);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
_domMethods_1.replaceContent(markerPre, markerPost, newArr);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
_domMethods_1.replaceContent(markerPre, markerPost, nodes.get());
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
exports.forEach = forEach;
|
|
71
|
-
//# sourceMappingURL=_domForEach.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_domForEach.js","sourceRoot":"","sources":["../../../lib/_domForEach.ts"],"names":[],"mappings":";;AAAA,+CAAyC;AACzC,yCAA2C;AAC3C,+CAA6C;AAC7C,yCAAkE;AAElE,mFAAmF;AACnF,qDAAmC;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAA2B,QAA0B,EAAE,cAAsC;IAC3F,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,kBAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAChD,MAAM,UAAU,GAAG,kBAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC3B,4BAAc,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;YACpE,OAAO;SACR;QAED,MAAM,KAAK,GAAwB,wBAAa,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAC3E,KAAK,CAAC,WAAW,CAAC,CAAC,MAAwB,EAAE,MAAwB,EAAE,MAAO,EAAE,EAAE;YAChF,IA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