@dxos/react-list 0.1.13 → 0.1.16
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/lib/browser/index.mjs +527 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/{src → types/src}/components/List/List.d.ts +0 -0
- package/dist/types/src/components/List/List.d.ts.map +1 -0
- package/dist/{src → types/src}/components/List/List.stories.d.ts +0 -0
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -0
- package/dist/{src → types/src}/components/List/index.d.ts +0 -0
- package/dist/types/src/components/List/index.d.ts.map +1 -0
- package/dist/{src → types/src}/components/ListPrimitive/ListPrimitive.d.ts +4 -4
- package/dist/types/src/components/ListPrimitive/ListPrimitive.d.ts.map +1 -0
- package/dist/{src → types/src}/components/ListPrimitive/ListPrimitive.stories.d.ts +0 -0
- package/dist/types/src/components/ListPrimitive/ListPrimitive.stories.d.ts.map +1 -0
- package/dist/{src → types/src}/components/ListPrimitive/index.d.ts +0 -0
- package/dist/types/src/components/ListPrimitive/index.d.ts.map +1 -0
- package/dist/{src → types/src}/components/index.d.ts +0 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/{src → types/src}/hooks/index.d.ts +0 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/{src → types/src}/hooks/usePropStatefully.d.ts +0 -0
- package/dist/types/src/hooks/usePropStatefully.d.ts.map +1 -0
- package/dist/{src → types/src}/index.d.ts +0 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/{src → types/src}/model.d.ts +0 -0
- package/dist/types/src/model.d.ts.map +1 -0
- package/dist/{src → types/src}/testing/index.d.ts +0 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/{src → types/src}/testing/templateForComponent.d.ts +0 -0
- package/dist/types/src/testing/templateForComponent.d.ts.map +1 -0
- package/package.json +13 -15
- package/src/components/ListPrimitive/ListPrimitive.tsx +33 -18
- package/dist/src/components/List/List.d.ts.map +0 -1
- package/dist/src/components/List/List.js +0 -99
- package/dist/src/components/List/List.js.map +0 -1
- package/dist/src/components/List/List.stories.d.ts.map +0 -1
- package/dist/src/components/List/List.stories.js +0 -117
- package/dist/src/components/List/List.stories.js.map +0 -1
- package/dist/src/components/List/index.d.ts.map +0 -1
- package/dist/src/components/List/index.js +0 -21
- package/dist/src/components/List/index.js.map +0 -1
- package/dist/src/components/ListPrimitive/ListPrimitive.d.ts.map +0 -1
- package/dist/src/components/ListPrimitive/ListPrimitive.js +0 -222
- package/dist/src/components/ListPrimitive/ListPrimitive.js.map +0 -1
- package/dist/src/components/ListPrimitive/ListPrimitive.stories.d.ts.map +0 -1
- package/dist/src/components/ListPrimitive/ListPrimitive.stories.js +0 -42
- package/dist/src/components/ListPrimitive/ListPrimitive.stories.js.map +0 -1
- package/dist/src/components/ListPrimitive/index.d.ts.map +0 -1
- package/dist/src/components/ListPrimitive/index.js +0 -21
- package/dist/src/components/ListPrimitive/index.js.map +0 -1
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/index.js +0 -21
- package/dist/src/components/index.js.map +0 -1
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/index.js +0 -21
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/hooks/usePropStatefully.d.ts.map +0 -1
- package/dist/src/hooks/usePropStatefully.js +0 -30
- package/dist/src/hooks/usePropStatefully.js.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -22
- package/dist/src/index.js.map +0 -1
- package/dist/src/model.d.ts.map +0 -1
- package/dist/src/model.js +0 -9
- package/dist/src/model.js.map +0 -1
- package/dist/src/testing/index.d.ts.map +0 -1
- package/dist/src/testing/index.js +0 -21
- package/dist/src/testing/index.js.map +0 -1
- package/dist/src/testing/templateForComponent.d.ts.map +0 -1
- package/dist/src/testing/templateForComponent.js +0 -18
- package/dist/src/testing/templateForComponent.js.map +0 -1
|
@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version":3,"file":"ListPrimitive.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ListPrimitive/ListPrimitive.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAIpB,OAAO,EAAiB,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;;;;;;AAE7E,wBAIE;AAUF,eAAO,MAAM,OAAO,6EAAwD,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ListPrimitive/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePropStatefully.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePropStatefully.ts"],"names":[],"mappings":"AAIA,OAAO,EAA+B,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAM9E;;GAEG;AACH,eAAO,MAAM,iBAAiB,4DAEU,OAAO,0DAiB9C,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/model.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAC1C,eAAO,MAAM,cAAc,wBAAwB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateForComponent.d.ts","sourceRoot":"","sources":["../../../../src/testing/templateForComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAkB,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,oBAAoB,kEAQ9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-list",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "A list editing experience component for DXOS.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
|
-
"main": "dist/
|
|
10
|
-
"types": "dist/src/index.d.ts",
|
|
9
|
+
"main": "dist/lib/browser/index.mjs",
|
|
10
|
+
"types": "dist/types/src/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"src"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"classnames": "^2.3.2",
|
|
17
16
|
"lodash.debounce": "^4.0.8",
|
|
18
17
|
"react": "^18.2.0",
|
|
19
18
|
"react-dom": "^18.2.0",
|
|
20
|
-
"@dxos/client": "0.1.
|
|
21
|
-
"@dxos/config": "0.1.
|
|
22
|
-
"@dxos/object-model": "0.1.
|
|
23
|
-
"@dxos/react-appkit": "0.1.
|
|
24
|
-
"@dxos/react-async": "0.1.
|
|
25
|
-
"@dxos/react-client": "0.1.
|
|
26
|
-
"@dxos/react-ui": "0.1.
|
|
27
|
-
"@dxos/react-uikit": "0.1.
|
|
19
|
+
"@dxos/client": "0.1.16",
|
|
20
|
+
"@dxos/config": "0.1.16",
|
|
21
|
+
"@dxos/object-model": "0.1.16",
|
|
22
|
+
"@dxos/react-appkit": "0.1.16",
|
|
23
|
+
"@dxos/react-async": "0.1.16",
|
|
24
|
+
"@dxos/react-client": "0.1.16",
|
|
25
|
+
"@dxos/react-ui": "0.1.16",
|
|
26
|
+
"@dxos/react-uikit": "0.1.16"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
29
|
"@types/lodash.debounce": "^4.0.7",
|
|
31
30
|
"@types/react": "^18.0.21",
|
|
32
31
|
"@types/react-dom": "^18.0.6",
|
|
33
32
|
"phosphor-react": "^1.4.1",
|
|
34
|
-
"@dxos/async": "0.1.
|
|
35
|
-
"@dxos/debug": "0.1.
|
|
36
|
-
"@dxos/vite-plugin": "0.1.13"
|
|
33
|
+
"@dxos/async": "0.1.16",
|
|
34
|
+
"@dxos/debug": "0.1.16"
|
|
37
35
|
},
|
|
38
36
|
"peerDependencies": {
|
|
39
37
|
"phosphor-react": "^1.4.1"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import cx from 'classnames';
|
|
6
5
|
import debounce from 'lodash.debounce';
|
|
7
6
|
import { Minus, Plus } from 'phosphor-react';
|
|
8
7
|
import React, { ComponentProps, useCallback, useMemo, useState, KeyboardEvent } from 'react';
|
|
@@ -15,7 +14,8 @@ import {
|
|
|
15
14
|
Button,
|
|
16
15
|
randomString,
|
|
17
16
|
defaultGroup,
|
|
18
|
-
defaultHover
|
|
17
|
+
defaultHover,
|
|
18
|
+
mx
|
|
19
19
|
} from '@dxos/react-uikit';
|
|
20
20
|
|
|
21
21
|
import { usePropStatefully } from '../../hooks';
|
|
@@ -175,6 +175,20 @@ const ListItemPrimitive = ({
|
|
|
175
175
|
[orderIndex, isLast]
|
|
176
176
|
);
|
|
177
177
|
|
|
178
|
+
const inputSlots = useMemo(
|
|
179
|
+
() => ({
|
|
180
|
+
root: { className: 'm-0' },
|
|
181
|
+
input: {
|
|
182
|
+
className: 'border-0 rounded',
|
|
183
|
+
autoFocus: true,
|
|
184
|
+
'data-orderindex': orderIndex,
|
|
185
|
+
'data-itemid': id,
|
|
186
|
+
onKeyUp
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
[orderIndex, id, onKeyUp]
|
|
190
|
+
);
|
|
191
|
+
|
|
178
192
|
return (
|
|
179
193
|
<li
|
|
180
194
|
key={id}
|
|
@@ -183,14 +197,13 @@ const ListItemPrimitive = ({
|
|
|
183
197
|
{...(description && { 'aria-describedby': descriptionId })}
|
|
184
198
|
>
|
|
185
199
|
<input
|
|
186
|
-
key={titleSession}
|
|
187
200
|
{...{
|
|
188
201
|
type: 'checkbox',
|
|
189
202
|
id: checkId,
|
|
190
203
|
...(description && {
|
|
191
204
|
'aria-describedby': descriptionId
|
|
192
205
|
}),
|
|
193
|
-
className:
|
|
206
|
+
className: mx(
|
|
194
207
|
getSize(5),
|
|
195
208
|
'text-primary-600 bg-neutral-50 rounded-full border-neutral-300 dark:bg-neutral-800 dark:border-neutral-600 cursor-pointer',
|
|
196
209
|
defaultFocus,
|
|
@@ -208,18 +221,13 @@ const ListItemPrimitive = ({
|
|
|
208
221
|
</span>
|
|
209
222
|
<div role='none' className='grow'>
|
|
210
223
|
<Input
|
|
211
|
-
|
|
224
|
+
key={titleSession}
|
|
212
225
|
label={t('list item title label')}
|
|
213
226
|
placeholder={t('list item title placeholder')}
|
|
214
227
|
labelVisuallyHidden
|
|
215
228
|
initialValue={title}
|
|
216
229
|
onChange={onChangeTitle}
|
|
217
|
-
|
|
218
|
-
borders='border-0'
|
|
219
|
-
rounding='rounded'
|
|
220
|
-
autoFocus={autoFocus}
|
|
221
|
-
onKeyUp={onKeyUp}
|
|
222
|
-
data-orderindex={orderIndex}
|
|
230
|
+
slots={inputSlots}
|
|
223
231
|
/>
|
|
224
232
|
{/* TODO(thure): Re-enable this when descriptions become relevant */}
|
|
225
233
|
{/* <Input */}
|
|
@@ -243,7 +251,7 @@ const ListItemPrimitive = ({
|
|
|
243
251
|
{/* <span className='sr-only'>{t('move list item down label')}</span> */}
|
|
244
252
|
{/* </Button> */}
|
|
245
253
|
{/* </ButtonGroup> */}
|
|
246
|
-
<Button onClick={onClickDelete} variant='ghost'
|
|
254
|
+
<Button onClick={onClickDelete} variant='ghost' className='p-1 self-stretch'>
|
|
247
255
|
<Minus className={getSize(4)} />
|
|
248
256
|
<span className='sr-only'>{t('delete list item label')}</span>
|
|
249
257
|
</Button>
|
|
@@ -394,11 +402,22 @@ export const ListPrimitive = ({
|
|
|
394
402
|
|
|
395
403
|
// Render
|
|
396
404
|
|
|
405
|
+
const inputSlots = useMemo(
|
|
406
|
+
() => ({
|
|
407
|
+
root: { className: 'mli-2 mbs-0 mbe-2' },
|
|
408
|
+
input: {
|
|
409
|
+
className: 'border-0 rounded text-xl font-display font-semibold',
|
|
410
|
+
'data-itemid': listId
|
|
411
|
+
}
|
|
412
|
+
}),
|
|
413
|
+
[listId]
|
|
414
|
+
);
|
|
415
|
+
|
|
397
416
|
return (
|
|
398
417
|
<div
|
|
399
418
|
role='group'
|
|
400
419
|
{...divProps}
|
|
401
|
-
className={
|
|
420
|
+
className={mx(defaultGroup({ elevation: 3, spacing: 'pbs-2 pbe-1' }), divProps.className)}
|
|
402
421
|
aria-labelledby={titleId}
|
|
403
422
|
{...(description && { 'aria-describedby': descriptionId })}
|
|
404
423
|
>
|
|
@@ -417,11 +436,7 @@ export const ListPrimitive = ({
|
|
|
417
436
|
labelVisuallyHidden
|
|
418
437
|
initialValue={title}
|
|
419
438
|
onChange={onChangeTitle}
|
|
420
|
-
|
|
421
|
-
spacing='mli-2 mbe-2'
|
|
422
|
-
borders='border-0'
|
|
423
|
-
rounding='rounded'
|
|
424
|
-
typography='text-xl font-display font-semibold'
|
|
439
|
+
slots={inputSlots}
|
|
425
440
|
/>
|
|
426
441
|
{/* TODO(thure): Re-enable this when relevant */}
|
|
427
442
|
{/* <Input */}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAS,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAuBjD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;CACjC;AAiED,eAAO,MAAM,IAAI,yBAA0B,SAAS,gBAanD,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// Copyright 2022 DXOS.org
|
|
4
|
-
//
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.List = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const object_model_1 = require("@dxos/object-model");
|
|
32
|
-
const react_client_1 = require("@dxos/react-client");
|
|
33
|
-
const react_ui_1 = require("@dxos/react-ui");
|
|
34
|
-
const react_uikit_1 = require("@dxos/react-uikit");
|
|
35
|
-
const model_1 = require("../../model");
|
|
36
|
-
const ListPrimitive_1 = require("../ListPrimitive");
|
|
37
|
-
const ListLoaded = ({ space, list, listItems: propsListItems }) => {
|
|
38
|
-
var _a, _b, _c;
|
|
39
|
-
const listItems = (_a = (0, react_client_1.useSelection)(list === null || list === void 0 ? void 0 : list.select().children().filter({ type: model_1.LIST_ITEM_TYPE }))) !== null && _a !== void 0 ? _a : propsListItems;
|
|
40
|
-
const onAction = (0, react_1.useCallback)(async (action) => {
|
|
41
|
-
if ((0, ListPrimitive_1.isListItemDeletedAction)(action)) {
|
|
42
|
-
const subject = space.database.getItem(action.deleted.id);
|
|
43
|
-
// TODO(thure): use Echo’s native deletion
|
|
44
|
-
return subject === null || subject === void 0 ? void 0 : subject.model.set('annotations.deleted', true);
|
|
45
|
-
}
|
|
46
|
-
else if ((0, ListPrimitive_1.isListItemCreatedAction)(action)) {
|
|
47
|
-
// do nothing?
|
|
48
|
-
}
|
|
49
|
-
else if ((0, ListPrimitive_1.isListItemChangedAction)(action)) {
|
|
50
|
-
const subject = space.database.getItem(action.listItemId);
|
|
51
|
-
return Promise.all(Object.keys(action.next).map((prop) => {
|
|
52
|
-
return subject === null || subject === void 0 ? void 0 : subject.model.set(prop, action.next[prop]);
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
return Promise.all(Object.keys(action.next).map((prop) => {
|
|
57
|
-
return list === null || list === void 0 ? void 0 : list.model.set(prop, action.next[prop]);
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
}, [list, listItems]);
|
|
61
|
-
const createListItemId = (0, react_1.useCallback)(async () => {
|
|
62
|
-
const listItem = await (space === null || space === void 0 ? void 0 : space.database.createItem({
|
|
63
|
-
model: object_model_1.ObjectModel,
|
|
64
|
-
type: model_1.LIST_ITEM_TYPE,
|
|
65
|
-
parent: list.id
|
|
66
|
-
}));
|
|
67
|
-
return listItem.id;
|
|
68
|
-
}, [space]);
|
|
69
|
-
return (react_1.default.createElement(ListPrimitive_1.ListPrimitive, { ...{
|
|
70
|
-
id: list.id,
|
|
71
|
-
title: (_b = list.model.get('title')) !== null && _b !== void 0 ? _b : '',
|
|
72
|
-
description: (_c = list.model.get('description')) !== null && _c !== void 0 ? _c : '',
|
|
73
|
-
items: (listItems !== null && listItems !== void 0 ? listItems : [])
|
|
74
|
-
// TODO(thure): use Echo’s native deletion
|
|
75
|
-
.filter((item) => !item.model.get('annotations.deleted'))
|
|
76
|
-
.reduce((acc, item) => {
|
|
77
|
-
acc[item.id] = {
|
|
78
|
-
title: item.model.get('title'),
|
|
79
|
-
description: item.model.get('description'),
|
|
80
|
-
annotations: item.model.get('annotations')
|
|
81
|
-
};
|
|
82
|
-
return acc;
|
|
83
|
-
}, {}),
|
|
84
|
-
onChangePeriod: 640,
|
|
85
|
-
onAction,
|
|
86
|
-
createListItemId
|
|
87
|
-
} }));
|
|
88
|
-
};
|
|
89
|
-
const List = ({ spaceKey, itemId }) => {
|
|
90
|
-
var _a;
|
|
91
|
-
const { t } = (0, react_uikit_1.useTranslation)('uikit');
|
|
92
|
-
const space = (0, react_client_1.useSpace)(spaceKey);
|
|
93
|
-
const list = ((_a = (0, react_client_1.useSelection)(space === null || space === void 0 ? void 0 : space.database.select({ id: itemId }))) !== null && _a !== void 0 ? _a : [])[0];
|
|
94
|
-
const listItems = (0, react_client_1.useSelection)(list === null || list === void 0 ? void 0 : list.select().children().filter({ type: model_1.LIST_ITEM_TYPE }));
|
|
95
|
-
// TODO(thure): this should become `Suspense` when the above hooks support it
|
|
96
|
-
return space && list && listItems ? (react_1.default.createElement(ListLoaded, { ...{ space, list, listItems } })) : (react_1.default.createElement(react_ui_1.Loading, { label: t('generic loading label') }));
|
|
97
|
-
};
|
|
98
|
-
exports.List = List;
|
|
99
|
-
//# sourceMappingURL=List.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../../src/components/List/List.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,+CAA2C;AAG3C,qDAAiD;AACjD,qDAA4D;AAC5D,6CAAyC;AACzC,mDAAmD;AAEnD,uCAA6C;AAC7C,oDAS0B;AAa1B,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAmB,EAAE,EAAE;;IACjF,MAAM,SAAS,GAAG,MAAA,IAAA,2BAAY,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,sBAAc,EAAE,CAAC,CAAC,mCAAI,cAAc,CAAC;IAE7G,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAC1B,KAAK,EAAE,MAAkB,EAAE,EAAE;QAC3B,IAAI,IAAA,uCAAuB,EAAC,MAAM,CAAC,EAAE;YACnC,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC1D,0CAA0C;Y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,MAAM,IAAI,GAAG,CAAC,MAAA,IAAA,2BAAY,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,mCAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,SAAS,GAAG,IAAA,2BAAY,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,sBAAc,EAAE,CAAC,CAAC,CAAC;IAE3F,6EAA6E;IAC7E,OAAO,KAAK,IAAI,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAClC,8BAAC,UAAU,OAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAI,CAC/C,CAAC,CAAC,CAAC,CACF,8BAAC,kBAAO,IAAC,KAAK,EAAE,CAAC,CAAC,uBAAuB,CAAC,GAAI,CAC/C,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,IAAI,QAaf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAIpB,OAAO,EAAsB,SAAS,EAAE,MAAM,cAAc,CAAC;AAU7D,OAAO,EAAQ,SAAS,EAAE,MAAM,QAAQ,CAAC;;;;;;AAKzC,wBAIE;AAsBF,eAAO,MAAM,OAAO;;;EAAqC,CAAC"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// Copyright 2022 DXOS.org
|
|
4
|
-
//
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Default = void 0;
|
|
30
|
-
require("@dxosTheme");
|
|
31
|
-
const react_1 = __importStar(require("react"));
|
|
32
|
-
const async_1 = require("@dxos/async");
|
|
33
|
-
const client_1 = require("@dxos/client");
|
|
34
|
-
const testing_1 = require("@dxos/client/testing");
|
|
35
|
-
const debug_1 = require("@dxos/debug");
|
|
36
|
-
const object_model_1 = require("@dxos/object-model");
|
|
37
|
-
const react_async_1 = require("@dxos/react-async");
|
|
38
|
-
const react_client_1 = require("@dxos/react-client");
|
|
39
|
-
const react_uikit_1 = require("@dxos/react-uikit");
|
|
40
|
-
const model_1 = require("../../model");
|
|
41
|
-
const testing_2 = require("../../testing");
|
|
42
|
-
const List_1 = require("./List");
|
|
43
|
-
// TODO(wittjosiah): @dxos/log.
|
|
44
|
-
const log = console.log;
|
|
45
|
-
exports.default = {
|
|
46
|
-
title: 'react-list/List',
|
|
47
|
-
component: List_1.List,
|
|
48
|
-
argTypes: {}
|
|
49
|
-
};
|
|
50
|
-
const Template = (args) => {
|
|
51
|
-
var _a;
|
|
52
|
-
const space = (0, react_client_1.useSpace)(args.spaceKey);
|
|
53
|
-
const [item] = (_a = (0, react_client_1.useSelection)(space === null || space === void 0 ? void 0 : space.database.select({ type: model_1.LIST_TYPE }))) !== null && _a !== void 0 ? _a : [];
|
|
54
|
-
(0, react_async_1.useAsyncEffect)(async () => {
|
|
55
|
-
if (args.id === 0) {
|
|
56
|
-
await (space === null || space === void 0 ? void 0 : space.database.createItem({
|
|
57
|
-
model: object_model_1.ObjectModel,
|
|
58
|
-
type: model_1.LIST_TYPE
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
}, [space]);
|
|
62
|
-
return (react_1.default.createElement("main", { className: 'max-is-lg mli-auto pli-7 mbs-7' }, item && space ? react_1.default.createElement(List_1.List, { ...args, itemId: item.id, spaceKey: space === null || space === void 0 ? void 0 : space.key }) : react_1.default.createElement(react_uikit_1.Loading, { label: 'Loading\u2026' })));
|
|
63
|
-
};
|
|
64
|
-
exports.Default = (0, testing_2.templateForComponent)(Template)({});
|
|
65
|
-
exports.Default.args = {};
|
|
66
|
-
exports.Default.decorators = [
|
|
67
|
-
// TODO(wittjosiah): Factor out.
|
|
68
|
-
(Story) => {
|
|
69
|
-
const n = 2;
|
|
70
|
-
const clients = (0, react_1.useMemo)(() => {
|
|
71
|
-
const testBuilder = new testing_1.TestBuilder();
|
|
72
|
-
return [...Array(n)].map(() => new client_1.Client({ services: testBuilder.createClientServicesHost() }));
|
|
73
|
-
}, []);
|
|
74
|
-
const [spaceKey, setSpaceKey] = (0, react_1.useState)();
|
|
75
|
-
(0, react_async_1.useAsyncEffect)(async () => {
|
|
76
|
-
await Promise.all(clients.map((client) => client.initialize()));
|
|
77
|
-
log('initialized');
|
|
78
|
-
await Promise.all(clients.map((client) => client.halo.createProfile()));
|
|
79
|
-
log('identity created');
|
|
80
|
-
const space = await clients[0].echo.createSpace();
|
|
81
|
-
log('space created', { space: space.key });
|
|
82
|
-
await Promise.all(clients.slice(1).map(async (client) => {
|
|
83
|
-
const observable1 = await space.createInvitation({ type: client_1.Invitation.Type.INTERACTIVE_TESTING });
|
|
84
|
-
log('invitation created');
|
|
85
|
-
const observable2 = await client.echo.acceptInvitation(observable1.invitation);
|
|
86
|
-
log('invitation accepted');
|
|
87
|
-
const success1 = new async_1.Trigger();
|
|
88
|
-
observable1.subscribe({
|
|
89
|
-
onSuccess: (invitation) => {
|
|
90
|
-
success1.wake(invitation);
|
|
91
|
-
log('invitation success1');
|
|
92
|
-
},
|
|
93
|
-
onError: (err) => (0, debug_1.raise)(err)
|
|
94
|
-
});
|
|
95
|
-
const success2 = new async_1.Trigger();
|
|
96
|
-
observable2.subscribe({
|
|
97
|
-
onSuccess: (invitation) => {
|
|
98
|
-
success2.wake(invitation);
|
|
99
|
-
log('invitation success2');
|
|
100
|
-
},
|
|
101
|
-
onError: (err) => (0, debug_1.raise)(err)
|
|
102
|
-
});
|
|
103
|
-
await Promise.all([success1.wait(), success2.wait()]);
|
|
104
|
-
}));
|
|
105
|
-
setSpaceKey(space.key);
|
|
106
|
-
return () => {
|
|
107
|
-
void Promise.all(clients.map((client) => client.destroy()));
|
|
108
|
-
};
|
|
109
|
-
}, clients);
|
|
110
|
-
if (!spaceKey) {
|
|
111
|
-
return react_1.default.createElement(react_uikit_1.Loading, { label: 'Loading\u2026' });
|
|
112
|
-
}
|
|
113
|
-
return (react_1.default.createElement("div", { className: 'flex' }, clients.map((client, index) => (react_1.default.createElement(react_client_1.ClientProvider, { key: index, client: client, fallback: react_1.default.createElement(react_uikit_1.Loading, { label: 'Loading\u2026' }) },
|
|
114
|
-
react_1.default.createElement(Story, { args: { spaceKey, id: index } }))))));
|
|
115
|
-
}
|
|
116
|
-
];
|
|
117
|
-
//# sourceMappingURL=List.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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G,CAAC;iBACpC,CAAC,CAAC;gBAEH,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,CACH,CAAC;YAEF,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEvB,OAAO,GAAG,EAAE;gBACV,KAAK,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YAC9D,CAAC,CAAC;QACJ,CAAC,EAAE,OAAO,CAAC,CAAC;QAEZ,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,8BAAC,qBAAO,IAAC,KAAK,EAAC,eAAU,GAAG,CAAC;SACrC;QAED,OAAO,CACL,uCAAK,SAAS,EAAC,MAAM,IAClB,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,8BAAC,6BAAc,IAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,8BAAC,qBAAO,IAAC,KAAK,EAAC,eAAU,GAAG;YAChF,8BAAC,KAAK,IAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAI,CACzB,CAClB,CAAC,CACE,CACP,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// Copyright 2022 DXOS.org
|
|
4
|
-
//
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("./List"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/List/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,yCAAuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListPrimitive.d.ts","sourceRoot":"","sources":["../../../../src/components/ListPrimitive/ListPrimitive.tsx"],"names":[],"mappings":"AAOA,OAAc,EAAE,cAAc,EAAiD,MAAM,OAAO,CAAC;AAe7F,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,UAAU,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CAChD;AAED,MAAM,MAAM,SAAS,GAAG,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