solid-ui 2.4.28-e3ba3633 → 2.4.28-f42a6c93
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 +26 -26
- 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/participation.d.ts.map +1 -1
- package/lib/participation.js +2 -1
- package/lib/participation.js.map +1 -1
- package/lib/style.js +4 -3
- package/lib/style.js.map +1 -1
- package/lib/styleConstants.js +3 -1
- package/lib/styleConstants.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/forms/basic.js +1 -1
- package/lib/widgets/forms/basic.js.map +1 -1
- package/package.json +1 -1
package/lib/participation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participation.js","names":["debug","_interopRequireWildcard","require","_rdflib","ns","_widgets","_utils","_pad","style","_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","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 { 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')) || 'white'\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,WAAA,GAAAP,OAAA;AAAwD,SAAAQ,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,SAAAV,wBAAAc,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,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AK,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,CACjCvE,GAAa,EACbwE,SAAyB,EACzBhC,MAAiB,EACjBrC,OAAkB,EAClBsC,EAAa,EACbpC,OAA6B,EAC7B;EACA,IAAMJ,KAAK,GAAGD,GAAG,CAACc,aAAa,CAAC,OAAO,CAAC;EACxC0D,SAAS,CAACjD,WAAW,CAACtB,KAAK,CAAC;EAC5BF,kBAAkB,CAACC,GAAG,EAAEC,KAAK,EAAEuC,MAAM,EAAErC,OAAO,EAAEsC,EAAE,EAAEpC,OAAO,CAAC;EAC5D,IAAIoE,cAAc;EAClB,IAAI;IACFA,cAAc,GAAGP,mBAAmB,CAAC/D,OAAO,EAAEqC,MAAM,EAAEvC,KAAK,CAAC;EAC9D,CAAC,CAAC,OAAO1D,CAAC,EAAE;IACViI,SAAS,CAACjD,WAAW,CACnB,IAAAmD,0BAAiB,EACf1E,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,iBAA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AO0D,KAAK;AACd"}
|
package/lib/style.js
CHANGED
|
@@ -37,9 +37,11 @@ var style = {
|
|
|
37
37
|
searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
|
|
38
38
|
autocompleteRowStyle: 'border: 0.2em solid straw;',
|
|
39
39
|
// Login buttons
|
|
40
|
-
|
|
40
|
+
signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
|
|
41
41
|
// was 0.5em radius
|
|
42
|
-
|
|
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;',
|
|
43
45
|
// Forms
|
|
44
46
|
heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;',
|
|
45
47
|
// originally was brown; now grey
|
|
@@ -105,7 +107,6 @@ var style = {
|
|
|
105
107
|
headerBannerRightMenu: 'display: flex',
|
|
106
108
|
headerBannerLogin: 'margin-left: auto',
|
|
107
109
|
allChildrenVisible: 'display:true',
|
|
108
|
-
headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
|
|
109
110
|
headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
|
|
110
111
|
headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
|
|
111
112
|
headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
|
package/lib/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","names":["_styleConstants","_interopRequireDefault","require","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectStyle","textInputStyle","textInputStyleUneditable","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","messageBodyStyle","pendingeditModifier","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInButtonStyle","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingStyle","formTextInput","formGroupStyle","concat","styleConstants","formBorderColor","formFieldLabelStyle","lowProfileLinkColor","formFieldNameBoxStyle","formFieldNameBoxWidth","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerLoginInput","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","controlStyle","mediaModuleCanvasWidth","mediaModuleCanvasHeight","dragEvent","dropEvent","restoreStyle","errorCancelButton","errorMessageBlockStyle","notepadStyle","upstreamStatus","downstreamStatus","baseStyle","headingCore","headingStyle","participantsStyle","participantsBlock","personTableTD","tabsNavElement","tabsRootElement","tabsMainElement","tabContainer","makeNewSlot","ellipsis","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n// These must all end with semicolon so they can be appended to.\n\nimport styleConstants from './styleConstants'\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n messageBodyStyle:\n '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;',\n pendingeditModifier: 'color: #bbb;',\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${styleConstants.lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${styleConstants.formFieldNameBoxWidth};`,\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',\n aclControlBoxStatus: 'display: none; margin: 1rem 0',\n aclControlBoxStatusRevealed: 'display: block',\n aclGroupContent: 'maxWidth: 650',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',\n defaultsController: 'display: flex',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',\n group: 'color: #888',\n group1: 'color: green',\n group2: 'color: #cc0',\n group3: 'color: orange',\n group5: 'color: red',\n group9: 'color: blue',\n group13: 'color: purple',\n\n trustedAppAddApplicationsTable: 'background-color: #eee',\n trustedAppCancelButton: 'float: right',\n trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',\n temporaryStatusInit: 'background: green',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear',\n\n // header\n 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',\n 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%)',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',\n 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%)',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',\n headerBannerLink: 'display: block',\n headerBannerRightMenu: 'display: flex',\n headerBannerLogin: 'margin-left: auto',\n allChildrenVisible: 'display:true',\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',\n\n // buttons\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n\n // media\n controlStyle: `border-radius: 0.5em; margin: 0.8em; width:${styleConstants.mediaModuleCanvasWidth}; height:${styleConstants.mediaModuleCanvasHeight};`,\n\n // dragAndDrop\n dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',\n dropEvent: 'background-color: white; border: 0em solid black;',\n restoreStyle: 'background-color: white;',\n\n // errors\n errorCancelButton: 'width: 2em; height: 2em; align: right;',\n errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',\n\n // pad\n notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',\n upstreamStatus: 'width:50%',\n downstreamStatus: 'width:50%',\n baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',\n headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',\n headingStyle: [\n 'font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;',\n 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;',\n 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'\n ],\n\n // participation\n participantsStyle: 'margin: 0.8em;',\n participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',\n personTableTD: 'vertical-align: middle;',\n\n // tabs\n tabsNavElement: 'margin: 0;',\n tabsRootElement: 'display: flex; height: 100%; width: 100%;',\n tabsMainElement: 'margin: 0; width:100%; height: 100%;',\n tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',\n makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer',\n ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;;AAKA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;AACA;;AAIO,IAAMC,KAAK,GAAG;EAAE;;EAErBC,aAAa,EAAE,6EAA6E;EAC5FC,kBAAkB,EAAE,0GAA0G;EAE9HC,eAAe,EAAE,wCAAwC;EACzDC,eAAe,EACb,yHAAyH;EAC3HC,cAAc,EACZ,yHAAyH;EAC3HC,wBAAwB;EAAE;EACxB,2HAA2H;EAC7HC,WAAW,EACP,2HAA2H;EAAE;EACjIC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,EAAE,wTAAwT;EACpVC,eAAe,EAAE,mRAAmR;EACpSC,oBAAoB,EAAE,sTAAsT;EAC5UC,uBAAuB,EAAE,qRAAqR;EAC9SC,4BAA4B,EAAE,wTAAwT;EAEtV;EACAC,YAAY,gDAAA/D,MAAA,CAAgDC,0BAAc,CAAC+D,sBAAsB,eAAAhE,MAAA,CAAYC,0BAAc,CAACgE,uBAAuB,MAAG;EAEtJ;EACAC,SAAS,EAAE,4EAA4E;EACvFC,SAAS,EAAE,mDAAmD;EAC9DC,YAAY,EAAE,0BAA0B;EAExC;EACAC,iBAAiB,EAAE,wCAAwC;EAC3DC,sBAAsB,EAAE,wEAAwE;EAEhG;EACAC,YAAY,EAAE,oEAAoE;EAClFC,cAAc,EAAE,WAAW;EAC3BC,gBAAgB,EAAE,WAAW;EAC7BC,SAAS,EAAE,4FAA4F;EACvGC,WAAW,EAAE,4DAA4D;EACzEC,YAAY,EAAE,CACZ,0EAA0E,EAC1E,sEAAsE,EACtE,sEAAsE,CACvE;EAED;EACAC,iBAAiB,EAAE,gBAAgB;EACnCC,iBAAiB,EAAE,uEAAuE;EAC1FC,aAAa,EAAE,yBAAyB;EAExC;EACAC,cAAc,EAAE,YAAY;EAC5BC,eAAe,EAAE,2CAA2C;EAC5DC,eAAe,EAAE,sCAAsC;EACvDC,YAAY,EAAE,yFAAyF;EACvGC,WAAW,EAAE,gEAAgE;EAC7EC,QAAQ,EAAE;AAEZ,CAAC;AAAAC,OAAA,CAAAhH,KAAA,GAAAA,KAAA;AAEDA,KAAK,CAACiH,QAAQ,GAAG,SAASA,QAAQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAAClH,KAAK,GAAGA,KAAK,CAACmH,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAGhH,KAAK,EAAC"}
|
|
1
|
+
{"version":3,"file":"style.js","names":["_styleConstants","_interopRequireDefault","require","style","checkboxStyle","checkboxInputStyle","fieldLabelStyle","formSelectStyle","textInputStyle","textInputStyleUneditable","buttonStyle","commentStyle","iconStyle","smallButtonStyle","classIconStyle","confirmPopupStyle","messageBodyStyle","pendingeditModifier","personaBarStyle","searchInputStyle","autocompleteRowStyle","signInAndUpButtonStyle","headerBannerLoginInput","signUpBackground","signInBackground","heading1Style","heading2Style","heading3Style","heading4Style","formHeadingStyle","formTextInput","formGroupStyle","concat","styleConstants","formBorderColor","formFieldLabelStyle","lowProfileLinkColor","formFieldNameBoxStyle","formFieldNameBoxWidth","multilineTextInputStyle","renderAsDivStyle","imageDivStyle","linkDivStyle","aclControlBoxContainer","aclControlBoxHeader","aclControlBoxStatus","aclControlBoxStatusRevealed","aclGroupContent","accessGroupList","accessGroupListItem","defaultsController","defaultsControllerNotice","bigButton","group","group1","group2","group3","group5","group9","group13","trustedAppAddApplicationsTable","trustedAppCancelButton","trustedAppControllerI","temporaryStatusInit","temporaryStatusEnd","headerUserMenuLink","headerUserMenuLinkHover","headerUserMenuTrigger","headerUserMenuTriggerImg","headerUserMenuButton","headerUserMenuButtonHover","headerUserMenuList","headerUserMenuListDisplay","headerUserMenuNavigationMenu","headerUserMenuNavigationMenuNotDisplayed","headerUserMenuListItem","headerUserMenuPhoto","headerBanner","headerBannerLink","headerBannerRightMenu","headerBannerLogin","allChildrenVisible","headerBannerUserMenu","headerBannerHelpMenu","headerBannerIcon","footer","primaryButton","primaryButtonHover","primaryButtonNoBorder","primaryButtonNoBorderHover","secondaryButton","secondaryButtonHover","secondaryButtonNoBorder","secondaryButtonNoBorderHover","controlStyle","mediaModuleCanvasWidth","mediaModuleCanvasHeight","dragEvent","dropEvent","restoreStyle","errorCancelButton","errorMessageBlockStyle","notepadStyle","upstreamStatus","downstreamStatus","baseStyle","headingCore","headingStyle","participantsStyle","participantsBlock","personTableTD","tabsNavElement","tabsRootElement","tabsMainElement","tabContainer","makeNewSlot","ellipsis","exports","setStyle","ele","styleName","module"],"sources":["../src/style.js"],"sourcesContent":["// Common readable consistent stylesheet\n// to avoid using style sheets which are document-global\n// and make programmable style toggling with selection, drag over, etc easier\n// These must all end with semicolon so they can be appended to.\n\nimport styleConstants from './styleConstants'\n\nexport const style = { // styleModule\n\n checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',\n checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',\n\n fieldLabelStyle: 'color: #3B5998; text-decoration: none;',\n formSelectStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyle:\n 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n textInputStyleUneditable: // Color difference only\n 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',\n buttonStyle:\n 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;\n commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',\n iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',\n smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',\n classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle\n confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',\n messageBodyStyle:\n '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;',\n pendingeditModifier: 'color: #bbb;',\n\n // Contacts\n personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',\n searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',\n autocompleteRowStyle: 'border: 0.2em solid straw;',\n\n // Login buttons\n signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius\n headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',\n signUpBackground: 'background-color: #eef;',\n signInBackground: 'background-color: #efe;',\n\n // Forms\n heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey\n heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey\n heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form\n heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things\n\n formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey\n formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this\n formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`, // weight 0\n `padding-left: 2em; border: 0.05em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.1em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;`,\n `padding-left: 2em; border: 0.2em solid ${styleConstants.formBorderColor}; border-radius: 0.2em;` // @@ pink\n ],\n\n formFieldLabelStyle: `'color: ${styleConstants.lowProfileLinkColor}; text-decoration: none;'`,\n formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${styleConstants.formFieldNameBoxWidth};`,\n multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +\n ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',\n\n // Buttons\n renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',\n imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',\n linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',\n\n // ACL\n aclControlBoxContainer: 'margin: 1em',\n aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',\n aclControlBoxStatus: 'display: none; margin: 1rem 0',\n aclControlBoxStatusRevealed: 'display: block',\n aclGroupContent: 'maxWidth: 650',\n accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',\n accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',\n defaultsController: 'display: flex',\n defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',\n bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',\n group: 'color: #888',\n group1: 'color: green',\n group2: 'color: #cc0',\n group3: 'color: orange',\n group5: 'color: red',\n group9: 'color: blue',\n group13: 'color: purple',\n\n trustedAppAddApplicationsTable: 'background-color: #eee',\n trustedAppCancelButton: 'float: right',\n trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',\n temporaryStatusInit: 'background: green',\n temporaryStatusEnd: 'background: transparent; transition: background 5s linear',\n\n // header\n 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',\n 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%)',\n headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',\n headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',\n headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',\n 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%)',\n headerUserMenuList: 'list-style: none; margin: 0; padding: 0',\n headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',\n headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',\n headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',\n headerUserMenuListItem: 'border-bottom: solid 1px #000000',\n headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',\n headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',\n headerBannerLink: 'display: block',\n headerBannerRightMenu: 'display: flex',\n headerBannerLogin: 'margin-left: auto',\n allChildrenVisible: 'display:true',\n headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',\n headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',\n headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);\n\n // footer\n footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',\n\n // buttons\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n 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',\n\n // media\n controlStyle: `border-radius: 0.5em; margin: 0.8em; width:${styleConstants.mediaModuleCanvasWidth}; height:${styleConstants.mediaModuleCanvasHeight};`,\n\n // dragAndDrop\n dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',\n dropEvent: 'background-color: white; border: 0em solid black;',\n restoreStyle: 'background-color: white;',\n\n // errors\n errorCancelButton: 'width: 2em; height: 2em; align: right;',\n errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',\n\n // pad\n notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',\n upstreamStatus: 'width:50%',\n downstreamStatus: 'width:50%',\n baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',\n headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',\n headingStyle: [\n 'font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;',\n 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;',\n 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'\n ],\n\n // participation\n participantsStyle: 'margin: 0.8em;',\n participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',\n personTableTD: 'vertical-align: middle;',\n\n // tabs\n tabsNavElement: 'margin: 0;',\n tabsRootElement: 'display: flex; height: 100%; width: 100%;',\n tabsMainElement: 'margin: 0; width:100%; height: 100%;',\n tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',\n makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer',\n ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'\n\n}\n\nstyle.setStyle = function setStyle (ele, styleName) {\n ele.style = style[styleName]\n}\n\nmodule.exports = style // @@ No way to do this in ESM\n"],"mappings":";;;;;;;AAKA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;AACA;;AAIO,IAAMC,KAAK,GAAG;EAAE;;EAErBC,aAAa,EAAE,6EAA6E;EA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AQA,CAAEC,GAAG,EAAEC,SAAS,EAAE;EAClDD,GAAG,CAACpH,KAAK,GAAGA,KAAK,CAACqH,SAAS,CAAC;AAC9B,CAAC;AAEDC,MAAM,CAACJ,OAAO,GAAGlH,KAAK,EAAC"}
|
package/lib/styleConstants.js
CHANGED
|
@@ -28,7 +28,9 @@ var _default = {
|
|
|
28
28
|
textInputBackgroundColorUneditable: '#fff',
|
|
29
29
|
textInputColor: '#000',
|
|
30
30
|
textInputColorPending: '#888',
|
|
31
|
-
defaultErrorBackgroundColor: '#fee'
|
|
31
|
+
defaultErrorBackgroundColor: '#fee',
|
|
32
|
+
participationDefaultBackground: 'white',
|
|
33
|
+
basicMaxLength: '4096'
|
|
32
34
|
};
|
|
33
35
|
exports["default"] = _default;
|
|
34
36
|
//# sourceMappingURL=styleConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styleConstants.js","names":["highlightColor","formBorderColor","formHeadingColor","lowProfileLinkColor","formFieldNameBoxWidth","mediaModuleCanvasWidth","mediaModuleCanvasHeight","textInputSize","tabBorderRadius","textInputBackgroundColor","textInputBackgroundColorUneditable","textInputColor","textInputColorPending","defaultErrorBackgroundColor","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"],"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;
|
|
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-07-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-07-01T19:30:54Z',
|
|
9
|
+
commit: 'f42a6c93dc3065624bec9cc0a7ae4e86802eb68e',
|
|
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-07-
|
|
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-07-01T19:30:54Z',\n commit: 'f42a6c93dc3065624bec9cc0a7ae4e86802eb68e',\n npmInfo:\n{\n 'solid-ui': '2.4.28',\n npm: '8.19.4',\n node: '16.20.1',\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.1u+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"}
|
|
@@ -137,7 +137,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
|
|
|
137
137
|
var size = kb.anyJS(form, ns.ui('size')) || _styleConstants["default"].textInputSize || 20;
|
|
138
138
|
field.setAttribute('size', size);
|
|
139
139
|
var maxLength = kb.any(form, ns.ui('maxLength'));
|
|
140
|
-
field.setAttribute('maxLength', maxLength ? '' + maxLength :
|
|
140
|
+
field.setAttribute('maxLength', maxLength ? '' + maxLength : _styleConstants["default"].basicMaxLength);
|
|
141
141
|
doc = doc || fieldStore(subject, property, doc);
|
|
142
142
|
var obj = kb.any(subject, property, undefined, doc);
|
|
143
143
|
if (!obj) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.js","names":["_rdflib","require","_solidLogic","ns","_interopRequireWildcard","_style","_styleConstants","_interopRequireDefault","_utils","_error","_fieldFunction","_fieldParams","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","store","solidLogicSingleton","renderNameValuePair","dom","kb","box","form","label","style","display","flexDirection","lhs","appendChild","createElement","width","styleConstants","formFieldNameBoxWidth","rhs","setAttribute","formFieldNameBoxStyle","createTextNode","any","ui","fieldLabel","errorMessageBlock","property","fieldInQuestion","lab","undefined","anchor","uri","textContent","fieldStore","subject","predicate","def","sts","statementsMatching","length","updater","Error","why","value","editable","sym","basicField","container","already","doc","callbackFunction","formDoc","suppressEmptyUneditable","anyJS","mostSpecificClassURI","params","fieldParams","paramStyle","textInputStyle","field","type","size","textInputSize","maxLength","uriPrefix","decodeURIComponent","replace","readOnly","textInputStyleUneditable","addEventListener","_e","pattern","match","disabled","ds","result","namedNode","encodeURIComponent","dt","Literal","trim","xsd","is","map","statement","st","updateMany","callback","docs","forEach","includes","push","update","pop","is1","filter","is2","ds1","ds2","ok","body"],"sources":["../../../src/widgets/forms/basic.ts"],"sourcesContent":["import { BlankNode, Literal, NamedNode, Node, st, Store, Variable } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { formFieldNameBoxStyle, textInputStyle, textInputStyleUneditable } from '../../style'\nimport styleConstants from '../../styleConstants'\nimport { label } from '../../utils'\nimport { errorMessageBlock } from '../error'\nimport { mostSpecificClassURI } from './fieldFunction'\nimport { fieldParams } from './fieldParams'\n\nconst store = solidLogicSingleton.store\n\n/* Style and create a name, value pair\n*/\nexport function renderNameValuePair (dom: HTMLDocument, kb: Store, box: HTMLElement, form: NamedNode, label?: string):HTMLElement {\n // const property = kb.any(form, ns.ui('property'))\n box.style.display = 'flex'\n box.style.flexDirection = 'row'\n const lhs = box.appendChild(dom.createElement('div'))\n lhs.style.width = styleConstants.formFieldNameBoxWidth\n const rhs = box.appendChild(dom.createElement('div'))\n\n lhs.setAttribute('class', 'formFieldName')\n lhs.setAttribute('style', formFieldNameBoxStyle)\n rhs.setAttribute('class', 'formFieldValue')\n if (label) {\n lhs.appendChild(dom.createTextNode(label))\n } else if (kb.any(form, ns.ui('property'))) { // Assume more space for error on right\n lhs.appendChild(fieldLabel(dom, kb.any(form, ns.ui('property')) as NamedNode, form))\n } else {\n rhs.appendChild(errorMessageBlock(dom, 'No property or label given for form field: ' + form))\n lhs.appendChild(dom.createTextNode('???'))\n }\n return rhs\n}\n\n/**\n * Create an anchor element with a label as the anchor text.\n *\n * @param dom The DOM\n * @param property href for the anchor element\n * @param fieldInQuestion field to produce a label for\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldLabel (dom: HTMLDocument, property: NamedNode | undefined, fieldInQuestion: Node): HTMLElement | Text {\n let lab = store.any(fieldInQuestion as any, ns.ui('label'))\n if (!lab) lab = label(property, true) // Init capital\n if (property === undefined) {\n return dom.createTextNode('@@Internal error: undefined property')\n }\n const anchor = dom.createElement('a')\n /* istanbul ignore next */\n if (property.uri) anchor.setAttribute('href', property.uri)\n anchor.setAttribute('style', 'color: #3B5998; text-decoration: none;') // Not too blue and no underline\n anchor.textContent = lab as any\n return anchor\n}\n\n/**\n * Returns the document for the first quad that matches\n * the subject and predicate provided, or default if that\n * store is not editable.\n *\n * @param subject Subject about which we want to find an editable RDF document\n * @param predicate Predicate about which we want to find an editable RDF document\n * @param def default RDF document to return if none found\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldStore (subject: NamedNode | BlankNode | Variable, predicate: NamedNode | Variable, def: NamedNode | undefined): NamedNode | undefined {\n const sts = store.statementsMatching(subject, predicate)\n if (sts.length === 0) return def // can used default as no data yet\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (\n sts.length > 0 &&\n sts[0].why.value &&\n store.updater.editable(sts[0].why.value, store)\n ) {\n return store.sym(sts[0].why.value)\n }\n return def\n}\n\n/**\n * Render a basic form field\n *\n * The same function is used for many similar one-value fields, with different\n * regexps used to validate.\n *\n * @param dom The HTML Document object aka Document Object Model\n * @param container If present, the created widget will be appended to this\n * @param already A hash table of (form, subject) kept to prevent recursive forms looping\n * @param subject The thing about which the form displays/edits data\n * @param form The form or field to be rendered\n * @param doc The web document in which the data is\n * @param callbackFunction Called when data is changed?\n *\n * @returns The HTML widget created\n */\n// eslint-disable-next-line complexity\nexport function basicField (\n dom: HTMLDocument,\n container: HTMLElement | undefined,\n already,\n subject: NamedNode | BlankNode | Variable,\n form: NamedNode,\n doc: NamedNode | undefined,\n callbackFunction: (_ok: boolean, _errorMessage: string) => void\n): HTMLElement {\n const kb = store\n const formDoc = form.doc ? form.doc() : null // @@ if blank no way to know\n\n const box = dom.createElement('div')\n\n const property = kb.any(form, ns.ui('property'))\n if (container) container.appendChild(box)\n if (!property) {\n return box.appendChild(\n errorMessageBlock(dom, 'Error: No property given for text field: ' + form)\n )\n }\n const rhs = renderNameValuePair(dom, kb, box, form)\n\n // It can be cleaner to just remove empty fields if you can't edit them anyway\n const suppressEmptyUneditable = kb.anyJS(form, ns.ui('suppressEmptyUneditable'), null, formDoc)\n\n const uri = mostSpecificClassURI(form)\n let params = fieldParams[uri]\n if (params === undefined) params = { style: '' } // non-bottom field types can do this\n const paramStyle = params.style || ''\n const style = textInputStyle + paramStyle\n const field = dom.createElement('input')\n ;(field as any).style = style\n rhs.appendChild(field)\n field.setAttribute('type', params.type ? params.type : 'text')\n\n const size = kb.anyJS(form, ns.ui('size')) || styleConstants.textInputSize || 20\n field.setAttribute('size', size)\n\n const maxLength = kb.any(form, ns.ui('maxLength'))\n field.setAttribute('maxLength', maxLength ? '' + maxLength : '4096')\n\n doc = doc || fieldStore(subject, property as any, doc)\n\n let obj = kb.any(subject, property as any, undefined, doc)\n if (!obj) {\n obj = kb.any(form, ns.ui('default'))\n }\n if (obj && obj.value && params.uriPrefix) {\n // eg tel: or mailto:\n field.value = decodeURIComponent(obj.value.replace(params.uriPrefix, '')) // should have no spaces but in case\n .replace(/ /g, '')\n } else if (obj) {\n /* istanbul ignore next */\n field.value = obj.value || obj.value || ''\n }\n field.setAttribute('style', style)\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (!kb.updater.editable((doc as NamedNode).uri)) {\n field.readOnly = true // was: disabled. readOnly is better\n ;(field as any).style = textInputStyleUneditable + paramStyle\n if (suppressEmptyUneditable && field.value === '') {\n box.style.display = 'none' // clutter\n }\n return box\n }\n\n // read-write:\n field.addEventListener(\n 'keyup',\n function (_e) {\n if (params.pattern) {\n field.setAttribute(\n 'style',\n style +\n (field.value.match(params.pattern)\n ? 'color: green;'\n : 'color: red;')\n )\n }\n },\n true\n )\n field.addEventListener(\n 'change',\n function (_e) {\n // i.e. lose focus with changed data\n if (params.pattern && !field.value.match(params.pattern)) return\n field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.\n field.setAttribute('style', style + 'color: gray;') // pending\n const ds = kb.statementsMatching(subject, property as any) // remove any multiple values\n let result\n if (params.namedNode) {\n result = kb.sym(field.value)\n } else if (params.uriPrefix) {\n result = encodeURIComponent(field.value.replace(/ /g, ''))\n result = kb.sym(params.uriPrefix + field.value)\n } else {\n if (params.dt) {\n result = new Literal(\n field.value.trim(),\n undefined,\n ns.xsd(params.dt)\n )\n } else {\n result = new Literal(field.value)\n }\n }\n let is = ds.map(statement => st(statement.subject, statement.predicate, result, statement.why)) // can include >1 doc\n if (is.length === 0) {\n // or none\n is = [st(subject, property as any, result, doc)]\n }\n\n function updateMany (ds, is: { why: { uri: string } }[], callback) {\n const docs: any[] = []\n is.forEach(st => {\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n ds.forEach(st => {\n /* istanbul ignore next */\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n /* istanbul ignore next */\n if (docs.length === 0) {\n throw new Error('updateMany has no docs to patch')\n }\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (docs.length === 1) {\n return kb.updater.update(ds, is as any, callback)\n }\n // return kb.updater.update(ds, is, callback)\n\n const doc = docs.pop()\n const is1 = is.filter(st => st.why.uri === doc)\n const is2 = is.filter(st => st.why.uri !== doc)\n const ds1 = ds.filter(st => st.why.uri === doc)\n const ds2 = ds.filter(st => st.why.uri !== doc)\n kb.updater.update(ds1, is1 as any, function (uri, ok, body) {\n if (ok) {\n updateMany(ds2, is2, callback)\n } else {\n callback(uri, ok, body)\n }\n })\n }\n\n updateMany(ds, is as any, function (uri, ok, body) {\n // kb.updater.update(ds, is, function (uri, ok, body) {\n if (ok) {\n field.disabled = false\n field.setAttribute('style', style)\n } else {\n box.appendChild(errorMessageBlock(dom, body))\n }\n callbackFunction(ok, body)\n })\n },\n true\n )\n return box\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA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CAAC,EACD,IAAI,CACL;EACD,OAAO9F,GAAG;AACZ"}
|
|
1
|
+
{"version":3,"file":"basic.js","names":["_rdflib","require","_solidLogic","ns","_interopRequireWildcard","_style","_styleConstants","_interopRequireDefault","_utils","_error","_fieldFunction","_fieldParams","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","store","solidLogicSingleton","renderNameValuePair","dom","kb","box","form","label","style","display","flexDirection","lhs","appendChild","createElement","width","styleConstants","formFieldNameBoxWidth","rhs","setAttribute","formFieldNameBoxStyle","createTextNode","any","ui","fieldLabel","errorMessageBlock","property","fieldInQuestion","lab","undefined","anchor","uri","textContent","fieldStore","subject","predicate","def","sts","statementsMatching","length","updater","Error","why","value","editable","sym","basicField","container","already","doc","callbackFunction","formDoc","suppressEmptyUneditable","anyJS","mostSpecificClassURI","params","fieldParams","paramStyle","textInputStyle","field","type","size","textInputSize","maxLength","basicMaxLength","uriPrefix","decodeURIComponent","replace","readOnly","textInputStyleUneditable","addEventListener","_e","pattern","match","disabled","ds","result","namedNode","encodeURIComponent","dt","Literal","trim","xsd","is","map","statement","st","updateMany","callback","docs","forEach","includes","push","update","pop","is1","filter","is2","ds1","ds2","ok","body"],"sources":["../../../src/widgets/forms/basic.ts"],"sourcesContent":["import { BlankNode, Literal, NamedNode, Node, st, Store, Variable } from 'rdflib'\nimport { solidLogicSingleton } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { formFieldNameBoxStyle, textInputStyle, textInputStyleUneditable } from '../../style'\nimport styleConstants from '../../styleConstants'\nimport { label } from '../../utils'\nimport { errorMessageBlock } from '../error'\nimport { mostSpecificClassURI } from './fieldFunction'\nimport { fieldParams } from './fieldParams'\n\nconst store = solidLogicSingleton.store\n\n/* Style and create a name, value pair\n*/\nexport function renderNameValuePair (dom: HTMLDocument, kb: Store, box: HTMLElement, form: NamedNode, label?: string):HTMLElement {\n // const property = kb.any(form, ns.ui('property'))\n box.style.display = 'flex'\n box.style.flexDirection = 'row'\n const lhs = box.appendChild(dom.createElement('div'))\n lhs.style.width = styleConstants.formFieldNameBoxWidth\n const rhs = box.appendChild(dom.createElement('div'))\n\n lhs.setAttribute('class', 'formFieldName')\n lhs.setAttribute('style', formFieldNameBoxStyle)\n rhs.setAttribute('class', 'formFieldValue')\n if (label) {\n lhs.appendChild(dom.createTextNode(label))\n } else if (kb.any(form, ns.ui('property'))) { // Assume more space for error on right\n lhs.appendChild(fieldLabel(dom, kb.any(form, ns.ui('property')) as NamedNode, form))\n } else {\n rhs.appendChild(errorMessageBlock(dom, 'No property or label given for form field: ' + form))\n lhs.appendChild(dom.createTextNode('???'))\n }\n return rhs\n}\n\n/**\n * Create an anchor element with a label as the anchor text.\n *\n * @param dom The DOM\n * @param property href for the anchor element\n * @param fieldInQuestion field to produce a label for\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldLabel (dom: HTMLDocument, property: NamedNode | undefined, fieldInQuestion: Node): HTMLElement | Text {\n let lab = store.any(fieldInQuestion as any, ns.ui('label'))\n if (!lab) lab = label(property, true) // Init capital\n if (property === undefined) {\n return dom.createTextNode('@@Internal error: undefined property')\n }\n const anchor = dom.createElement('a')\n /* istanbul ignore next */\n if (property.uri) anchor.setAttribute('href', property.uri)\n anchor.setAttribute('style', 'color: #3B5998; text-decoration: none;') // Not too blue and no underline\n anchor.textContent = lab as any\n return anchor\n}\n\n/**\n * Returns the document for the first quad that matches\n * the subject and predicate provided, or default if that\n * store is not editable.\n *\n * @param subject Subject about which we want to find an editable RDF document\n * @param predicate Predicate about which we want to find an editable RDF document\n * @param def default RDF document to return if none found\n *\n * @internal exporting this only for unit tests\n */\nexport function fieldStore (subject: NamedNode | BlankNode | Variable, predicate: NamedNode | Variable, def: NamedNode | undefined): NamedNode | undefined {\n const sts = store.statementsMatching(subject, predicate)\n if (sts.length === 0) return def // can used default as no data yet\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n if (\n sts.length > 0 &&\n sts[0].why.value &&\n store.updater.editable(sts[0].why.value, store)\n ) {\n return store.sym(sts[0].why.value)\n }\n return def\n}\n\n/**\n * Render a basic form field\n *\n * The same function is used for many similar one-value fields, with different\n * regexps used to validate.\n *\n * @param dom The HTML Document object aka Document Object Model\n * @param container If present, the created widget will be appended to this\n * @param already A hash table of (form, subject) kept to prevent recursive forms looping\n * @param subject The thing about which the form displays/edits data\n * @param form The form or field to be rendered\n * @param doc The web document in which the data is\n * @param callbackFunction Called when data is changed?\n *\n * @returns The HTML widget created\n */\n// eslint-disable-next-line complexity\nexport function basicField (\n dom: HTMLDocument,\n container: HTMLElement | undefined,\n already,\n subject: NamedNode | BlankNode | Variable,\n form: NamedNode,\n doc: NamedNode | undefined,\n callbackFunction: (_ok: boolean, _errorMessage: string) => void\n): HTMLElement {\n const kb = store\n const formDoc = form.doc ? form.doc() : null // @@ if blank no way to know\n\n const box = dom.createElement('div')\n\n const property = kb.any(form, ns.ui('property'))\n if (container) container.appendChild(box)\n if (!property) {\n return box.appendChild(\n errorMessageBlock(dom, 'Error: No property given for text field: ' + form)\n )\n }\n const rhs = renderNameValuePair(dom, kb, box, form)\n\n // It can be cleaner to just remove empty fields if you can't edit them anyway\n const suppressEmptyUneditable = kb.anyJS(form, ns.ui('suppressEmptyUneditable'), null, formDoc)\n\n const uri = mostSpecificClassURI(form)\n let params = fieldParams[uri]\n if (params === undefined) params = { style: '' } // non-bottom field types can do this\n const paramStyle = params.style || ''\n const style = textInputStyle + paramStyle\n const field = dom.createElement('input')\n ;(field as any).style = style\n rhs.appendChild(field)\n field.setAttribute('type', params.type ? params.type : 'text')\n\n const size = kb.anyJS(form, ns.ui('size')) || styleConstants.textInputSize || 20\n field.setAttribute('size', size)\n\n const maxLength = kb.any(form, ns.ui('maxLength'))\n field.setAttribute('maxLength', maxLength ? '' + maxLength : styleConstants.basicMaxLength)\n\n doc = doc || fieldStore(subject, property as any, doc)\n\n let obj = kb.any(subject, property as any, undefined, doc)\n if (!obj) {\n obj = kb.any(form, ns.ui('default'))\n }\n if (obj && obj.value && params.uriPrefix) {\n // eg tel: or mailto:\n field.value = decodeURIComponent(obj.value.replace(params.uriPrefix, '')) // should have no spaces but in case\n .replace(/ /g, '')\n } else if (obj) {\n /* istanbul ignore next */\n field.value = obj.value || obj.value || ''\n }\n field.setAttribute('style', style)\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (!kb.updater.editable((doc as NamedNode).uri)) {\n field.readOnly = true // was: disabled. readOnly is better\n ;(field as any).style = textInputStyleUneditable + paramStyle\n if (suppressEmptyUneditable && field.value === '') {\n box.style.display = 'none' // clutter\n }\n return box\n }\n\n // read-write:\n field.addEventListener(\n 'keyup',\n function (_e) {\n if (params.pattern) {\n field.setAttribute(\n 'style',\n style +\n (field.value.match(params.pattern)\n ? 'color: green;'\n : 'color: red;')\n )\n }\n },\n true\n )\n field.addEventListener(\n 'change',\n function (_e) {\n // i.e. lose focus with changed data\n if (params.pattern && !field.value.match(params.pattern)) return\n field.disabled = true // See if this stops getting two dates from fumbling e.g the chrome datepicker.\n field.setAttribute('style', style + 'color: gray;') // pending\n const ds = kb.statementsMatching(subject, property as any) // remove any multiple values\n let result\n if (params.namedNode) {\n result = kb.sym(field.value)\n } else if (params.uriPrefix) {\n result = encodeURIComponent(field.value.replace(/ /g, ''))\n result = kb.sym(params.uriPrefix + field.value)\n } else {\n if (params.dt) {\n result = new Literal(\n field.value.trim(),\n undefined,\n ns.xsd(params.dt)\n )\n } else {\n result = new Literal(field.value)\n }\n }\n let is = ds.map(statement => st(statement.subject, statement.predicate, result, statement.why)) // can include >1 doc\n if (is.length === 0) {\n // or none\n is = [st(subject, property as any, result, doc)]\n }\n\n function updateMany (ds, is: { why: { uri: string } }[], callback) {\n const docs: any[] = []\n is.forEach(st => {\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n ds.forEach(st => {\n /* istanbul ignore next */\n if (!docs.includes(st.why.uri)) docs.push(st.why.uri)\n })\n /* istanbul ignore next */\n if (docs.length === 0) {\n throw new Error('updateMany has no docs to patch')\n }\n if (!kb.updater) {\n throw new Error('kb has no updater')\n }\n if (docs.length === 1) {\n return kb.updater.update(ds, is as any, callback)\n }\n // return kb.updater.update(ds, is, callback)\n\n const doc = docs.pop()\n const is1 = is.filter(st => st.why.uri === doc)\n const is2 = is.filter(st => st.why.uri !== doc)\n const ds1 = ds.filter(st => st.why.uri === doc)\n const ds2 = ds.filter(st => st.why.uri !== doc)\n kb.updater.update(ds1, is1 as any, function (uri, ok, body) {\n if (ok) {\n updateMany(ds2, is2, callback)\n } else {\n callback(uri, ok, body)\n }\n })\n }\n\n updateMany(ds, is as any, function (uri, ok, body) {\n // kb.updater.update(ds, is, function (uri, ok, body) {\n if (ok) {\n field.disabled = false\n field.setAttribute('style', style)\n } else {\n box.appendChild(errorMessageBlock(dom, body))\n }\n callbackFunction(ok, body)\n })\n },\n true\n )\n return box\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAA2C,SAAAW,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,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA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