solid-ui 2.4.22-3e0d1a42 → 2.4.22-3e379ebd

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 CHANGED
@@ -7,13 +7,26 @@ User Interface widgets and utilities for Solid (solid-ui)
7
7
  These are HTML5 widgets which connect to a solid store. Building blocks for solid-based apps.
8
8
  Vanilla JS. Includes large widgets like chat, table, matrix, form fields, and small widgets.
9
9
 
10
+ See [Solid-Ui Storybook](http://solidos.github.io/solid-ui/examples/storybook/) for SolidUI widgets.
11
+ See [Solid-UI API](https://solidos.github.io/solid-ui/Documentation/api/) for SolidUI functions.
12
+ See [Forms introduction](./Documentation/FormsReadme.md) for UI vocabulary implementation.
13
+
14
+ Table of content:
15
+ - Getting started(#getting-started)
16
+ - Further documentation(#further-ocumentation)
17
+
18
+
10
19
  ## Getting started
20
+
21
+ Contributions of bug fixes and new functionality, documentation, and tests are
22
+ always appreciated.
23
+
11
24
  ### In npm-based projects
12
25
  When including solid-ui in an npm-based project, you can use it with:
13
26
 
14
27
  ```js
15
- import { ns, rdf, acl, aclControl, authn, create, dom, icons, log, matrix, media,
16
- messageArea, infiniteMessageArea, pad, preferences, store, style, table, tabs, utils, widgets, versionInfo
28
+ import { ns, rdf, acl, aclControl, create, dom, icons, log, matrix, media,
29
+ messageArea, infiniteMessageArea, pad, preferences, style, table, tabs, utils, widgets, versionInfo
17
30
  } from 'solid-ui'
18
31
 
19
32
  ```
@@ -23,10 +36,8 @@ Clone this repo, and in the repo root run:
23
36
  * `npm install`
24
37
  * `npm run build`
25
38
 
26
- This will generate a `lib/` folder containing, among other artifacts, `lib/webpack-bundle.js`.
27
- Now run `npx serve` and go to http://localhost:5000/examples/ with your browser to see some examples.
28
- See the ['examples' folder](https://github.com/solidos/solid-ui/tree/examples/examples) for the
29
- source code of those examples.
39
+ This will generate a `dist/` folder containing, among other artifacts, `dist/main.js`.
40
+ Now run `npx serve` and go to http://localhost:3000/Documentation/ with your browser to see some examples.
30
41
 
31
42
  While viewing one of those examples, you can open the web console in your browser and for instance
32
43
  try how you can create a button:
@@ -44,56 +55,7 @@ const chat = UI.infiniteMessageArea(document, store, UI.rdf.namedNode(chatChanne
44
55
  document.body.appendChild(chat)
45
56
  ```
46
57
 
47
- Or a full ACL Control Box:
48
- ```js
49
- const exampleFolder = 'https://example-user.inrupt.net/public/public-control/'
50
- const aclControlBox = UI.aclControl.ACLControlBox5(UI.rdf.namedNode(exampleFolder), { dom: document }, '', store)
51
- document.body.appendChild(aclControlBox)
52
- ```
53
-
54
-
55
- ## Documentation
56
- - [talk presentation](https://solidos.github.io/solid-ui/Documentation/talks/FormsTalk.html)
57
- - API https://solidos.github.io/solid-ui/Documentation/api/ for the API documentation.
58
- - The UI components are presented in a [storybook](http://solidos.github.io/solid-ui/examples/storybook/).
59
-
60
- ## Overview
61
- This has been a place to put any functionality from solid views which has been generalized to be usable in other views.
62
-
63
- - Authentication UI: manage the user's logged in/out state.
64
- - Discovery: finding the user's stuff, and leaving records of new things
65
- - Preferences: UI for managing a user's preferences with two axes of defaults
66
- - An Access Control List widget for Solid ACL system
67
- - Acess Control Logic
68
- - Create a new object from modules/extensions which have registered their ability to create things
69
-
70
- - A [form system](https://solidos.github.io/solid-ui/Documentation/forms-intro.html): Forms are defined in RDF, and create/edit RDF data, including form definitions
71
- - A collection of shortcut namespace objects for a selection of relevant RDF vocabularies.
72
- - Small atomic widgets (buttons etc) of which the others are constructed.
73
- - An error message panel
74
-
75
- Some of the larger controls include:
76
-
77
- - A chat widget: add discussion to any object. Infinite scroll, embedded images, social reactions, etc etc
78
- - A people picker widget for choosing a set of people or an existing group
79
- - A general purpose table display with built-in faceted browsing
80
- - A two-dimentional matrix of editable live data that extends in both dimensions.
81
- - A notepad of shared notes for real-time collaboration
82
- - Drag and drop code for linking things and uploading files
83
- - A set of tabs for holding other widgets and arbitrary UI elements
84
-
85
- The typical style of the widgets is to know what data it has been derived from,
86
- allow users to edit it, and to automatically sync with data as it changes in the future.
87
- To see how these are used, see the panes which use them within the data browser.
88
-
89
- The level of support for this varies.
90
-
91
- See also: [A short introduction to the Form system](https://solidos.github.io/solid-ui/Documentation/forms-intro.html)
92
-
93
- Contributions of bug fixes and new functionality, documentation, and tests are
94
- always appreciated.
95
-
96
- ## Development
58
+ ### Development new components
97
59
 
98
60
  When developing a component in solid-ui you can test it in isolation using storybook
99
61
 
@@ -104,5 +66,8 @@ npm run storybook
104
66
 
105
67
  If there is no story for the component yet, add a new one to `./src/stories`.
106
68
 
107
- When you want to test the component within a solid-pane, you can use the [development mode of solid-panes](https://github.com/solidos/solid-panes#development) or
108
- [mashlib-dev](https://github.com/solidos/mashlib-dev).
69
+ When you want to test the component within a solid-pane, you can use the [development mode of solid-panes](https://github.com/solidos/solid-panes#development).
70
+
71
+ ## Further documentation
72
+
73
+ - [Some code know-how](https://github.com/SolidOS/solidos/wiki/2.-Solid-UI-know-how)
package/dist/main.js CHANGED
@@ -15192,11 +15192,11 @@ Object.defineProperty(exports, "__esModule", ({
15192
15192
  }));
15193
15193
  exports.versionInfo = void 0;
15194
15194
  var versionInfo = {
15195
- buildTime: '2022-05-10T17:01:23Z',
15196
- commit: '3e0d1a42e042cb5542cbc183d7ae53eec6498254',
15195
+ buildTime: '2022-05-13T07:20:35Z',
15196
+ commit: '3e379ebd1779dad724424c903151563dcf84a0c7',
15197
15197
  npmInfo: {
15198
15198
  'solid-ui': '2.4.22',
15199
- npm: '6.14.16',
15199
+ npm: '6.14.17',
15200
15200
  ares: '1.18.1',
15201
15201
  brotli: '1.0.9',
15202
15202
  cldr: '40.0',
@@ -15205,12 +15205,12 @@ var versionInfo = {
15205
15205
  modules: '83',
15206
15206
  napi: '8',
15207
15207
  nghttp2: '1.42.0',
15208
- node: '14.19.1',
15208
+ node: '14.19.2',
15209
15209
  openssl: '1.1.1n',
15210
15210
  tz: '2021a3',
15211
15211
  unicode: '14.0',
15212
15212
  uv: '1.42.0',
15213
- v8: '8.4.371.23-node.85',
15213
+ v8: '8.4.371.23-node.87',
15214
15214
  zlib: '1.2.11'
15215
15215
  }
15216
15216
  };
@@ -16280,6 +16280,7 @@ function openHrefInOutlineMode(e) {
16280
16280
 
16281
16281
  if (dom.outlineManager) {
16282
16282
  // @@ TODO Remove the use of document as a global object
16283
+ // TODO fix dependency cycle to solid-panes by calling outlineManager
16283
16284
  ;
16284
16285
  dom.outlineManager.GotoSubject(_solidLogic.store.sym(uri), true, undefined, true, undefined);
16285
16286
  } else if (window && window.panes && window.panes.getOutliner) {
@@ -16407,6 +16408,7 @@ function linkButton(dom, object) {
16407
16408
  b.textContent = 'Goto ' + utils.label(object);
16408
16409
  b.addEventListener('click', function (_event) {
16409
16410
  // b.parentNode.removeChild(b)
16411
+ // TODO fix dependency cycle to solid-panes by calling outlineManager
16410
16412
  ;
16411
16413
  dom.outlineManager.GotoSubject(object, true, undefined, true, undefined);
16412
16414
  }, true);
@@ -17262,10 +17264,11 @@ _fieldFunction.field[ns.ui('Form').uri] = _fieldFunction.field[ns.ui('Group').ur
17262
17264
 
17263
17265
  if (already[key]) {
17264
17266
  // been there done that
17265
- box.appendChild(dom.createTextNode('Group: see above ' + key));
17266
- var plist = [$rdf.st(subject, ns.owl('sameAs'), subject)]; // @@ need prev subject
17267
+ box.appendChild(dom.createTextNode('Group: see above ' + key)); // TODO fix dependency cycle to solid-panes by calling outlineManager
17268
+ // const plist = [$rdf.st(subject, ns.owl('sameAs'), subject)] // @@ need prev subject
17269
+ // dom.outlineManager.appendPropertyTRs(box, plist)
17270
+ // dom.appendChild(plist)
17267
17271
 
17268
- dom.outlineManager.appendPropertyTRs(box, plist);
17269
17272
  return box;
17270
17273
  }
17271
17274
 
@@ -17795,8 +17798,7 @@ _fieldFunction.field[ns.ui('Multiple').uri] = function (dom, container, already,
17795
17798
  }
17796
17799
 
17797
17800
  var multipleUIlabel = kb.any(form, ui('label'));
17798
- if (!multipleUIlabel) multipleUIlabel = utils.label(property, true); // Init capital
17799
-
17801
+ if (!multipleUIlabel) multipleUIlabel = utils.label(property);
17800
17802
  var min = kb.any(form, ui('min')); // This is the minimum number -- default 0
17801
17803
 
17802
17804
  min = min ? 0 + min.value : 0;
@@ -18136,6 +18138,7 @@ _fieldFunction.field[ns.ui('Classifier').uri] = function (dom, container, alread
18136
18138
  ** -- radio buttons
18137
18139
  ** -- auto-complete typing
18138
18140
  **
18141
+ ** TODO: according to ontology ui:choice can also have ns.ui('default') - this is not implemented yet
18139
18142
  */
18140
18143
 
18141
18144
 
@@ -18185,6 +18188,10 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18185
18188
  firstSelectOptionText = utils.label(subject, true);
18186
18189
  }
18187
18190
 
18191
+ if (subject.termType === 'BlankNode') {
18192
+ firstSelectOptionText = '* Select for ' + utils.label(property) + ' *';
18193
+ }
18194
+
18188
18195
  var opts = {
18189
18196
  form: form,
18190
18197
  subForm: subForm,
@@ -18476,7 +18483,8 @@ function promptForNew(dom, kb, subject, predicate, theClass, form, dataDoc, call
18476
18483
  b.setAttribute('type', 'button');
18477
18484
  b.setAttribute('style', 'float: right;');
18478
18485
  b.innerHTML = 'Goto ' + utils.label(theClass);
18479
- b.addEventListener('click', function (_e) {
18486
+ b.addEventListener('click', // TODO fix dependency cycle to solid-panes by calling outlineManager
18487
+ function (_e) {
18480
18488
  dom.outlineManager.GotoSubject(theClass, true, undefined, true, undefined);
18481
18489
  }, false);
18482
18490
  return box;