solid-ui 2.4.28-b8b4cdaf → 2.4.28-b99176c4
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 +6 -6
- 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/participation.d.ts +1 -1
- package/lib/participation.js +1 -1
- package/lib/participation.js.map +1 -1
- package/lib/styleConstants.js +1 -1
- package/lib/styleConstants.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/dragAndDrop.js +2 -2
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/package.json +1 -1
package/lib/participation.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare class ParticipationTableElement extends HTMLTableElement {
|
|
|
14
14
|
* @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)
|
|
15
15
|
* @param {NamedNode} subject - the thing in which the participation is happening
|
|
16
16
|
* @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)
|
|
17
|
-
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable
|
|
17
|
+
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
|
|
18
18
|
*/
|
|
19
19
|
export declare function renderParticipants(dom: HTMLDocument, table: ParticipationTableElement, unused1: NamedNode, subject: NamedNode, unused2: NamedNode, options: ParticipationOptions): ParticipationTableElement;
|
|
20
20
|
/** Record, or find old, Participation object
|
package/lib/participation.js
CHANGED
|
@@ -57,7 +57,7 @@ var store = _solidLogic.solidLogicSingleton.store;
|
|
|
57
57
|
* @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)
|
|
58
58
|
* @param {NamedNode} subject - the thing in which the participation is happening
|
|
59
59
|
* @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
|
|
60
|
+
* @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
|
|
61
61
|
*/
|
|
62
62
|
function renderParticipants(dom, table, unused1, subject, unused2, options) {
|
|
63
63
|
table.setAttribute('style', style.participantsStyle);
|
package/lib/participation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participation.js","names":["debug","_interopRequireWildcard","require","_rdflib","ns","_widgets","_utils","_pad","style","_styleConstants","_interopRequireDefault","_solidLogic","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_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,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,eAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAwD,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAZ,wBAAAgB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kB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ACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASmB,mBAAmBA,CACjCzE,GAAa,EACb0E,SAAyB,EACzBhC,MAAiB,EACjBvC,OAAkB,EAClBwC,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,OAAO1D,CAAC,EAAE;IACVmI,SAAS,CAACjD,WAAW,CACnB,IAAAmD,0BAAiB,EACf5E,GAAG,EACH,sCAAsC,GAAGzD,CAAC,CAC3C,CACF,EAAC;EACJ;;EACA,OAAO0D,KAAK;AACd"}
|
|
1
|
+
{"version":3,"file":"participation.js","names":["debug","_interopRequireWildcard","require","_rdflib","ns","_widgets","_utils","_pad","style","_styleConstants","_interopRequireDefault","_solidLogic","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","i","F","s","n","done","value","e","_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,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,eAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAwD,SAAAU,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAZ,wBAAAgB,GAAA,EAAAJ,WAAA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,EAACnB,EAAE,CAAC,EAClBD,MAAM,CACP,CACF;IACA7C,KAAK,CAACkE,OAAO,CAAmBC,MAAM,CAAC,EAAE,EAAEL,GAAG,EAAE,UAAUM,GAA8B,EAAEC,EAAW,EAAEC,YAAqB,EAAE;MAC7H,IAAI,CAACD,EAAE,EAAE;QACP,MAAM,IAAInB,KAAK,CAAC,sCAAsC,GAAGoB,YAAY,CAAC;MACxE;MACA,IAAIE,WAAW,IAAIA,WAAW,CAAC7B,OAAO,EAAE;QACtC6B,WAAW,CAAC7B,OAAO,EAAE;MACvB;IACF,CAAC,CAAC;IACF,OAAOc,aAAa;EACtB;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASmB,mBAAmBA,CACjCzE,GAAa,EACb0E,SAAyB,EACzBhC,MAAiB,EACjBvC,OAAkB,EAClBwC,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,OAAO1D,CAAC,EAAE;IACVmI,SAAS,CAACjD,WAAW,CACnB,IAAAmD,0BAAiB,EACf5E,GAAG,EACH,sCAAsC,GAAGzD,CAAC,CAC3C,CACF,EAAC;EACJ;;EACA,OAAO0D,KAAK;AACd"}
|
package/lib/styleConstants.js
CHANGED
|
@@ -22,7 +22,7 @@ var _default = {
|
|
|
22
22
|
mediaModuleCanvasWidth: '640',
|
|
23
23
|
mediaModuleCanvasHeight: '480',
|
|
24
24
|
textInputSize: 20,
|
|
25
|
-
//
|
|
25
|
+
// Default text input size in characters roughly
|
|
26
26
|
tabBorderRadius: '0.2em',
|
|
27
27
|
textInputBackgroundColor: '#eef',
|
|
28
28
|
textInputBackgroundColorUneditable: '#fff',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleConstants.js","names":["highlightColor","formBorderColor","formHeadingColor","lowProfileLinkColor","formFieldNameBoxWidth","mediaModuleCanvasWidth","mediaModuleCanvasHeight","textInputSize","tabBorderRadius","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","defaultErrorBackgroundColor","participationDefaultBackground","basicMaxLength","exports","_default"],"sources":["../src/styleConstants.js"],"sourcesContent":["export default {\n highlightColor: '#7C4DFF', // Solid lavender https://design.inrupt.com/atomic-core/?cat=Core\n\n formBorderColor: '#888888', // Mid-grey\n formHeadingColor: '#888888', // originally was brown; now grey\n lowProfileLinkColor: '#3B5998', // Grey-blue, e.g., for field labels linking to ontology\n formFieldNameBoxWidth: '8em', // The fixed amount to get form fields to line up\n // The latter we put in when switching awy from using tables. Getting alignment between\n // fields in different groups though is hard problem.\n\n mediaModuleCanvasWidth: '640',\n mediaModuleCanvasHeight: '480',\n\n textInputSize: 20, //
|
|
1
|
+
{"version":3,"file":"styleConstants.js","names":["highlightColor","formBorderColor","formHeadingColor","lowProfileLinkColor","formFieldNameBoxWidth","mediaModuleCanvasWidth","mediaModuleCanvasHeight","textInputSize","tabBorderRadius","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","defaultErrorBackgroundColor","participationDefaultBackground","basicMaxLength","exports","_default"],"sources":["../src/styleConstants.js"],"sourcesContent":["export default {\n highlightColor: '#7C4DFF', // Solid lavender https://design.inrupt.com/atomic-core/?cat=Core\n\n formBorderColor: '#888888', // Mid-grey\n formHeadingColor: '#888888', // originally was brown; now grey\n lowProfileLinkColor: '#3B5998', // Grey-blue, e.g., for field labels linking to ontology\n formFieldNameBoxWidth: '8em', // The fixed amount to get form fields to line up\n // The latter we put in when switching awy from using tables. Getting alignment between\n // fields in different groups though is hard problem.\n\n mediaModuleCanvasWidth: '640',\n mediaModuleCanvasHeight: '480',\n\n textInputSize: 20, // Default text input size in characters roughly\n tabBorderRadius: '0.2em',\n\n textInputBackgroundColor: '#eef',\n textInputBackgroundColorUneditable: '#fff',\n textInputColor: '#000',\n textInputColorPending: '#888',\n\n defaultErrorBackgroundColor: '#fee',\n\n participationDefaultBackground: 'white',\n\n basicMaxLength: '4096'\n}\n"],"mappings":";;;;;;eAAe;EACbA,cAAc,EAAE,SAAS;EAAE;;EAE3BC,eAAe,EAAE,SAAS;EAAE;EAC5BC,gBAAgB,EAAE,SAAS;EAAE;EAC7BC,mBAAmB,EAAE,SAAS;EAAE;EAChCC,qBAAqB,EAAE,KAAK;EAAE;EAC9B;EACA;;EAEAC,sBAAsB,EAAE,KAAK;EAC7BC,uBAAuB,EAAE,KAAK;EAE9BC,aAAa,EAAE,EAAE;EAAE;EACnBC,eAAe,EAAE,OAAO;EAExBC,wBAAwB,EAAE,MAAM;EAChCC,kCAAkC,EAAE,MAAM;EAC1CC,cAAc,EAAE,MAAM;EACtBC,qBAAqB,EAAE,MAAM;EAE7BC,2BAA2B,EAAE,MAAM;EAEnCC,8BAA8B,EAAE,OAAO;EAEvCC,cAAc,EAAE;AAClB,CAAC;AAAAC,OAAA,cAAAC,QAAA"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.versionInfo = void 0;
|
|
7
7
|
var versionInfo = {
|
|
8
|
-
buildTime: '2023-08-16T08:
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-08-16T08:00:13Z',
|
|
9
|
+
commit: 'b99176c4b9983e73540ac99821945ab149f6317a',
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-ui': '2.4.28',
|
|
12
12
|
npm: '8.19.4',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-08-16T08:
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-08-16T08:00:13Z',\n commit: 'b99176c4b9983e73540ac99821945ab149f6317a',\n npmInfo:\n{\n 'solid-ui': '2.4.28',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;EACzBC,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC;AAAAC,OAAA,CAAAtB,WAAA,GAAAA,WAAA"}
|
|
@@ -15,8 +15,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
15
|
/* Drag and drop common functionality
|
|
16
16
|
*
|
|
17
17
|
* It is easy to make something draggable, or to make it a drag target!
|
|
18
|
-
* Just call the functions below. In a
|
|
19
|
-
*
|
|
18
|
+
* Just call the functions below. In a solid world, any part of the UI which
|
|
19
|
+
* represent one thing which has a URI, should be made draggable using makeDraggable
|
|
20
20
|
* Any list of things should typically allow you to drag new members of the list
|
|
21
21
|
* onto it.
|
|
22
22
|
* The file upload function uploadFiles is provided as often as someone drags a file from the computer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dragAndDrop.js","names":["debug","_interopRequireWildcard","require","mime","style","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","makeDropTarget","ele","droppedURIHandler","droppedFileHandler","dragoverListener","e","preventDefault","dataTransfer","dropEffect","dragenterListener","log","localStyle","savedStyle","dragEvent","dragleaveListener","dropEvent","dropListener","types","join","uris","text","t","length","type","getData","split","files","i","f","name","size","lastModifiedDate","toLocaleDateString","slice","restoreStyle","addTargetListeners","addEventListener","makeDraggable","tr","setAttribute","fontWeight","setData","uri","outerHTML","stopPropagation","uploadFiles","fetcher","fileBase","imageBase","successHandler","reader","FileReader","onload","theFile","data","target","result","suffix","byteLength","contentType","lookup","msg","alert","Error","extension","endsWith","folderName","startsWith","destURI","encodeURIComponent","webOperation","then","_response","error","readAsArrayBuffer"],"sources":["../../src/widgets/dragAndDrop.js"],"sourcesContent":["/* Drag and drop common functionality\n *\n * It is easy to make something draggable, or to make it a drag target!\n * Just call the functions below. In a Solid world, any part of the UI which\n * represents one thing which has a URI, should be made draggable using makeDraggable.\n * Any list of things should typically allow you to drag new members of the list\n * onto it.\n * The file upload function uploadFiles is provided as often as someone drags a file from the computer\n * desktop, you may want to upload it into the pod.\n */\nimport * as debug from '../debug'\nimport * as mime from 'mime-types'\nimport * as style from '../style'\n\n/* global FileReader alert */\n\nexport function makeDropTarget (ele, droppedURIHandler, droppedFileHandler) {\n const dragoverListener = function (e) {\n e.preventDefault() // Need else drop does not work [sic]\n e.dataTransfer.dropEffect = 'copy'\n }\n\n const dragenterListener = function (e) {\n debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.localStyle) {\n // necessary not sure when\n if (!this.savedStyle) {\n this.savedStyle = style.dragEvent\n }\n }\n\n e.dataTransfer.dropEffect = 'link'\n debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect)\n }\n const dragleaveListener = function (e) {\n debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.savedStyle) {\n this.localStyle = this.savedStyle\n } else {\n this.localStyle = style.dropEvent\n }\n }\n\n const dropListener = function (e) {\n if (e.preventDefault) e.preventDefault() // stops the browser from redirecting off to the text.\n debug.log('Drop event. dropEffect: ' + e.dataTransfer.dropEffect)\n debug.log(\n 'Drop event. types: ' +\n (e.dataTransfer.types ? e.dataTransfer.types.join(', ') : 'NOPE')\n )\n\n let uris = null\n let text\n if (e.dataTransfer.types) {\n for (let t = 0; t < e.dataTransfer.types.length; t++) {\n const type = e.dataTransfer.types[t]\n if (type === 'text/uri-list') {\n uris = e.dataTransfer.getData(type).split('\\n') // @ ignore those starting with #\n debug.log('Dropped text/uri-list: ' + uris)\n } else if (type === 'text/plain') {\n text = e.dataTransfer.getData(type)\n } else if (type === 'Files' && droppedFileHandler) {\n const files = e.dataTransfer.files // FileList object.\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n 'Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate\n ? f.lastModifiedDate.toLocaleDateString()\n : 'n/a')\n )\n }\n droppedFileHandler(files)\n }\n }\n if (uris === null && text && text.slice(0, 4) === 'http') {\n uris = text\n debug.log(\"Waring: Poor man's drop: using text for URI\") // chrome disables text/uri-list??\n }\n } else {\n // ... however, if we're IE, we don't have the .types property, so we'll just get the Text value\n uris = [e.dataTransfer.getData('Text')]\n debug.log('WARNING non-standard drop event: ' + uris[0])\n }\n debug.log('Dropped URI list (2): ' + uris)\n if (uris) {\n droppedURIHandler(uris)\n }\n this.localStyle = style.restoreStyle // restore style\n return false\n } // dropListener\n\n const addTargetListeners = function (ele) {\n if (!ele) {\n debug.log('@@@ addTargetListeners: ele ' + ele)\n }\n ele.addEventListener('dragover', dragoverListener)\n ele.addEventListener('dragenter', dragenterListener)\n ele.addEventListener('dragleave', dragleaveListener)\n ele.addEventListener('drop', dropListener)\n }\n addTargetListeners(ele, droppedURIHandler)\n} // listen for dropped URIs\n\n// Make an HTML element draggable as a URI-identified thing\n//\n// Possibly later set the drag image too?\n//\nexport function makeDraggable (tr, obj) {\n tr.setAttribute('draggable', 'true') // Stop the image being dragged instead - just the TR\n\n tr.addEventListener(\n 'dragstart',\n function (e) {\n tr.style.fontWeight = 'bold'\n e.dataTransfer.setData('text/uri-list', obj.uri)\n e.dataTransfer.setData('text/plain', obj.uri)\n e.dataTransfer.setData('text/html', tr.outerHTML)\n debug.log(\n 'Dragstart: ' + tr + ' -> ' + obj + 'de: ' + e.dataTransfer.dropEffect\n )\n },\n false\n )\n\n tr.addEventListener(\n 'drag',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // debug.log('Drag: dropEffect: ' + e.dataTransfer.dropEffect)\n },\n false\n )\n\n tr.addEventListener(\n 'dragend',\n function (e) {\n tr.style.fontWeight = 'normal'\n debug.log('Dragend dropeffect: ' + e.dataTransfer.dropEffect)\n debug.log('Dragend: ' + tr + ' -> ' + obj)\n },\n false\n )\n}\n\n/** uploadFiles\n**\n** Generic uploader of local files to the web\n** typically called from dropped file handler\n**\n** @param {Fetcher} fetcher instance of class Fetcher as in kb.fetcher\n** @param {Array<File>} files Array of file objects\n** @param {String} fileBase URI of folder in which to put files (except images) (no trailing slash)\n** @param {String } imageBase URI of folder in which to put images\n** @param successHandler function(file, uploadedURI) Called after EACH success upload\n** With file object an final URI as params\n*/\n\nexport function uploadFiles (fetcher, files, fileBase, imageBase, successHandler) {\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n ' dropped: Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')\n ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/\n\n // @@ Add: progress bar(s)\n const reader = new FileReader()\n reader.onload = (function (theFile) {\n return function (e) {\n const data = e.target.result\n let suffix = ''\n debug.log(' File read byteLength : ' + data.byteLength)\n let contentType = theFile.type\n if (!theFile.type || theFile.type === '') {\n // Not known by browser\n contentType = mime.lookup(theFile.name)\n if (!contentType) {\n const msg =\n 'Filename needs to have an extension which gives a type we know: ' +\n theFile.name\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n } else {\n const extension = mime.extension(theFile.type)\n // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3\n if (extension && extension !== 'false' && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...\n theFile.type !== mime.lookup(theFile.name)) { // the mime type of this ext is not the right one?\n suffix = '_.' + extension\n // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)\n }\n }\n const folderName = theFile.type.startsWith('image/')\n ? imageBase || fileBase\n : fileBase\n const destURI =\n folderName +\n (folderName.endsWith('/') ? '' : '/') +\n encodeURIComponent(theFile.name) +\n suffix\n\n fetcher\n .webOperation('PUT', destURI, {\n data,\n contentType\n })\n .then(\n _response => {\n debug.log(' Upload: put OK: ' + destURI)\n successHandler(theFile, destURI)\n },\n error => {\n const msg = ' Upload: FAIL ' + destURI + ', Error: ' + error\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n )\n }\n })(f)\n reader.readAsArrayBuffer(f)\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAiC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,w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AK,CAACqC,GAAG,CAAC,mBAAmB,GAAG0D,OAAO,CAAC;UACxCnB,cAAc,CAACI,OAAO,EAAEe,OAAO,CAAC;QAClC,CAAC,EACD,UAAAK,KAAK,EAAI;UACP,IAAMZ,GAAG,GAAG,gBAAgB,GAAGO,OAAO,GAAG,WAAW,GAAGK,KAAK;UAC5DpG,KAAK,CAACqC,GAAG,CAACmD,GAAG,CAAC;UACdC,KAAK,CAACD,GAAG,CAAC;UACV,MAAM,IAAIE,KAAK,CAACF,GAAG,CAAC;QACtB,CAAC,CACF;MACL,CAAC;IACH,CAAC,CAAEjC,CAAC,CAAC;IACLsB,MAAM,CAACwB,iBAAiB,CAAC9C,CAAC,CAAC;EAC7B;AACF"}
|
|
1
|
+
{"version":3,"file":"dragAndDrop.js","names":["debug","_interopRequireWildcard","require","mime","style","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","makeDropTarget","ele","droppedURIHandler","droppedFileHandler","dragoverListener","e","preventDefault","dataTransfer","dropEffect","dragenterListener","log","localStyle","savedStyle","dragEvent","dragleaveListener","dropEvent","dropListener","types","join","uris","text","t","length","type","getData","split","files","i","f","name","size","lastModifiedDate","toLocaleDateString","slice","restoreStyle","addTargetListeners","addEventListener","makeDraggable","tr","setAttribute","fontWeight","setData","uri","outerHTML","stopPropagation","uploadFiles","fetcher","fileBase","imageBase","successHandler","reader","FileReader","onload","theFile","data","target","result","suffix","byteLength","contentType","lookup","msg","alert","Error","extension","endsWith","folderName","startsWith","destURI","encodeURIComponent","webOperation","then","_response","error","readAsArrayBuffer"],"sources":["../../src/widgets/dragAndDrop.js"],"sourcesContent":["/* Drag and drop common functionality\n *\n * It is easy to make something draggable, or to make it a drag target!\n * Just call the functions below. In a solid world, any part of the UI which\n * represent one thing which has a URI, should be made draggable using makeDraggable\n * Any list of things should typically allow you to drag new members of the list\n * onto it.\n * The file upload function uploadFiles is provided as often as someone drags a file from the computer\n * desktop, you may want to upload it into the pod.\n */\nimport * as debug from '../debug'\nimport * as mime from 'mime-types'\nimport * as style from '../style'\n\n/* global FileReader alert */\n\nexport function makeDropTarget (ele, droppedURIHandler, droppedFileHandler) {\n const dragoverListener = function (e) {\n e.preventDefault() // Need else drop does not work [sic]\n e.dataTransfer.dropEffect = 'copy'\n }\n\n const dragenterListener = function (e) {\n debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.localStyle) {\n // necessary not sure when\n if (!this.savedStyle) {\n this.savedStyle = style.dragEvent\n }\n }\n\n e.dataTransfer.dropEffect = 'link'\n debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect)\n }\n const dragleaveListener = function (e) {\n debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect)\n if (this.savedStyle) {\n this.localStyle = this.savedStyle\n } else {\n this.localStyle = style.dropEvent\n }\n }\n\n const dropListener = function (e) {\n if (e.preventDefault) e.preventDefault() // stops the browser from redirecting off to the text.\n debug.log('Drop event. dropEffect: ' + e.dataTransfer.dropEffect)\n debug.log(\n 'Drop event. types: ' +\n (e.dataTransfer.types ? e.dataTransfer.types.join(', ') : 'NOPE')\n )\n\n let uris = null\n let text\n if (e.dataTransfer.types) {\n for (let t = 0; t < e.dataTransfer.types.length; t++) {\n const type = e.dataTransfer.types[t]\n if (type === 'text/uri-list') {\n uris = e.dataTransfer.getData(type).split('\\n') // @ ignore those starting with #\n debug.log('Dropped text/uri-list: ' + uris)\n } else if (type === 'text/plain') {\n text = e.dataTransfer.getData(type)\n } else if (type === 'Files' && droppedFileHandler) {\n const files = e.dataTransfer.files // FileList object.\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n 'Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate\n ? f.lastModifiedDate.toLocaleDateString()\n : 'n/a')\n )\n }\n droppedFileHandler(files)\n }\n }\n if (uris === null && text && text.slice(0, 4) === 'http') {\n uris = text\n debug.log(\"Waring: Poor man's drop: using text for URI\") // chrome disables text/uri-list??\n }\n } else {\n // ... however, if we're IE, we don't have the .types property, so we'll just get the Text value\n uris = [e.dataTransfer.getData('Text')]\n debug.log('WARNING non-standard drop event: ' + uris[0])\n }\n debug.log('Dropped URI list (2): ' + uris)\n if (uris) {\n droppedURIHandler(uris)\n }\n this.localStyle = style.restoreStyle // restore style\n return false\n } // dropListener\n\n const addTargetListeners = function (ele) {\n if (!ele) {\n debug.log('@@@ addTargetListeners: ele ' + ele)\n }\n ele.addEventListener('dragover', dragoverListener)\n ele.addEventListener('dragenter', dragenterListener)\n ele.addEventListener('dragleave', dragleaveListener)\n ele.addEventListener('drop', dropListener)\n }\n addTargetListeners(ele, droppedURIHandler)\n} // listen for dropped URIs\n\n// Make an HTML element draggable as a URI-identified thing\n//\n// Possibly later set the drag image too?\n//\nexport function makeDraggable (tr, obj) {\n tr.setAttribute('draggable', 'true') // Stop the image being dragged instead - just the TR\n\n tr.addEventListener(\n 'dragstart',\n function (e) {\n tr.style.fontWeight = 'bold'\n e.dataTransfer.setData('text/uri-list', obj.uri)\n e.dataTransfer.setData('text/plain', obj.uri)\n e.dataTransfer.setData('text/html', tr.outerHTML)\n debug.log(\n 'Dragstart: ' + tr + ' -> ' + obj + 'de: ' + e.dataTransfer.dropEffect\n )\n },\n false\n )\n\n tr.addEventListener(\n 'drag',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // debug.log('Drag: dropEffect: ' + e.dataTransfer.dropEffect)\n },\n false\n )\n\n tr.addEventListener(\n 'dragend',\n function (e) {\n tr.style.fontWeight = 'normal'\n debug.log('Dragend dropeffect: ' + e.dataTransfer.dropEffect)\n debug.log('Dragend: ' + tr + ' -> ' + obj)\n },\n false\n )\n}\n\n/** uploadFiles\n**\n** Generic uploader of local files to the web\n** typically called from dropped file handler\n**\n** @param {Fetcher} fetcher instance of class Fetcher as in kb.fetcher\n** @param {Array<File>} files Array of file objects\n** @param {String} fileBase URI of folder in which to put files (except images) (no trailing slash)\n** @param {String } imageBase URI of folder in which to put images\n** @param successHandler function(file, uploadedURI) Called after EACH success upload\n** With file object an final URI as params\n*/\n\nexport function uploadFiles (fetcher, files, fileBase, imageBase, successHandler) {\n for (let i = 0; files[i]; i++) {\n const f = files[i]\n debug.log(\n ' dropped: Filename: ' +\n f.name +\n ', type: ' +\n (f.type || 'n/a') +\n ' size: ' +\n f.size +\n ' bytes, last modified: ' +\n (f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a')\n ) // See e.g. https://www.html5rocks.com/en/tutorials/file/dndfiles/\n\n // @@ Add: progress bar(s)\n const reader = new FileReader()\n reader.onload = (function (theFile) {\n return function (e) {\n const data = e.target.result\n let suffix = ''\n debug.log(' File read byteLength : ' + data.byteLength)\n let contentType = theFile.type\n if (!theFile.type || theFile.type === '') {\n // Not known by browser\n contentType = mime.lookup(theFile.name)\n if (!contentType) {\n const msg =\n 'Filename needs to have an extension which gives a type we know: ' +\n theFile.name\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n } else {\n const extension = mime.extension(theFile.type)\n // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3\n if (extension && extension !== 'false' && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...\n theFile.type !== mime.lookup(theFile.name)) { // the mime type of this ext is not the right one?\n suffix = '_.' + extension\n // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)\n }\n }\n const folderName = theFile.type.startsWith('image/')\n ? imageBase || fileBase\n : fileBase\n const destURI =\n folderName +\n (folderName.endsWith('/') ? '' : '/') +\n encodeURIComponent(theFile.name) +\n suffix\n\n fetcher\n .webOperation('PUT', destURI, {\n data,\n contentType\n })\n .then(\n _response => {\n debug.log(' Upload: put OK: ' + destURI)\n successHandler(theFile, destURI)\n },\n error => {\n const msg = ' Upload: FAIL ' + destURI + ', Error: ' + error\n debug.log(msg)\n alert(msg)\n throw new Error(msg)\n }\n )\n }\n })(f)\n reader.readAsArrayBuffer(f)\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,uBAAA,CAAAC,OAAA;AAAiC,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YA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