solid-ui 2.4.30 → 2.4.31
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/solid-ui.js +1520 -1074
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +14 -18
- package/lib/login/login.js.map +1 -1
- package/lib/media/media-capture.d.ts +2 -2
- package/lib/media/media-capture.d.ts.map +1 -1
- package/lib/media/media-capture.js +11 -15
- package/lib/media/media-capture.js.map +1 -1
- package/lib/pad.d.ts +2 -2
- package/lib/pad.d.ts.map +1 -1
- package/lib/pad.js +15 -39
- package/lib/pad.js.map +1 -1
- package/lib/participation.d.ts +7 -7
- package/lib/participation.d.ts.map +1 -1
- package/lib/participation.js +26 -24
- package/lib/participation.js.map +1 -1
- package/lib/style.js +93 -85
- package/lib/style.js.map +1 -1
- package/lib/styleConstants.js +35 -0
- package/lib/styleConstants.js.map +1 -0
- package/lib/tabs.d.ts +0 -125
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +15 -8
- package/lib/tabs.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +11 -19
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.d.ts.map +1 -1
- package/lib/widgets/error.js +9 -2
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/basic.d.ts.map +1 -1
- package/lib/widgets/forms/basic.js +5 -4
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js +2 -2
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms.js +9 -8
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +4 -4
package/lib/participation.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.manageParticipation = manageParticipation;
|
|
9
9
|
exports.participationObject = participationObject;
|
|
10
10
|
exports.recordParticipation = recordParticipation;
|
|
11
|
-
exports.
|
|
11
|
+
exports.renderParticipants = renderParticipants;
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -24,6 +24,8 @@ var ns = _interopRequireWildcard(require("./ns"));
|
|
|
24
24
|
var _widgets = require("./widgets");
|
|
25
25
|
var _utils = require("./utils");
|
|
26
26
|
var _pad = require("./pad");
|
|
27
|
+
var style = _interopRequireWildcard(require("./style"));
|
|
28
|
+
var _styleConstants = _interopRequireDefault(require("./styleConstants"));
|
|
27
29
|
var _solidLogic = require("solid-logic");
|
|
28
30
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
31
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -31,7 +33,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
31
33
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
32
34
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
33
35
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
34
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* Manage a UI for the
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* Manage a UI for the participation of a person in any thing
|
|
35
37
|
*/ // import { currentUser } from './authn/authn'
|
|
36
38
|
var ParticipationTableElement = /*#__PURE__*/function (_HTMLTableElement) {
|
|
37
39
|
(0, _inherits2["default"])(ParticipationTableElement, _HTMLTableElement);
|
|
@@ -57,11 +59,11 @@ var store = _solidLogic.solidLogicSingleton.store;
|
|
|
57
59
|
* @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)
|
|
58
60
|
* @param {NamedNode} subject - the thing in which the participation is happening
|
|
59
61
|
* @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)
|
|
60
|
-
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
|
|
62
|
+
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable; these are used by the personTR button
|
|
61
63
|
*/
|
|
62
|
-
function
|
|
63
|
-
table.setAttribute('style',
|
|
64
|
-
var
|
|
64
|
+
function renderParticipants(dom, table, unused1, subject, unused2, options) {
|
|
65
|
+
table.setAttribute('style', style.participantsStyle);
|
|
66
|
+
var newRowForParticipation = function newRowForParticipation(parp) {
|
|
65
67
|
var person = store.any(parp, ns.wf('participant'));
|
|
66
68
|
var tr;
|
|
67
69
|
if (!person) {
|
|
@@ -69,13 +71,14 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
69
71
|
tr.textContent = '???'; // Don't crash - invalid part'n entry
|
|
70
72
|
return tr;
|
|
71
73
|
}
|
|
72
|
-
var bg = store.anyValue(parp, ns.ui('backgroundColor')) ||
|
|
74
|
+
var bg = store.anyValue(parp, ns.ui('backgroundColor')) || _styleConstants["default"].participationDefaultBackground;
|
|
73
75
|
var block = dom.createElement('div');
|
|
74
|
-
block.setAttribute('style',
|
|
76
|
+
block.setAttribute('style', style.participantsBlock);
|
|
77
|
+
block.style.backgroundColor = bg;
|
|
75
78
|
tr = (0, _widgets.personTR)(dom, null, person, options);
|
|
76
79
|
table.appendChild(tr);
|
|
77
80
|
var td = dom.createElement('td');
|
|
78
|
-
td.setAttribute('style',
|
|
81
|
+
td.setAttribute('style', style.personTableTD);
|
|
79
82
|
td.appendChild(block);
|
|
80
83
|
tr.insertBefore(td, tr.firstChild);
|
|
81
84
|
return tr;
|
|
@@ -89,16 +92,16 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
89
92
|
var participations = parps.map(function (p) {
|
|
90
93
|
return p[1];
|
|
91
94
|
});
|
|
92
|
-
(0, _utils.syncTableToArray)(table, participations,
|
|
95
|
+
(0, _utils.syncTableToArray)(table, participations, newRowForParticipation);
|
|
93
96
|
};
|
|
94
97
|
table.refresh = syncTable;
|
|
95
98
|
syncTable();
|
|
96
99
|
return table;
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
/** Record, or find old,
|
|
102
|
+
/** Record, or find old, Participation object
|
|
100
103
|
*
|
|
101
|
-
* A
|
|
104
|
+
* A participation object is a place to record things specifically about
|
|
102
105
|
* subject and the user, such as preferences, start of membership, etc
|
|
103
106
|
* @param {NamedNode} subject - the thing in which the participation is happening
|
|
104
107
|
* @param {NamedNode} document - where to record the data
|
|
@@ -133,19 +136,19 @@ function participationObject(subject, padDoc, me) {
|
|
|
133
136
|
}
|
|
134
137
|
candidates.sort(); // Pick the earliest
|
|
135
138
|
// @@ Possibly, for extra credit, delete the others, if we have write access
|
|
136
|
-
debug.warn('Multiple
|
|
139
|
+
debug.warn('Multiple participation objects, picking earliest, in ' + padDoc);
|
|
137
140
|
resolve(candidates[0][1]);
|
|
138
141
|
// throw new Error('Multiple records of your participation')
|
|
139
142
|
}
|
|
140
143
|
if (parps.length) {
|
|
141
144
|
// If I am not already recorded
|
|
142
|
-
resolve(parps[0]); // returns the
|
|
145
|
+
resolve(parps[0]); // returns the participation object
|
|
143
146
|
} else {
|
|
144
147
|
var _participation2 = (0, _widgets.newThing)(padDoc);
|
|
145
148
|
var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), _participation2, padDoc), (0, _rdflib.st)(_participation2, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(_participation2, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(_participation2, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
|
|
146
149
|
store.updater.update([], ins, function (uri, ok, errorMessage) {
|
|
147
150
|
if (!ok) {
|
|
148
|
-
reject(new Error('Error recording your
|
|
151
|
+
reject(new Error('Error recording your participation: ' + errorMessage));
|
|
149
152
|
} else {
|
|
150
153
|
resolve(_participation2);
|
|
151
154
|
}
|
|
@@ -158,7 +161,7 @@ function participationObject(subject, padDoc, me) {
|
|
|
158
161
|
/** Record my participation and display participants
|
|
159
162
|
*
|
|
160
163
|
* @param {NamedNode} subject - the thing in which participation is happening
|
|
161
|
-
* @param {NamedNode} padDoc - the document into which the
|
|
164
|
+
* @param {NamedNode} padDoc - the document into which the participation should be recorded
|
|
162
165
|
* @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works
|
|
163
166
|
*
|
|
164
167
|
*/
|
|
@@ -174,22 +177,21 @@ function recordParticipation(subject, padDoc, refreshable) {
|
|
|
174
177
|
}
|
|
175
178
|
if (parps.length) {
|
|
176
179
|
// If I am not already recorded
|
|
177
|
-
return parps[0]; // returns the
|
|
180
|
+
return parps[0]; // returns the participation object
|
|
178
181
|
} else {
|
|
179
182
|
if (!store.updater.editable(padDoc)) {
|
|
180
|
-
debug.log('Not recording participation, as no write
|
|
183
|
+
debug.log('Not recording participation, as no write access as ' + me + ' to ' + padDoc);
|
|
181
184
|
return null;
|
|
182
185
|
}
|
|
183
186
|
var participation = (0, _widgets.newThing)(padDoc);
|
|
184
187
|
var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), participation, padDoc), (0, _rdflib.st)(participation, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(participation, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(participation, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
|
|
185
188
|
store.updater.update([], ins, function (uri, ok, errorMessage) {
|
|
186
189
|
if (!ok) {
|
|
187
|
-
throw new Error('Error recording your
|
|
190
|
+
throw new Error('Error recording your participation: ' + errorMessage);
|
|
188
191
|
}
|
|
189
192
|
if (refreshable && refreshable.refresh) {
|
|
190
193
|
refreshable.refresh();
|
|
191
194
|
}
|
|
192
|
-
// UI.pad.renderPartipants(dom, table, padDoc, subject, me, options)
|
|
193
195
|
});
|
|
194
196
|
return participation;
|
|
195
197
|
}
|
|
@@ -199,21 +201,21 @@ function recordParticipation(subject, padDoc, refreshable) {
|
|
|
199
201
|
*
|
|
200
202
|
* @param {Document} dom - the web page loaded into the browser
|
|
201
203
|
* @param {HTMLDivElement} container - the container element where the participants should be displayed
|
|
202
|
-
* @param {NamedNode} document - the document into which the
|
|
204
|
+
* @param {NamedNode} document - the document into which the participation should be shown
|
|
203
205
|
* @param {NamedNode} subject - the thing in which participation is happening
|
|
204
206
|
* @param {NamedNode} me - the logged in user
|
|
205
|
-
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
|
|
207
|
+
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable; these are used by the personTR button
|
|
206
208
|
*
|
|
207
209
|
*/
|
|
208
210
|
function manageParticipation(dom, container, padDoc, subject, me, options) {
|
|
209
211
|
var table = dom.createElement('table');
|
|
210
212
|
container.appendChild(table);
|
|
211
|
-
|
|
213
|
+
renderParticipants(dom, table, padDoc, subject, me, options);
|
|
212
214
|
var _participation;
|
|
213
215
|
try {
|
|
214
216
|
_participation = recordParticipation(subject, padDoc, table);
|
|
215
217
|
} catch (e) {
|
|
216
|
-
container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your
|
|
218
|
+
container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your participation: ' + e)); // Clean up?
|
|
217
219
|
}
|
|
218
220
|
return table;
|
|
219
221
|
}
|
package/lib/participation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participation.js","names":["_debug","_interopRequireWildcard","require","debug","_rdflib","ns","_widgets","_utils","_pad","_solidLogic","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","F","s","done","value","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ParticipationTableElement","_HTMLTableElement","_inherits2","_super","_this","_classCallCheck2","_len","args","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","_wrapNativeSuper2","HTMLTableElement","store","solidLogicSingleton","renderPartipants","dom","table","unused1","subject","unused2","options","setAttribute","newRowForParticpation","parp","person","any","wf","tr","createElement","textContent","bg","anyValue","ui","block","personTR","appendChild","td","insertBefore","firstChild","syncTable","parps","each","map","log","cal","sort","participations","p","syncTableToArray","refresh","participationObject","padDoc","me","Promise","resolve","reject","Error","filter","pn","holds","candidates","_iterator","_step","participation","date","push","warn","newThing","ins","st","Date","lightColorHash","updater","update","uri","ok","errorMessage","recordParticipation","refreshable","authn","currentUser","editable","manageParticipation","container","_participation","errorMessageBlock"],"sources":["../src/participation.ts"],"sourcesContent":["/* Manage a UI for the particpation of a person in any thing\n*/\n\n// import { currentUser } from './authn/authn'\nimport * as debug from './debug'\nimport { LiveStore, NamedNode, st, UpdateManager } from 'rdflib'\nimport * as ns from './ns'\nimport { personTR, newThing, errorMessageBlock } from './widgets'\nimport { syncTableToArray } from './utils'\nimport { lightColorHash } from './pad'\nimport { log } from './debug'\nimport { solidLogicSingleton, authn } from 'solid-logic'\n\ntype ParticipationOptions = {\n deleteFunction?: () => {}\n link?: string\n draggable?: boolean\n}\n\nclass ParticipationTableElement extends HTMLTableElement {\n refresh?: () => void\n}\nconst store = solidLogicSingleton.store as LiveStore\n\n/** Manage participation in this session\n*\n* @param {Document} dom - the web page loaded into the browser\n* @param {HTMLTableElement} table - the table element\n* @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)\n* @param {NamedNode} subject - the thing in which the participation is happening\n* @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)\n* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button\n*/\nexport function renderPartipants (dom: HTMLDocument, table: ParticipationTableElement, unused1: NamedNode, subject: NamedNode, unused2: NamedNode, options: ParticipationOptions) {\n table.setAttribute('style', 'margin: 0.8em;')\n\n const newRowForParticpation = function (parp) {\n const person = store.any(parp, ns.wf('participant'))\n\n let tr\n if (!person) {\n tr = dom.createElement('tr')\n tr.textContent = '???' // Don't crash - invalid part'n entry\n return tr\n }\n const bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white'\n\n const block = dom.createElement('div')\n block.setAttribute(\n 'style',\n 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888; background-color: ' +\n bg\n )\n tr = personTR(dom, null, person, options)\n table.appendChild(tr)\n const td = dom.createElement('td')\n td.setAttribute('style', 'vertical-align: middle;')\n td.appendChild(block)\n tr.insertBefore(td, tr.firstChild)\n return tr\n }\n\n const syncTable = function () {\n const parps = store.each(subject, ns.wf('participation')).map(function (parp) {\n log('in participants')\n return [store.anyValue(parp as any, ns.cal('dtstart')) || '9999-12-31', parp]\n })\n parps.sort() // List in order of joining\n const participations = parps.map(function (p) {\n return p[1]\n })\n syncTableToArray(table, participations, newRowForParticpation)\n }\n table.refresh = syncTable\n syncTable()\n return table\n}\n\n/** Record, or find old, Particpation object\n *\n * A particpaption object is a place to record things specifically about\n * subject and the user, such as preferences, start of membership, etc\n * @param {NamedNode} subject - the thing in which the participation is happening\n * @param {NamedNode} document - where to record the data\n * @param {NamedNode} me - the logged in user\n *\n */\nexport function participationObject (subject: NamedNode, padDoc: NamedNode, me: NamedNode) {\n return new Promise(function (resolve, reject) {\n if (!me) {\n throw new Error('No user id')\n }\n\n const parps = store.each(subject, ns.wf('participation')).filter(function (pn) {\n return store.holds(pn, ns.wf('participant'), me)\n })\n if (parps.length > 1) { // This can happen. https://github.com/solidos/chat-pane/issues/71\n const candidates: (string | NamedNode) [][] = []\n for (const participation of parps) {\n const date = store.anyValue(participation as NamedNode, ns.cal('dtstart'))\n if (date) {\n candidates.push([date, participation as NamedNode])\n }\n }\n candidates.sort() // Pick the earliest\n // @@ Possibly, for extra credit, delete the others, if we have write access\n debug.warn('Multiple particpation objects, picking earliest, in ' + padDoc)\n resolve(candidates[0][1])\n // throw new Error('Multiple records of your participation')\n }\n if (parps.length) {\n // If I am not already recorded\n resolve(parps[0]) // returns the particpation object\n } else {\n const participation = newThing(padDoc)\n const ins = [\n st(subject, ns.wf('participation'), participation, padDoc),\n\n st(participation, ns.wf('participant'), me, padDoc),\n st(participation, ns.cal('dtstart'), new Date() as any, padDoc),\n st(\n participation,\n ns.ui('backgroundColor'),\n lightColorHash(me) as any,\n padDoc\n )\n ];\n (store.updater as UpdateManager).update([], ins, function (uri: string | null | undefined, ok: boolean, errorMessage?: string) {\n if (!ok) {\n reject(new Error('Error recording your partipation: ' + errorMessage))\n } else {\n resolve(participation)\n }\n })\n resolve(participation)\n }\n })\n}\n\n/** Record my participation and display participants\n *\n * @param {NamedNode} subject - the thing in which participation is happening\n * @param {NamedNode} padDoc - the document into which the particpation should be recorded\n * @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works\n *\n */\nexport function recordParticipation (subject: NamedNode, padDoc: NamedNode, refreshable: any) {\n const me = authn.currentUser()\n if (!me) return // Not logged in\n\n const parps = store.each(subject, ns.wf('participation')).filter(function (pn) {\n return store.holds(pn, ns.wf('participant'), me)\n })\n if (parps.length > 1) {\n throw new Error('Multiple records of your participation')\n }\n if (parps.length) {\n // If I am not already recorded\n return parps[0] // returns the particpation object\n } else {\n if (!(store.updater as UpdateManager).editable(padDoc)) {\n debug.log('Not recording participation, as no write acesss as ' + me + ' to ' + padDoc)\n return null\n }\n const participation = newThing(padDoc)\n const ins = [\n st(subject, ns.wf('participation'), participation, padDoc),\n\n st(participation, ns.wf('participant'), me, padDoc),\n st(participation, ns.cal('dtstart'), new Date() as any, padDoc),\n st(\n participation,\n ns.ui('backgroundColor'),\n lightColorHash(me) as any,\n padDoc\n )\n ];\n (store.updater as UpdateManager).update([], ins, function (uri: string | null | undefined, ok: boolean, errorMessage?: string) {\n if (!ok) {\n throw new Error('Error recording your partipation: ' + errorMessage)\n }\n if (refreshable && refreshable.refresh) {\n refreshable.refresh()\n }\n // UI.pad.renderPartipants(dom, table, padDoc, subject, me, options)\n })\n return participation\n }\n}\n\n/** Record my participation and display participants\n*\n* @param {Document} dom - the web page loaded into the browser\n* @param {HTMLDivElement} container - the container element where the participants should be displayed\n* @param {NamedNode} document - the document into which the particpation should be shown\n* @param {NamedNode} subject - the thing in which participation is happening\n* @param {NamedNode} me - the logged in user\n* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button\n*\n*/\nexport function manageParticipation (\n dom: Document,\n container: HTMLDivElement,\n padDoc: NamedNode,\n subject: NamedNode,\n me: NamedNode,\n options: ParticipationOptions\n) {\n const table = dom.createElement('table')\n container.appendChild(table)\n renderPartipants(dom, table, padDoc, subject, me, options)\n let _participation\n try {\n _participation = recordParticipation(subject, padDoc, table)\n } catch (e) {\n container.appendChild(\n errorMessageBlock(\n dom,\n 'Error recording your partipation: ' + e\n )\n ) // Clean up?\n }\n return table\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgC,IAAAC,KAAA,GAAAH,MAAA;AAChC,IAAAI,OAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAJ,uBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAEA,IAAAO,WAAA,GAAAP,OAAA;AAAwD,SAAAQ,yB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CACF,CAAC,EAAC;EACJ;EACA,OAAO2F,KAAK;AACd"}
|
|
1
|
+
{"version":3,"file":"participation.js","names":["_debug","_interopRequireWildcard","require","debug","_rdflib","ns","_widgets","_utils","_pad","style","_styleConstants","_interopRequireDefault","_solidLogic","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","F","s","done","value","_e","f","TypeError","normalCompletion","didErr","err","step","next","_e2","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","arr","len","arr2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","ParticipationTableElement","_HTMLTableElement","_inherits2","_super","_this","_classCallCheck2","_len","args","_key","concat","_defineProperty2","_assertThisInitialized2","_createClass2","_wrapNativeSuper2","HTMLTableElement","store","solidLogicSingleton","renderParticipants","dom","table","unused1","subject","unused2","options","setAttribute","participantsStyle","newRowForParticipation","parp","person","any","wf","tr","createElement","textContent","bg","anyValue","ui","styleConstants","participationDefaultBackground","block","participantsBlock","backgroundColor","personTR","appendChild","td","personTableTD","insertBefore","firstChild","syncTable","parps","each","map","log","cal","sort","participations","p","syncTableToArray","refresh","participationObject","padDoc","me","Promise","resolve","reject","Error","filter","pn","holds","candidates","_iterator","_step","participation","date","push","warn","newThing","ins","st","Date","lightColorHash","updater","update","uri","ok","errorMessage","recordParticipation","refreshable","authn","currentUser","editable","manageParticipation","container","_participation","errorMessageBlock"],"sources":["../src/participation.ts"],"sourcesContent":["/* Manage a UI for the participation of a person in any thing\n*/\n\n// import { currentUser } from './authn/authn'\nimport * as debug from './debug'\nimport { LiveStore, NamedNode, st, UpdateManager } from 'rdflib'\nimport * as ns from './ns'\nimport { personTR, newThing, errorMessageBlock } from './widgets'\nimport { syncTableToArray } from './utils'\nimport { lightColorHash } from './pad'\nimport { log } from './debug'\nimport * as style from './style'\nimport styleConstants from './styleConstants'\nimport { solidLogicSingleton, authn } from 'solid-logic'\n\ntype ParticipationOptions = {\n deleteFunction?: () => {}\n link?: string\n draggable?: boolean\n}\n\nclass ParticipationTableElement extends HTMLTableElement {\n refresh?: () => void\n}\nconst store = solidLogicSingleton.store as LiveStore\n\n/** Manage participation in this session\n*\n* @param {Document} dom - the web page loaded into the browser\n* @param {HTMLTableElement} table - the table element\n* @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)\n* @param {NamedNode} subject - the thing in which the participation is happening\n* @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)\n* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable; these are used by the personTR button\n*/\nexport function renderParticipants (dom: HTMLDocument, table: ParticipationTableElement, unused1: NamedNode, subject: NamedNode, unused2: NamedNode, options: ParticipationOptions) {\n table.setAttribute('style', style.participantsStyle)\n\n const newRowForParticipation = function (parp) {\n const person = store.any(parp, ns.wf('participant'))\n\n let tr\n if (!person) {\n tr = dom.createElement('tr')\n tr.textContent = '???' // Don't crash - invalid part'n entry\n return tr\n }\n const bg = store.anyValue(parp, ns.ui('backgroundColor')) || styleConstants.participationDefaultBackground\n\n const block = dom.createElement('div')\n block.setAttribute(\n 'style', style.participantsBlock)\n block.style.backgroundColor = bg\n\n tr = personTR(dom, null, person, options)\n table.appendChild(tr)\n const td = dom.createElement('td')\n td.setAttribute('style', style.personTableTD)\n td.appendChild(block)\n tr.insertBefore(td, tr.firstChild)\n return tr\n }\n\n const syncTable = function () {\n const parps = store.each(subject, ns.wf('participation')).map(function (parp) {\n log('in participants')\n return [store.anyValue(parp as any, ns.cal('dtstart')) || '9999-12-31', parp]\n })\n parps.sort() // List in order of joining\n const participations = parps.map(function (p) {\n return p[1]\n })\n syncTableToArray(table, participations, newRowForParticipation)\n }\n table.refresh = syncTable\n syncTable()\n return table\n}\n\n/** Record, or find old, Participation object\n *\n * A participation object is a place to record things specifically about\n * subject and the user, such as preferences, start of membership, etc\n * @param {NamedNode} subject - the thing in which the participation is happening\n * @param {NamedNode} document - where to record the data\n * @param {NamedNode} me - the logged in user\n *\n */\nexport function participationObject (subject: NamedNode, padDoc: NamedNode, me: NamedNode) {\n return new Promise(function (resolve, reject) {\n if (!me) {\n throw new Error('No user id')\n }\n\n const parps = store.each(subject, ns.wf('participation')).filter(function (pn) {\n return store.holds(pn, ns.wf('participant'), me)\n })\n if (parps.length > 1) { // This can happen. https://github.com/solidos/chat-pane/issues/71\n const candidates: (string | NamedNode) [][] = []\n for (const participation of parps) {\n const date = store.anyValue(participation as NamedNode, ns.cal('dtstart'))\n if (date) {\n candidates.push([date, participation as NamedNode])\n }\n }\n candidates.sort() // Pick the earliest\n // @@ Possibly, for extra credit, delete the others, if we have write access\n debug.warn('Multiple participation objects, picking earliest, in ' + padDoc)\n resolve(candidates[0][1])\n // throw new Error('Multiple records of your participation')\n }\n if (parps.length) {\n // If I am not already recorded\n resolve(parps[0]) // returns the participation object\n } else {\n const participation = newThing(padDoc)\n const ins = [\n st(subject, ns.wf('participation'), participation, padDoc),\n\n st(participation, ns.wf('participant'), me, padDoc),\n st(participation, ns.cal('dtstart'), new Date() as any, padDoc),\n st(\n participation,\n ns.ui('backgroundColor'),\n lightColorHash(me) as any,\n padDoc\n )\n ];\n (store.updater as UpdateManager).update([], ins, function (uri: string | null | undefined, ok: boolean, errorMessage?: string) {\n if (!ok) {\n reject(new Error('Error recording your participation: ' + errorMessage))\n } else {\n resolve(participation)\n }\n })\n resolve(participation)\n }\n })\n}\n\n/** Record my participation and display participants\n *\n * @param {NamedNode} subject - the thing in which participation is happening\n * @param {NamedNode} padDoc - the document into which the participation should be recorded\n * @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works\n *\n */\nexport function recordParticipation (subject: NamedNode, padDoc: NamedNode, refreshable: any) {\n const me = authn.currentUser()\n if (!me) return // Not logged in\n\n const parps = store.each(subject, ns.wf('participation')).filter(function (pn) {\n return store.holds(pn, ns.wf('participant'), me)\n })\n if (parps.length > 1) {\n throw new Error('Multiple records of your participation')\n }\n if (parps.length) {\n // If I am not already recorded\n return parps[0] // returns the participation object\n } else {\n if (!(store.updater as UpdateManager).editable(padDoc)) {\n debug.log('Not recording participation, as no write access as ' + me + ' to ' + padDoc)\n return null\n }\n const participation = newThing(padDoc)\n const ins = [\n st(subject, ns.wf('participation'), participation, padDoc),\n\n st(participation, ns.wf('participant'), me, padDoc),\n st(participation, ns.cal('dtstart'), new Date() as any, padDoc),\n st(\n participation,\n ns.ui('backgroundColor'),\n lightColorHash(me) as any,\n padDoc\n )\n ];\n (store.updater as UpdateManager).update([], ins, function (uri: string | null | undefined, ok: boolean, errorMessage?: string) {\n if (!ok) {\n throw new Error('Error recording your participation: ' + errorMessage)\n }\n if (refreshable && refreshable.refresh) {\n refreshable.refresh()\n }\n })\n return participation\n }\n}\n\n/** Record my participation and display participants\n*\n* @param {Document} dom - the web page loaded into the browser\n* @param {HTMLDivElement} container - the container element where the participants should be displayed\n* @param {NamedNode} document - the document into which the participation should be shown\n* @param {NamedNode} subject - the thing in which participation is happening\n* @param {NamedNode} me - the logged in user\n* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable; these are used by the personTR button\n*\n*/\nexport function manageParticipation (\n dom: Document,\n container: HTMLDivElement,\n padDoc: NamedNode,\n subject: NamedNode,\n me: NamedNode,\n options: ParticipationOptions\n) {\n const table = dom.createElement('table')\n container.appendChild(table)\n renderParticipants(dom, table, padDoc, subject, me, options)\n let _participation\n try {\n _participation = recordParticipation(subject, padDoc, table)\n } catch (e) {\n container.appendChild(\n errorMessageBlock(\n dom,\n 'Error recording your participation: ' + e\n )\n ) // Clean up?\n }\n return table\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,IAAAA,MA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C,EAAa,EACbtC,OAA6B,EAC7B;EACA,IAAMJ,KAAK,GAAGD,GAAG,CAACc,aAAa,CAAC,OAAO,CAAC;EACxC4D,SAAS,CAACjD,WAAW,CAACxB,KAAK,CAAC;EAC5BF,kBAAkB,CAACC,GAAG,EAAEC,KAAK,EAAEyC,MAAM,EAAEvC,OAAO,EAAEwC,EAAE,EAAEtC,OAAO,CAAC;EAC5D,IAAIsE,cAAc;EAClB,IAAI;IACFA,cAAc,GAAGP,mBAAmB,CAACjE,OAAO,EAAEuC,MAAM,EAAEzC,KAAK,CAAC;EAC9D,CAAC,CAAC,OAAO3F,CAAC,EAAE;IACVoK,SAAS,CAACjD,WAAW,CACnB,IAAAmD,0BAAiB,EACf5E,GAAG,EACH,sCAAsC,GAAG1F,CAC3C,CACF,CAAC,EAAC;EACJ;EACA,OAAO2F,KAAK;AACd"}
|
package/lib/style.js
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.style = void 0;
|
|
8
|
+
var _styleConstants = _interopRequireDefault(require("./styleConstants"));
|
|
7
9
|
// Common readable consistent stylesheet
|
|
8
10
|
// to avoid using style sheets which are document-global
|
|
9
11
|
// and make programmable style toggling with selection, drag over, etc easier
|
|
10
|
-
|
|
11
12
|
// These must all end with semicolon so they can be appended to.
|
|
12
13
|
|
|
13
|
-
var formBorderColor = '#888888'; // Mid-grey
|
|
14
|
-
var lowProfileLinkColor = '#3B5998'; // Grey-blue, e.g., for field labels linking to ontology
|
|
15
|
-
var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to line up
|
|
16
|
-
// The latter we put in when switching awy from using tables. Getting allignment between
|
|
17
|
-
// fields in different groups though is hard problem.
|
|
18
|
-
|
|
19
14
|
var style = exports.style = {
|
|
20
15
|
// styleModule
|
|
21
16
|
|
|
22
17
|
checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
|
|
23
|
-
checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
|
|
18
|
+
checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em;',
|
|
24
19
|
fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
|
|
25
|
-
|
|
26
|
-
textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c;
|
|
20
|
+
formSelectStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
|
|
21
|
+
textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
|
|
27
22
|
textInputStyleUneditable:
|
|
28
23
|
// Color difference only
|
|
29
|
-
'background-color: white; padding: 0.5em; border: .05em solid white;
|
|
30
|
-
|
|
31
|
-
// Default text input size in characters roughly
|
|
32
|
-
buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
|
|
24
|
+
'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
|
|
25
|
+
buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
|
|
33
26
|
// 'background-color: #eef;
|
|
34
27
|
commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',
|
|
35
28
|
iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',
|
|
@@ -37,20 +30,18 @@ var style = exports.style = {
|
|
|
37
30
|
classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;',
|
|
38
31
|
// combine with buttonStyle
|
|
39
32
|
confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',
|
|
40
|
-
tabBorderRadius: '0.2em',
|
|
41
33
|
messageBodyStyle: 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',
|
|
42
34
|
pendingeditModifier: 'color: #bbb;',
|
|
43
|
-
highlightColor: '#7C4DFF',
|
|
44
|
-
// Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core
|
|
45
|
-
|
|
46
35
|
// Contacts
|
|
47
36
|
personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',
|
|
48
37
|
searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
|
|
49
38
|
autocompleteRowStyle: 'border: 0.2em solid straw;',
|
|
50
39
|
// Login buttons
|
|
51
|
-
|
|
40
|
+
signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
|
|
52
41
|
// was 0.5em radius
|
|
53
|
-
|
|
42
|
+
headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',
|
|
43
|
+
signUpBackground: 'background-color: #eef;',
|
|
44
|
+
signInBackground: 'background-color: #efe;',
|
|
54
45
|
// Forms
|
|
55
46
|
heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;',
|
|
56
47
|
// originally was brown; now grey
|
|
@@ -61,87 +52,104 @@ var style = exports.style = {
|
|
|
61
52
|
heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;',
|
|
62
53
|
// Lowest level used by default in small things
|
|
63
54
|
|
|
64
|
-
formBorderColor: formBorderColor,
|
|
65
|
-
// originally was brown; now grey
|
|
66
|
-
formHeadingColor: '#888888',
|
|
67
|
-
// originally was brown; now grey
|
|
68
55
|
formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;',
|
|
69
56
|
// originally was brown; now grey
|
|
70
57
|
formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;',
|
|
71
58
|
// originally used this
|
|
72
|
-
formGroupStyle: ["padding-left: 0em; border: 0.0em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), // weight 0
|
|
73
|
-
"padding-left: 2em; border: 0.05em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.1em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.2em solid ".concat(formBorderColor, "; border-radius: 0.2em;") // @@ pink
|
|
59
|
+
formGroupStyle: ["padding-left: 0em; border: 0.0em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), // weight 0
|
|
60
|
+
"padding-left: 2em; border: 0.05em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.1em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.2em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;") // @@ pink
|
|
74
61
|
],
|
|
75
|
-
formFieldLabelStyle: "
|
|
76
|
-
|
|
77
|
-
formFieldNameBoxStyle: "padding: 0.3em; vertical-align: middle; width:".concat(formFieldNameBoxWidth, ";"),
|
|
78
|
-
textInputBackgroundColor: '#eef',
|
|
79
|
-
textInputBackgroundColorUneditable: '#fff',
|
|
80
|
-
textInputColor: '#000',
|
|
81
|
-
textInputColorPending: '#888',
|
|
62
|
+
formFieldLabelStyle: "color: ".concat(_styleConstants["default"].lowProfileLinkColor, "; text-decoration: none;"),
|
|
63
|
+
formFieldNameBoxStyle: "padding: 0.3em; vertical-align: middle; width:".concat(_styleConstants["default"].formFieldNameBoxWidth, ";"),
|
|
82
64
|
multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' + ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',
|
|
83
65
|
// Buttons
|
|
84
66
|
renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',
|
|
85
67
|
imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
|
|
86
68
|
linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
|
|
87
69
|
// ACL
|
|
88
|
-
aclControlBoxContainer: 'margin: 1em',
|
|
89
|
-
aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
|
|
90
|
-
aclControlBoxStatus: 'display: none; margin: 1rem 0',
|
|
91
|
-
aclControlBoxStatusRevealed: 'display: block',
|
|
92
|
-
aclGroupContent: 'maxWidth: 650',
|
|
93
|
-
accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100
|
|
94
|
-
accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30
|
|
95
|
-
defaultsController: 'display: flex',
|
|
96
|
-
defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80
|
|
97
|
-
bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
|
|
98
|
-
group: 'color: #888',
|
|
99
|
-
group1: 'color: green',
|
|
100
|
-
group2: 'color: #cc0',
|
|
101
|
-
group3: 'color: orange',
|
|
102
|
-
group5: 'color: red',
|
|
103
|
-
group9: 'color: blue',
|
|
104
|
-
group13: 'color: purple',
|
|
105
|
-
trustedAppAddApplicationsTable: 'background-color: #eee',
|
|
106
|
-
trustedAppCancelButton: 'float: right',
|
|
107
|
-
trustedAppControllerI: 'border-color: orange;
|
|
108
|
-
temporaryStatusInit: 'background: green',
|
|
109
|
-
temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
|
|
70
|
+
aclControlBoxContainer: 'margin: 1em;',
|
|
71
|
+
aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem;',
|
|
72
|
+
aclControlBoxStatus: 'display: none; margin: 1rem 0;',
|
|
73
|
+
aclControlBoxStatusRevealed: 'display: block;',
|
|
74
|
+
aclGroupContent: 'maxWidth: 650;',
|
|
75
|
+
accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%;',
|
|
76
|
+
accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%;',
|
|
77
|
+
defaultsController: 'display: flex;',
|
|
78
|
+
defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%;',
|
|
79
|
+
bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em;',
|
|
80
|
+
group: 'color: #888;',
|
|
81
|
+
group1: 'color: green;',
|
|
82
|
+
group2: 'color: #cc0;',
|
|
83
|
+
group3: 'color: orange;',
|
|
84
|
+
group5: 'color: red;',
|
|
85
|
+
group9: 'color: blue;',
|
|
86
|
+
group13: 'color: purple;',
|
|
87
|
+
trustedAppAddApplicationsTable: 'background-color: #eee;',
|
|
88
|
+
trustedAppCancelButton: 'float: right;',
|
|
89
|
+
trustedAppControllerI: 'border-color: orange; border-radius: 1em; border-width: 0.1em;',
|
|
90
|
+
temporaryStatusInit: 'background: green;',
|
|
91
|
+
temporaryStatusEnd: 'background: transparent; transition: background 5s linear;',
|
|
110
92
|
// header
|
|
111
|
-
headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',
|
|
112
|
-
headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
|
|
113
|
-
headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
|
|
114
|
-
headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
|
|
115
|
-
headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100
|
|
116
|
-
headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
|
|
117
|
-
headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
|
|
118
|
-
headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
|
|
119
|
-
headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
|
|
120
|
-
headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
|
|
121
|
-
headerUserMenuListItem: 'border-bottom: solid 1px #000000',
|
|
122
|
-
headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
|
|
123
|
-
headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
|
|
124
|
-
headerBannerLink: 'display: block',
|
|
125
|
-
headerBannerRightMenu: 'display: flex',
|
|
126
|
-
headerBannerLogin: 'margin-left: auto',
|
|
127
|
-
allChildrenVisible: 'display:true',
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
|
|
93
|
+
headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none;',
|
|
94
|
+
headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',
|
|
95
|
+
headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px;',
|
|
96
|
+
headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important;',
|
|
97
|
+
headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;',
|
|
98
|
+
headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',
|
|
99
|
+
headerUserMenuList: 'list-style: none; margin: 0; padding: 0;',
|
|
100
|
+
headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true;',
|
|
101
|
+
headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;',
|
|
102
|
+
headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;',
|
|
103
|
+
headerUserMenuListItem: 'border-bottom: solid 1px #000000;',
|
|
104
|
+
headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;',
|
|
105
|
+
headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;',
|
|
106
|
+
headerBannerLink: 'display: block;',
|
|
107
|
+
headerBannerRightMenu: 'display: flex;',
|
|
108
|
+
headerBannerLogin: 'margin-left: auto;',
|
|
109
|
+
allChildrenVisible: 'display:true;',
|
|
110
|
+
headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto;',
|
|
111
|
+
headerBannerHelpMenu: 'border-left: solid 1px #000000; margin-left: auto;',
|
|
112
|
+
headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important;',
|
|
132
113
|
// may just be 65px round($icon-size * 352 / 322);
|
|
133
114
|
|
|
134
115
|
// footer
|
|
135
|
-
footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
|
|
116
|
+
footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;',
|
|
136
117
|
// buttons
|
|
137
|
-
primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
138
|
-
primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
139
|
-
primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
140
|
-
primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
141
|
-
secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
142
|
-
secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
|
|
143
|
-
secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
|
|
144
|
-
secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'
|
|
118
|
+
primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
|
|
119
|
+
primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
|
|
120
|
+
primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
|
|
121
|
+
primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
|
|
122
|
+
secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
|
|
123
|
+
secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
|
|
124
|
+
secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
|
|
125
|
+
secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
|
|
126
|
+
// media
|
|
127
|
+
controlStyle: "border-radius: 0.5em; margin: 0.8em; width:".concat(_styleConstants["default"].mediaModuleCanvasWidth, "; height:").concat(_styleConstants["default"].mediaModuleCanvasHeight, ";"),
|
|
128
|
+
// dragAndDrop
|
|
129
|
+
dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',
|
|
130
|
+
dropEvent: 'background-color: white; border: 0em solid black;',
|
|
131
|
+
restoreStyle: 'background-color: white;',
|
|
132
|
+
// errors
|
|
133
|
+
errorCancelButton: 'width: 2em; height: 2em; align: right;',
|
|
134
|
+
errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',
|
|
135
|
+
// pad
|
|
136
|
+
notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',
|
|
137
|
+
upstreamStatus: 'width: 50%;',
|
|
138
|
+
downstreamStatus: 'width: 50%;',
|
|
139
|
+
baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',
|
|
140
|
+
headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',
|
|
141
|
+
headingStyle: ['font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;', 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;', 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'],
|
|
142
|
+
// participation
|
|
143
|
+
participantsStyle: 'margin: 0.8em;',
|
|
144
|
+
participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',
|
|
145
|
+
personTableTD: 'vertical-align: middle;',
|
|
146
|
+
// tabs
|
|
147
|
+
tabsNavElement: 'margin: 0;',
|
|
148
|
+
tabsRootElement: 'display: flex; height: 100%; width: 100%;',
|
|
149
|
+
tabsMainElement: 'margin: 0; width:100%; height: 100%;',
|
|
150
|
+
tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',
|
|
151
|
+
makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer;',
|
|
152
|
+
ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'
|
|
145
153
|
};
|
|
146
154
|
style.setStyle = function setStyle(ele, styleName) {
|
|
147
155
|
ele.style = style[styleName];
|