diff --git a/10.138a55f591cf64435c2e.bundle.js b/10.138a55f591cf64435c2e.bundle.js new file mode 100644 index 000000000..4c279c44b --- /dev/null +++ b/10.138a55f591cf64435c2e.bundle.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1556:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_exports__.default="\x3c!-- XXX: stub for the element because it's still part of the nuxeo/nuxeo-web-ui repo. --\x3e\n\x3c!-- (to be reviewed once ELEMENTS-1321 is handled) --\x3e\n\n

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000..312ee194d --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ +Storybook
\ No newline at end of file diff --git a/main.138a55f591cf64435c2e.bundle.js b/main.138a55f591cf64435c2e.bundle.js new file mode 100644 index 000000000..df7173c19 --- /dev/null +++ b/main.138a55f591cf64435c2e.bundle.js @@ -0,0 +1,5756 @@ +/*! For license information please see main.138a55f591cf64435c2e.bundle.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{107:function(module,__webpack_exports__,__webpack_require__){"use strict";const template=__webpack_require__(0).a` + + + +`;document.head.appendChild(template.content)},11:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_polymer_element_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(30);window.Nuxeo=window.Nuxeo||{},Nuxeo.Element=class Element extends _polymer_polymer_polymer_element_js__WEBPACK_IMPORTED_MODULE_0__.a{}},122:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return DocumentBuilder}));__webpack_require__(42),__webpack_require__(52),__webpack_require__(59),__webpack_require__(484),__webpack_require__(49),__webpack_require__(1295),__webpack_require__(397),__webpack_require__(60),__webpack_require__(77),__webpack_require__(28),__webpack_require__(53),__webpack_require__(48);var uuid_v4__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(83),uuid_v4__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(uuid_v4__WEBPACK_IMPORTED_MODULE_12__);function _typeof(o){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function _defineProperties(e,r){for(var o,t=0;t\n \n \n"])));document.head.appendChild(template.content)},1268:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(133).a.__router={baseUrl:"",useHashbang:!0,browse:function(){return"#"},user:function(){return"#"},group:function(){return"#"}}},1269:function(module,exports,__webpack_require__){var map={"./actions/actions.stories.js":1270,"./nuxeo-actions-menu/nuxeo-actions-menu.stories.js":1297,"./nuxeo-aggregation-widget/nuxeo-aggregation-widget.stories.js":1299,"./nuxeo-card/nuxeo-card.stories.js":1300,"./nuxeo-checkmark/nuxeo-checkmark.stories.js":1302,"./nuxeo-data-grid/nuxeo-data-grid.stories.js":1303,"./nuxeo-data-list/nuxeo-data-list.stories.js":1305,"./nuxeo-data-table/nuxeo-data-table.stories.js":1307,"./nuxeo-date-picker/nuxeo-date-picker.stories.js":1308,"./nuxeo-date/nuxeo-date.stories.js":1309,"./nuxeo-directory-radio-group/nuxeo-directory-radio-group.stories.js":1310,"./nuxeo-document-comments/nuxeo-document-comments.stories.js":1311,"./nuxeo-document-layout/nuxeo-document-layout.stories.js":1315,"./nuxeo-document-picker/nuxeo-document-picker.stories.js":1510,"./nuxeo-html-editor/nuxeo-html-editor.stories.js":1511,"./nuxeo-icons/nuxeo-icons.stories.js":1518,"./nuxeo-input/nuxeo-input.stories.js":1519,"./nuxeo-justified-grid/nuxeo-justified-grid.stories.js":1520,"./nuxeo-pagination-controls/nuxeo-pagination-controls.stories.js":1523,"./nuxeo-search-form-layout/nuxeo-search-form-layout.stories.js":1526,"./nuxeo-search-results-layout/nuxeo-search-results-layout.stories.js":1527,"./nuxeo-select/nuxeo-select.stories.js":1528,"./nuxeo-selectivity/nuxeo-selectivity.stories.js":1529,"./nuxeo-sort-select/nuxeo-sort-select.stories.js":1530,"./nuxeo-textarea/nuxeo-textarea.stories.js":1532,"./nuxeo-tree/nuxeo-tree.stories.js":1533,"./nuxeo-user-suggestion/nuxeo-user-suggestion.stories.js":1534,"./nuxeo-video/nuxeo-video-conversions.stories.js":1536,"./nuxeo-video/nuxeo-video-info.stories.js":1538,"./widgets/widget.stories.js":1540};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=1269},1270:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(1279),__webpack_require__(1284),__webpack_require__(1285),__webpack_require__(1286),__webpack_require__(1287),__webpack_require__(1288),__webpack_require__(730),__webpack_require__(1289),__webpack_require__(1290),__webpack_require__(1291),__webpack_require__(1292),__webpack_require__(1293),__webpack_require__(1294),__webpack_require__(78);var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,lit_html__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(2),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(91),_data_documents_data__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(122),_img_nuxeo_elements_catalog_svg__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(313),_img_nuxeo_elements_catalog_svg__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(_img_nuxeo_elements_catalog_svg__WEBPACK_IMPORTED_MODULE_22__),_lists_icons__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(186);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import '@nuxeo/nuxeo-ui-elements/actions/nuxeo-add-to-collection-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-favorites-toggle-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-delete-blob-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-delete-document-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-download-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-export-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-link-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-lock-toggle-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-move-documents-down-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-move-documents-up-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-notifications-toggle-button';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-share-button.js';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-untrash-document-button.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-icons';\nimport { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { color, select, text, boolean } from '@storybook/addon-knobs';\nimport { action } from '@storybook/addon-actions';\nimport DocumentBuilder from '../../data/documents.data';\nimport image from '../../img/nuxeo-elements-catalog.svg';\nimport iconMap from '../../lists/icons';\n\nconst documentBuilder = new DocumentBuilder()\n .setFileContent('Nuxeo Logo', image)\n .setPermissions(['Write', 'ManageWorkflows']);\n\nconst DOCUMENTS = [documentBuilder.build(), documentBuilder.build(), documentBuilder.build()];\n\nconst listOfIcons = iconMap.nuxeo;\n\nconst server = window.nuxeo.mock;\nserver.respondWith('POST', '/api/v1/automation/Document.AddToFavorites', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.RemoveFromFavorites', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Blob.RemoveFromDocument', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.Lock', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.Unlock', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.Subscribe', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.Unsubscribe', DOCUMENTS[0]);\nserver.respondWith('POST', '/api/v1/automation/Document.Untrash', DOCUMENTS[0]);\n\nconst stories = storiesOf('UI/Actions', module);\nstories\n .add(\n 'nuxeo-add-to-collection-button',\n () =>\n html`\n \n `,\n )\n\n .add(\n 'nuxeo-delete-blob-button',\n () =>\n html`\n \n `,\n )\n\n .add(\n 'nuxeo-delete-document-button',\n () =>\n html`\n \n \n `,\n )\n\n .add(\n 'nuxeo-download-button',\n () =>\n html`\n \n `,\n )\n\n .add(\n 'nuxeo-export-button',\n () =>\n html`\n \n `,\n )\n\n .add('nuxeo-favorites-toggle-button', () => {\n const favorite = boolean('Favorite', false);\n return html`\n \n \n \n `;\n })\n\n .add('nuxeo-link-button', () => {\n const href = text('Href', 'https://nuxeo.com');\n const icon = select('Icons', listOfIcons, 'nuxeo:add');\n const label = text('Label', 'Nuxeo');\n const showLabel = boolean('Show Label', false);\n return html`\n \n `;\n })\n\n .add('nuxeo-lock-toggle-button', () => {\n const locked = boolean('Locked', false);\n return html`\n \n \n `;\n })\n\n .add('nuxeo-move-documents-down-button', () => {\n const documents = DOCUMENTS;\n const selectedDocuments = [DOCUMENTS[1]];\n return html`\n \n \n `;\n })\n\n .add('nuxeo-move-documents-up-button', () => {\n const documents = DOCUMENTS;\n const selectedDocuments = [DOCUMENTS[1]];\n return html`\n \n \n `;\n })\n\n .add('nuxeo-notifications-toggle-button', () => {\n const subscribed = boolean('Subscribed', false);\n return html`\n \n \n \n `;\n })\n\n .add(\n 'nuxeo-share-button',\n () =>\n html`\n \n `,\n )\n\n .add('nuxeo-untrash-document-button', () => {\n const DOCUMENT_TRASHED = new DocumentBuilder()\n .setSystemProperties({ isTrashed: true })\n .setPermissions(['Write', 'ManageWorkflows'])\n .build();\n return html`\n \n \n `;\n });\n"),__ADDS_MAP__={},documentBuilder=(new _data_documents_data__WEBPACK_IMPORTED_MODULE_21__.a).setFileContent("Nuxeo Logo",_img_nuxeo_elements_catalog_svg__WEBPACK_IMPORTED_MODULE_22___default.a).setPermissions(["Write","ManageWorkflows"]),DOCUMENTS=[documentBuilder.build(),documentBuilder.build(),documentBuilder.build()],listOfIcons=_lists_icons__WEBPACK_IMPORTED_MODULE_23__.a.nuxeo,server=window.nuxeo.mock;server.respondWith("POST","/api/v1/automation/Document.AddToFavorites",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.RemoveFromFavorites",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Blob.RemoveFromDocument",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.Lock",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.Unlock",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.Subscribe",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.Unsubscribe",DOCUMENTS[0]),server.respondWith("POST","/api/v1/automation/Document.Untrash",DOCUMENTS[0]),Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_18__.storiesOf)("UI/Actions",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/actions.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/actions",{})).add("nuxeo-add-to-collection-button",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS[0])})).add("nuxeo-delete-blob-button",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS[0])})).add("nuxeo-delete-document-button",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS[0])})).add("nuxeo-download-button",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS[0])})).add("nuxeo-export-button",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),document)})).add("nuxeo-favorites-toggle-button",(function(){var favorite=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.boolean)("Favorite",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n \n \n \n '])),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.color)("--nuxeo-action-color-activated","#00aded","CSS variables"),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS[0],favorite)})).add("nuxeo-link-button",(function(){var href=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.text)("Href","https://nuxeo.com"),icon=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.select)("Icons",listOfIcons,"nuxeo:add"),label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.text)("Label","Nuxeo"),showLabel=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.boolean)("Show Label",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),href,icon,label,showLabel)})).add("nuxeo-lock-toggle-button",(function(){var locked=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.boolean)("Locked",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS,selectedDocuments)})).add("nuxeo-move-documents-up-button",(function(){var selectedDocuments=[DOCUMENTS[1]];return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENTS,selectedDocuments)})).add("nuxeo-notifications-toggle-button",(function(){var subscribed=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_19__.boolean)("Subscribed",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),document)})).add("nuxeo-untrash-document-button",(function(){var DOCUMENT_TRASHED=(new _data_documents_data__WEBPACK_IMPORTED_MODULE_21__.a).setSystemProperties({isTrashed:!0}).setPermissions(["Write","ManageWorkflows"]).build();return Object(lit_html__WEBPACK_IMPORTED_MODULE_17__.html)(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_20__.action)("clicked"),DOCUMENT_TRASHED)}))}.call(this,__webpack_require__(29)(module))},1279:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(98),__webpack_require__(121),__webpack_require__(404),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(8),_widgets_nuxeo_selectivity_js__WEBPACK_IMPORTED_MODULE_14__=(__webpack_require__(78),__webpack_require__(132),__webpack_require__(153));__webpack_require__(405),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class AddToCollectionButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_11__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + + +

[[i18n('addToCollectionButton.dialog.heading')]]

+ + + + + + +
+ [[i18n('addToCollectionButton.dialog.cancel')]] + + [[i18n('addToCollectionButton.dialog.add')]] + +
+
+ `}static get is(){return"nuxeo-add-to-collection-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:collections"},collection:{type:String,value:""},resultsFilter:{type:Function,value(){return this._resultsFilter.bind(this)}},resultFormatter:{type:Function,value(){return this._resultFormatter.bind(this)}},selectionFormatter:{type:Function,value(){return this._selectionFormatter.bind(this)}},newEntryFormatter:{type:Function,value(){return this._newEntryFormatter.bind(this)}},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}_isAvailable(doc){return this.isCollectionMember(doc)}_computeLabel(){return this.i18n("addToCollectionButton.tooltip")}_toggleDialog(){this.$.dialog.toggle()}_add(){if(this._isNew()){const op=this.$$("#createCollectionOp"),name=this.$.nxSelect.selectedItem.displayLabel;return op.params={name:name,description:this.description},op.execute().then(response=>{this.collection=response.uid,this._addToCollection()})}this._addToCollection()}_addToCollection(){const op=this.$$("#addToCollectionOp");return op.params={collection:this.collection},op.execute().then(()=>{this.dispatchEvent(new CustomEvent("added-to-collection",{composed:!0,bubbles:!0,detail:{docId:this.document.uid,collectionId:this.collection}})),this._resetPopup()})}_resultsFilter(entry){return entry.id&&-1===entry.id.indexOf("-999999")}_resultFormatter(item){const label=item.displayLabel||item.title;return-1===item.id?''+label:Object(_widgets_nuxeo_selectivity_js__WEBPACK_IMPORTED_MODULE_14__.a)(label)}_selectionFormatter(item){const label=item.displayLabel||item.title;return-1===item.id?label:Object(_widgets_nuxeo_selectivity_js__WEBPACK_IMPORTED_MODULE_14__.a)(label)}_escapeHTML(markup){const replaceMap={"\\":"\","&":"&","<":"<",">":">","/":"/"};return"string"!=typeof markup?markup:String(markup).replace(/[&<>"/\\]/g,match=>replaceMap[match])}_newEntryFormatter(term){return{id:-1,displayLabel:this._escapeHTML(term)}}_isValid(){return this.collection}_isNew(){return-1===this.collection}_resetPopup(){this.set("collection",null),this.description=""}}customElements.define(AddToCollectionButton.is,AddToCollectionButton),Nuxeo.AddToCollectionButton=AddToCollectionButton}},1280:function(module,exports,__webpack_require__){var map={"./af":598,"./af.js":598,"./ar":599,"./ar-dz":600,"./ar-dz.js":600,"./ar-kw":601,"./ar-kw.js":601,"./ar-ly":602,"./ar-ly.js":602,"./ar-ma":603,"./ar-ma.js":603,"./ar-sa":604,"./ar-sa.js":604,"./ar-tn":605,"./ar-tn.js":605,"./ar.js":599,"./az":606,"./az.js":606,"./be":607,"./be.js":607,"./bg":608,"./bg.js":608,"./bm":609,"./bm.js":609,"./bn":610,"./bn.js":610,"./bo":611,"./bo.js":611,"./br":612,"./br.js":612,"./bs":613,"./bs.js":613,"./ca":614,"./ca.js":614,"./cs":615,"./cs.js":615,"./cv":616,"./cv.js":616,"./cy":617,"./cy.js":617,"./da":618,"./da.js":618,"./de":619,"./de-at":620,"./de-at.js":620,"./de-ch":621,"./de-ch.js":621,"./de.js":619,"./dv":622,"./dv.js":622,"./el":623,"./el.js":623,"./en-SG":624,"./en-SG.js":624,"./en-au":625,"./en-au.js":625,"./en-ca":626,"./en-ca.js":626,"./en-gb":627,"./en-gb.js":627,"./en-ie":628,"./en-ie.js":628,"./en-il":629,"./en-il.js":629,"./en-nz":630,"./en-nz.js":630,"./eo":631,"./eo.js":631,"./es":632,"./es-do":633,"./es-do.js":633,"./es-us":634,"./es-us.js":634,"./es.js":632,"./et":635,"./et.js":635,"./eu":636,"./eu.js":636,"./fa":637,"./fa.js":637,"./fi":638,"./fi.js":638,"./fo":639,"./fo.js":639,"./fr":640,"./fr-ca":641,"./fr-ca.js":641,"./fr-ch":642,"./fr-ch.js":642,"./fr.js":640,"./fy":643,"./fy.js":643,"./ga":644,"./ga.js":644,"./gd":645,"./gd.js":645,"./gl":646,"./gl.js":646,"./gom-latn":647,"./gom-latn.js":647,"./gu":648,"./gu.js":648,"./he":649,"./he.js":649,"./hi":650,"./hi.js":650,"./hr":651,"./hr.js":651,"./hu":652,"./hu.js":652,"./hy-am":653,"./hy-am.js":653,"./id":654,"./id.js":654,"./is":655,"./is.js":655,"./it":656,"./it-ch":657,"./it-ch.js":657,"./it.js":656,"./ja":658,"./ja.js":658,"./jv":659,"./jv.js":659,"./ka":660,"./ka.js":660,"./kk":661,"./kk.js":661,"./km":662,"./km.js":662,"./kn":663,"./kn.js":663,"./ko":664,"./ko.js":664,"./ku":665,"./ku.js":665,"./ky":666,"./ky.js":666,"./lb":667,"./lb.js":667,"./lo":668,"./lo.js":668,"./lt":669,"./lt.js":669,"./lv":670,"./lv.js":670,"./me":671,"./me.js":671,"./mi":672,"./mi.js":672,"./mk":673,"./mk.js":673,"./ml":674,"./ml.js":674,"./mn":675,"./mn.js":675,"./mr":676,"./mr.js":676,"./ms":677,"./ms-my":678,"./ms-my.js":678,"./ms.js":677,"./mt":679,"./mt.js":679,"./my":680,"./my.js":680,"./nb":681,"./nb.js":681,"./ne":682,"./ne.js":682,"./nl":683,"./nl-be":684,"./nl-be.js":684,"./nl.js":683,"./nn":685,"./nn.js":685,"./oc-lnc":686,"./oc-lnc.js":686,"./pa-in":687,"./pa-in.js":687,"./pl":688,"./pl.js":688,"./pt":689,"./pt-br":690,"./pt-br.js":690,"./pt.js":689,"./ro":691,"./ro.js":691,"./ru":692,"./ru.js":692,"./sd":693,"./sd.js":693,"./se":694,"./se.js":694,"./si":695,"./si.js":695,"./sk":696,"./sk.js":696,"./sl":697,"./sl.js":697,"./sq":698,"./sq.js":698,"./sr":699,"./sr-cyrl":700,"./sr-cyrl.js":700,"./sr.js":699,"./ss":701,"./ss.js":701,"./sv":702,"./sv.js":702,"./sw":703,"./sw.js":703,"./ta":704,"./ta.js":704,"./te":705,"./te.js":705,"./tet":706,"./tet.js":706,"./tg":707,"./tg.js":707,"./th":708,"./th.js":708,"./tl-ph":709,"./tl-ph.js":709,"./tlh":710,"./tlh.js":710,"./tr":711,"./tr.js":711,"./tzl":712,"./tzl.js":712,"./tzm":713,"./tzm-latn":714,"./tzm-latn.js":714,"./tzm.js":713,"./ug-cn":715,"./ug-cn.js":715,"./uk":716,"./uk.js":716,"./ur":717,"./ur.js":717,"./uz":718,"./uz-latn":719,"./uz-latn.js":719,"./uz.js":718,"./vi":720,"./vi.js":720,"./x-pseudo":721,"./x-pseudo.js":721,"./yo":722,"./yo.js":722,"./zh-cn":723,"./zh-cn.js":723,"./zh-hk":724,"./zh-hk.js":724,"./zh-tw":725,"./zh-tw.js":725};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=1280},1284:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_8__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(98),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class FavoritesToggleButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_8__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + `}static get is(){return"nuxeo-favorites-toggle-button"}static get properties(){return{document:{type:Object,observer:"_documentChanged"},icon:{type:String,value:"nuxeo:favorites"},favorite:{type:Boolean,readOnly:!0,notify:!0,reflectToAttribute:!0},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(favorite, i18n)"}}}ready(){super.ready(),this.removeFromFavoritesHandler=e=>{this.document&&e.detail.docUid&&e.detail.docUid===this.document.uid&&this._setFavorite(!1)},window.addEventListener("removed-from-favorites",this.removeFromFavoritesHandler),this.addEventListener("click",this._toggle),this.addEventListener("keydown",event=>{"Enter"===event.key&&event.stopPropagation()})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("removed-from-favorites",this.removeFromFavoritesHandler),this.removeFromFavoritesHandler=null}_isAvailable(doc){return this.isCollectionMember(doc)}_toggle(){this.favorite?this.$.opRemove.execute().then(()=>{this.dispatchEvent(new CustomEvent("removed-from-favorites",{composed:!0,bubbles:!0,detail:{doc:this.document}})),this._setFavorite(!1)}):this.$.opAdd.execute().then(()=>{this.dispatchEvent(new CustomEvent("added-to-favorites",{composed:!0,bubbles:!0,detail:{doc:this.document}})),this._setFavorite(!0)})}_computeLabel(favorite){return this.i18n&&this.i18n("favoritesToggleButton.tooltip."+(favorite?"remove":"add"))}_computeHoverLabel(favorite,doc){return`${doc&&doc.title}${this._computeLabel(favorite)}`}_documentChanged(){this._setFavorite(this.isFavorite(this.document))}}customElements.define(FavoritesToggleButton.is,FavoritesToggleButton),Nuxeo.FavoritesToggleButton=FavoritesToggleButton}},1285:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(98),__webpack_require__(121),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(132),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class DeleteBlobButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + + +

[[i18n('deleteBlobButton.dialog.heading')]]

+
[[i18n('deleteBlobButton.dialog.message')]]
+
+ [[i18n('deleteBlobButton.dialog.no')]] + [[i18n('deleteBlobButton.dialog.yes')]] +
+
+ + + `}static get is(){return"nuxeo-delete-blob-button"}static get properties(){return{connectionId:{type:String,value:"nx"},document:Object,xpath:{type:String,value:"file:content"},icon:{type:String,value:"nuxeo:remove"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}_isAvailable(doc){return doc&&this.hasPermission(doc,"WriteProperties")&&!this.isImmutable(doc)&&!this.hasType(doc,"Root")&&!this.isTrashed(doc)&&!this._isPropUnderRetention(doc)}_isPropUnderRetention(doc){if(doc&&doc.isUnderRetentionOrLegalHold&&doc.retainedProperties&&doc.retainedProperties.length>0){const{retainedProperties:retainedProperties}=doc;return retainedProperties.find(prop=>this._transformXpathRegex(prop,this.xpath)||prop.startsWith(this.xpath)||prop.includes(this.xpath.split("/")[0])&&!prop.includes("/"))}return!1}_transformXpathRegex(prop,xpath){const transformedArray=[];if(prop.includes("*")){let xpathArray=xpath.split("/");for(let i=0;i{this._dispatchEvent("file-deleted",response)}).catch(error=>{this._dispatchEvent("error",error)})):this._removeBlob()}else this._removeBlob()}_removeBlob(){this.$.operation.execute().then(response=>{this._dispatchEvent("file-deleted",response)})}_dispatchEvent(eventName,response){this.dispatchEvent(new CustomEvent(eventName,{composed:!0,bubbles:!0,detail:{response:response}}))}}customElements.define(DeleteBlobButton.is,DeleteBlobButton),Nuxeo.DeleteBlobButton=DeleteBlobButton}},1286:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(98),__webpack_require__(121),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(132),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class DeleteDocumentButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + + `}static get is(){return"nuxeo-delete-document-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:delete",computed:"_computeIcon(hard)"},hard:{type:Boolean,value:!1},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(hard, i18n)"}}}_isAvailable(doc){return!this.isVersion(doc)&&this.hasPermission(doc,"Remove")&&(!this.isTrashed(doc)||this.hard)}_computeIcon(hard){return hard?"nuxeo:delete-permanently":"nuxeo:delete"}_computeLabel(hard){return this.i18n(hard?"deleteButton.tooltip.permanently":"deleteButton.tooltip")}_delete(){if(!window.confirm(this.i18n("deleteButton.confirm")))return;(this.hard?this.$.deleteOp:this.$.trashOp).execute().then(()=>{this.dispatchEvent(new CustomEvent("document-deleted",{composed:!0,bubbles:!0,detail:{doc:this.document,hard:this.hard}}))}).catch(error=>{this.dispatchEvent(new CustomEvent("document-deleted",{composed:!0,bubbles:!0,detail:{doc:this.document,error:error,hard:this.hard}}))})}}customElements.define(DeleteDocumentButton.is,DeleteDocumentButton),Nuxeo.DeleteDocumentButton=DeleteDocumentButton}},1287:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(90);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class DownloadButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_8__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_7__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + `}static get is(){return"nuxeo-download-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:download"},xpath:{type:String,value:"file:content"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}ready(){super.ready(),this.addEventListener("keydown",event=>{"Enter"===event.key&&event.stopPropagation()})}_isAvailable(doc){return this.hasContent(doc,this.formatPropertyXpath(this.xpath))}_computeLabel(){return this.i18n("downloadButton.tooltip")}_computeHoverLabel(doc){return`${doc&&doc.title}${this._computeLabel()}`}async _download(){const blob=this.document&&this._deepFind(this.document.properties,this.xpath);blob&&await new Promise(()=>{window.location.href=blob.downloadUrl?blob.downloadUrl:blob.data})}_deepFind(obj,props){for(let i=0,path=props.split("/"),len=path.length;i + .item { + @apply --layout-horizontal; + @apply --layout-center; + padding-top: 0.4em; + padding-bottom: 0.4em; + } + + .item iron-icon { + margin-right: 1em; + } + + a { + color: var(--nuxeo-link-color, #3a3a54); + } + a:hover { + color: var(--nuxeo-link-hover-color, #0066ff); + } + + .container { + overflow: auto; + } + + + + + + + +

[[i18n('exportButton.dialog.heading')]]

+ + + + + +
+ [[i18n('exportButton.dialog.cancel')]] +
+
+ `}static get is(){return"nuxeo-export-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:export"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}_isAvailable(document){return document}_computeLabel(){return this.i18n("exportButton.tooltip")}_toggleDialog(){this.$.dialog.toggle()}_filterRenditions(document){return document&&document.contextParameters&&document.contextParameters.renditions?document.contextParameters.renditions.filter(rendition=>"nuxeo:video:conversion"!==rendition.kind&&"nuxeo:picture:conversion"!==rendition.kind).map(item=>Object.assign({label:this.formatRendition(item.name)},item)):[]}}customElements.define(ExportButton.is,ExportButton),Nuxeo.ExportButton=ExportButton}},1289:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(208),__webpack_require__(11),__webpack_require__(98),__webpack_require__(62),__webpack_require__(44),__webpack_require__(89)),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(80),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(90),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class LockToggleButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a,_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_12__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a,_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_11__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + + + + + `}static get is(){return"nuxeo-lock-toggle-button"}static get properties(){return{document:{type:Object,observer:"_documentChanged"},icon:{type:String,computed:"_computeIcon(locked)"},locked:{type:Boolean,notify:!0,reflectToAttribute:!0},tooltip:{type:String,notify:!0,computed:"_computeTooltip(locked, i18n, document)"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(locked, i18n)"}}}ready(){super.ready(),this.addEventListener("click",this._toggle)}_isAvailable(doc,locked){return doc&&!doc.isVersion&&!this.isImmutable(doc)&&"Root"!==doc.type&&(this.hasPermission(doc,"Write")||locked&&this.hasPermission(doc,"Read"))}_toggle(){!this.locked&&this._canLock()?this.$.opLock.execute().then(doc=>{this.locked=!0,this.dispatchEvent(new CustomEvent("document-locked",{composed:!0,bubbles:!0,detail:{doc:doc}}))}).catch(this._handleError.bind(this)):this._canUnlock()&&this.$.opUnlock.execute().then(doc=>{this.locked=!1,this.dispatchEvent(new CustomEvent("document-unlocked",{composed:!0,bubbles:!0,detail:{doc:doc}}))}).catch(this._handleError.bind(this))}_handleError(err){const errorKey=`lockToggleButton.${this.locked?"unlock":"lock"}.error`;let message;switch(err.response.status){case 403:message=this.i18n(errorKey+".noPermissions");break;case 409:message=this.i18n(`${errorKey}.${this.locked?"lockedByAnotherUser":"alreadyLocked"}`);break;default:message=this.i18n(errorKey+".unexpectedError")}this.notify({message:message})}_computeTooltip(locked){return locked&&this.document.lockOwner&&this.document.lockCreated?this.i18n("lockToggleButton.tooltip.lockedBy",this.document.lockOwner,this.formatDate(this.document.lockCreated)):this.i18n("lockToggleButton.tooltip."+(locked?"unlock":"lock"))}_computeLabel(locked){return this.i18n("lockToggleButton.tooltip."+(locked?"unlock":"lock"))}_computeIcon(locked){return locked?"nuxeo:lock":"nuxeo:unlock"}_documentChanged(){this.locked=!(!this.document||!this.document.lockCreated)}_canLock(){return this.$.nxcon.connect().then(currentUser=>!this.document.isProxy&&!this.document.isVersion&&(currentUser.isAdministrator||this.document.contextParameters.permissions.indexOf("Everything")>-1||this.document.contextParameters.permissions.indexOf("Write")>-1))}_canUnlock(){return this.$.nxcon.connect().then(currentUser=>!this.document.isProxy&&((!!(currentUser.isAdministrator||this.document.contextParameters.permissions.indexOf("Everything")>-1)||currentUser.id===this.document.lockOwner&&this.document.contextParameters.permissions.indexOf("Write")>-1)&&!document.isVersion))}}customElements.define(LockToggleButton.is,LockToggleButton),Nuxeo.LockToggleButton=LockToggleButton}},1290:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__=(__webpack_require__(11),__webpack_require__(98),__webpack_require__(62),__webpack_require__(44),__webpack_require__(89)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class MoveDocumentsDown extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__.a,_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + `}static get is(){return"nuxeo-move-documents-down-button"}static get properties(){return{documents:Array,selectedDocuments:Array,tooltipPosition:{type:String,value:"bottom"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"},_available:Boolean,_beforeUid:Document,_sortedDocuments:Array}}static get observers(){return["_isAvailable(selectedDocuments.splices)"]}ready(){super.ready(),this.addEventListener("click",this.move)}move(){this.$.moveDownOp.execute().then(()=>{for(let i=0;i{this.notify({message:this.i18n("moveDocumentButton.error")})})}_isAvailable(){if(this._available=!1,this.selectedDocuments&&this.selectedDocuments.length>0){this._sortedDocuments=this.selectedDocuments.slice(0);try{this._sortedDocuments.sort((a,b)=>{const idxa=this.documents.indexOf(a),idxb=this.documents.indexOf(b);if(idxa<0||idxb<0)throw new Error("Document is not in the list.");return idxb-idxa})}catch(e){return void this.dispatchEvent(new CustomEvent("clear-selected-items",{composed:!0,bubbles:!0}))}let sequenceBreakIdx;const isSequence=this._sortedDocuments.every((doc,idx)=>!(idx>0)||(this._sortedDocuments[idx-1].uid===this.documents[this.documents.indexOf(doc)+1].uid||(sequenceBreakIdx=idx,!1)));if(this._sortedDocuments[0].uid===this.documents[this.documents.length-1].uid){if(isSequence)return;this._focusIndex=this.documents.indexOf(this._sortedDocuments[0])-sequenceBreakIdx,this._sortedDocuments.splice(0,sequenceBreakIdx),this._beforeUid=this.documents[this._focusIndex+1].uid}else{const tmpIdx=this.documents.indexOf(this._sortedDocuments[0]);tmpIdxthis.documents.indexOf(a)-this.documents.indexOf(b)),this._available=!0}}_computeLabel(){return this.i18n("moveDocumentButton.down.tooltip")}_computeParams(){return this._beforeUid?{before:this._beforeUid}:{}}}customElements.define(MoveDocumentsDown.is,MoveDocumentsDown),Nuxeo.MoveDocumentsDown=MoveDocumentsDown}},1291:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__=(__webpack_require__(11),__webpack_require__(98),__webpack_require__(62),__webpack_require__(44),__webpack_require__(89)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class MoveDocumentsUp extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__.a,_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + `}static get is(){return"nuxeo-move-documents-up-button"}static get properties(){return{documents:Array,selectedDocuments:Array,tooltipPosition:{type:String,value:"bottom"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"},_available:Boolean,_beforeUid:Document,_sortedDocuments:Array}}static get observers(){return["_isAvailable(selectedDocuments.splices)"]}ready(){super.ready(),this.addEventListener("click",this.move)}move(){this.$.moveUpOp.execute().then(()=>{for(let i=this._sortedDocuments.length-1;i>=0;i--)this.documents.splice(this.documents.indexOf(this._sortedDocuments[i]),1),this.documents.splice(this._focusIndex,0,this._sortedDocuments[i]);this._sortedDocuments=[],this.dispatchEvent(new CustomEvent("refresh-display",{composed:!0,bubbles:!0,detail:{focusIndex:this._focusIndex}}))}).catch(()=>{this.notify({message:this.i18n("moveDocumentButton.error")})})}_isAvailable(){if(this._available=!1,this.selectedDocuments&&this.selectedDocuments.length>0){this._sortedDocuments=this.selectedDocuments.slice(0);try{this._sortedDocuments.sort((a,b)=>{const idxa=this.documents.indexOf(a),idxb=this.documents.indexOf(b);if(idxa<0||idxb<0)throw new Error("Document is not in the list.");return idxa-idxb})}catch(e){return void this.dispatchEvent(new CustomEvent("clear-selected-items",{composed:!0,bubbles:!0,detail:{}}))}let sequenceBreakIdx;const isSequence=this._sortedDocuments.every((doc,idx)=>!(idx>0)||(this._sortedDocuments[idx-1].uid===this.documents[this.documents.indexOf(doc)-1].uid||(sequenceBreakIdx=idx,!1)));if(this._sortedDocuments[0].uid===this.documents[0].uid){if(isSequence)return;this._focusIndex=this.documents.indexOf(this._sortedDocuments[sequenceBreakIdx-1])+1,this._sortedDocuments.splice(0,sequenceBreakIdx)}else this._focusIndex=this.documents.indexOf(this._sortedDocuments[0])-1;this._beforeUid=this.documents[this._focusIndex].uid,this._available=!0}}_computeLabel(){return this.i18n("moveDocumentButton.up.tooltip")}}customElements.define(MoveDocumentsUp.is,MoveDocumentsUp),Nuxeo.MoveDocumentsDown=MoveDocumentsUp}},1292:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(731),__webpack_require__(11),__webpack_require__(98),__webpack_require__(62),__webpack_require__(44),__webpack_require__(8)),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(80);__webpack_require__(78),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class NotificationsToggleButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + `}static get is(){return"nuxeo-notifications-toggle-button"}static get properties(){return{document:{type:Object,observer:"_documentChanged"},icon:{type:String,value:"nuxeo:notify"},subscribed:{type:Boolean,notify:!0,reflectToAttribute:!0},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(subscribed, i18n)"}}}ready(){super.ready(),this.documentUnsubscribedHandler=e=>{this.document&&e.detail.docUid&&e.detail.docUid===this.document.uid&&(this.subscribed=!1)},window.addEventListener("document-unsubscribed",this.documentUnsubscribedHandler),this.addEventListener("click",this._toggle)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("document-unsubscribed",this.documentUnsubscribedHandler),this.documentUnsubscribedHandler=null}_isAvailable(doc){return doc&&!doc.isVersion}_toggle(){this.subscribed?this.$.opUnsubscribe.execute().then(()=>{this.dispatchEvent(new CustomEvent("document-unsubscribed",{composed:!0,bubbles:!0,detail:{doc:this.document}})),this.subscribed=!1}):this.$.opSubscribe.execute().then(()=>{this.dispatchEvent(new CustomEvent("document-subscribed",{composed:!0,bubbles:!0,detail:{doc:this.document}})),this.subscribed=!0})}_computeLabel(isSubscribed){return this.i18n("notificationsToggleButton.tooltip."+(isSubscribed?"doNotNotify":"notify"))}_documentChanged(){this.subscribed=this.isSubscribed(this.document)}}customElements.define(NotificationsToggleButton.is,NotificationsToggleButton),Nuxeo.NotificationsToggleButton=NotificationsToggleButton}},1293:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(19),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4),_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_13__=(__webpack_require__(71),__webpack_require__(40),__webpack_require__(105),__webpack_require__(731),__webpack_require__(11),__webpack_require__(121),__webpack_require__(62),__webpack_require__(211),__webpack_require__(44),__webpack_require__(89)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(132),__webpack_require__(210),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class ShareButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_3__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_13__.a,_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_14__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + +
+

[[i18n('shareButton.dialog.heading')]]

+
+
+ + + + [[i18n('shareButton.operation.copy')]] +
+ +
+ [[i18n('shareButton.dialog.close')]] +
+
+ `}static get is(){return"nuxeo-share-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:share"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}_isAvailable(document){return document}_computeLabel(){return this.i18n("shareButton.tooltip")}_toggleDialog(){this.$.dialog.toggle()}_buildPermalink(document){return document?`${window.location.origin+window.location.pathname}#!/doc/${document.uid}`:""}_copyLink(e){const shareButton=e.currentTarget,link=shareButton.previousElementSibling;link.$.paperInput.$.nativeInput.select(),window.document.execCommand("copy")&&(shareButton._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__.a.debounce(shareButton._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.d.after(2e3),()=>{link.$.paperInput.$.nativeInput.setSelectionRange(0,0),link.$.paperInput.blur(),shareButton.set("icon","link"),shareButton.classList.remove("selected")}),shareButton.set("icon","check"),shareButton.classList.add("selected"),this.notify({message:this.i18n("shareButton.operation.copied"),duration:2e3}))}}customElements.define(ShareButton.is,ShareButton),Nuxeo.ShareButton=ShareButton}},1294:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(40),__webpack_require__(105),__webpack_require__(11),__webpack_require__(98),__webpack_require__(121),__webpack_require__(62),__webpack_require__(44),__webpack_require__(80)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(8);__webpack_require__(78),__webpack_require__(132),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class UntrashDocumentButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_10__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + `}static get is(){return"nuxeo-untrash-document-button"}static get properties(){return{document:Object,icon:{type:String,value:"nuxeo:restore-deleted"},showLabel:{type:Boolean,value:!1},_label:{type:String,computed:"_computeLabel(i18n)"}}}_isAvailable(doc){return doc&&this.isTrashed(doc)&&this.hasPermission(doc,"Write")}_computeLabel(){return this.i18n("untrashButton.tooltip")}_untrash(){this.$.operation.execute().then(res=>{this.dispatchEvent(new CustomEvent("document-untrashed",{composed:!0,bubbles:!0,detail:{doc:res}}))}).catch(error=>{this.dispatchEvent(new CustomEvent("document-untrashed",{composed:!0,bubbles:!0,detail:{error:error}}))})}}customElements.define(UntrashDocumentButton.is,UntrashDocumentButton),Nuxeo.UntrashDocumentButton=UntrashDocumentButton}},1297:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(26),__webpack_require__(27),__webpack_require__(97),__webpack_require__(22);var _templateObject,_templateObject2,_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),lit_html__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3),_lists_icons__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(1298),__webpack_require__(730),__webpack_require__(186));function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { number } from '@storybook/addon-knobs';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-actions-menu';\nimport '@nuxeo/nuxeo-ui-elements/actions/nuxeo-link-button';\nimport iconMap from '../../lists/icons';\n\nconst iconsList = iconMap.nuxeo;\n\nconst label = 'Number of items';\nconst defaultValue = 5;\nconst options = {\n range: true,\n min: 1,\n max: iconsList.length + 1,\n step: 1,\n};\n\nstoriesOf('UI/nuxeo-actions-menu', module).add('Default', () => {\n const value = number(label, defaultValue, options);\n const list = iconsList.slice(0, value);\n return html`\n \n \n ${list.map(\n (i) => html`\n \n `,\n )}\n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-actions-menu--default":{startLoc:{col:47,line:19},endLoc:{col:1,line:36},startBody:{col:58,line:19},endBody:{col:1,line:36}}},iconsList=_lists_icons__WEBPACK_IMPORTED_MODULE_9__.a.nuxeo,options={range:!0,min:1,max:iconsList.length+1,step:1};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-actions-menu",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-actions-menu.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-actions-menu",{})).add("Default",(function(){var value=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",5,options),list=iconsList.slice(0,value);return Object(lit_html__WEBPACK_IMPORTED_MODULE_6__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n \n ","\n \n "])),list.map((function(i){return Object(lit_html__WEBPACK_IMPORTED_MODULE_6__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(['\n + `}static get is(){return"nuxeo-actions-menu"}connectedCallback(){super.connectedCallback(),this._observer=new _polymer_polymer_lib_utils_flattened_nodes_observer_js__WEBPACK_IMPORTED_MODULE_1__.a(this,({addedNodes:addedNodes,removedNodes:removedNodes})=>{const unresolved=addedNodes.filter(node=>node.tagName&&node.tagName.includes("-")&&!customElements.get(node.tagName.toLowerCase()));unresolved.forEach(node=>customElements.whenDefined(node.tagName.toLowerCase()).then(this._layout.bind(this))),(addedNodes.length>0&&0===unresolved.length||removedNodes.length>0)&&this._layout()}),this.addEventListener("iron-resize",this._layout),this.addEventListener("dom-change",this._layout),this.addEventListener("iron-overlay-opened",this._reparent)}disconnectedCallback(){super.disconnectedCallback(),this._observer.disconnect(),this.removeEventListener("iron-resize",this._layout),this.removeEventListener("dom-change",this._layout),this.removeEventListener("iron-overlay-opened",this._reparent)}ready(){super.ready()}get contentWidth(){return this._getMenuElements().reduce((sum,current)=>sum+current.clientWidth,0)}_reparent(e){const src=e.composedPath()[0];if(("NUXEO-DIALOG"===src.tagName||"PAPER-DIALOG"===src.tagName)&&"dropdown"===e.target.slot){const parent=e.target.parentElement,sibling=e.target.nextElementSibling,action=e.target;_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.b.run(()=>{this.$.reparent.appendChild(action),action._actionsMenuReparent=action._actionsMenuReparent||(evt=>{let path=evt.composedPath();"NUXEO-DIALOG"!==path[0].tagName&&"PAPER-DIALOG"!==path[0].tagName||(path=path.slice(0,path.findIndex(el=>el===action)),path.filter(el=>"NUXEO-DIALOG"===el.tagName||"PAPER-DIALOG"===el.tagName).length>1||parent.insertBefore(action,sibling))}),action.addEventListener("iron-overlay-closed",action._actionsMenuReparent)})}}_getMenuElements(){return this.$.slot.assignedNodes({flatten:!0}).filter(node=>node.nodeType===Node.ELEMENT_NODE&&"NUXEO-SLOT"!==node.tagName)}_getDropdownElements(){return this.$.dropdown.assignedNodes({flatten:!0}).filter(node=>node.nodeType===Node.ELEMENT_NODE&&"NUXEO-SLOT"!==node.tagName)}_moveToMenu(el){el.slot="",el.removeAttribute("show-label")}_removeTabIndex(event){if(event.shiftKey&&"Tab"===event.key){const dropDownList=this._getDropdownElements();setTimeout(()=>{dropDownList.map(list=>list.removeAttribute("tabindex"))},0)}}listnerRemove(){this.removeEventListener("keydown",this._removeTabIndex.bind(this))}_moveToDropdown(el){el.slot="dropdown",el.addEventListener("keydown",this._removeTabIndex.bind(this)),setTimeout(()=>{el.setAttribute("show-label",""),el.removeAttribute("tabindex")},0)}_layout(e){e&&e.type&&e.composedPath().find(el=>"reparent"===el.id||"dropdownButton"===el.id)||(this.__layoutDebouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_3__.a.debounce(this.__layoutDebouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.c,()=>{let els=this._getDropdownElements();for(els.length||(this.$.dropdownButton.hidden=!0),els=this._getMenuElements();els.length&&this.contentWidth+(this.$.dropdownButton.hidden?0:this.$.dropdownButton.offsetWidth)>this.clientWidth;)this._moveToDropdown(els.pop()),this.$.dropdownButton.hidden&&(this.$.dropdownButton.hidden=!1);for(;els.length&&this.contentWidth<=this.clientWidth;)this._moveToMenu(els.shift())}))}}customElements.define(ActionsMenu.is,ActionsMenu),Nuxeo.ActionsMenu=ActionsMenu}},1299:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2);__webpack_require__(749);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport { boolean, number, text } from '@storybook/addon-knobs';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-aggregation/nuxeo-checkbox-aggregation.js';\n\nconst DATA = {\n 'entity-type': 'aggregate',\n extendedBuckets: [\n {\n docCount: 2,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Tolkien',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2292',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2292',\n },\n {\n docCount: 1,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Asimov',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 3,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Hemingway',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 4,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Dostoevsky',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 5,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Tolstoy',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 6,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Pessoa',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 7,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Balzac',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 8,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Cervantes',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n {\n docCount: 9,\n fetchedKey: {\n 'entity-type': 'document',\n properties: {\n 'dc:title': 'Shakespeare',\n },\n uid: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n key: '59cf794f-6875-45ca-a837-053c196b2291',\n },\n ],\n field: 'book:author',\n id: 'book_author_agg',\n properties: {\n order: 'count desc',\n size: '20',\n },\n ranges: [],\n selection: [],\n type: 'terms',\n};\n\nstoriesOf('UI/nuxeo-checkbox-aggregation', module).add('Default', () => {\n const label = text('Label', 'Some Label');\n const collapsible = boolean('Collapsible', false);\n const opened = boolean('Opened (collapsible)', false);\n const visibleItems = number('Number of visible items (collapsible)', 8);\n return html`\n \n \n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-checkbox-aggregation--default":{startLoc:{col:55,line:120},endLoc:{col:1,line:142},startBody:{col:66,line:120},endBody:{col:1,line:142}}},DATA={"entity-type":"aggregate",extendedBuckets:[{docCount:2,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Tolkien"},uid:"59cf794f-6875-45ca-a837-053c196b2292"},key:"59cf794f-6875-45ca-a837-053c196b2292"},{docCount:1,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Asimov"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:3,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Hemingway"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:4,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Dostoevsky"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:5,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Tolstoy"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:6,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Pessoa"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:7,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Balzac"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:8,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Cervantes"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"},{docCount:9,fetchedKey:{"entity-type":"document",properties:{"dc:title":"Shakespeare"},uid:"59cf794f-6875-45ca-a837-053c196b2291"},key:"59cf794f-6875-45ca-a837-053c196b2291"}],field:"book:author",id:"book_author_agg",properties:{order:"count desc",size:"20"},ranges:[],selection:[],type:"terms"};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-checkbox-aggregation",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-aggregation-widget.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-aggregation-widget",{})).add("Default",(function(){var label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.text)("Label","Some Label"),collapsible=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.boolean)("Collapsible",!1),opened=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.boolean)("Opened (collapsible)",!1),visibleItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of visible items (collapsible)",8);return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n \n \n '])),DATA,label,collapsible,opened,visibleItems)}))}.call(this,__webpack_require__(29)(module))},1300:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(2),lit_html__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(3);__webpack_require__(298);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { text, select, boolean } from '@storybook/addon-knobs';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-card';\n\nconst ICONS = {\n attachment: 'nuxeo:attachment',\n dashboard: 'nuxeo:dashboard',\n edit: 'nuxeo:edit',\n none: '',\n};\n\nstoriesOf('UI/nuxeo-card', module).add('nuxeo-card', () => {\n const heading = text('Heading', 'About Nuxeo');\n const icon = select('Icon', ICONS, ICONS.attachment);\n const collapsible = boolean('Collapsible', false);\n const opened = boolean('Opened', false);\n return html`\n \n ${text(\n 'Content',\n `Nuxeo makes it easy to build smart content applications that enhance customer experiences,\n improve decision making, and accelerate products to market.`,\n )}\n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-card--nuxeo-card":{startLoc:{col:39,line:13},endLoc:{col:1,line:27},startBody:{col:53,line:13},endBody:{col:1,line:27}}},ICONS={attachment:"nuxeo:attachment",dashboard:"nuxeo:dashboard",edit:"nuxeo:edit",none:""};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-card",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-card.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-card",{})).add("nuxeo-card",(function(){var heading=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.text)("Heading","About Nuxeo"),icon=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.select)("Icon",ICONS,ICONS.attachment),collapsible=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Collapsible",!1),opened=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Opened",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_5__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n ',"\n \n "])),heading,icon,collapsible,opened,Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.text)("Content","Nuxeo makes it easy to build smart content applications that enhance customer experiences,\n improve decision making, and accelerate products to market."))}))}.call(this,__webpack_require__(29)(module))},1302:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(2),lit_html__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(3);__webpack_require__(732);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { boolean, color } from '@storybook/addon-knobs';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-checkmark';\n\nstoriesOf('UI/nuxeo-checkmark', module).add('nuxeo-checkmark', () => {\n const bgColor = color('--nuxeo-checkmark-background-color', '#fffff', 'CSS variables');\n const bgColorChecked = color('--nuxeo-checkmark-background-color-checked', '#0000ff', 'CSS variables');\n const checked = boolean('checked', false);\n const disabled = boolean('disabled', false);\n return html`\n \n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-checkmark--nuxeo-checkmark":{startLoc:{col:44,line:6},endLoc:{col:1,line:20},startBody:{col:63,line:6},endBody:{col:1,line:20}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-checkmark",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-checkmark.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-checkmark",{})).add("nuxeo-checkmark",(function(){var bgColor=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.color)("--nuxeo-checkmark-background-color","#fffff","CSS variables"),bgColorChecked=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.color)("--nuxeo-checkmark-background-color-checked","#0000ff","CSS variables"),checked=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("checked",!1),disabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("disabled",!1);return Object(lit_html__WEBPACK_IMPORTED_MODULE_5__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n \n '])),bgColor,bgColorChecked,checked,disabled)}))}.call(this,__webpack_require__(29)(module))},1303:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,lit_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(163),_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(34);__webpack_require__(1304);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { number } from '@storybook/addon-knobs';\nimport { analyse } from '../../../.storybook/analysis';\nimport { LIST } from '../../data/lists.data.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-data-grid/nuxeo-data-grid.js';\n\nconst docs = analyse('nuxeo-data-grid').notes;\n\nconst stories = storiesOf('UI/nuxeo-data-grid', module);\n\nstories\n .add(\n 'Empty',\n () => html`\n \n \n `,\n { notes: { markdown: docs } },\n )\n .add(\n 'Default',\n () => {\n const numberOfItems = number('Number of items', 50);\n return html`\n \n \n \n \n `;\n },\n { notes: { markdown: docs } },\n );\n"),__ADDS_MAP__={},docs=Object(_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__.a)("nuxeo-data-grid").notes;Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-data-grid",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-data-grid.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-data-grid",{})).add("Empty",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n \n '])),Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(0).data)}),{notes:{markdown:docs}}).add("Default",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",50);return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n \n \n \n \n '])),Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(numberOfItems).data)}),{notes:{markdown:docs}})}.call(this,__webpack_require__(29)(module))},1304:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(40),__webpack_require__(299),__webpack_require__(54)),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_10__=(__webpack_require__(300),__webpack_require__(11),__webpack_require__(44),__webpack_require__(88),__webpack_require__(733),__webpack_require__(12)),_nuxeo_draggable_list_behavior_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(216),_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(164);{class DataGrid extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a,_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_12__.a,_nuxeo_draggable_list_behavior_js__WEBPACK_IMPORTED_MODULE_11__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + +
+ + +
+
+ + + +
+
+ + + + + + + + + + + + +
+ `}static get is(){return"nuxeo-data-grid"}static get properties(){return{multiSelection:{type:Boolean,value:!0},displayNavigation:{type:Boolean,value:!1},_lastIndex:{type:Number,value:0},_lastIndexValue:{type:Number,value:0}}}static get observers(){return["_fetchMissingItems(loading)","_lastIndexChanged(lastIndex)"]}ready(){super.ready(),this.addEventListener("iron-resize",this._fetchMissingItems),this.addEventListener("keydown",this._handleKeyDown)}_handleKeyDown(event){"Tab"===event.key&&(this.$.list.lastVisibleIndex!==this._lastIndexValue&&this.$.list.lastVisibleIndex!==this._lastIndexValue-1||(this.$.list.scrollTop=0))}_lastIndexChanged(lastIndex){this._lastIndexValue=lastIndex}_fetchMissingItems(){!this.loading&&this.$.list.lastVisibleIndex&&this._pageSize&&_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_10__.b.run(()=>{this.$.list.lastVisibleIndex>this._pageSize&&this._fetchRange(this._pageSize,this.$.list.lastVisibleIndex)})}_removeFilter(e){this.dispatchEvent(new CustomEvent("column-filter-changed",{composed:!0,bubbles:!0,detail:{value:"",filterBy:e.model.filter.path,filterExpression:e.model.filter.expression}}))}_onScrollTo(e){this.scrollToIndex(e.detail.index)}draggableFilter(el){return el.selected}get visible(){return Boolean(this.offsetWidth||this.offsetHeight)}}customElements.define(DataGrid.is,DataGrid),Nuxeo.DataGrid=DataGrid}},1305:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,_templateObject3,lit_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(163),_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(34);__webpack_require__(1306),__webpack_require__(734);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { number } from '@storybook/addon-knobs';\nimport { analyse } from '../../../.storybook/analysis';\nimport { LIST } from '../../data/lists.data.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-data-list/nuxeo-data-list.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-document-thumbnail/nuxeo-document-thumbnail.js';\n\nconst docs = analyse('nuxeo-data-list').notes;\nconst stories = storiesOf('UI/nuxeo-data-list', module);\n\nstories\n .add(\n 'Empty',\n () =>\n html`\n \n \n `,\n { notes: { markdown: docs } },\n )\n .add(\n 'Default',\n () => {\n const numberOfItems = number('Number of items', 50);\n return html`\n \n \n \n \n `;\n },\n { notes: { markdown: docs } },\n )\n .add(\n 'With thumbnail',\n () => {\n const numberOfItems = number('Number of items', 50);\n return html`\n \n \n \n \n `;\n },\n { notes: { markdown: docs } },\n );\n"),__ADDS_MAP__={},docs=Object(_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__.a)("nuxeo-data-list").notes;Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-data-list",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-data-list.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-data-list",{})).add("Empty",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n \n '])),Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(0).data)}),{notes:{markdown:docs}}).add("Default",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",50);return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n \n \n \n \n '])),Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(numberOfItems).data)}),{notes:{markdown:docs}}).add("With thumbnail",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",50);return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n \n \n \n \n '])),Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(numberOfItems).data)}),{notes:{markdown:docs}})}.call(this,__webpack_require__(29)(module))},1306:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(40),__webpack_require__(299),__webpack_require__(54)),_nuxeo_draggable_list_behavior_js__WEBPACK_IMPORTED_MODULE_11__=(__webpack_require__(300),__webpack_require__(11),__webpack_require__(748),__webpack_require__(44),__webpack_require__(88),__webpack_require__(733),__webpack_require__(216)),_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(164);{class DataList extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a,_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_12__.a,_nuxeo_draggable_list_behavior_js__WEBPACK_IMPORTED_MODULE_11__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + +
+ + +
+
+ + + +
+
+ + + + + + + + + + + + +
+ `}static get is(){return"nuxeo-data-list"}static get properties(){return{multiSelection:{type:Boolean,value:!1},selectOnTap:{type:Boolean,value:!1},displayNavigation:{type:Boolean,value:!1}}}ready(){super.ready(),this.listen(this.$.list,"keydown","_keydown")}_keydown(e){switch(e.key){case"ArrowUp":case"Up":this._select(-1,1);break;case"k":this._select(-1,0);break;case"ArrowDown":case"Down":this._select(1,-1);break;case"j":this._select(1,0)}}_select(indexOffset,focusOffset){const index=this._selectedItemIndex()+indexOffset;index>=0&&index tableTemplate(LIST(0)))\n .add('Basic', () => {\n const numberOfItems = number('Number of items', 50);\n return tableTemplate(LIST(numberOfItems));\n })\n .add('Editable and Orderable', () => {\n const orderable = boolean('Orderable', true);\n const editable = boolean('Editable', true);\n const numberOfItems = number('Number of items', 50);\n return tableTemplate(Object.assign({}, LIST(numberOfItems), { orderable, editable }));\n })\n .add('Settings', () => {\n const settingsEnabled = boolean('Settings', true);\n const numberOfItems = number('Number of items', 50);\n return tableTemplate(Object.assign({}, LIST(numberOfItems), { settingsEnabled }));\n })\n .add('Selectable', () => {\n const selectionEnabled = boolean('Selection Enabled', true);\n const selectAllEnabled = boolean('Select All Enabled', true);\n const multiSelection = boolean('Multi Selection', true);\n const numberOfItems = number('Number of items', 50);\n return tableTemplate(\n Object.assign({}, LIST(numberOfItems), {\n selectionEnabled,\n selectAllEnabled,\n multiSelection,\n }),\n );\n })\n .add('Complex', () => {\n const orderable = boolean('Orderable', true);\n const editable = boolean('Editable', true);\n const settingsEnabled = boolean('Settings', true);\n const selectionEnabled = boolean('Selection Enabled', true);\n const selectAllEnabled = boolean('Select All Enabled', false);\n const multiSelection = boolean('Multi Selection', true);\n const selectOnTap = boolean('Select on tap', false);\n const label = text('Label', 'Label');\n const required = boolean('Required', false);\n const hidden = boolean('Hide Date column', false);\n const alignRight = boolean('Align Right', false);\n const flex = number('Flex size on User column', undefined);\n const columnNumbers = {\n range: false,\n min: 0,\n max: 1,\n step: 1,\n };\n const orderColumn = number('Order Department column', 0, columnNumbers);\n const numberOfItems = number('Number of items', 50);\n return tableTemplate(\n Object.assign({}, LIST(numberOfItems), {\n orderable,\n editable,\n settingsEnabled,\n selectionEnabled,\n selectAllEnabled,\n multiSelection,\n selectOnTap,\n label,\n required,\n hidden,\n alignRight,\n flex,\n orderColumn,\n }),\n );\n });\n"),__ADDS_MAP__={};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("UI/nuxeo-data-table",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-data-table.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-data-table",{})).add("Empty",(function(){return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(0))})).add("Basic",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Number of items",50);return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(numberOfItems))})).add("Editable and Orderable",(function(){var orderable=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Orderable",!0),editable=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Editable",!0),numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Number of items",50);return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object.assign({},Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(numberOfItems),{orderable:orderable,editable:editable}))})).add("Settings",(function(){var settingsEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Settings",!0),numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Number of items",50);return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object.assign({},Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(numberOfItems),{settingsEnabled:settingsEnabled}))})).add("Selectable",(function(){var selectionEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Selection Enabled",!0),selectAllEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Select All Enabled",!0),multiSelection=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Multi Selection",!0),numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Number of items",50);return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object.assign({},Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(numberOfItems),{selectionEnabled:selectionEnabled,selectAllEnabled:selectAllEnabled,multiSelection:multiSelection}))})).add("Complex",(function(){var orderable=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Orderable",!0),editable=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Editable",!0),settingsEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Settings",!0),selectionEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Selection Enabled",!0),selectAllEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Select All Enabled",!1),multiSelection=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Multi Selection",!0),selectOnTap=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Select on tap",!1),label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.text)("Label","Label"),required=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Required",!1),hidden=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Hide Date column",!1),alignRight=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.boolean)("Align Right",!1),flex=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Flex size on User column",void 0),orderColumn=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Order Department column",0,{range:!1,min:0,max:1,step:1}),numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_2__.number)("Number of items",50);return Object(_nuxeo_data_table_structure_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object.assign({},Object(_data_lists_data__WEBPACK_IMPORTED_MODULE_3__.a)(numberOfItems),{orderable:orderable,editable:editable,settingsEnabled:settingsEnabled,selectionEnabled:selectionEnabled,selectAllEnabled:selectAllEnabled,multiSelection:multiSelection,selectOnTap:selectOnTap,label:label,required:required,hidden:hidden,alignRight:alignRight,flex:flex,orderColumn:orderColumn}))}))}.call(this,__webpack_require__(29)(module))},1308:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(39);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),lit_html__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3);__webpack_require__(301);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { text, date } from '@storybook/addon-knobs';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-date-picker';\n\nstoriesOf('UI/nuxeo-date-picker', module).add('nuxeo-date-picker', () => {\n const dateTime = date('Date', new Date());\n const label = text('label', 'Choose a date');\n return html`\n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-date-picker--nuxeo-date-picker":{startLoc:{col:46,line:6},endLoc:{col:1,line:12},startBody:{col:67,line:6},endBody:{col:1,line:12}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-date-picker",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-date-picker.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-date-picker",{})).add("nuxeo-date-picker",(function(){var dateTime=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.date)("Date",new Date),label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.text)("label","Choose a date");return Object(lit_html__WEBPACK_IMPORTED_MODULE_6__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n '])),new Date(dateTime),label)}))}.call(this,__webpack_require__(29)(module))},1309:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(39);var _templateObject,lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(735),__webpack_require__(2));var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-date';\nimport { select, date } from '@storybook/addon-knobs';\n\nstoriesOf('UI/nuxeo-date', module).add('Nuxeo Date', () => {\n const dateTime = date('Date', new Date());\n const relativeFormat = select('Format', ['MMM D, YYYY', 'MMMM D, YYYY HH:mm', 'relative'], 'MMM D, YYYY');\n const tooltipFormat = select('Tooltip Format', ['MMMM D, YYYY HH:mm', 'relative'], 'MMMM D, YYYY HH:mm');\n return html`\n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-date--nuxeo-date":{startLoc:{col:39,line:6},endLoc:{col:1,line:13},startBody:{col:53,line:6},endBody:{col:1,line:13}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_5__.storiesOf)("UI/nuxeo-date",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-date.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-date",{})).add("Nuxeo Date",(function(){var dateTime=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_7__.date)("Date",new Date),relativeFormat=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_7__.select)("Format",["MMM D, YYYY","MMMM D, YYYY HH:mm","relative"],"MMM D, YYYY"),tooltipFormat=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_7__.select)("Tooltip Format",["MMMM D, YYYY HH:mm","relative"],"MMMM D, YYYY HH:mm");return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n '])),new Date(dateTime),relativeFormat,tooltipFormat)}))}.call(this,__webpack_require__(29)(module))},1310:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,lit_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_data_directory_suggestion_data_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(750),__webpack_require__(319));var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { text } from '@storybook/addon-knobs';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-directory-radio-group.js';\nimport { DIRECTORY_SUGGESTION_ENTRIES } from '../../data/directory-suggestion.data.js';\n\nconst server = window.nuxeo.mock;\nserver.respondWith('post', '/api/v1/automation/Directory.SuggestEntries', () => DIRECTORY_SUGGESTION_ENTRIES);\n\nstoriesOf('UI/nuxeo-directory-radio-group', module).add('Default', () => {\n const label = text('Label', 'Select language');\n return html`\n \n
\n \n
\n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-directory-radio-group--default":{startLoc:{col:56,line:10},endLoc:{col:1,line:22},startBody:{col:67,line:10},endBody:{col:1,line:22}}};window.nuxeo.mock.respondWith("post","/api/v1/automation/Directory.SuggestEntries",(function(){return _data_directory_suggestion_data_js__WEBPACK_IMPORTED_MODULE_7__.a})),Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-directory-radio-group",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-directory-radio-group.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-directory-radio-group",{})).add("Default",(function(){var label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.text)("Label","Select language");return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n
\n \n
\n '])),label)}))}.call(this,__webpack_require__(29)(module))},1311:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(145),__webpack_require__(143),__webpack_require__(22),__webpack_require__(39),__webpack_require__(397),__webpack_require__(60),__webpack_require__(26),__webpack_require__(27),__webpack_require__(28),__webpack_require__(1312),__webpack_require__(118),__webpack_require__(67),__webpack_require__(738),__webpack_require__(740);var _templateObject,_templateObject2,_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(2),_storybook_polymer__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(3),uuid_v4__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(83),uuid_v4__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(uuid_v4__WEBPACK_IMPORTED_MODULE_17__),_data_comments_data_js__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(768);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import '@nuxeo/nuxeo-ui-elements/nuxeo-document-comments/nuxeo-document-comment';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-document-comments/nuxeo-document-comment-thread';\nimport { boolean, color, radios } from '@storybook/addon-knobs';\nimport { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport uuid from 'uuid/v4';\nimport { getCommentsSample } from '../../data/comments.data.js';\n\nconst commentsSample = getCommentsSample;\nconst server = window.nuxeo.mock;\nserver.respondWith('delete', new RegExp(/\\/api\\/v1\\/id\\/(\\S+)\\/@comment\\/(\\S+)/));\nserver.respondWith('get', new RegExp(/\\/api\\/v1\\/id\\/(\\S+)\\/@comment\\//), ({ queryParams }, args) => {\n const id = args[0];\n if (id === 'doc-id') {\n return {\n entries: commentsSample.slice(0, queryParams.pageSize === 0 ? commentsSample.length : 10),\n totalSize: commentsSample.length,\n };\n }\n const comment = commentsSample.find((c) => c.id === id);\n if (!comment) {\n return {\n entries: [],\n totalSize: 0,\n };\n }\n const replies = [];\n // To avoid showing threads with more than two levels\n const repliesSample = commentsSample.filter((c) => c.numberOfReplies === 0);\n for (let i = 0; i < comment.numberOfReplies; i++) {\n replies.push(repliesSample[Math.floor(Math.random() * repliesSample.length)]);\n }\n return {\n entries: replies,\n totalSize: comment ? comment.numberOfReplies : commentsSample.length,\n };\n});\nserver.respondWith('post', new RegExp(/\\/api\\/v1\\/id\\/(\\S+)\\/@comment\\//), ({ body }) => {\n return {\n 'entity-type': 'comment',\n parentId: body.parentId,\n id: uuid(),\n numberOfReplies: 0,\n author: 'Administrator',\n creationDate: new Date(),\n text: body.text,\n };\n});\nserver.respondWith('put', new RegExp(/\\/api\\/v1\\/id\\/(\\S+)\\/@comment\\/(\\S+)/), ({ body }, args) => {\n const parentId = args[0];\n const id = args[1];\n let comment = commentsSample.find((c) => c.id === parentId && c.parentId === id);\n if (!comment) {\n comment = {\n 'entity-type': 'comment',\n parentId,\n id,\n numberOfReplies: 0,\n author: 'Administrator',\n creationDate: new Date(),\n };\n }\n comment.modificationDate = new Date();\n comment.text = body.text;\n return comment;\n});\n\nstoriesOf('UI/Comments', module)\n .addElement('nuxeo-document-comment', () => {\n const level = radios('Comment Type', { Comment: '1', Response: '2' }, '1', 'States');\n const hasReplies = boolean('Has Replies?', false, 'States');\n const isTruncated = boolean('Is text big?', false, 'States');\n const comment = Object.assign(\n {},\n commentsSample.find(\n (entry) =>\n (hasReplies ? entry.numberOfReplies > 0 : entry.numberOfReplies === 0) &&\n (isTruncated ? entry.text.length >= 256 : entry.text.length < 256),\n ),\n );\n return html`\n \n \n `;\n })\n .addElement(\n 'nuxeo-document-comment-thread',\n () =>\n html`\n \n \n `,\n );\n"),__ADDS_MAP__={"ui-comments--nuxeo-document-comment-thread":{startLoc:{col:4,line:92},endLoc:{col:7,line:102},startBody:{col:4,line:93},endBody:{col:7,line:102}},"ui-comments--nuxeo-document-comment":{startLoc:{col:14,line:69},endLoc:{col:3,line:90},startBody:{col:40,line:69},endBody:{col:3,line:90}}},commentsSample=_data_comments_data_js__WEBPACK_IMPORTED_MODULE_18__.a,server=window.nuxeo.mock;server.respondWith("delete",new RegExp(/\/api\/v1\/id\/(\S+)\/@comment\/(\S+)/)),server.respondWith("get",new RegExp(/\/api\/v1\/id\/(\S+)\/@comment\//),(function(_ref,args){var queryParams=_ref.queryParams,id=args[0];if("doc-id"===id)return{entries:commentsSample.slice(0,0===queryParams.pageSize?commentsSample.length:10),totalSize:commentsSample.length};var comment=commentsSample.find((function(c){return c.id===id}));if(!comment)return{entries:[],totalSize:0};for(var replies=[],repliesSample=commentsSample.filter((function(c){return 0===c.numberOfReplies})),i=0;ientry.text.length)})));return Object(lit_html__WEBPACK_IMPORTED_MODULE_16__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_14__.color)("--nuxeo-comment-more-content-color","#1f28bf","CSS"),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_14__.color)("--nuxeo-comment-placeholder-color","#939caa","CSS"),comment,+level)})).addElement("nuxeo-document-comment-thread",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_16__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n \n \n '])),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_14__.color)("--nuxeo-comment-more-content-color","#1f28bf","CSS"),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_14__.color)("--nuxeo-comment-placeholder-color","#939caa","CSS"))}))}.call(this,__webpack_require__(29)(module))},1315:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,_templateObject3,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(217),_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(6),_img_image01_jpg__WEBPACK_IMPORTED_MODULE_12__=(__webpack_require__(1316),__webpack_require__(210),__webpack_require__(301),__webpack_require__(591),__webpack_require__(317)),_img_image01_jpg__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_img_image01_jpg__WEBPACK_IMPORTED_MODULE_12__),_data_documents_data__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(122),_code_panel_template_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(135);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport { select } from '@storybook/addon-knobs';\nimport { LayoutBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-layout-behavior.js';\nimport { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-document-layout.js';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-input.js';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-date-picker.js';\nimport '../../../.storybook/i18n';\nimport image from '../../img/image01.jpg';\nimport DocumentBuilder from '../../data/documents.data';\nimport { codePanelTemplate } from '../code-panel-template.js';\n\nwindow.Polymer = Polymer;\nwindow.Nuxeo.LayoutBehavior = LayoutBehavior;\n\nconst documentBuilder = new DocumentBuilder().setTitle('My Document').setFileContent('Nuxeo Logo', image);\n\nstoriesOf('UI/nuxeo-document-layout', module)\n .add('Default', () => {\n const layout = select('Layout', ['view', 'edit', 'metadata'], 'view');\n return html`\n
\n \n \n
\n ${codePanelTemplate(`document/file/nuxeo-file-${layout}-layout.html`)}\n `;\n })\n .add(\n 'Custom validation',\n () => html`\n

This layout won't allow Title and Description to have the same value.

\n \n
\n \n \n {\n const docLayout = e.target.previousElementSibling;\n const form = e.target.parentElement;\n const valid = docLayout.validate();\n form.style.border = `2px ${valid ? 'dashed green' : 'solid red'}`;\n e.preventDefault();\n }}\n >\n Validate\n \n \n
\n ${codePanelTemplate('document/picture/nuxeo-picture-edit-layout.html')}\n `,\n )\n .add(\n 'Missing layout',\n () =>\n html`\n \n \n `,\n );\n"),__ADDS_MAP__={"ui-nuxeo-document-layout--missing-layout":{startLoc:{col:4,line:63},endLoc:{col:7,line:72},startBody:{col:4,line:64},endBody:{col:7,line:72}},"ui-nuxeo-document-layout--custom-validation":{startLoc:{col:4,line:35},endLoc:{col:5,line:60},startBody:{col:4,line:36},endBody:{col:5,line:60}},"ui-nuxeo-document-layout--default":{startLoc:{col:7,line:20},endLoc:{col:3,line:33},startBody:{col:18,line:20},endBody:{col:3,line:33}}};window.Polymer=_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_7__.a,window.Nuxeo.LayoutBehavior=_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_6__.a;var documentBuilder=(new _data_documents_data__WEBPACK_IMPORTED_MODULE_13__.a).setTitle("My Document").setFileContent("Nuxeo Logo",_img_image01_jpg__WEBPACK_IMPORTED_MODULE_12___default.a);Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-document-layout",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-document-layout.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-document-layout",{})).add("Default",(function(){var layout=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.select)("Layout",["view","edit","metadata"],"view");return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n
\n \n \n
\n ',"\n "])),documentBuilder.setType("File").build(),layout,Object(_code_panel_template_js__WEBPACK_IMPORTED_MODULE_14__.a)("document/file/nuxeo-file-".concat(layout,"-layout.html")))})).add("Custom validation",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(['\n

This layout won\'t allow Title and Description to have the same value.

\n \n
\n \n \n \n \n '])),documentBuilder.setType("MyDoc").build())}))}.call(this,__webpack_require__(29)(module))},1316:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(11),__webpack_require__(409),__webpack_require__(88);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(0),_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(65),_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(45),_polymer_polymer_lib_legacy_class__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8);function getAbsoluteUrl(relativeUrl){const publicPath=__webpack_require__.p;let url="";return(!publicPath||publicPath.indexOf("://")<0)&&(url+=window.location.protocol+"//"+window.location.host),url+=publicPath||"/",url+relativeUrl}{class DocumentLayout extends(Object(_polymer_polymer_lib_legacy_class__WEBPACK_IMPORTED_MODULE_6__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_3__.a` + +
+ + + +
+ + + `}static get is(){return"nuxeo-document-layout"}static get importMeta(){return{url:getAbsoluteUrl("/nuxeo-document-layout.js")}}static get properties(){return{document:{type:Object,notify:!0},layout:{type:String,value:"view",reflectToAttribute:!0},hrefTemplate:{type:String,value:()=>"${document.type}/nuxeo-${document.type}-${layout}-layout.html"},hrefBase:{type:String,value:""},hrefFunction:{type:Function,computed:"_buildHrefFn(hrefTemplate)"},_model:{type:Object,value:{},readOnly:!0},_href:{type:String,readOnly:!0},_errorMessages:{type:Array,readOnly:!0,value:[]}}}static get observers(){return["_loadLayout(document, layout, hrefFunction, hrefBase)"]}get element(){return this.$.layout.element}validate(){return this.$.layout.validate()}applyAutoFocus(){const focusableElement=this._getFocusableElement(this.element);focusableElement&&focusableElement.focus()}reportValidation(validationReport){this._resetValidationErrors(),validationReport.violations.reverse().forEach(violation=>{this.invalid=!0,violation.path?violation.path.forEach(p=>{const widgets=this._getBoundElements("document.properties."+p.field_name);if(widgets){const msg=this.i18n(violation.messageKey,violation.invalid_value,p.field_name);msg===violation.messageKey&&violation.constraint&&violation.constraint.name?this._addValidationError(this.i18n("label.schema.constraint.violation."+violation.constraint.name,violation.invalid_value,p.field_name,...Object.values(violation.constraint.parameters))):this._addValidationError(msg),Object.values(widgets).forEach(widget=>{widget.invalid=!0})}else this._addValidationError(this.i18n(violation.messageKey,violation.invalid_value,p.field_name))}):this._addValidationError(this.i18n(violation.messageKey))})}_buildHrefFn(tmpl){return()=>{const matches=tmpl.matchAll(/\${([^}]+)}/g);let str=tmpl;for(const[match,prop]of matches){const val=prop.match(/^(layout|document)(\.(.+))?$/)?this.get(prop).toLowerCase():"";str=str.replace(match,val)}return str}}_loadLayout(document,layout,hrefFunction,hrefBase){if(this._resetValidationErrors(),document){this.previousDocument&&document.uid===this.previousDocument.uid||this._set_href(null),this.previousDocument&&document.type!==this.previousDocument.type||this._set_model({document:document});const base=hrefBase||Object(_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_4__.a)(this.__dataHost.importPath||this.importPath),path=[base,hrefFunction(document,layout)].join("/"!==base.slice(-1)?"/":"");this._set_href(path)}else void 0===document&&this._set_model({document:document});this.previousDocument=document}_elementChanged(){this._set_model({document:this.document}),this.element&&this.element.addEventListener("document-changed",e=>{this.notifyPath(e.detail.path,e.detail.value)}),Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_5__.a)(this,()=>{this.dispatchEvent(new CustomEvent("document-layout-changed",{bubbles:!0,composed:!0,detail:{element:this.element,layout:this.layout}})),this.applyAutoFocus()})}_getBoundElements(property){return this.$.layout._getBoundElements(property)}_getFocusableElement(parent){if(parent&&parent.shadowRoot&&!parent.shadowRoot.activeElement){const nodes=Array.from(parent.shadowRoot.querySelectorAll("*")).filter(node=>{const style=window.getComputedStyle(node);return!node.disabled&&"none"!==style.display&&"hidden"!==style.visibility});let focusableElement=nodes.find(node=>node.autofocus);if(focusableElement)return focusableElement;nodes.filter(node=>node.shadowRoot).forEach(node=>{if(focusableElement=this._getFocusableElement(node),focusableElement)return focusableElement})}}_addValidationError(message){this.push("_errorMessages",message),this.$.error.scrollIntoView(),this.$.error.focus()}_hasValidationErrors(){return this._errorMessages&&this._errorMessages.length>0}_resetValidationErrors(){this._set_errorMessages([])}}customElements.define(DocumentLayout.is,DocumentLayout)}},132:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_neon_animation_neon_animation_runner_behavior_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(325),_polymer_paper_dialog_behavior_paper_dialog_behavior_js__WEBPACK_IMPORTED_MODULE_2__=(__webpack_require__(11),__webpack_require__(314)),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(1281),__webpack_require__(0)),_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_polymer_polymer_lib_legacy_templatizer_behavior_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(108);__webpack_require__(324).a._overlayWithBackdrop=function(){for(let i=0;i + :host { + @apply --nuxeo-dialog; + visibility: visible; + } + + :host > ::slotted(h2), + :host > ::slotted(*) { + margin-top: 16px; + } + + :host > ::slotted(.buttons) { + @apply --layout-horizontal; + @apply --layout-justified; + margin-top: 16px; + } + + + + `}static get is(){return"nuxeo-dialog"}static get properties(){return{reparent:{type:Boolean,value:!1}}}ready(){super.ready(),this.addEventListener("iron-overlay-opened",this._opened)}disconnectedCallback(){this._observer&&this.detached(),this._clear()}_opened(e){const isIOS=/iPhone|iPad|iPod/.test(window.navigator.userAgent);if((this.reparent&&e.target.withBackdrop||isIOS)&&e.target.parentNode.insertBefore(e.target.backdropElement,e.target),!this._instance){const template=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_5__.a)(this).querySelector("nuxeo-dialog > template");template&&(this._templatizerTemplate||this.templatize(template),this._instance=this.stamp(),this.appendChild(this._instance.root))}}_clear(){if(this._instance){const c$=this._instance.children;if(c$&&c$.length){const parent=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_5__.a)(Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_5__.a)(c$[0]).parentNode);for(let n,i=0;iRoutingBehavior.__router},urlFor:{type:Function,computed:"_computeUrlFor(router)"},navigateTo:{type:Function,computed:"_computeNavigateTo(router)"}},attached(){this._updateRouter(),this.routerChangedHandler=this._updateRouter.bind(this),document.addEventListener("nuxeo-router-changed",this.routerChangedHandler)},detached(){document.removeEventListener("nuxeo-router-changed",this.routerChangedHandler)},_updateRouter(){this.router=this.router||RoutingBehavior.__router},_routerChanged(router){router&&!RoutingBehavior.__router&&setRouter(router)},_generateUrl(baseUrl,path){const base=`${baseUrl}${this.router.useHashbang?(baseUrl.endsWith("/")?"":"/")+"#!":""}`;return`${base}${base.endsWith("/")||path.startsWith("/")?"":"/"}${path}`},_computeUrlFor:()=>function(...args){if(this.router){const[route,...params]=args;if(!route)return"";const baseUrl=this.router.baseUrl||"";let path;if("object"==typeof route){if(!Object.keys(route).length)return"";path=this._routeEntity(...args);/^http(s)?:\/\//.test(path)||(path=this._generateUrl(baseUrl,path))}else{if(route.startsWith("/"))return baseUrl+route;if(!this.router[route])return void console.error("Could not generate a url for route "+route);path=this._generateUrl(baseUrl,this.router[route].apply(this,params))}return path}},_computeNavigateTo:()=>function(...args){if(this.router){const[route,...params]=args;let path;"object"==typeof route?path=this._routeEntity(...args):(route.startsWith("/")&&this.router.navigate((this.router.baseUrl||"")+route),this.router[route]||console.error("Could not navigate to a url for route "+route),path=this.router[route].apply(this,params)),this.router.navigate(path)}else console.error("No router defined")},_routeEntity(...args){if(0===args.length)return;const[obj,...params]=args;if("object"!=typeof obj)throw new Error(`cannot resolve route: "${obj}" is not a valid entity object`);let entityType=obj["entity-type"];if(!entityType){if(!obj.path||!obj.uid)throw new Error('cannot resolve route: object does not have an "entity-type"');entityType="document"}let routeKey=_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_1__.a.get("router.key."+entityType),baseUrl="",fn=this.router[entityType];"document"===entityType&&(routeKey=routeKey||"path",(obj.isProxy||obj.isVersion)&&(routeKey="uid"),obj.repository&&Nuxeo.UI&&Nuxeo.UI.repositories&&Nuxeo.UI.repositories.length>1&&(baseUrl=`${window.location.origin}${Nuxeo.UI.repositories.find(r=>r.name===obj.repository).href}`),fn="path"===routeKey&&this.router.browse||fn),routeKey=routeKey||"id";const routeVal=obj[routeKey];if(!routeVal)throw new Error("invalid router key: "+routeKey);const path=fn(routeVal,...params);return baseUrl?this._generateUrl(baseUrl,path):path}},setRouter=router=>{RoutingBehavior.__router=router,document&&document.dispatchEvent(new Event("nuxeo-router-changed"))}},135:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return codePanelTemplate}));__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(49),__webpack_require__(28),__webpack_require__(144),__webpack_require__(53),__webpack_require__(48);var _templateObject,_templateObject2,lit_html__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),lit_html_directives_unsafe_html_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(769),lit_html_directives_until_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(770),highlight_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(771),highlight_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(highlight_js__WEBPACK_IMPORTED_MODULE_11__);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var codePanelTemplate=function(path){return Object(lit_html__WEBPACK_IMPORTED_MODULE_8__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n \n
\n layout source\n \n ',"\n
\n"])),Object(lit_html_directives_until_js__WEBPACK_IMPORTED_MODULE_10__.a)(__webpack_require__(1509)("./".concat(path)).then((function(module){var val=highlight_js__WEBPACK_IMPORTED_MODULE_11___default.a.highlight("html",module.default).value;return Object(lit_html_directives_unsafe_html_js__WEBPACK_IMPORTED_MODULE_9__.a)("
".concat(val,"
"))})),Object(lit_html__WEBPACK_IMPORTED_MODULE_8__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n Loading layout source...\n "])))))}},147:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(19),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12);__webpack_require__(11),__webpack_require__(208);{class Resource extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + `}static get is(){return"nuxeo-resource"}static get properties(){return{connectionId:{type:String,value:""},success:{type:Boolean,notify:!0},error:{type:Object,notify:!0},uncancelable:{type:Boolean},auto:{type:Boolean,value:!1},method:{type:String,value:"get"},path:{type:String},params:{type:Object,value:null},data:{type:Object,value:null},response:{type:Object,value:null,notify:!0},type:{type:String,value:""},headers:{type:Object,value:null},enrichers:{type:Object,value:{}},enrichersEntity:{type:String,value:"document"},contentType:{type:String,value:"application/json"},schemas:{type:String,value:""},autoDelay:{type:Number,value:300},activeRequests:{type:Number,value:0,notify:!0,readOnly:!0},syncIndexing:Boolean,loading:{type:Boolean,notify:!0,readOnly:!0,value:!1}}}static get observers(){return["_autoGet(connectionId, auto, path, params, type, enrichers, enrichersEntity)","_isLoading(activeRequests)"]}get(){return this.method="get",this.execute()}post(){return this.method="post",this.execute()}put(){return this.method="put",this.execute()}remove(){return this.method="delete",this.execute()}execute(){this._setActiveRequests(this.activeRequests+1);const options={method:this.method||"get"};if(this.data&&"get"!==this.method&&(options.body=this.data),this.schemas&&this.schemas.length>1&&(options.schemas=this.schemas.trim().split(/[\s,]+/)),options.headers=this.headers||{},this.syncIndexing&&(options.headers["nx-es-sync"]=!0),options.headers.accept=options.headers.accept||"text/plain,application/json",options.headers["Content-Type"]=this.contentType,this.enrichers){let enrich={};"string"==typeof this.enrichers?enrich[this.enrichersEntity]=this.enrichers:enrich=this.enrichers,Object.entries(enrich).forEach(([type,value])=>{let v=value;Array.isArray(value)&&(v=value.join(",")),options.headers["enrichers-"+type]=v})}options.resolveWithFullResponse=!0,this.uncancelable||(this._controller&&this._controller.abort(),this._controller=new AbortController,options.signal=this._controller.signal);const params=this.params||{};return this.$.nx.request().then(request=>(this._request=request,this._doExecute(params,options)))}_autoGet(){this.auto&&this.path&&(this._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__.a.debounce(this._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.d.after(this.autoDelay),()=>this.get()))}_doExecute(params,options){return this._request.path(this.path).queryParams(params).repositoryName("default"===this._request._baseOptions.repositoryName?void 0:this._request._baseOptions.repositoryName).execute(options).then(response=>response.text().then(text=>{const contentType=response.headers?response.headers.get("content-type"):options.headers.accept;if(!contentType||!contentType.includes("application/json"))return text;try{return text?JSON.parse(text):{}}catch(e){return{error:"Invalid json"}}})).then(data=>(this.dispatchEvent(new CustomEvent("response",{bubbles:!0,composed:!0,detail:{response:data}})),this.response=data,this.success=!0,this._setActiveRequests(this.activeRequests-1),this.response)).catch(error=>{if(this.success=!1,this._setActiveRequests(this.activeRequests-1),error.response)return 401===error.response.status&&this.dispatchEvent(new CustomEvent("unauthorized-request",{bubbles:!0,composed:!0,detail:error})),error.response.text().then(text=>{if(text)try{this.error=JSON.parse(text),this.error.status=error.response.status,console.warn("Resource request failed: "+this.error.message)}catch(e){this.error={message:"Invalid json",status:error.response.status}}else this.error={message:"No message",status:error.response.status};throw this.error});throw error})}_isLoading(){this._setLoading(this.activeRequests>0)}}customElements.define(Resource.is,Resource),Nuxeo.Resource=Resource}},1509:function(module,exports,__webpack_require__){var map={"./document/file/nuxeo-file-edit-layout.html":[1549,3],"./document/file/nuxeo-file-metadata-layout.html":[1550,4],"./document/file/nuxeo-file-view-layout.html":[1551,5],"./document/picture/nuxeo-picture-edit-layout.html":[1552,6],"./search/picker/nuxeo-picker-search-form.html":[1553,7],"./search/picker/nuxeo-picker-search-results.html":[1554,8],"./search/test/nuxeo-test-search-form.html":[1555,9],"./search/test/nuxeo-test-search-results.html":[1556,10]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}));var ids=map[req],id=ids[0];return __webpack_require__.e(ids[1]).then((function(){return __webpack_require__(id)}))}webpackAsyncContext.keys=function webpackAsyncContextKeys(){return Object.keys(map)},webpackAsyncContext.id=1509,module.exports=webpackAsyncContext},1510:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(35),__webpack_require__(586),__webpack_require__(97);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(3),_code_panel_template_js__WEBPACK_IMPORTED_MODULE_9__=(__webpack_require__(751),__webpack_require__(135));var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-document-picker/nuxeo-document-picker.js';\nimport { codePanelTemplate } from '../code-panel-template.js';\n\nwindow.nuxeo.I18n.en['pickerSearch.title'] = 'Quick Search';\nwindow.nuxeo.I18n.en['searchResults.noResults'] = 'No documents match the search criteria.';\n\nstoriesOf('UI/nuxeo-document-picker', module).add(\n 'nuxeo-document-picker',\n () => html`\n \n {\n const picked = e.detail.selectedItems;\n const span = e.target.parentElement.querySelector('span.info');\n span.innerText = `${picked.length} document(s) picked (${picked.map((doc) => doc.title).join(', ')})`;\n }}\"\n >\n \n No documents picked.\n ${codePanelTemplate('search/picker/nuxeo-picker-search-form.html')}\n ${codePanelTemplate('search/picker/nuxeo-picker-search-results.html')}\n `,\n);\n"),__ADDS_MAP__={"ui-nuxeo-document-picker--nuxeo-document-picker":{startLoc:{col:2,line:10},endLoc:{col:3,line:45},startBody:{col:2,line:11},endBody:{col:3,line:45}}};window.nuxeo.I18n.en["pickerSearch.title"]="Quick Search",window.nuxeo.I18n.en["searchResults.noResults"]="No documents match the search criteria.",Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_6__.storiesOf)("UI/nuxeo-document-picker",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-document-picker.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-document-picker",{})).add("nuxeo-document-picker",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_7__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n \n \n No documents picked.\n ',"\n ","\n "])),(function(e){var picked=e.detail.selectedItems;e.target.parentElement.querySelector("span.info").innerText="".concat(picked.length," document(s) picked (").concat(picked.map((function(doc){return doc.title})).join(", "),")")}),(function(e){return e.target.parentElement.querySelector("nuxeo-document-picker").open()}),Object(_code_panel_template_js__WEBPACK_IMPORTED_MODULE_9__.a)("search/picker/nuxeo-picker-search-form.html"),Object(_code_panel_template_js__WEBPACK_IMPORTED_MODULE_9__.a)("search/picker/nuxeo-picker-search-results.html"))}))}.call(this,__webpack_require__(29)(module))},1511:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3);__webpack_require__(1546);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-html-editor';\n\nstoriesOf('UI/nuxeo-html-editor', module).add(\n 'nuxeo-html-editor',\n () => html`\n \n
\n \n
\n `,\n);\n"),__ADDS_MAP__={"ui-nuxeo-html-editor--nuxeo-html-editor":{startLoc:{col:2,line:6},endLoc:{col:3,line:17},startBody:{col:2,line:7},endBody:{col:3,line:17}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-html-editor",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-html-editor.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-html-editor",{})).add("nuxeo-html-editor",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n
\n \n
\n '])))}))}.call(this,__webpack_require__(29)(module))},1518:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(97),__webpack_require__(22),__webpack_require__(26),__webpack_require__(27),__webpack_require__(61);var _templateObject,lit_html__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(13),_lists_icons_js__WEBPACK_IMPORTED_MODULE_10__=(__webpack_require__(88),__webpack_require__(78),__webpack_require__(298),__webpack_require__(186));var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,'import { html } from \'lit-html\';\nimport { storiesOf } from \'@storybook/polymer\';\nimport \'@polymer/polymer/lib/elements/dom-repeat.js\';\nimport \'@nuxeo/nuxeo-ui-elements/nuxeo-icons.js\';\nimport \'@nuxeo/nuxeo-ui-elements/widgets/nuxeo-card.js\';\nimport iconMap from \'../../lists/icons.js\';\n\nconst items = Object.keys(iconMap).map((key) => {\n return { name: key, icons: iconMap[key] };\n});\n\nstoriesOf(\'UI/nuxeo-icons\', module).add(\n \'Icon catalogue\',\n () => html`\n \n \n \n \n \n `,\n);\n'),__ADDS_MAP__={"ui-nuxeo-icons--icon-catalogue":{startLoc:{col:2,line:13},endLoc:{col:3,line:45},startBody:{col:2,line:14},endBody:{col:3,line:45}}},items=Object.keys(_lists_icons_js__WEBPACK_IMPORTED_MODULE_10__.a).map((function(key){return{name:key,icons:_lists_icons_js__WEBPACK_IMPORTED_MODULE_10__.a[key]}}));Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_6__.storiesOf)("UI/nuxeo-icons",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-icons.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-icons",{})).add("Icon catalogue",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_5__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n \n \n \n \n '])),items)}))}.call(this,__webpack_require__(29)(module))},1519:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(2),lit_html__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(3);__webpack_require__(210);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { boolean, color, number, select, text } from '@storybook/addon-knobs';\nimport { html } from 'lit-html';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-input';\n\nstoriesOf('UI/nuxeo-input', module).add('nuxeo-input', () => {\n const listOfTypes = ['email', 'number', 'password', 'tel', 'text', 'url'];\n const type = select('Type', listOfTypes, 'text');\n const label = text('Label', 'Label');\n const placeholder = text('Placeholder', 'Placeholder');\n const errorMessage = text('Error message', '');\n const readOnly = boolean('readonly', false);\n const disabled = boolean('Disabled', false);\n const required = boolean('Required', false);\n const invalid = boolean('Invalid', false);\n const autoFocus = boolean('Autofocus', false);\n const minLength = number('minlength', 0);\n const maxLength = number('maxLength', 10);\n const min = number('min', 0);\n const max = number('max', 100);\n const step = number('Step', 1);\n const invalidColor = color('--paper-input-container-invalid-color', '#de350b', 'CSS variables');\n\n return html`\n \n \n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-input--nuxeo-input":{startLoc:{col:40,line:6},endLoc:{col:1,line:50},startBody:{col:55,line:6},endBody:{col:1,line:50}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-input",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-input.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-input",{})).add("nuxeo-input",(function(){var type=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.select)("Type",["email","number","password","tel","text","url"],"text"),label=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.text)("Label","Label"),placeholder=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.text)("Placeholder","Placeholder"),errorMessage=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.text)("Error message",""),readOnly=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("readonly",!1),disabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Disabled",!1),required=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Required",!1),invalid=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Invalid",!1),autoFocus=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.boolean)("Autofocus",!1),minLength=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.number)("minlength",0),maxLength=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.number)("maxLength",10),min=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.number)("min",0),max=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.number)("max",100),step=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.number)("Step",1),invalidColor=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_4__.color)("--paper-input-container-invalid-color","#de350b","CSS variables");return Object(lit_html__WEBPACK_IMPORTED_MODULE_5__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n \n \n \n '])),invalidColor,type,placeholder,errorMessage,autoFocus,readOnly,disabled,required,minLength,maxLength,min,max,step,invalid,label)}))}.call(this,__webpack_require__(29)(module))},1520:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,_templateObject3,lit_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(163),_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(34);__webpack_require__(1521),__webpack_require__(1522);function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { boolean, button, number } from '@storybook/addon-knobs';\nimport { analyse } from '../../../.storybook/analysis';\nimport { LIST } from '../../data/lists.data.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-justified-grid/nuxeo-justified-grid.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-justified-grid/nuxeo-justified-grid-item.js';\n\nconst docs = analyse('nuxeo-justified-grid').notes;\n\nconst stories = storiesOf('UI/nuxeo-justified-grid', module);\n\nconst server = window.nuxeo.mock;\n\nstories\n .add(\n 'Empty',\n () =>\n html`\n \n `,\n { notes: { markdown: docs } },\n )\n .add(\n 'Default',\n () => {\n const numberOfItems = number('Number of items', 50);\n button('Refresh grid', () => {\n const grid = document.querySelector('nuxeo-justified-grid');\n grid.reset();\n grid.fetch();\n });\n server.respondWith('GET', '/api/v1/search/pp/default_search/execute', {\n 'entity-type': 'documents',\n entries: LIST(numberOfItems).data,\n currentPage: 1,\n numberOfPages: 1,\n resultsCount: numberOfItems,\n offset: 0,\n pageSize: numberOfItems,\n isPreviousPageAvailable: false,\n currentPageSize: numberOfItems,\n });\n return html`\n \n\n \n \n\n \n \n \n `;\n },\n { notes: { markdown: docs } },\n )\n .add(\n 'Selection',\n () => {\n const numberOfItems = number('Number of items', 50);\n const selectionEnabled = boolean('Selection Enabled', true);\n const multiSelection = boolean('Multi selection', false);\n server.respondWith('GET', '/api/v1/search/pp/default_search/execute', {\n 'entity-type': 'documents',\n entries: LIST(numberOfItems).data,\n currentPage: 1,\n numberOfPages: 1,\n resultsCount: numberOfItems,\n offset: 0,\n pageSize: numberOfItems,\n isPreviousPageAvailable: false,\n currentPageSize: numberOfItems,\n });\n button('Refresh grid', () => {\n const grid = document.querySelector('nuxeo-justified-grid');\n grid.reset();\n grid.fetch();\n });\n return html`\n \n\n \n \n\n \n \n \n `;\n },\n { notes: { markdown: docs } },\n );\n"),__ADDS_MAP__={},docs=Object(_storybook_analysis__WEBPACK_IMPORTED_MODULE_6__.a)("nuxeo-justified-grid").notes,stories=Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-justified-grid",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-justified-grid.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-justified-grid",{})),server=window.nuxeo.mock;stories.add("Empty",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n \n "])))}),{notes:{markdown:docs}}).add("Default",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",50);return Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.button)("Refresh grid",(function(){var grid=document.querySelector("nuxeo-justified-grid");grid.reset(),grid.fetch()})),server.respondWith("GET","/api/v1/search/pp/default_search/execute",{"entity-type":"documents",entries:Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(numberOfItems).data,currentPage:1,numberOfPages:1,resultsCount:numberOfItems,offset:0,pageSize:numberOfItems,isPreviousPageAvailable:!1,currentPageSize:numberOfItems}),Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(['\n \n\n \n \n\n \n \n \n '])),numberOfItems)}),{notes:{markdown:docs}}).add("Selection",(function(){var numberOfItems=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of items",50),selectionEnabled=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.boolean)("Selection Enabled",!0),multiSelection=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.boolean)("Multi selection",!1);return server.respondWith("GET","/api/v1/search/pp/default_search/execute",{"entity-type":"documents",entries:Object(_data_lists_data_js__WEBPACK_IMPORTED_MODULE_7__.a)(numberOfItems).data,currentPage:1,numberOfPages:1,resultsCount:numberOfItems,offset:0,pageSize:numberOfItems,isPreviousPageAvailable:!1,currentPageSize:numberOfItems}),Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.button)("Refresh grid",(function(){var grid=document.querySelector("nuxeo-justified-grid");grid.reset(),grid.fetch()})),Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(['\n \n\n \n \n\n \n \n \n '])),numberOfItems,selectionEnabled,multiSelection)}),{notes:{markdown:docs}})}.call(this,__webpack_require__(29)(module))},1521:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4),_polymer_polymer_lib_legacy_templatizer_behavior_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(108),_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_6__=(__webpack_require__(299),__webpack_require__(54)),_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_13__=(__webpack_require__(300),__webpack_require__(11),__webpack_require__(62),__webpack_require__(500),__webpack_require__(44),__webpack_require__(88),__webpack_require__(19)),_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(45),_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(164),_nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(133);{class JustifiedGrid extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_3__.b)([_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_6__.a,_polymer_polymer_lib_legacy_templatizer_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a,_nuxeo_page_provider_display_behavior_js__WEBPACK_IMPORTED_MODULE_15__.a,_nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_16__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + +
+ + + + + + + +
+ `}static get is(){return"nuxeo-justified-grid"}static get properties(){return{rowHeight:{type:Number,value:196},page:{type:Number,value:1},pageSize:{type:Number,value:50},rows:{type:Array,value:[]},_isFetching:{type:Boolean,value:!1},_templateElement:{type:Object}}}static get observers(){return["_selectedItemsChanged(selectedItems.splices)"]}ready(){super.ready();const template=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_1__.a)(this).querySelector("template");template&&(this.templatize(template),this._templateElement=this.stamp().root.firstElementChild)}disconnectedCallback(){super.disconnectedCallback(),this._templateElement=null}_itemChanged(item){this._templateElement&&item&&item._view&&Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_14__.a)(this,()=>{const el=this.$$("#item-"+item._view.index);if(el)if(el.childNodes.length>0)el.childNodes[0].set("document",item);else{const clone=this._templateElement.cloneNode(!0);clone.set("document",item),el.appendChild(clone)}})}reset(size){this.set("items",[]),this.set("rows",[]),this.page=1,this.$.scrollThreshold.clearTriggers(),this._reset(size)}fetch(){return this._fetchNewPage(!0)}_fetchNewPage(reset){return this._isFetching||!this._hasPageProvider()||this.page>this.nxProvider.numberOfPages?(reset||this.$.scrollThreshold.clearTriggers(),this._isFetching=!1,Promise.resolve()):(this._isFetching=!0,this.page=reset?1:this.page,this._fetchPage(this.page,this.pageSize).then(response=>{this._addItems(response.entries),reset&&1!==this.page||(this.page+=1,this.$.scrollThreshold.clearTriggers()),this._isFetching=!1}))}_scrollChanged(){return this._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_13__.a.debounce(this._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.d.after(this.scrollThrottle>0?this.scrollThrottle:1),()=>this._fetchNewPage(!1)),this._fetchNewPage(!1)}getSelectedItems(){return this.$.selector.selected}selectItem(item){this.selectionEnabled&&(this.$.selector.select(item),this._updateFlags())}selectIndex(index){this.selectionEnabled&&(this.$.selector.selectIndex(index),this._updateFlags())}selectItems(items){this.selectionEnabled&&items&&items.length>0&&(items.forEach(item=>this.$.selector.select(item)),this._updateFlags())}deselectItem(item){this.selectionEnabled&&!this.selectAllActive&&(this.$.selector.deselect(item),this._updateFlags())}deselectIndex(index){this.selectionEnabled&&!this.selectAllActive&&(this.$.selector.deselectIndex(index),this._updateFlags())}clearSelection(){this._isSelectAllActive=!1,this.$.selector.clearSelection(),this._updateFlags()}_check(e){this.selectionEnabled&&!this.selectAllActive?(this.selectionMode=!0,this._click(e)):(e.preventDefault(),e.stopPropagation())}_click(e){const{index:index}=e.model.item._view;this.selectionEnabled&&this.selectionMode&&!this.selectAllActive?this._isIndexSelected(index)?this.deselectIndex(index):this.selectIndex(index):this.dispatchEvent(new CustomEvent("navigate",{composed:!0,bubbles:!0,detail:{doc:this.items[index],index:index}})),e.stopPropagation()}_selectedItemsChanged(){this.selectionMode=this.selectedItems&&this.selectedItems.length>0}_isSelected(item){return this._isIndexSelected(item._view.index)}_isIndexSelected(index){return this.selectedItems.indexOf(this.items[index])>-1}_addItems(newItems){let items=newItems;if(this.rows.length>0){items=this.rows[this.rows.length-1].map(item=>this.items[item._view.index]).concat(items),this.pop("rows")}this._computeRows(items).forEach(row=>this.push("rows",row)),this.$.scrollThreshold.clearTriggers()}_computeRows(items){const gridWidth=this.$.list.offsetWidth,rows=[];let currentRowWidth=0,currentRow=[];return items.filter(item=>0!==Object.keys(item).length).forEach((item,idx)=>{const clone=Object.assign({},item);clone.size=clone.properties["picture:info"]||{width:1,height:1},clone.size.width=clone.size.width||1,clone.size.height=clone.size.height||1,clone._view={},clone._view.index=this.items.indexOf(item),clone._view.width=clone.size.width*this.rowHeight/clone.size.height,clone._view.height=this.rowHeight,currentRowWidth+clone._view.width<=gridWidth?(currentRow.push(clone),currentRowWidth+=clone._view.width):(rows.push(this._fitItemsToWidth(currentRow,currentRowWidth,gridWidth)),currentRow=[clone],currentRowWidth=clone._view.width),idx===items.length-1&&rows.push(this._fitItemsToWidth(currentRow,currentRowWidth,gridWidth))}),rows}_fitItemsToWidth(currentRow,currentRowWidth,gridWidth){const computedHeight=gridWidth*this.rowHeight/currentRowWidth;return currentRow.forEach(item=>{item._view.height=computedHeight,item._view.width=item._view.width/currentRowWidth*gridWidth}),currentRow}_resize(){(this.$.list.offsetWidth||this.$.list.offsetHeight)&&(this._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_13__.a.debounce(this._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.d.after(150),()=>{this.rows=this._computeRows(this.items)}))}}customElements.define(JustifiedGrid.is,JustifiedGrid),Nuxeo.JustifiedGrid=JustifiedGrid}},1522:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(11);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0);__webpack_require__(744);{class JustifiedGridItem extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__.a` + + +
+ +
[[document.title]]
+
+ `}static get is(){return"nuxeo-justified-grid-item"}static get properties(){return{document:Object}}_url(doc){if(doc&&doc.uid&&doc.contextParameters&&doc.contextParameters.thumbnail&&doc.contextParameters.thumbnail.url){if(!this.isFollowRedirectEnabled()){const splitter=doc.contextParameters.thumbnail.url.indexOf("?")>-1?"&":"?";doc.contextParameters.thumbnail.url=`${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`}return doc.contextParameters.thumbnail.url}return""}isFollowRedirectEnabled(){const followRedirect=Nuxeo&&Nuxeo.UI&&Nuxeo.UI.config&&Nuxeo.UI.config.url&&Nuxeo.UI.config.url.followRedirect;return!!followRedirect&&"true"===String(followRedirect).toLowerCase()}}customElements.define(JustifiedGridItem.is,JustifiedGridItem),Nuxeo.JustifiedGridItem=JustifiedGridItem}},1523:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,lit_html__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3),_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(13),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2);__webpack_require__(1524);var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { html } from 'lit-html';\nimport { storiesOf } from '@storybook/polymer';\nimport { number } from '@storybook/addon-knobs';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-pagination-controls.js';\n\nstoriesOf('UI/nuxeo-pagination-controls', module).add('Nuxeo pagination', () => {\n const numberOfPages = number('Number of pages', 5);\n return html`\n \n \n `;\n});\n"),__ADDS_MAP__={"ui-nuxeo-pagination-controls--nuxeo-pagination":{startLoc:{col:54,line:6},endLoc:{col:1,line:16},startBody:{col:74,line:6},endBody:{col:1,line:16}}};Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_4__.storiesOf)("UI/nuxeo-pagination-controls",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-pagination-controls.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-pagination-controls",{})).add("Nuxeo pagination",(function(){var numberOfPages=Object(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_5__.number)("Number of pages",5);return Object(lit_html__WEBPACK_IMPORTED_MODULE_3__.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n \n '])),numberOfPages)}))}.call(this,__webpack_require__(29)(module))},1524:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(1525),__webpack_require__(105),__webpack_require__(11),__webpack_require__(62),__webpack_require__(71),__webpack_require__(302);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(0);{class PaginationControls extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_6__.a` + + +
+ + + + +
+ + [[page]] + / [[numberOfPages]] +
+ + + + +
+ `}static get is(){return"nuxeo-pagination-controls"}static get properties(){return{page:{type:Number,value:1,notify:!0},numberOfPages:Number}}_previous(){this.page--}_next(){this.page++}_first(){this.page=1}_last(){this.page=this.numberOfPages}_isFirst(page){return 1===page}_isLast(page){return page===this.numberOfPages}_computePageOptions(numberOfPages){return Array.from({length:numberOfPages},(x,i)=>i+1)}_computeLimitForOptions(numberOfPages){return!(numberOfPages>(Nuxeo&&Nuxeo.UI&&Nuxeo.UI.config&&Nuxeo.UI.config.pagination&&Nuxeo.UI.config.pagination.nuxeoSelectOptions&&Nuxeo.UI.config.pagination.nuxeoSelectOptions.listingMaxItems?Nuxeo.UI.config.pagination.nuxeoSelectOptions.listingMaxItems:1e3))}}customElements.define(PaginationControls.is,PaginationControls),Nuxeo.PaginationControls=PaginationControls}},1526:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(217),_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6),_code_panel_template_js__WEBPACK_IMPORTED_MODULE_10__=(__webpack_require__(742),__webpack_require__(210),__webpack_require__(749),__webpack_require__(135));function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport { LayoutBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-layout-behavior.js';\nimport { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport '@nuxeo/nuxeo-ui-elements/search/nuxeo-search-form-layout.js';\nimport '@nuxeo/nuxeo-ui-elements/widgets/nuxeo-input.js';\nimport '@nuxeo/nuxeo-ui-elements/nuxeo-aggregation/nuxeo-checkbox-aggregation.js';\nimport { codePanelTemplate } from '../code-panel-template.js';\n\nwindow.Polymer = Polymer;\nwindow.Nuxeo.LayoutBehavior = LayoutBehavior;\nwindow.nuxeo.I18n.en['defaultSearch.fullText'] = 'Full Text';\nwindow.nuxeo.I18n.en['defaultSearch.fullText.placeholder'] = 'Search for something...';\nwindow.nuxeo.I18n.en['defaultSearch.modifiedDate'] = 'Modification Date';\n\nstoriesOf('UI/nuxeo-search-form-layout', module)\n .add(\n 'Default',\n () => html`\n
\n \n
\n ${codePanelTemplate('search/test/nuxeo-test-search-form.html')}\n `,\n )\n .add(\n 'Missing layout',\n () => html`\n \n `,\n );\n"),__ADDS_MAP__={"ui-nuxeo-search-form-layout--missing-layout":{startLoc:{col:4,line:31},endLoc:{col:5,line:38},startBody:{col:4,line:32},endBody:{col:5,line:38}},"ui-nuxeo-search-form-layout--default":{startLoc:{col:4,line:18},endLoc:{col:5,line:28},startBody:{col:4,line:19},endBody:{col:5,line:28}}};window.Polymer=_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_6__.a,window.Nuxeo.LayoutBehavior=_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_5__.a,window.nuxeo.I18n.en["defaultSearch.fullText"]="Full Text",window.nuxeo.I18n.en["defaultSearch.fullText.placeholder"]="Search for something...",window.nuxeo.I18n.en["defaultSearch.modifiedDate"]="Modification Date",Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-search-form-layout",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-search-form-layout.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-search-form-layout",{})).add("Default",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n
\n \n
\n ',"\n "])),Object(_code_panel_template_js__WEBPACK_IMPORTED_MODULE_10__.a)("search/test/nuxeo-test-search-form.html"))})).add("Missing layout",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(['\n \n '])))}))}.call(this,__webpack_require__(29)(module))},1527:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var _templateObject,_templateObject2,_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),lit_html__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(217),_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6),_code_panel_template_js__WEBPACK_IMPORTED_MODULE_8__=(__webpack_require__(743),__webpack_require__(135));function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var withSourceLoader=__webpack_require__(14).withSource,__STORY__=(__webpack_require__(14).addSource,"import { storiesOf } from '@storybook/polymer';\nimport { html } from 'lit-html';\nimport { LayoutBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-layout-behavior.js';\nimport { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport '@nuxeo/nuxeo-ui-elements/search/nuxeo-search-results-layout.js';\nimport { codePanelTemplate } from '../code-panel-template.js';\n\nwindow.Polymer = Polymer;\nwindow.Nuxeo.LayoutBehavior = LayoutBehavior;\n\nstoriesOf('UI/nuxeo-search-results-layout', module)\n .add(\n 'Default',\n () => html`\n
\n \n
\n \n \n ${codePanelTemplate('search/test/nuxeo-test-search-results.html')}\n `,\n )\n .add(\n 'Missing layout',\n () => html`\n \n `,\n );\n"),__ADDS_MAP__={"ui-nuxeo-search-results-layout--missing-layout":{startLoc:{col:4,line:32},endLoc:{col:5,line:35},startBody:{col:4,line:33},endBody:{col:5,line:35}},"ui-nuxeo-search-results-layout--default":{startLoc:{col:4,line:13},endLoc:{col:5,line:29},startBody:{col:4,line:14},endBody:{col:5,line:29}}};window.Polymer=_polymer_polymer_lib_legacy_polymer_fn_js__WEBPACK_IMPORTED_MODULE_6__.a,window.Nuxeo.LayoutBehavior=_nuxeo_nuxeo_ui_elements_nuxeo_layout_behavior_js__WEBPACK_IMPORTED_MODULE_5__.a,Object(_storybook_polymer__WEBPACK_IMPORTED_MODULE_3__.storiesOf)("UI/nuxeo-search-results-layout",module).addParameters({storySource:{source:__STORY__,locationsMap:__ADDS_MAP__}}).addDecorator(withSourceLoader(__STORY__,__ADDS_MAP__,"/nuxeo-search-results-layout.stories.js",[],{},"/home/runner/work/nuxeo-elements/nuxeo-elements/storybook/src/elements/nuxeo-search-results-layout",{})).add("Default",(function(){return Object(lit_html__WEBPACK_IMPORTED_MODULE_4__.html)(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n
\n \n
\n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ `}static get is(){return"nuxeo-html-editor"}static get properties(){return{value:{type:String,notify:!0},placeholder:{type:String,value:"Type here..."},readOnly:{type:Boolean,value:!1,reflectToAttribute:!0},_editor:{type:Object}}}static get observers(){return["_valueChanged(value, _editor)","_readOnlyChanged(readOnly, _editor)"]}static get importMeta(){return{url:getAbsoluteUrl("s/nuxeo-html-editor.js")}}ready(){super.ready();const{placeholder:placeholder,readOnly:readOnly}=this;this._editor=new Quill(this.$.editor,{theme:"snow",modules:{toolbar:"#toolbar"},placeholder:placeholder,readOnly:readOnly}),this._editor.on("text-change",()=>{this._debouncer=debounce.a.debounce(this._debouncer,utils_async.d.after(200),()=>this._updateValue())})}_updateValue(){this._internalChange=!0,this.value=this._editor.getSemanticHTML(),this._internalChange=!1}_valueChanged(){if(this._editor&&!this._internalChange){const delta=this._editor.clipboard.convert({html:this.value});this._editor.setContents(delta,this.readOnly?Quill.sources.SILENT:Quill.sources.USER),this._editor.setSelection(0,Quill.sources.SILENT)}}_readOnlyChanged(){this._editor&&(this._editor.enable(!this.readOnly),this._editor.getModule("toolbar").container.style.display=this.readOnly?"none":"")}_onImageUpload(){this.$.qlImage.click()}_onSearchImage(){this.$.picker.open()}_onPickerSelected(e){const selectedDocuments=e.detail&&e.detail.selectedItems;if(selectedDocuments){const templateToInsert=selectedDocuments.filter(doc=>doc.properties["file:content"]&&doc.properties["file:content"].data).map(doc=>``).join("\n");this._editor.clipboard.dangerouslyPasteHTML(this._editor.getSelection(!0).index,templateToInsert)}}}customElements.define(HTMLEditor.is,HTMLEditor)}},1547:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(11);var html_tag=__webpack_require__(0),polymer_dom=__webpack_require__(1),legacy_class=(__webpack_require__(297),__webpack_require__(94),__webpack_require__(4)),templatizer_behavior=__webpack_require__(108),nuxeo_i18n_behavior=__webpack_require__(8);{class TreeNode extends(Object(legacy_class.b)([templatizer_behavior.a,nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + + + `}static get is(){return"nuxeo-tree-node"}static get properties(){return{data:Object,_children:{type:Array},controller:Object,opened:{type:Boolean,value:!1,observer:"_openedChanged"},loading:{type:Boolean,value:!1,observer:"_loadingChanged"},template:Object,nodeKey:{type:String,value:"id"},page:{type:Number,value:1},isNextAvailable:{type:Boolean,value:!1},_parentModel:{type:Boolean,value:!0}}}static get observers(){return["_renderNodeContent(data)"]}toggle(){this._updated?this.opened=!this.opened:(this._fetchChildren(),this.opened=!0)}_selectNode(e){let detail;detail=e.detail.item?{item:e.detail.item}:{item:this.data},this.dispatchEvent(new CustomEvent("select",{composed:!0,bubbles:!0,detail:detail}))}open(){return this.opened=!0,this._updated?Promise.resolve():this._fetchChildren()}close(){this.opened=!1}_renderNodeContent(){if(this.template){this._instance&&(this._teardownInstance(),this._fetchChildren()),this.template.__templatizeOwner=null,this.templatize(this.template,!0),this._instance=this.stamp({}),this._instance.item=this.data,this._instance.opened=this.opened,this._instance.loading=this.loading,this._instance.isLeaf=this.controller.isLeaf(this.data),this.dataset[this.nodeKey]=this.data[this.nodeKey];const content=document.createElement("div");content.id="content",Object(polymer_dom.a)(content).appendChild(this._instance.root),Object(polymer_dom.a)(this).appendChild(content);const children=document.createElement("iron-collapse");children.id="children",children.opened=this.opened,children.loading=this.loading,children.noAnimation="true",Object(polymer_dom.a)(this).appendChild(children),Object(polymer_dom.b)(),this._setupToggleListener()}}_renderChildNodes(){if(this.template)return new Promise(resolve=>{const children=Object(polymer_dom.a)(this).querySelector("#children");for(;children.lastChild;)children.removeChild(children.lastChild);const items=this._children||[];for(let i=0;i(results.items?(results.items.forEach(doc=>{this.push("_children",doc)}),this.isNextAvailable=results.isNextAvailable):(this._children=results,this.isNextAvailable=!1),this._updated=!0,this._renderChildNodes()))}_setupToggleListener(){Object(polymer_dom.b)();const selectElts=Object(polymer_dom.a)(this).querySelector("#content").querySelectorAll("[select]");for(let i=0;i + :host { + display: block; + @apply --nuxeo-tree-theme; + } + + + + `}static get is(){return"nuxeo-tree"}static get properties(){return{data:Object,controller:Object,template:Object,nodeKey:{type:String,value:"id"}}}static get observers(){return["_update(data, controller)"]}_update(){if(this.data&&this.controller){const template=Object(polymer_dom.a)(this).querySelector("template");this._root&&Object(polymer_dom.a)(this).removeChild(this._root),this._root=document.createElement("nuxeo-tree-node"),this._root.id="root",this._root.template=template,this._root.dataHost=this.dataHost,this._root.controller=this.controller,this._root.nodeKey=this.nodeKey,this._root.data=this.data,this._root.dataset[this.nodeKey]=this.data[this.nodeKey],Object(polymer_dom.a)(this).appendChild(this._root),this._root.open()}}open(){this._openNodes(arguments)}_openNodes(keys){if(!keys||0===keys.length)return;const node=this._find(keys[0]);node&&node.open().then(()=>{this._openNodes(Array.prototype.slice.call(keys,1))})}_find(key){return this.querySelector(`[data-${this.nodeKey}="${key}"]`)}removeNodes(keys){if(!keys||0===keys.length)return;const node=this._find(keys[0]);node&&node.removeSelf().then(()=>{this.removeNodes(Array.prototype.slice.call(keys,1))})}}customElements.define(Tree.is,Tree),Nuxeo.Tree=Tree}},163:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return analyse}));__webpack_require__(42),__webpack_require__(52),__webpack_require__(143),__webpack_require__(36),__webpack_require__(97),__webpack_require__(87),__webpack_require__(60),__webpack_require__(61),__webpack_require__(28),__webpack_require__(37);var _storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(2),_nuxeo_nuxeo_ui_elements_analysis_json__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(753);var ELEMENTS={};_nuxeo_nuxeo_ui_elements_analysis_json__WEBPACK_IMPORTED_MODULE_11__.elements.forEach((function(el){ELEMENTS[el.tagname]=el}));var knobFor=function(prop){var overrides=1[]},sortOrder:{type:Array,notify:!0,value:()=>[]},_ppSort:{type:Object,value:{},notify:!0},loading:{type:Boolean,reflectToAttribute:!0,notify:!0,readOnly:!0,value:!1},selectionEnabled:{type:Boolean,value:!1},selectAllEnabled:{type:Boolean,value:!1},selectAllActive:{type:Boolean,notify:!0,computed:"_computeSelectAllStatus(selectAllEnabled, _isSelectAllActive)"},selectedItems:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},items:{type:Array,value:[],notify:!0},maxItems:{type:Number,value:()=>_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_5__.a.get("listingMaxItems",1e4)},_fetchAheadLimit:{type:Number,value:10},selectOnTap:{type:Boolean,value:!1},as:{type:String,value:"item"},quickFilters:{type:Array,notify:!0},scrollThrottle:{type:Number,value:60},handlesSorting:{type:Boolean,reflectToAttribute:!0,value:!1},handlesFiltering:{type:Boolean,reflectToAttribute:!0,value:!1},handlesSelectAll:{type:Boolean,reflectToAttribute:!0,value:!1},_lastSelectedIndex:Number,_excludedItems:{type:Array,value:()=>[],notify:!0}},observers:["_updateFlags(size)","_nxProviderChanged(nxProvider)","_selectionEnabledChanged(selectionEnabled, selectOnTap, multiSelection)","_itemsChanged(items.*)","_computeLabel(i18n, emptyLabel, filters, loading, size, _isEmpty)"],listeners:{"column-filter-changed":"_onColumnFilterChanged",selected:"_selected"},detached(){this.unlisten(this.nxProvider,"update","_updateResults"),this.unlisten(this.nxProvider,"loading-changed","_updateLoading"),this.$.list.unlisten.call(this.$.list,this.$.list,"selected","_selectionHandler"),this.$.list.unlisten.call(this.$.list,this.$.list,"tap","_selectionHandler")},_nxProviderChanged(nxProvider){"string"==typeof nxProvider?(this.nxProvider=this.__dataHost?this.__dataHost.$[nxProvider]:Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_1__.a)(this.ownerDocument).querySelector("#"+nxProvider),null===this.nxProvider&&(this.nxProvider=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_1__.a)(this).parentNode.querySelector("#"+nxProvider))):nxProvider&&(this._pageSize=this.nxProvider.pageSize,this.listen(this.nxProvider,"loading-changed","_updateLoading"),this.listen(this.nxProvider,"update","_updateResults"))},_updateLoading(){this._setLoading(this.nxProvider.loading)},_hasPageProvider(){return this.nxProvider&&"string"!=typeof this.nxProvider},_resetResults(){this._hasPageProvider()&&this._reset(0)},_updateResults(){this._hasPageProvider()&&(this.size=this.items.length)},_itemsChanged(){this._isEmpty=!(this.items&&this.items.length>0)},_selected(e){const{index:index}=e.detail;if("number"==typeof index){if(e.detail.shiftKey&&"number"==typeof this._lastSelectedIndex){this.items[index]&&this.items[index].uid||this.deselectIndex(index);const last=this._lastSelectedIndex,start=index>last?last:index,end=index>last?index:last;if(this.items.slice(start,end).every(item=>item&&item.uid))for(let i=start;ii!==item.uid))}}},selectItem(item){this.selectionEnabled&&(this.$.list.selectItem(item),this._updateFlags())},selectIndex(index){this.selectionEnabled&&(this.$.list.selectIndex(index),this._updateFlags())},selectItems(items){this.selectionEnabled&&items&&items.length>0&&(items.forEach(function(item){this.selectItem(item)}.bind(this.$.list)),this._updateFlags())},deselectItem(item){this.selectionEnabled&&(this.$.list.deselectItem(item),this._updateFlags())},deselectIndex(index){this.selectionEnabled&&(this.$.list.deselectIndex(index),this._updateFlags())},selectAll(){if(this.selectionEnabled&&this.selectAllEnabled){this._isSelectAllActive=!0,this._excludedItems=[];const{start:start,end:end}=this._getSelectionBoundaries();this._updateSelectedItems(index=>{this.selectItem(this.items[index])}),Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_4__.a)(this,this._pushSelectedItems,[0,start]),Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_4__.a)(this,this._pushSelectedItems,[end+1,this.items.length])}},clearSelection(){this._isSelectAllActive=!1,this._excludedItems=[],this.$.list.clearSelection(),this._updateFlags()},_pushSelectedItems(indexStart,limit){for(let index=indexStart;index-1):!(!this.selectedItem||this.selectedItem!==item))},_isIndexSelected(index){return this.multiSelection?!(!(this.selectedItems&&this.selectedItems.length&&this.items&&this.items.length>index&&this.items[index]&&this.selectedItems.indexOf(this.items[index])>-1)||this._excludedItems.includes(this.items[index].uid))||!(!this._isSelectAllActive||!this._excludedItems.length||this._excludedItems.includes(this.items[index].uid)):!!(this.selectedItem&&this.items&&this.items.length>index&&this.selectedItem===this.items[index])},_toggleSelectAll(){0===this._excludedItems.length&&this.selectAllActive?this.clearSelection():this.selectAll()},_selectionEnabledChanged(){this.$.list.selectionEnabled=this.selectionEnabled,this.$.list.multiSelection=this.multiSelection,this.$.list.unlisten.call(this.$.list,this.$.list,"selected","_selectionHandler"),this.selectionEnabled&&!this.selectOnTap&&(this.$.list.unlisten.call(this.$.list,this.$.list,"tap","_selectionHandler"),this.$.list.listen.call(this.$.list,this.$.list,"selected","_selectionHandler"))},_sortDirectionChanged(e){if(this._hasPageProvider()){let notFound=!0;for(let i=0;i0&&this.sortOrder.forEach(sortItem=>{tmpSort[sortItem.path]=sortItem.direction}),JSON.stringify(this._ppSort)!==JSON.stringify(tmpSort)&&(this.clearSelection(),this._ppSort=tmpSort,this.nxProvider.sort=this._ppSort,this.nxProvider.auto||this.fetch())}},_onColumnFilterChanged(e){if(this._hasPageProvider()){let notFound=!0;for(let i=0;i0&&(this.clearSelection(),e.detail.filterExpression?this.nxProvider.params[e.detail.filterBy]=e.detail.filterExpression.replace(/(\$term)/g,e.detail.value):this.nxProvider.params[e.detail.filterBy]=e.detail.value,this.fetch())}},scrollToItem(item){this.$.list.scrollToItem(item)},scrollToIndex(index){this.$.list.scrollToIndex(Math.min(Math.max(index,0),this.items.length-1))},focusOnIndexIfNotVisible(index){this.$.list._isIndexVisible(index)||this.$.list.scrollToIndex(index)},_computeLabel(){this.loading?this._computedEmptyLabel=this.i18n("label.loading"):this._computeLabelDebouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_2__.a.debounce(this._computeLabelDebouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_3__.d.after(500),()=>{this.filters&&this.filters.length>0?this._computedEmptyLabel=this.emptyLabelWhenFiltered?this.emptyLabelWhenFiltered:this.i18n("label.noResultsWhenFiltered"):(this.nxProvider&&0===this.nxProvider.resultsCount||!this.nxProvider)&&(this._computedEmptyLabel=this.emptyLabel?this.emptyLabel:this.i18n("label.noResults"))})},_quickFilterChanged(){this.fetch()},_updateFlags(){this.size=Array.isArray(this.items)?this.items.length:0;const selectedItemsSize=Array.isArray(this.selectedItems)?this.selectedItems.length:0;this._isSelectAllIndeterminate=!this._isSelectAllActive||selectedItemsSizethis.maxItems&&(size=this.maxItems),this.set("items",[]),"number"==typeof size&&size>0){const arr=new Array(size);for(let i=0;i1};return page&&(this.nxProvider.page=page),pageSize&&(this.nxProvider.pageSize=pageSize),this.nxProvider.offset=0,this.nxProvider.fetch(options).then(response=>{1===page&&this.reset();for(let i=0;ithis.maxItems?(lastIndex=this.maxItems,clear=!0):firstIndex>0&&(lastIndex+=this._fetchAheadLimit,this.maxItems&&(lastIndex=Math.min(lastIndex,this.maxItems-1))),!clear&&this.items&&this.items.length){if(!this.items.slice(firstIndex,lastIndex).some((el,idx)=>(!el||0===Object.keys(el).length&&el.constructor===Object)&&(firstIndex+=idx,!0)))return}this.nxProvider.offset=firstIndex,this.nxProvider.page=1,this.nxProvider.pageSize=lastIndex-firstIndex+1;const options={skipAggregates:0!==firstIndex};return this.nxProvider.fetch(options).then(response=>{if(!response)return;let count;count=response.resultsCount<0?response.resultsCountLimit>0?response.resultsCountLimit:response.currentPageSize:response.resultsCountLimit>0&&response.resultsCountLimitthis.maxItems&&(count=this.maxItems),(clear||this.items.length!==count)&&this.reset(count);let entryIndex=0;for(let i=firstIndex;i<=lastIndex;i++)if(entryIndexthis.quickFilters[k].active);let buckets=[];if(response.aggregations&&!hasActiveQuickFilters){const providerSort=this.nxProvider.sort;if(providerSort&&1===Object.keys(providerSort).length){const providerField=Object.keys(providerSort)[0],providerOrder=providerSort[providerField];Object.keys(response.aggregations).forEach(key=>{const aggregation=response.aggregations[key];if(aggregation.field===providerField&&aggregation.buckets.length>=buckets.length&&aggregation.properties&&aggregation.properties.order){const order=aggregation.properties.order.split(" ");order.length>0&&"key"===order[0]&&({buckets:buckets}=aggregation),order.length>1&&order[1]!==providerOrder&&buckets.reverse()}})}this.set("buckets",buckets)}this.fire("nuxeo-page-loaded")})}return Promise.resolve()},_getSelectionBoundaries(){const n=Math.max(0,this.$.list.lastVisibleIndex-this.$.list.firstVisibleIndex);return{start:Math.max(0,this.$.list.firstVisibleIndex-n),end:Math.min(this.items.length,this.$.list.lastVisibleIndex+n),n:n}},_updateSelectedItems(selectionCallback){const{start:start,end:end}=this._getSelectionBoundaries();for(let index=start;index<=end;index++)selectionCallback(index)},_selectItemModel(index){if(this.$.list._isIndexRendered(index)){const model=this.modelForElement(this.$.list._physicalItems[this.$.list._getPhysicalIndex(index)]),item=this.items[index];if(!item)return;model&&(!this._excludedItems||!this._excludedItems.length||this._excludedItems.length&&!this._excludedItems.includes(item.uid)?model[this.$.list.selectedAs]=!0:this._excludedItems&&this._excludedItems.length&&this._excludedItems.includes(item.uid)&&(model[this.$.list.selectedAs]=!1))}},_scrollChanged(){this._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_2__.a.debounce(this._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_3__.d.after(this.scrollThrottle>0?this.scrollThrottle:1),()=>{this.selectAllActive&&Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_4__.a)(this,()=>this._updateSelectedItems(index=>{this._syncArraySelectorSelection(index),this._selectItemModel(index)})),this._fetchRange(this.$.list.firstVisibleIndex,this.$.list.lastVisibleIndex)})},_syncArraySelectorSelection(index){const item=this.items[index];this._isSelected(item)&&!this.$.list.$.selector.isSelected(item)?this.$.list.$.selector.__selectedMap.set(item,index):!this._isSelected(item)&&this.$.list.$.selector.isSelected(item)&&this.$.list.$.selector.__selectedMap.delete(item)},modelForElement(el){return this.$.list.modelForElement(el)},_resize(){this.$.list.notifyResize()}}]},186:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(36),__webpack_require__(87),__webpack_require__(28),__webpack_require__(37);var _polymer_iron_meta_iron_meta_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(184),iconMap={};new _polymer_iron_meta_iron_meta_js__WEBPACK_IMPORTED_MODULE_4__.a({type:"iconset"}).list.forEach((function(item){iconMap[item.name]=item.getIconNames()})),__webpack_exports__.a=iconMap},189:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return tableTemplate}));__webpack_require__(22),__webpack_require__(26),__webpack_require__(27);var lit_html=__webpack_require__(3),html_tag=(__webpack_require__(746),__webpack_require__(734),__webpack_require__(735),__webpack_require__(301),__webpack_require__(0)),legacy_class=__webpack_require__(4),iron_resizable_behavior=(__webpack_require__(11),__webpack_require__(44),__webpack_require__(54)),nuxeo_routing_behavior=__webpack_require__(133);__webpack_require__(40),__webpack_require__(8);{class Tag extends Nuxeo.Element{static get template(){return html_tag.a` + + + + + + + `}static get is(){return"nuxeo-tag"}static get properties(){return{icon:String,uppercase:{type:Boolean,value:!1,reflectToAttribute:!0}}}}customElements.define(Tag.is,Tag),Nuxeo.Tag=Tag}var _templateObject;__webpack_require__(736),__webpack_require__(68);{class UserTag extends(Object(legacy_class.b)([nuxeo_routing_behavior.a,iron_resizable_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ + + + + + + + + + + + + + +
+
+ `}static get is(){return"nuxeo-user-tag"}static get properties(){return{user:Object,disabled:{type:Boolean,value:!1},fetchAvatar:{type:Boolean,value:!1}}}_isEntity(user){return user&&user["entity-type"]&&("user"===user["entity-type"]||"document"===user["entity-type"]&&"user"===user.type)&&user.properties}_id(user){if(user){return user.id||user.uid||user.replace("user:","")}}_name(user){if(this._isEntity(user)){const firstName=user.properties.firstName||user.properties["user:firstName"],lastName=user.properties.lastName||user.properties["user:lastName"],email=user.properties.email||user.properties["user:email"];return[firstName,lastName].join(" ").trim()||email||this._id(user)}return this._id(user)}_email(user){if(this._isEntity(user)){const email=user.properties.email||user.properties["user:email"];return email!==this._id(user)?email:""}return""}_href(user){return this.urlFor("user",this._id(user))}_hasLink(disabled,user){return!(disabled||"system"===this._name(user))}_preventPropagation(e){e.stopPropagation()}_getUserTagClass(user){const userFullName=this._name(user);return/\s/.test(userFullName)?"user-tag-wrap":"user-tag-nowrap"}_calculateElementWidth(element){const currrentElement=getComputedStyle(element),paddingX=parseFloat(currrentElement.paddingLeft)+parseFloat(currrentElement.paddingRight),borderX=parseFloat(currrentElement.borderLeftWidth)+parseFloat(currrentElement.borderRightWidth),scrollBarWidth=element.offsetWidth-element.clientWidth;return element.offsetWidth-paddingX-borderX-scrollBarWidth}_getHTMLRootNode(element){let currentElement=element;for(;currentElement.parentNode instanceof DocumentFragment;)currentElement=currentElement.parentNode.host;return currentElement.parentNode}connectedCallback(){super.connectedCallback(),this.addEventListener("dom-change",this._layout),this.addEventListener("iron-resize",this._layout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("dom-change",this._layout),this.removeEventListener("iron-resize",this._layout)}_layout(){if(this&&this.parentNode){const selectedElement=this,parentElement=this._getHTMLRootNode(selectedElement);let elementWidth=this._calculateElementWidth(parentElement);const childNodes=Array.from(parentElement.children),userAvatar=Array.from(selectedElement.shadowRoot.querySelectorAll(".user-avatar")),userAvatarWidth=userAvatar[0].offsetWidth,totalAvatarWidth=userAvatar.length*userAvatarWidth;elementWidth-=childNodes.reduce((totalWidth,currentValue)=>(currentValue===this||currentValue.shadowRoot||(totalWidth+=this._calculateElementWidth(currentValue)),totalWidth),0)+totalAvatarWidth;const userTagElement=this.shadowRoot.querySelector(".username-container");userTagElement&&elementWidth>0&&userTagElement.setAttribute("style",`max-width:${elementWidth}px`)}}}customElements.define(UserTag.is,UserTag),Nuxeo.UserTag=UserTag}var tableTemplate=function(params){return Object(lit_html.html)(_templateObject||(_templateObject=function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n '])),params.data,params.editable,params.orderable,params.settingsEnabled,params.selectionEnabled,params.selectAllEnabled,params.multiSelection,params.selectOnTap,params.detailsEnabled,params.label?params.label:"",params.required,params.hidden,params.orderColumn,params.alignRight,params.flex)}},208:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(525);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0);__webpack_require__(11);{const nxClients={};class Connection extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__.a` + + `}static get is(){return"nuxeo-connection"}static get properties(){return{connectionId:{type:String,value:"nx"},url:{type:String,value:"",notify:!0},repositoryName:{type:String,value:null},username:{type:String,value:null},password:{type:String,value:null},method:{type:String,value:"basic"},user:{type:Object,readOnly:!0,notify:!0},platformVersion:{type:String,readOnly:!0,notify:!0},token:{type:String,value:null}}}ready(){super.ready(),this.connect().catch(error=>{console.warn("Nuxeo connection refused: "+error)})}connect(){const id=this.connectionId?this.connectionId:Object.keys(nxClients)[0];if(this.client=nxClients[id],this.client){if(this.url||this.username||this.password||this.repositoryName||(this.set("url",this.client._baseURL),this.username=this.client._username,this.password=this.client._password,this.repositoryName=this.client._baseOptions.repositoryName),this.client._baseURL===this.url&&this.client._username===this.username&&this.client._password===this.password&&this.client._baseOptions.repositoryName===this.repositoryName)return this.client._promise.then(this._handleConnected.bind(this));this.client=null}const options={baseURL:this.url,schemas:["*"]};return"basic"===this.method?this.username&&(options.auth={method:"basic",username:this.username,password:this.password}):("token"===this.method&&this.token&&(options.auth={method:"token",token:this.token}),options.headers={"X-No-Basic-Header":!0}),this.repositoryName&&(options.repositoryName=this.repositoryName),nxClients[id]=this.client=this.client||new Nuxeo(options),this.client._promise=this.client.connect(),this.client._promise.then(this._handleConnected.bind(this)).catch(error=>{if(401!==error.response.status||"form"!==this.method)throw error;{document.cookie=`nuxeo.start.url.fragment=${window.location.hash.substring(1)||""}; path=/`;const loginUrl=`${this.url}/login.jsp?requestedUrl=${window.location.href}`;window.location.replace(loginUrl)}})}get connected(){return this.client&&this.client.connected}get active(){return this.client&&this.client._activeRequests>0}_handleConnected(nuxeo){return this.client.connected&&(this._setUser(nuxeo.user),this._setPlatformVersion(nuxeo.nuxeoVersion),this.dispatchEvent(new CustomEvent("connected",{bubbles:!0,composed:!0}))),nuxeo.user}request(){return this.connect().then(()=>this.client.request())}operation(op){return this.connect().then(()=>this.client.operation(op))}http(url){return this.connect().then(()=>this.client._http({url:url}))}batchUpload(){return this.connect().then(()=>this.client.batchUpload())}}customElements.define(Connection.is,Connection),Nuxeo.Connection=Connection}},210:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_iron_form_element_behavior_iron_form_element_behavior_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(72),_polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(50),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(11),__webpack_require__(211),__webpack_require__(0)),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(4);{class Input extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_5__.b)([_polymer_iron_form_element_behavior_iron_form_element_behavior_js__WEBPACK_IMPORTED_MODULE_0__.a,_polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_1__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_4__.a` + + + + + + + `}static get is(){return"nuxeo-input"}static get properties(){return{label:String,type:String,name:String,value:{type:String,notify:!0},placeholder:String,errorMessage:String,autofocus:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},required:{type:Boolean,value:!1,reflectToAttribute:!0},min:String,max:String,step:Number,minlength:Number,maxlength:Number,pattern:String,validator:String,autoValidate:{type:Boolean,value:!1}}}focus(){this.$.paperInput.focus()}_getValidity(){return this.$.paperInput.validate()}}customElements.define(Input.is,Input),Nuxeo.Input=Input}},216:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return DraggableListBehavior}));__webpack_require__(5);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0);__webpack_require__(11);const template=_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__.a` + + + +`;document.head.appendChild(template.content);const DraggableListBehavior={properties:{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},dropTargetFilter:{type:Function,value(){return this.dropTargetFilter.bind(this)}},draggableFilter:{type:Function,value(){return this.draggableFilter.bind(this)}}},attached(){let proxy;const bodyEl=document.querySelector("body"),moveFn=e=>{(new Date).getTime()-this._mouseDownStarted<=150||(this.style.pointerEvents="none",bodyEl.setAttribute("style","cursor: grabbing; cursor: -webkit-grabbing;"),proxy||(proxy=document.createElement("nuxeo-drag-proxy"),proxy.counter=this.selectedItems.length,bodyEl.appendChild(proxy)),proxy.setPosition(e.pageX,e.pageY),proxy.hidden=!1,this._scrollList(e),this.target=null,this.droptargets.forEach(target=>{target.classList.remove("droptarget-hover");const boundingClientRect=target.getBoundingClientRect();e.clientX>boundingClientRect.left&&e.clientXboundingClientRect.top&&e.clientY-1?(this.target=null,proxy.hidden=!0,bodyEl.style.cursor="not-allowed"):this.target.classList.add("droptarget-hover")))},upFn=()=>{this._mouseDownStarted=null,this.style.pointerEvents="",bodyEl.style.cursor="",proxy&&(bodyEl.removeChild(proxy),proxy=null),document.removeEventListener("mousemove",moveFn),document.removeEventListener("mouseup",upFn),this.target&&(this.target.classList.remove("droptarget-hover"),this.fire("nuxeo-documents-dropped",{targetDocument:this.modelForElement(this.target).item,documents:this.selectedItems}),this.target=null)};this.addEventListener("mousedown",e=>{this.draggable&&e.target&&this.draggableFilter(e.target)&&(e.preventDefault(),this._mouseDownStarted=this._mouseDownStarted||(new Date).getTime(),document.addEventListener("mousemove",moveFn),document.addEventListener("mouseup",upFn))})},get droptargets(){return Array.from(this.$.list.queryAllEffectiveChildren("*")).filter(el=>this.dropTargetFilter(el,this.modelForElement(el)))},dropTargetFilter:()=>!0,draggableFilter:()=>!0,_scrollList(e){const container=this.$.list,boundingClientRect=container.getBoundingClientRect();boundingClientRect.bottom-e.pageY<=100?container.scrollTop+=30:e.pageY>=boundingClientRect.top&&e.pageY<=boundingClientRect.top+100&&(container.scrollTop-=30)}};{class DragProxy extends Nuxeo.Element{static get is(){return"nuxeo-drag-proxy"}static get properties(){return{counter:Number}}setPosition(x,y){this.style.left=x+"px",this.style.top=y+"px"}}customElements.define(DragProxy.is,DragProxy),Nuxeo.DragProxy=DragProxy}},217:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return LayoutBehavior}));var _nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(133),_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(80),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(90);const LayoutBehavior=[_nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_0__.a,_nuxeo_filters_behavior_js__WEBPACK_IMPORTED_MODULE_1__.a,_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_2__.a]},298:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(297),__webpack_require__(71),__webpack_require__(40),__webpack_require__(1301);var _polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(54),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(11),__webpack_require__(44),__webpack_require__(0)),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(4);{class Card extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_8__.b)([_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_7__.a` + + + + + + + + + + + + + + `}static get is(){return"nuxeo-card"}static get properties(){return{icon:{type:String,value:null},heading:{type:String,value:null},collapsible:{type:Boolean,value:!1,reflectToAttribute:!0},opened:{type:Boolean,value:!1,reflectToAttribute:!0}}}_hasHeading(icon,heading,collapsible){return icon||heading||collapsible}_opened(opened,collapsible){return!collapsible||opened}_toggle(){this.collapsible&&(this.opened=!this.opened,this.$$("iron-collapse")&&this.$$("iron-collapse").addEventListener("transitionend",fireEvent=>{this.dispatchEvent(new CustomEvent("iron-resize",{bubbles:!0,composed:!0})),this.removeEventListener("transitionend",fireEvent)}))}_toggleIcon(opened){return"hardware:keyboard-arrow-"+(opened?"up":"down")}}customElements.define(Card.is,Card),Nuxeo.Card=Card}},301:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_iron_form_element_behavior_iron_form_element_behavior_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(72),_polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(50),_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__=(__webpack_require__(11),__webpack_require__(211),__webpack_require__(1541),__webpack_require__(95)),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(4),_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(82),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(8);{class DatePicker extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_7__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a,_polymer_iron_form_element_behavior_iron_form_element_behavior_js__WEBPACK_IMPORTED_MODULE_0__.a,_polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_1__.a],Nuxeo.Element)){static get is(){return"nuxeo-date-picker"}static get properties(){return{label:String,defaultTime:String,errorMessage:String,max:String,min:String,required:{type:Boolean,value:!1,reflectToAttribute:!0},value:{type:String,notify:!0,observer:"_valueChanged"},disabled:{type:Boolean,value:!1},firstDayOfWeek:{type:Number},timezone:{type:String,value:()=>_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_8__.a.get("timezone")},_inputValue:{type:String,observer:"_inputValueChanged"},hideClearDateButton:{type:Boolean,value:!1,reflectToAttribute:!0},_preventInputUpdate:{type:Boolean,value:!1}}}static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_6__.a` + + + + + + + `}ready(){super.ready(),_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.locale(window.nuxeo.I18n.language?window.nuxeo.I18n.language.split("-")[0]:"en"),this.$.date.set("i18n.formatDate",date=>this._moment(date).format(_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.localeData().longDateFormat("L"))),this.$.date.set("i18n.parseDate",text=>{const date=this._moment(text,_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.localeData().longDateFormat("L"));return{day:date.get("D"),month:date.get("M"),year:date.get("Y")}}),this.$.date.set("i18n.monthNames",_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.months()),this.$.date.set("i18n.weekdays",_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.weekdays()),this.$.date.set("i18n.weekdaysShort",_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.weekdaysShort()),this.$.date.set("i18n.cancel",this.i18n("command.cancel")),this.$.date.set("i18n.clear",this.i18n("command.clear")),this.$.date.set("i18n.today",this.i18n("today")),this.$.date.set("i18n.firstDayOfWeek",this.firstDayOfWeek||_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_8__.a.get("firstDayOfWeek",_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.localeData().firstDayOfWeek()||0))}_moment(...args){return("Etc/UTC"===this.timezone?_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a.utc:_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a)(...args)}_getValidity(){return this.$.date.validate(this.value?this.$.date.i18n.formatDate(this.value):this.value)&&(!this.required||!!this.value)}_valueChanged(){if(!this.value)return void(this._inputValue=null);const date=this._moment(this.value);if(this.value&&date.isValid()){this._preventInputUpdate=!0;const year=(""+date.get("Y")).padStart(4,"0"),month=(""+(date.get("M")+1)).padStart(2,"0"),day=(""+date.get("D")).padStart(2,"0");this._inputValue=`${year}-${month}-${day}`}else this._inputValue=""}_inputValueChanged(){if(null!==this._inputValue&&!this._preventInputUpdate){const date=this._moment(this._inputValue);if(date.isValid()){if(this.defaultTime){const time=Object(_nuxeo_moment_min_moment_with_locales_js__WEBPACK_IMPORTED_MODULE_5__.a)(this.defaultTime,"HH:mm:ss");if(!time.isValid())throw new Error("Invalid default time "+this.defaultTime);date.add(time.hour(),"hour"),date.add(time.minute(),"minute"),date.add(time.second(),"second")}this.set("value",date.toJSON())}else this.set("value",null)}this._preventInputUpdate=!1}}customElements.define(DatePicker.is,DatePicker),Nuxeo.DatePicker=DatePicker}},302:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(50),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(11),__webpack_require__(1544),__webpack_require__(745),__webpack_require__(44),__webpack_require__(88),__webpack_require__(406),__webpack_require__(0)),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(4),_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(54);{class Select extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_8__.b)([_polymer_iron_resizable_behavior_iron_resizable_behavior_js__WEBPACK_IMPORTED_MODULE_9__.a,_polymer_iron_validatable_behavior_iron_validatable_behavior_js__WEBPACK_IMPORTED_MODULE_0__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_7__.a` + + + + + + + + + + + + + `}static get is(){return"nuxeo-select"}static get properties(){return{label:{type:String,value:null},placeholder:{type:String,value:" "},errorMessage:{type:String},options:{type:Array,value:null},selected:{type:String,notify:!0},attrForSelected:{type:String,value:null},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"top"},dynamicAlign:{type:Boolean},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},required:{type:Boolean,value:!1,reflectToAttribute:!0}}}connectedCallback(){super.connectedCallback(),this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._resize())),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}close(){this.$.paperDropdownMenu.close()}_resize(){const button=this.$.paperDropdownMenu.$.menuButton;button.noOverlap=!0,button.verticalOffset=-8;const{width:width}=this.getBoundingClientRect();width>0&&(this.$.paperDropdownMenu.style.width=this.$.paperMenu.style.width=width+"px")}_id(item){return this.selected||(this.selected=item&&item.id?item.id:item),item&&item.id?item.id:item}_label(item){return item&&item.label?item.label:item}_computeAttrForSelected(attrForSelected,options){return options?"option":attrForSelected}_getValidity(){return this.$.paperDropdownMenu._getValidity()}}customElements.define(Select.is,Select),Nuxeo.Select=Select}},303:function(module,__webpack_exports__,__webpack_require__){"use strict";Nuxeo=Nuxeo||{},Nuxeo.UI=Nuxeo.UI||{},Nuxeo.UI.config=Nuxeo.UI.config||{};const{config:config}=Nuxeo.UI;Object.assign(config,{get(path,fallback){let val=path.split(".").reduce((a,b)=>a&&a[b],this);if(void 0!==val&&typeof val!=typeof fallback)if("boolean"==typeof fallback)val="true"===val;else{let type;switch(typeof fallback){case"number":type=Number;break;case"string":type=String;break;case"bigint":type=BigInt}val=null!=(type&&type(val))?type(val):val}return null!=val?val:fallback},set(path,value){const parentPath=path.substring(0,path.lastIndexOf("."));let parent=this.get(parentPath);parent||(parent=path.split(".").slice(0,-1).reduce((a,b)=>(a[b]=a[b]||{},a[b]),this)),parent[path.substring(path.lastIndexOf(".")+1)]=value}}),__webpack_exports__.a=config},313:function(module,exports,__webpack_require__){module.exports=__webpack_require__.p+"static/media/nuxeo-elements-catalog.784dbae7.svg"},317:function(module,exports,__webpack_require__){module.exports=__webpack_require__.p+"static/media/image01.df0ac7ee.jpg"},319:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return DIRECTORY_SUGGESTION_ENTRIES}));var DIRECTORY_SUGGESTION_ENTRIES=[{absoluteLabel:"Arabic",computedId:"ar",directoryName:"language",displayLabel:"Arabic","entity-type":"directoryEntry",id:"ar",label:"Arabic",obsolete:0,ordering:1e7,properties:{id:"ar",label:"Arabic",obsolete:0,ordering:1e7}},{absoluteLabel:"Chinese",computedId:"zh",directoryName:"language",displayLabel:"Chinese","entity-type":"directoryEntry",id:"zh",label:"Chinese",obsolete:0,ordering:1e7,properties:{id:"zh",label:"Chinese",obsolete:0,ordering:1e7}},{absoluteLabel:"English",computedId:"en",directoryName:"language",displayLabel:"English","entity-type":"directoryEntry",id:"en",label:"English",obsolete:0,ordering:1e7,properties:{id:"en",label:"English",obsolete:0,ordering:1e7}},{absoluteLabel:"French",computedId:"fr",directoryName:"language",displayLabel:"French","entity-type":"directoryEntry",id:"fr",label:"French",obsolete:0,ordering:1e7,properties:{id:"fr",label:"French",obsolete:0,ordering:1e7}}]},321:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return USER_SUGGESTION_ENTRIES}));var USER_SUGGESTION_ENTRIES=[{company:"",displayIcon:!0,displayLabel:"Administrator",email:"devnull@nuxeo.com","entity-type":"user",firstName:"",groups:[],id:"Administrator",lastName:"",prefixed_id:"user:Administrator",tenantId:null,type:"USER_TYPE",username:"Administrator"},{company:"",displayIcon:!0,displayLabel:"jdoe",email:"devnull@nuxeo.com","entity-type":"user",firstName:"",groups:[],id:"jdoe",lastName:"",prefixed_id:"user:Administrator",tenantId:null,type:"USER_TYPE",username:"jdoe"},{company:"",displayIcon:!0,displayLabel:"Bob Jones",email:"bob@jones.com","entity-type":"user",firstName:"Bob",groups:[],id:"bobJones",lastName:"Jones",prefixed_id:"user:bjones",tenantId:null,type:"USER_TYPE",username:"bjones"}]},322:function(module,__webpack_exports__,__webpack_require__){"use strict";var _video_sample_mp4__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(772),_video_sample_mp4__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_video_sample_mp4__WEBPACK_IMPORTED_MODULE_0__);__webpack_exports__.a={"vid:transcodedVideos":[{name:"WebM 480p",content:{name:"sample.webm","mime-type":"video/webm",encoding:null,digestAlgorithm:"MD5",digest:"046356f7764cbd67acfc4365eb106e06",length:"401187",data:_video_sample_mp4__WEBPACK_IMPORTED_MODULE_0___default.a,appLinks:[]},info:{duration:10.03,frameRate:25,streams:[{codec:"vp9 (Profile 0)",bitRate:0,type:"Video"},{codec:"vorbis",bitRate:0,streamInfo:"Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)",type:"Audio"}],width:872,format:"matroska,webm",height:480}}],"vid:info":{duration:10.03,frameRate:25,streams:[{codec:"h264 (Main) (avc1 / 0x31637661)",bitRate:300,streamInfo:"Stream #0:0(und):",type:"Video"},{codec:"aac (LC) (mp4a / 0x6134706D)",bitRate:160,streamInfo:"Stream #0:0(und):",type:"Audio"},{codec:"aac (LC) (mp4a / 0x6134706D)",bitRate:160,streamInfo:"Stream #0:0(und):",type:"Audio"},{codec:"bin_data (text / 0x74786574)",bitRate:160,streamInfo:"Stream #0:0(und):",type:"Data"}],width:320,format:"mov,mp4,m4a,3gp,3g2,mj2",height:176}}},34:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return cities})),__webpack_require__.d(__webpack_exports__,"a",(function(){return LIST}));var _documents_data__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(122),_img_image01_jpg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(317),_img_image01_jpg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_img_image01_jpg__WEBPACK_IMPORTED_MODULE_1__),_img_image02_jpg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(759),_img_image02_jpg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_img_image02_jpg__WEBPACK_IMPORTED_MODULE_2__),_img_image03_jpg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(760),_img_image03_jpg__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_img_image03_jpg__WEBPACK_IMPORTED_MODULE_3__),_img_image04_jpg__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(761),_img_image04_jpg__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_img_image04_jpg__WEBPACK_IMPORTED_MODULE_4__),_img_image05_jpg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(762),_img_image05_jpg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_img_image05_jpg__WEBPACK_IMPORTED_MODULE_5__),_img_image06_jpg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(763),_img_image06_jpg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_img_image06_jpg__WEBPACK_IMPORTED_MODULE_6__),_img_image07_jpg__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(764),_img_image07_jpg__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_img_image07_jpg__WEBPACK_IMPORTED_MODULE_7__),_img_image08_jpg__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(765),_img_image08_jpg__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_img_image08_jpg__WEBPACK_IMPORTED_MODULE_8__),_img_image09_jpg__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(766),_img_image09_jpg__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_img_image09_jpg__WEBPACK_IMPORTED_MODULE_9__),_img_image10_jpg__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(767),_img_image10_jpg__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_img_image10_jpg__WEBPACK_IMPORTED_MODULE_10__),images=[_img_image01_jpg__WEBPACK_IMPORTED_MODULE_1___default.a,_img_image02_jpg__WEBPACK_IMPORTED_MODULE_2___default.a,_img_image03_jpg__WEBPACK_IMPORTED_MODULE_3___default.a,_img_image04_jpg__WEBPACK_IMPORTED_MODULE_4___default.a,_img_image05_jpg__WEBPACK_IMPORTED_MODULE_5___default.a,_img_image06_jpg__WEBPACK_IMPORTED_MODULE_6___default.a,_img_image07_jpg__WEBPACK_IMPORTED_MODULE_7___default.a,_img_image08_jpg__WEBPACK_IMPORTED_MODULE_8___default.a,_img_image09_jpg__WEBPACK_IMPORTED_MODULE_9___default.a,_img_image10_jpg__WEBPACK_IMPORTED_MODULE_10___default.a],companyNames=["Oyope","Babbleset","Twimm","Flipstorm","Feedmix","Dabjam","Photobug","Browsezoom","Yadel","Zooxo"],departments=["Marketing","Training","Accounting","Product Management","Legal","Engineering","Support","Research and Development","Services","Sales"],users=["cmagauran0@sbwire.com","tgorgler1@wordpress.org","wfogg2@photobucket.com","cvanezis3@nymag.com","ageist4@washingtonpost.com","cwhilder5@bluehost.com","blemmen9@salon.com","phydechambers8@artisteer.com","mcorbould7@symantec.com","gmaddicks6@macromedia.com"],dates=["8/16/2018","9/18/2018","7/20/2018","10/21/2018","3/3/2019","9/10/2018","5/24/2019","7/22/2018","12/8/2018","9/28/2018"],cities=["Lisbon","Paris","San Francisco","Oslo","New York","Copenhagen","London","Madrid","Rome","Berlin"],LIST=function(numberOfItems){for(var list={data:[]},index=0;index + :host { + display: block; + position: relative; + padding-bottom: 8px; + word-break: break-all; + } + + :host([hidden]) { + display: none; + } + + :host([required]) label::after { + display: inline-block; + content: '*'; + margin-left: 4px; + color: var(--paper-input-container-invalid-color, #de350b); + } + + paper-textarea { + --paper-input-container: { + margin-top: 5px; + padding: 0; + } + --iron-autogrow-textarea: { + padding: 0; + } + } + + label { + @apply --nuxeo-label; + } + + + + + + + `}static get is(){return"nuxeo-textarea"}static get properties(){return{label:String,name:String,value:{type:String,notify:!0},rows:Number,placeholder:String,errorMessage:String,readonly:{type:Boolean,value:!1,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},required:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,value:!1,reflectToAttribute:!0}}}_getValidity(){return this.$.paperTextarea.validate()}}customElements.define(Textarea.is,Textarea),Nuxeo.Textarea=Textarea}},409:function(module,__webpack_exports__,__webpack_require__){"use strict";var iron_resizable_behavior=__webpack_require__(54),html_tag=(__webpack_require__(11),__webpack_require__(0)),polymer_dom=__webpack_require__(1),flush=__webpack_require__(81),legacy_class=__webpack_require__(4);function whenImportsReady(cb){window.HTMLImports?HTMLImports.whenReady(cb):cb()}var nuxeo_i18n_behavior=__webpack_require__(8);{class Error extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
[[code]]
+
[[_label(code)]]
+
[[url]]
+
[[message]]
+ `}static get is(){return"nuxeo-error"}static get properties(){return{code:{type:String,value:""},message:{type:String,value:""},url:{type:String,value:""},hidden:{type:Boolean,value:!1,reflectToAttribute:!0}}}show(code,url,message){arguments.length&&(this.code=code,this.url=url,this.message=message),this.hidden=!1}hide(){this.hidden=!0}_label(){return this.code?this.i18n("error."+this.code):null}}customElements.define(Error.is,Error),Nuxeo.Error=Error}{class Layout extends(Object(legacy_class.b)([iron_resizable_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + +
+ `}static get is(){return"nuxeo-layout"}static get properties(){return{href:{type:String,observer:"_stamp"},model:{type:Object,value:{}},error:{type:String,value:"Failed to find layout"},element:{type:Object,readOnly:!0,notify:!0}}}static get observers(){return["_update(model.*)"]}_getBoundElements(property){const model={};for(let i=0;i{"property"===binding.kind&&binding.parts.forEach(part=>{"{"===part.mode&&!part.signature&&part.source.startsWith(property)&&(model[part.source]=model[part.source]||[],model[part.source]=node)})})}}return model}validate(){let valid=!0;if(this.element){const elements=this._getValidatableElements(this.element.root);for(let el,i=0;i0||node.offsetWidth>0||styles.opacity>0&&"hidden"!==styles.visibility)}_stamp(href){if(!href)return this.hidden=!0,void this._setElement(null);this.$.error.hidden=!0,this.hidden=this.$.container.hidden=!1;const name=href.split("/").pop().split(".")[0];!function(href,onload,onerror,optAsync){let link=document.head.querySelector('link[href="'+href+'"][import-href]');link||(link=document.createElement("link"),link.rel="import",link.href=href,link.setAttribute("import-href","")),optAsync&&link.setAttribute("async","");let cleanup=function(){link.removeEventListener("load",loadListener),link.removeEventListener("error",errorListener)},loadListener=function(event){cleanup(),link.__dynamicImportLoaded=!0,onload&&whenImportsReady(()=>{onload(event)})},errorListener=function(event){cleanup(),link.parentNode&&link.parentNode.removeChild(link),onerror&&whenImportsReady(()=>{onerror(event)})};link.addEventListener("load",loadListener),link.addEventListener("error",errorListener),null==link.parentNode?document.head.appendChild(link):link.__dynamicImportLoaded&&link.dispatchEvent(new Event("load"))}(href,()=>{const element=document.createElement(name);this.$.container.hasChildNodes()?this.$.container.replaceChild(element,this.$.container.firstChild):this.$.container.appendChild(element),this._setElement(element),this._update(),this.notifyResize(),Object(flush.b)()},()=>{this._setElement(void 0),this.$.error.hidden=!1,this.$.container.hidden=!0,this.notifyResize()})}_update(){this.element&&this.model&&Object.keys(this.model).forEach(prop=>{this.element[prop]=this.model[prop]})}}customElements.define(Layout.is,Layout),Nuxeo.Layout=Layout}},591:function(module,__webpack_exports__,__webpack_require__){"use strict";var _ui_i18n_messages_json__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(757);window.nuxeo={I18n:{language:"en",en:_ui_i18n_messages_json__WEBPACK_IMPORTED_MODULE_0__}}},592:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(19),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(12),_config_js__WEBPACK_IMPORTED_MODULE_6__=(__webpack_require__(11),__webpack_require__(98),__webpack_require__(147),__webpack_require__(303));{class PageProvider extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + + + + + `}static get is(){return"nuxeo-page-provider"}static get properties(){return{connectionId:{type:String,value:""},auto:{type:Boolean,value:!1},autoDelay:{type:Number,value:300},provider:{type:String,value:""},query:{type:String},path:{type:String,computed:"_computePath(provider, query)"},params:{type:Object,value:{}},pageSize:{type:Number,value:-1},page:{type:Number,value:1},offset:{type:Number,notify:!0},currentPage:{type:Array,value:[],notify:!0},sort:{type:Object,value:{},notify:!0},numberOfPages:{type:Number,notify:!0},resultsCount:{type:Number,notify:!0},aggregations:{type:Object,value:{},notify:!0},quickFilters:{type:Array,notify:!0},isNextPageAvailable:{type:Boolean,value:!1,notify:!0},isPreviousPageAvailable:{type:Boolean,value:!1,notify:!0},currentPageSize:{type:Number,notify:!0},enrichers:{type:Object,value:{}},schemas:{type:String},headers:{type:Object,value:null},fetchAggregates:{type:Boolean,value:!1,observer:"_fetchAggregatesChanged"},loading:{type:Boolean,notify:!0,readOnly:!0},skipAggregates:Boolean,method:{type:String,value:()=>_config_js__WEBPACK_IMPORTED_MODULE_6__.a.get("pageprovider.method","get")}}}static get observers(){return["_autoFetch(auto, provider, query, params.*, pageSize, page, sort)"]}ready(){super.ready(),this.$.nxResource.addEventListener("loading-changed",()=>{this._setLoading(this.$.nxResource.loading)})}fetch(options){this.headers||(this.headers={}),this.skipAggregates||options&&options.skipAggregates?this.headers.skipAggregates="true":delete this.headers.skipAggregates;const params=this._params;let target;return"get"===this.method.toLowerCase()?(target=this.$.nxResource,params.namedParameters&&(Object.assign(params,params.namedParameters),delete params.namedParameters)):(target=this.$.op,this.query?target.op="Repository.Query":(target.op="Repository.PageProvider",params.providerName=this.provider)),target.params=params,target.execute().then(response=>(this.currentPage=response.entries.slice(0),this.numberOfPages=response.numberOfPages,this.resultsCount=response.resultsCount,options&&options.skipAggregates||(this.aggregations=response.aggregations),this.quickFilters=response.quickFilters,this.isNextPageAvailable=response.isNextPageAvailable,this.offset=response.currentPageOffset,this.pageSize=response.pageSize,this.isPreviousPageAvailable=response.isPreviousPageAvailable,this.currentPageSize=response.currentPageSize,this.dispatchEvent(new CustomEvent("update",{bubbles:!0,composed:!0})),response)).catch(error=>{throw this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{error:error}})),error})}get _params(){const params={currentPageIndex:this.page-1,offset:this.offset,pageSize:this.pageSize};if(this._sortKeys.length>0&&(params.sortBy=this._sortKeys.join(","),params.sortOrder=this._sortValues.join(",")),this.query&&(params.query=this.query),Array.isArray(this.params))params.queryParams=this.params;else{const{queryParams:queryParams,...otherParams}=this.params;if(queryParams&&(params.queryParams=queryParams),otherParams){const namedParams={};Object.entries(otherParams).forEach(([key,value])=>{null!=value&&(Array.isArray(value)?value=JSON.stringify(value.map(item=>item["entity-type"]?item.uid||item.id:item)):"string"!=typeof value&&(value=value["entity-type"]?value.uid||value.id:JSON.stringify(value)),namedParams[key]=value)}),params.namedParameters=namedParams}}if(this.quickFilters){const retainedFilters=[];for(let i=0;ithis.sort[k])}_autoFetch(){this.$.nxResource.params&&this.query&&0===this.query.length&&this.query!==this.$.nxResource.params.query&&(this.page=1),this.auto&&(this.query||this.provider)&&(this._debouncer=_polymer_polymer_lib_utils_debounce_js__WEBPACK_IMPORTED_MODULE_1__.a.debounce(this._debouncer,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_2__.d.after(this.autoDelay),()=>this.fetch()))}_computePath(provider,query){let path="";return query?path="/search/execute":provider&&(path=`/search/pp/${provider}/execute`),path}_fetchAggregatesChanged(){null===this.headers&&(this.headers={}),!0===this.fetchAggregates?this.headers["fetch-aggregate"]="key":delete this.headers["fetch-aggregate"]}}customElements.define(PageProvider.is,PageProvider),Nuxeo.PageProvider=PageProvider}},68:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(11),__webpack_require__(1283);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0),_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1),_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(12);{class Tooltip extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_2__.a` + + + + `}static get is(){return"nuxeo-tooltip"}static get properties(){return{for:String,position:{type:String,value:"bottom"},offset:{type:Number,value:14},animationDelay:{type:Number,value:500}}}constructor(){super(),this._showListener=this.show.bind(this),this._hideListener=this.hide.bind(this),this._keyListener=this.keydown.bind(this)}connectedCallback(){super.connectedCallback(),this._target=this.target,this._target&&(this._target.addEventListener("mouseenter",this._showListener),this._target.addEventListener("focus",this._showListener),this._target.addEventListener("mouseleave",this._hideListener),this._target.addEventListener("blur",this._hideListener),this._target.addEventListener("tap",this._hideListener),window.addEventListener("keydown",this._keyListener))}disconnectedCallback(){super.disconnectedCallback(),this._target&&(this.hide(),this._target.removeEventListener("mouseenter",this._showListener),this._target.removeEventListener("focus",this._showListener),this._target.removeEventListener("mouseleave",this._hideListener),this._target.removeEventListener("blur",this._hideListener),this._target.removeEventListener("tap",this._hideListener),window.removeEventListener("keydown",this._keyListener)),this._target=null}show(){this._tooltip||this.hidden||(this._tooltip=document.createElement("paper-tooltip"),document.body.appendChild(this._tooltip),this.$.content.assignedNodes().forEach(node=>{this._tooltip.appendChild(node.cloneNode(!0))}),this._tooltip.manualMode=!0,this._tooltip._target=this._target,this._tooltip.animationDelay=this.animationDelay,this._tooltip.offset=this.offset,this._tooltip.position=this.position,this._tooltip.fitToVisibleBounds=!0,_polymer_polymer_lib_utils_async_js__WEBPACK_IMPORTED_MODULE_4__.c.run(()=>{this._tooltip.show()}))}hide(){const paperToolTip=document.getElementsByTagName("paper-tooltip")[0];paperToolTip&&document.body.removeChild(paperToolTip),this._tooltip=null}keydown(){this.hide()}get target(){const{parentNode:parentNode}=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_3__.a)(this),ownerRoot=Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_3__.a)(this).getOwnerRoot();let target;return target=this.for?Object(_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_3__.a)(ownerRoot).querySelector("#"+this.for):parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?ownerRoot.host:parentNode,target}}customElements.define(Tooltip.is,Tooltip),Nuxeo.Tooltip=Tooltip}},730:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(11),__webpack_require__(62),__webpack_require__(8));__webpack_require__(210),__webpack_require__(68),__webpack_require__(107),__webpack_require__(84);{class LinkButton extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + `}static get is(){return"nuxeo-link-button"}static get properties(){return{href:String,target:String,iconSrc:String,icon:String,showLabel:{type:Boolean,value:!1},label:String}}_isAvailable(){return this.href&&(this.icon||this.iconSrc)}}customElements.define(LinkButton.is,LinkButton),Nuxeo.LinkButton=LinkButton}},732:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(40),__webpack_require__(11);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0);__webpack_require__(78);{class CheckMark extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_2__.a` + + + + `}static get is(){return"nuxeo-checkmark"}static get properties(){return{checked:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_ariaChecked"},disabled:{type:Boolean,reflectToAttribute:!0,value:!1}}}ready(){super.ready(),this.setAttribute("role","checkbox"),this.setAttribute("aria-checked",!1)}_tap(){this.disabled||(this.checked=!this.checked)}_ariaChecked(){this.setAttribute("aria-checked",this.checked)}}customElements.define(CheckMark.is,CheckMark),Nuxeo.CheckMark=CheckMark}},733:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(11),__webpack_require__(88),__webpack_require__(8));{class AggregationNavigation extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + +
+ + + +
+
[[_cursorLabel]]
+
+
+ `}static get is(){return"nuxeo-aggregation-navigation"}static get properties(){return{buckets:{type:Array,value:[],observer:"_bucketsChanged"},granularity:{type:Number,value:30},opacity:{type:Number,value:.85},_keys:{type:Array,value:[]},_count:{type:Number,value:0},_cursorIndex:{type:Number,value:0},_cursorLabel:{type:String,value:""},_rect:{type:Object,value:{top:0,right:0,left:0,bottom:0}}}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseover",()=>{this._visibility(!0)}),this.addEventListener("mouseout",()=>{this._visibility(!1)})}_visibility(visible){this.$.keys.style.visibility=visible?"visible":"hidden",this.style.background=visible?"rgba(255, 255, 255, 0.85)":"transparent"}_label(key){return this.i18n(key.name)}_bucketsChanged(buckets){this._rect=this.$.keys.getBoundingClientRect(),this._count=0,buckets.forEach(bucket=>{this._count+=bucket.docCount}),this.style.opacity=this._count?this.opacity:0,this.set("_keys",[]);let offset=1,{granularity:granularity}=this;buckets.forEach(bucket=>{let visible=!1;granularity>=this.granularity&&(visible=!0,granularity=0);const height=bucket.docCount*(this._rect.height/this._count);this.push("_keys",{name:bucket.key,offset:offset,size:bucket.docCount,top:offset*this._rect.height/this._count,height:height,visible:visible}),offset+=bucket.docCount,granularity+=height})}_tap(){this.dispatchEvent(new CustomEvent("scroll-to",{composed:!0,bubbles:!0,detail:{index:this._cursorIndex}}))}_mouseMove(e){const y=e.y-this._rect.top;this.$.cursor.style.display="block",this.$.cursor.style.top=y+"px",this._cursorIndex=Math.round(this._count*y/this._rect.height),this._cursorLabel=this._label(e.model.key)}_mouseOut(){this.$.cursor.style.display="none"}_color(visible){return visible?"black":"transparent"}}customElements.define(AggregationNavigation.is,AggregationNavigation),Nuxeo.AggregationNavigation=AggregationNavigation}},734:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(11);var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(4),_nuxeo_i18n_behavior__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(8);{class DocumentThumbnail extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__.b)([_nuxeo_i18n_behavior__WEBPACK_IMPORTED_MODULE_3__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__.a` + + + [[_title(document)]] + `}static get is(){return"nuxeo-document-thumbnail"}static get properties(){return{document:Object}}_thumbnail(doc){if(doc&&doc.uid&&doc.contextParameters&&doc.contextParameters.thumbnail&&doc.contextParameters.thumbnail.url){if(!this.isFollowRedirectEnabled()){const splitter=doc.contextParameters.thumbnail.url.indexOf("?")>-1?"&":"?";doc.contextParameters.thumbnail.url=`${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`}return doc.contextParameters.thumbnail.url}return""}_error(){this.$.img.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}_title(doc){return doc&&doc.title?this.i18n("accessibility.thumbnail",doc.title):""}isFollowRedirectEnabled(){const followRedirect=Nuxeo&&Nuxeo.UI&&Nuxeo.UI.config&&Nuxeo.UI.config.url&&Nuxeo.UI.config.url.followRedirect;return!!followRedirect&&"true"===String(followRedirect).toLowerCase()}}customElements.define(DocumentThumbnail.is,DocumentThumbnail),Nuxeo.DocumentThumbnail=DocumentThumbnail}},735:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_3__=(__webpack_require__(11),__webpack_require__(82)),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(90),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(8);__webpack_require__(68);{class Date extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_1__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_5__.a,_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_4__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + [[formatDate(datetime, format, timezone)]] + + [[formatDateTime(datetime, tooltipFormat, timezone)]] + + `}static get is(){return"nuxeo-date"}static get properties(){return{datetime:{type:String},format:String,tooltipFormat:String,timezone:{type:String,value:()=>_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_3__.a.get("timezone")}}}_producesSameDateFormat(datetime,format,tooltipFormat,timezone){return this.formatDate(datetime,format,timezone)===this.formatDateTime(datetime,tooltipFormat,timezone)}}customElements.define(Date.is,Date),Nuxeo.Date=Date}},736:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0);__webpack_require__(40),__webpack_require__(11),__webpack_require__(147),__webpack_require__(78);{class UserAvatar extends Nuxeo.Element{static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + + + + + `}static get is(){return"nuxeo-user-avatar"}static get properties(){return{user:{type:Object},fetchAvatar:{type:Boolean,value:!1},height:{type:Number,value:48,observer:"__obsHeight"},width:{type:Number,value:48,observer:"__obsWidth"},textColor:{type:String,value:"#FFFFFF",observer:"__obsTextColor"},fontSize:{type:Number,value:20,observer:"__obsFontSize"},fontWeight:{type:Number,value:400,observer:"__obsFontWeight"},borderRadius:{type:Number,value:0,observer:"__obsBorderRadius"},boxShadow:{type:String,value:"0px 0px 0px 0px rgba(33,33,33,0.75)",observer:"__obsBoxShadow"},textShadow:{type:String,value:"0px 0px 0px rgba(33,33,33,0.75)",observer:"__obsTextShadow"},_output:{type:String}}}static get observers(){return["__makeAvatar(user)"]}_username(user){return this._isEntity(user)?user.properties.username||user.properties["user:username"]:this._id(user)}_isEntity(user){return user&&user["entity-type"]&&("user"===user["entity-type"]||"document"===user["entity-type"]&&"user"===user.type)&&user.properties}_id(user){if(user){return user.id||user.uid||user.replace("user:","")}}_name(user){if(this._isEntity(user)){return[user.properties.firstName||user.properties["user:firstName"],user.properties.lastName||user.properties["user:lastName"]].join(" ").trim()||this._id(user)}return this._id(user)}_email(user){if(this._isEntity(user)){const email=user.properties.email||user.properties["user:email"];return email!==this._id(user)?email:""}return""}__obsHeight(){this.$.container.style.height=this.height+"px"}__obsWidth(){this.$.container.style.width=this.width+"px"}__obsTextColor(){this.$.character.style.color=this.textColor}__obsFontSize(){this.$.character.style.fontSize=this.fontSize+"px"}__obsFontWeight(){this.$.character.style.fontWeight=this.fontWeight}__obsBorderRadius(){""!==this.borderRadius&&null!=this.borderRadius||(this.borderRadius=0),this.$.container.style.borderRadius=this.borderRadius+"%"}__obsBoxShadow(){this.$.container.style.webkitBoxShadow=this.boxShadow,this.$.container.style.mozBoxShadow=this.boxShadow,this.$.container.style.boxShadow=this.boxShadow}__obsTextShadow(){this.$.character.style.webkitTextShadow=this.textShadow,this.$.character.style.mozTextShadow=this.textShadow,this.$.character.style.textShadow=this.textShadow}__generateHue(){let hash=0;const userId=this._id(this.user);return Object.keys(userId).forEach(user=>{hash&=hash,hash=userId.charCodeAt(user)+((hash<<5)-hash)}),Math.abs(hash%360)}__makeAvatar(){if(this.user)if(this.user.contextParameters&&this.user.contextParameters.userprofile&&this.user.contextParameters.userprofile.avatar)this._output="",this.$.container.style.background=`url(${this.user.contextParameters.userprofile.avatar.data})`,this.$.container.style.backgroundRepeat="no-repeat",this.$.container.style.backgroundSize=`${this.height}px ${this.height}px`;else{const name=this._name(this.user),alphabetPosition=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"].indexOf(name.charAt(0).toLowerCase());if(this.$.container.style.backgroundColor=`hsl(${this.__generateHue()}, 70%, 42%)`,this._isInTheAlphabet=alphabetPosition>-1,this._isInTheAlphabet){let tempName="";const splitName=name.split(" ");for(let i=0;i{res.contextParameters&&res.contextParameters.userprofile&&res.contextParameters.userprofile.avatar&&(this.user=res)}).catch(()=>{console.warn("Cannot fetch profile for user "+this._username(this.user))}))}}}customElements.define(UserAvatar.is,UserAvatar),Nuxeo.UserAvatar=UserAvatar}},738:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(71),__webpack_require__(40),__webpack_require__(121),__webpack_require__(62),__webpack_require__(1314),__webpack_require__(410),__webpack_require__(406),__webpack_require__(408),__webpack_require__(44),__webpack_require__(208),__webpack_require__(11),__webpack_require__(147);var _nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(89),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_17__=(__webpack_require__(132),__webpack_require__(68),__webpack_require__(740),__webpack_require__(741),__webpack_require__(4)),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(0),_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(45),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(90);__webpack_require__(84);{class DocumentComment extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_17__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_12__.a,_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_20__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_18__.a` + + + + + + +

[[i18n('comments.deletion.dialog.heading')]]

+
[[_computeConfirmationLabel(comment.numberOfReplies)]]
+
+ [[i18n('comments.deletion.dialog.buttons.cancel')]] + [[i18n('comments.deletion.dialog.buttons.delete')]] +
+
+ + + + + `}static get is(){return"nuxeo-document-comment"}static get properties(){return{comment:{type:Object},level:{type:Number,value:1},truncated:{type:Boolean,computed:"_computeTruncatedFlag(comment.showFull, comment.text, maxChars)"},maxChars:{type:Number,readOnly:!0,value:256},editing:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1}}}connectedCallback(){super.connectedCallback(),this.addEventListener("number-of-replies",this._handleRepliesChange),this.text=this.comment&&this.comment.text}disconnectedCallback(){this.removeEventListener("number-of-replies",this._handleRepliesChange),super.disconnectedCallback()}_checkForEnter(e){13===e.keyCode&&e.ctrlKey&&!this._isBlank(this.comment.text)&&this._submitComment()}_clearInput(){this._setEditing(!1),this.text=this.comment.text}_deleteComment(){this.$.commentRequest.data={},this.$.commentRequest.remove().then(()=>{this.dispatchEvent(new CustomEvent("delete-comment",{composed:!0,bubbles:!0,detail:{commentId:this.comment.id}}))}).catch(error=>{if(404!==error.status)throw this.notify({message:this._computeTextLabel(this.level,"deletion.error")}),error;this.notify({message:this._computeTextLabel(this.level,"notFound")})})}_submitOnEnter(event){"Enter"===event.key&&this._submitComment()}_cancelOnEnter(event){"Enter"===event.key&&this._clearInput()}_editComment(){this._setEditing(!0),this.set("comment.text",this.$$("#view-comment").innerHTML),this.text=this.get("comment.text"),Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_19__.a)(this,(function(){this.$$("#inputContainer").focus()}))}_expand(){this.set("comment.expanded",!0)}_handleRepliesChange(event){const numberOfReplies=event.detail.total;0===numberOfReplies&&this.set("comment.expanded",!1),this.set("comment.numberOfReplies",numberOfReplies),event.stopPropagation()}_reply(){this.comment.expanded||this._expand(),Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_19__.a)(this,(function(){this.$$("#thread").focusInput()}))}_showFullComment(){this.set("comment.showFull",!0)}_submitComment(e){e&&e.preventDefault(),this.$.commentRequest.data={"entity-type":"comment",parentId:this.comment.parentId,text:this.$$("#inputContainer").value.trim()},this.$.commentRequest.put().then(response=>{this.dispatchEvent(new CustomEvent("edit-comment",{composed:!0,bubbles:!0,detail:{commentId:this.comment.id,modificationDate:response.modificationDate,text:response.text}})),this.text=response.text,this.set("comment.modificationDate",response.modificationDate),this.set("comment.text",response.text),this._clearInput()}).catch(error=>{if(404!==error.status)throw this.notify({message:this._computeTextLabel(this.level,"edition.error")}),error;this.notify({message:this._computeTextLabel(this.level,"notFound")})})}_toggleDeletionConfirmation(){this.$.dialog.toggle()}_computeAvatarDimensions(level){return this._isRootElement(level)?24:20}_computeAvatarFontSize(level){return this._isRootElement(level)?13:11}_computeConfirmationLabel(replies){return this.i18n("comments.deletion.dialog.message."+(replies>0?"withReplies":"withoutReplies"))}_computeDateLabel(item,option){if(item){let date=this.formatDate(item.creationDate,"relative");return"lastReplyDate"===option?(date=this.formatDate(item.lastReplyDate,"relative"),this.i18n("comments.lastReply",date)):item.modificationDate?this.i18n("comments.edited",date):date}}_computeMaxRows(){const lineHeight=parseFloat(this.getComputedStyleValue("--nuxeo-comment-line-height")),maxHeight=parseFloat(this.getComputedStyleValue("--nuxeo-comment-max-height"));return Math.round((Number.isNaN(maxHeight)?80:maxHeight)/(Number.isNaN(lineHeight)?20:lineHeight))}_computeSubLevel(level){return level+1}_computeTextLabel(level,option,placeholder){return 1===level?this.i18n(`comments.${option}.comment`,placeholder):this.i18n(`comments.${option}.reply`,placeholder)}_computeTextToDisplay(text,maxChars,truncated){let parsedText=text;return truncated&&(parsedText=text.substring(0,maxChars-1)+"…"),parsedText}_computeTruncatedFlag(showFull,text,limit){return!showFull&&"string"==typeof text&&text.length>limit}_areExtendedOptionsAvailable(author,currentUser){return currentUser&&(currentUser.properties&¤tUser.properties.username===author||currentUser.isAdministrator)}_isBlank(text){return!text||"string"!=typeof text||0===text.trim().length}_isRootElement(level){return 1===level}_isSummaryVisible(expanded,total){return!expanded&&total>0}}customElements.define(DocumentComment.is,DocumentComment)}},740:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(40),__webpack_require__(410),__webpack_require__(44),__webpack_require__(88),__webpack_require__(11),__webpack_require__(147);var _nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(89),_polymer_polymer_lib_legacy_class__WEBPACK_IMPORTED_MODULE_10__=(__webpack_require__(68),__webpack_require__(738),__webpack_require__(741),__webpack_require__(4)),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(0),_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(90);{class DocumentCommentThread extends(Object(_polymer_polymer_lib_legacy_class__WEBPACK_IMPORTED_MODULE_10__.b)([_nuxeo_nuxeo_elements_nuxeo_notify_behavior_js__WEBPACK_IMPORTED_MODULE_6__.a,_nuxeo_format_behavior_js__WEBPACK_IMPORTED_MODULE_12__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_11__.a` + + + + + + + + + + + + + + + `}static get is(){return"nuxeo-document-comment-thread"}static get properties(){return{uid:{type:String,observer:"_refresh"},comments:{type:Array,value:()=>[]},level:{type:Number,value:1},pageSize:{type:Number,readOnly:!0,value:10},allCommentsLoaded:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},total:{type:Number,readOnly:!0,value:0}}}connectedCallback(){super.connectedCallback(),this.addEventListener("delete-comment",this._handleDeleteEvent),this.addEventListener("edit-comment",this._handleEditEvent),this.addEventListener("comments-changed",this._handleCommentsChange)}disconnectedCallback(){this.removeEventListener("delete-comment",this._handleDeleteEvent),this.removeEventListener("edit-comment",this._handleEditEvent),this.removeEventListener("comments-changed",this._handleCommentsChange),super.disconnectedCallback()}focusInput(){this.$$("#inputContainer").focus()}_checkForEnter(e){13===e.keyCode&&e.ctrlKey&&!this._isBlank(this.text)&&this._submitComment()}_clearInput(){this.text=""}_clearRequest(){this.$.commentRequest.data={},this.$.commentRequest.headers={},this.$.commentRequest.params={}}_fetchComments(loadAll){this._clearRequest(),this.$.commentRequest.params={pageSize:loadAll?0:this.pageSize,currentPageIndex:0},this.$.commentRequest.headers={"fetch-comment":"repliesSummary"},this.$.commentRequest.get().then(response=>{const olderComment=this.comments.length>0?this.comments[0]:null,newComments=response.entries;for(;newComments.length>0&&olderComment&&(newComments[0].creationDate>olderComment.creationDate||newComments[0].id===olderComment.id);)newComments.shift();response.entries.forEach(entry=>{this.unshift("comments",entry)}),this._setTotal(response.totalSize),this._setAllCommentsLoaded(!!loadAll)}).catch(error=>{if(404!==error.status)throw this.notify({message:this._computeTextLabel(this.level,"fetch.error")}),error;this.notify({message:this._computeTextLabel(this.level,"notFound")})})}_getCommentIndexById(commentId){return this.comments.findIndex(entry=>entry.id===commentId)}_handleCommentsChange(event){"comments.length"===event.detail.path&&this.dispatchEvent(new CustomEvent("number-of-replies",{composed:!0,bubbles:!0,detail:{total:this.comments.length}}))}_handleDeleteEvent(event){const index=this._getCommentIndexById(event.detail.commentId);-1!==index&&(this.splice("comments",index,1),this._setTotal(this.total-1)),event.stopPropagation()}_handleEditEvent(event){const index=this._getCommentIndexById(event.detail.commentId);-1!==index&&(this.set(`comments.${index}.modificationDate`,event.detail.modificationDate),this.set(`comments.${index}.text`,event.detail.text)),event.stopPropagation()}_loadMore(){this._fetchComments(!0)}_refresh(){this.set("comments",[]),this._fetchComments(this.allCommentsLoaded)}_submitComment(e){e&&e.preventDefault(),this._clearRequest(),this.$.commentRequest.data={"entity-type":"comment",parentId:this.uid,text:this.text.trim()},this.$.commentRequest.post().then(response=>{this._clearInput(),this.push("comments",response),this._setTotal(this.total+1)}).catch(error=>{if(404!==error.status)throw this.notify({message:this._computeTextLabel(this.level,"creation.error")}),error;this.notify({message:this._computeTextLabel(this.level,"notFound")})})}_computeMaxRows(){const lineHeight=parseFloat(this.getComputedStyleValue("--nuxeo-comment-line-height")),maxHeight=parseFloat(this.getComputedStyleValue("--nuxeo-comment-max-height"));return Math.round((Number.isNaN(maxHeight)?80:maxHeight)/(Number.isNaN(lineHeight)?20:lineHeight))}_computeTextLabel(level,option,placeholder){return 1===level?this.i18n(`comments.${option}.comment`,placeholder):this.i18n(`comments.${option}.reply`,placeholder)}_allowReplies(level){return level<=2}_isBlank(text){return!text||"string"!=typeof text||0===text.trim().length}_moreAvailable(length,total,allCommentsLoaded){return length + + +`;document.head.appendChild(template.content)},742:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(45),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(4),_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(65),_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_5__=(__webpack_require__(11),__webpack_require__(82)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(409),__webpack_require__(8)),_nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(133);function getAbsoluteUrl(relativeUrl){const publicPath=__webpack_require__.p;let url="";return(!publicPath||publicPath.indexOf("://")<0)&&(url+=window.location.protocol+"//"+window.location.host),url+=publicPath||"/",url+relativeUrl}{class SearchFormLayout extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_7__.a,_nuxeo_routing_behavior_js__WEBPACK_IMPORTED_MODULE_8__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_0__.a` + + `}static get is(){return"nuxeo-search-form-layout"}static get importMeta(){return{url:getAbsoluteUrl("/nuxeo-search-form-layout.js")}}static get properties(){return{provider:String,searchName:String,params:{type:Object,notify:!0},skipAggregates:{type:Boolean,notify:!0},aggregations:{type:Object,observer:"_aggregationsChanged"},model:{type:Object,value:()=>({})},hrefBase:{type:String,value:()=>_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_5__.a.get("layouts.search.hrefBase")}}}static get observers(){return["_paramsChanged(params.*)"]}get element(){return this.$.layout.element}_paramsChanged(){this.element&&(this.element.params=this.params)}_aggregationsChanged(){this.element&&(this.element.aggregations=this.aggregations)}_formHref(provider,searchName,hrefBase){if(null==provider)return"";const name=(searchName||provider).toLowerCase();return`${hrefBase||Object(_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_3__.a)(this.__dataHost.importPath||this.importPath)}${name}/${["nuxeo",name,"search-form"].join("-")}.html`}_formModel(){return{provider:this.provider,params:this.params,aggregations:this.aggregations}}_formChanged(e){Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_1__.a)(this,()=>{this.dispatchEvent(new CustomEvent("search-form-layout-changed",{composed:!0,bubbles:!0,detail:e.detail})),this.element.addEventListener("params-changed",evt=>{this.notifyPath(evt.detail.path||"params",evt.detail.value)}),this.skipAggregates=this.element.skipAggregates,this.element.addEventListener("skip-aggregates-changed",evt=>{this.notifyPath(evt.detail.path||"skipAggregates",evt.detail.value)})})}}customElements.define(SearchFormLayout.is,SearchFormLayout)}},743:function(module,__webpack_exports__,__webpack_require__){"use strict";var _polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(4),_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(65),_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_5__=(__webpack_require__(11),__webpack_require__(82)),_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_7__=(__webpack_require__(409),__webpack_require__(45)),_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(8);function getAbsoluteUrl(relativeUrl){const publicPath=__webpack_require__.p;let url="";return(!publicPath||publicPath.indexOf("://")<0)&&(url+=window.location.protocol+"//"+window.location.host),url+=publicPath||"/",url+relativeUrl}{class SearchResultsLayout extends(Object(_polymer_polymer_lib_legacy_class_js__WEBPACK_IMPORTED_MODULE_2__.b)([_nuxeo_i18n_behavior_js__WEBPACK_IMPORTED_MODULE_8__.a],Nuxeo.Element)){static get template(){return _polymer_polymer_lib_utils_html_tag_js__WEBPACK_IMPORTED_MODULE_1__.a` + + `}static get is(){return"nuxeo-search-results-layout"}static get importMeta(){return{url:getAbsoluteUrl("/nuxeo-search-results-layout.js")}}static get properties(){return{searchName:String,nxProvider:HTMLElement,model:{type:Object,value:()=>({})},results:{type:Object,notify:!0},hrefBase:{type:String,value:()=>_nuxeo_nuxeo_elements__WEBPACK_IMPORTED_MODULE_5__.a.get("layouts.search.hrefBase")}}}get element(){return this.$.results&&this.$.results.element}fetch(){if(!this.results)return Promise.resolve();this.results.fetch()}reset(){this.results&&this.results.reset()}_resultsHref(searchName,hrefBase){if(!searchName)return"";const name=searchName.toLowerCase();return`${hrefBase||Object(_polymer_polymer_lib_utils_resolve_url_js__WEBPACK_IMPORTED_MODULE_3__.a)(this.__dataHost.importPath||this.importPath)}${name}/${["nuxeo",name,"search-results"].join("-")}.html`}_resultsModel(){return{nxProvider:this.nxProvider,name:this.searchName}}_formChanged(e){Object(_polymer_polymer_lib_utils_render_status_js__WEBPACK_IMPORTED_MODULE_7__.a)(this,()=>{this.results=e.detail.value&&this._grabResults([e.detail.value])})}_grabResults(els){if(!Array.isArray(els)||0===els.length)return;let i,el;for(i=0;i + :host { + height: 100%; + display: flex; + align-items: center; + } + :host([hidden]) { + display: none; + } + /* ELEMENTS-1214: Align this element appearance with nuxeo-selectivity */ + paper-input { + --paper-input-container: { + font-size: inherit; + margin: 12px 2px 9px 2px; + margin-top: 3px; + } + + --paper-input-container-input: { + min-height: 2em; + padding: 0; + font-size: inherit; + font-weight: 600; + } + + --paper-input-container-color: { + color: var(--nuxeo-text-default, #3a3a54); + } + + --paper-input-container-label: { + font-size: inherit; + color: #999; + font-weight: 600; + padding: 0; + } + } + + + `}static get is(){return"nuxeo-data-table-column-filter"}static get properties(){return{label:String,value:{type:String,notify:!0},hidden:Boolean}}_valueChanged(e){const{value:value}=e.detail;this._debouncer=debounce.a.debounce(this._debouncer,utils_async.d.after(250),()=>{this.value=value})}}customElements.define(DataTableColumnFilter.is,DataTableColumnFilter),Nuxeo.DataTableColumnFilter=DataTableColumnFilter}{class DataTableColumn extends Nuxeo.Element{static get template(){return html_tag.a` + + `}static get is(){return"nuxeo-data-table-column"}static get properties(){return{alignRight:{type:Boolean,value:!1},name:{type:String,value:""},filterBy:String,filterValue:String,filterExpression:String,width:{type:String,value:"100px"},flex:{type:Number,value:1},hidden:{type:Boolean,value:!1},alwaysVisible:{type:Boolean,value:!1},order:{type:Number,notify:!0},sortBy:{type:String},field:{type:String},table:Object,headerTemplate:{type:Object,readOnly:!0},template:{type:Object,readOnly:!0},overflow:{type:String,value:"hidden"}}}static get observers(){return["_alignRightChanged(table, alignRight)","_filterValueChanged(table, filterValue, filterBy, filterExpression)","_filterByChanged(table, filterBy)","_flexChanged(table, flex)","_overflowChanged(table, overflow)","_headerTemplateChanged(table, headerTemplate)","_hiddenChanged(table, hidden)","_alwaysVisibleChanged(table, alwaysVisible)","_nameChanged(table, name)","_orderChanged(table, order)","_sortByChanged(table, sortBy)","_templateChanged(table, template)","_widthChanged(table, width)"]}ready(){super.ready(),this._setTemplate(Object(polymer_dom.a)(this).querySelector("template:not([is=header])"));const customHeader=Object(polymer_dom.a)(this).querySelector("template[is=header]");customHeader?this._setHeaderTemplate(customHeader):this._setHeaderTemplate(Object(polymer_dom.a)(this.root).querySelector("#header"))}_notifyTable(table,path,value){if(table&&table.columns){const index=table.columns.indexOf(this);table.notifyPath(`columns.${index}.${path}`,value)}}_alignRightChanged(table,alignRight){this._notifyTable(table,"alignRight",alignRight)}_nameChanged(table,name){this._notifyTable(table,"name",name)}_sortByChanged(table,sortBy){this._notifyTable(table,"sortBy",sortBy)}_flexChanged(table,flex){this._notifyTable(table,"flex",flex)}_overflowChanged(table,overflow){this._notifyTable(table,"overflow",overflow)}_headerTemplateChanged(table,headerTemplate){this._notifyTable(table,"headerTemplate",headerTemplate)}_hiddenChanged(table,hidden){this._notifyTable(table,"hidden",hidden)}_alwaysVisibleChanged(table,alwaysVisible){this._notifyTable(table,"alwaysVisible",alwaysVisible)}_orderChanged(table,order){this._notifyTable(table,"order",order)}_templateChanged(table,template){this._notifyTable(table,"template",template)}_widthChanged(table,width){this._notifyTable(table,"width",width)}_filterByChanged(table,filterBy){this._notifyTable(table,"filterBy",filterBy)}_filterValueChanged(table,filterValue,filterBy,filterExpression){table&&filterBy&&void 0!==filterValue&&(this._notifyTable(table,"filterValue",filterValue),this.dispatchEvent(new CustomEvent("column-filter-changed",{composed:!0,bubbles:!0,detail:{value:filterValue,filterBy:filterBy,filterExpression:filterExpression}})))}}customElements.define(DataTableColumn.is,DataTableColumn),Nuxeo.DataTableColumn=DataTableColumn}var nuxeo_i18n_behavior=__webpack_require__(8);{class DataTableColumnSort extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ + +
[[order]]
+
+ `}static get is(){return"nuxeo-data-table-column-sort"}static get properties(){return{direction:{type:String,notify:!0},path:String,order:{type:Number,computed:"_order(path, sortOrder, sortOrder.length)"},sortOrder:Array}}static get observers(){return["_sortOrderChanged(sortOrder.*)"]}_order(path,sortOrder,length){if(length<=1)return"";for(let i=0;i{sort.path===this.path&&(this.direction=sort.direction)})}_sort(){switch(this.direction){case"asc":this.direction="desc";break;case"desc":this.direction=null;break;default:this.direction="asc"}this.dispatchEvent(new CustomEvent("sort-direction-changed",{composed:!0,bubbles:!0,detail:{path:this.path,direction:this.direction}}))}_computeAriaLabel(){if(this.direction)return this.i18n("command.sort."+("desc"===this.direction?"descend":"ascend"))}}customElements.define(DataTableColumnSort.is,DataTableColumnSort),Nuxeo.DataTableColumnSort=DataTableColumnSort}__webpack_require__(5);var templatizer_behavior=__webpack_require__(108);window.saulis=window.saulis||{},saulis.DataTableTemplatizerBehaviorImpl={properties:{expanded:Boolean,index:Number,item:Object,selected:Boolean,table:Object,template:Object,_forwardedParentProps:{type:Object,value:{}},_instance:{type:Object,computed:"_templatize(template)"}},observers:["_expandedChanged(_instance, expanded)","_indexChanged(_instance, index)","_itemChanged(_instance, item)","_itemPathChanged(_instance, item.*)","_selectedChanged(_instance, selected)"],created(){this._instanceProps={column:!0,expanded:!0,index:!0,item:!0,selected:!0}},detached(){this.table=null,this._instance=null},_templatize(template){if(!template)return;delete template.__templatizeOwner,this.templatize(template),template._rootDataHost&&(this._getRootDataHost=function(){return template._rootDataHost});const instance=this.stamp({});return Object.keys(this._forwardedParentProps).forEach(key=>{instance[key]=this._forwardedParentProps[key]}),Object(polymer_dom.a)(this).insertBefore(instance.root,Object(polymer_dom.a)(this).firstElementChild),instance},_expandedChanged(instance,expanded){this._expanded=expanded,instance&&(instance.expanded=expanded)},_indexChanged(instance,index){instance&&(instance.index=index)},_itemChanged(instance,item){instance&&(instance.item=item)},_itemPathChanged(instance,item){this._parentProps=this._parentProps||{},instance&&instance.notifyPath(item.path,item.value)},_selectedChanged(instance,selected){this._selected=selected,instance&&(instance.selected=selected)},_forwardHostPropV2(prop,value){this._forwardedParentProps[prop]=value,this._instance&&(this._instance[prop]=value)},_notifyInstancePropV2(inst,prop,value){"expanded"===prop&&inst.item&&this._expanded!==value&&(value?this.table.expandItem(inst.item):this.table.collapseItem(inst.item)),"selected"===prop&&inst.item&&this._selected!==value&&(value?this.table.selectItem(inst.item):this.table.deselectItem(inst.item))},_forwardInstancePath(inst,path,value){0===path.indexOf("item")&&(this.table._debouncer=debounce.a.debounce(this.table._debouncer,utils_async.c,()=>{this.table.dispatchEvent(new CustomEvent("item-changed",{composed:!0,bubbles:!0,detail:{item:inst.item,path:path.substring(5),value:value}}))}))}},saulis.DataTableTemplatizerBehavior=[templatizer_behavior.a,saulis.DataTableTemplatizerBehaviorImpl];{class DataTableCell extends(Object(legacy_class.b)([saulis.DataTableTemplatizerBehavior],Nuxeo.Element)){static get template(){return html_tag.a` + + + `}static get is(){return"nuxeo-data-table-cell"}static get properties(){return{alignRight:Boolean,column:Object,flex:Number,header:Boolean,hidden:Boolean,order:Number,template:Object,width:String,overflow:String,beforeBind:{type:Object,value:()=>function(data,cell){}}}}static get observers(){return["_beforeBind(beforeBind, column.*, index, item.*, expanded, selected)","_beforeBindHeader(beforeBind, column.*)","_alignRightChanged(alignRight)","_columnChanged(_instance, column)","_columnPathChanged(_instance, column.*)","_flexChanged(flex)","_hiddenChanged(hidden)","_orderChanged(order)","_widthChanged(width)","_overflowChanged(overflow)"]}ready(){super.ready(),this.header?this.setAttribute("scope","col"):this.setAttribute("role","cell")}_alignRightChanged(alignRight){this.style.flexDirection=alignRight?"row-reverse":"row"}_beforeBind(beforeBind,column,index,item,expanded,selected){beforeBind({column:column.base,index:index,item:item.base,expanded:expanded,selected:selected},this)}_beforeBindHeader(beforeBind,column){if(this.header){beforeBind({column:column.base},this)}}_hiddenChanged(hidden){this.toggleAttribute("hidden",hidden)}_orderChanged(order){this.style.order=order}_flexChanged(flex){this.style.flexGrow=flex}_overflowChanged(overflow){this.style.overflowX="auto"===overflow?"auto":"hidden"}_widthChanged(width){this.style.flexBasis=width}_columnChanged(instance,column){instance&&(instance.column=column)}_columnPathChanged(instance,column){instance&&utils_async.c.run(()=>{this._parentProps=this._parentProps||{},instance.notifyPath(column.path,column.value)})}}customElements.define(DataTableCell.is,DataTableCell),Nuxeo.DataTableCell=DataTableCell}{class DataTableRow extends Nuxeo.Element{static get template(){return html_tag.a` + + +
+ + + +
+
+ +
+
+ +
+ `}static get is(){return"nuxeo-data-table-row"}static get properties(){return{beforeBind:Object,expanded:{type:Boolean,reflectToAttribute:!0},index:Number,item:Object,selected:{type:Boolean,reflectToAttribute:!0,value:!1},_static:{type:Object,value:{id:0}}}}static get observers(){return["_beforeBind(beforeBind, index, item.*, selected, expanded)"]}connectedCallback(){super.connectedCallback();const{host:host}=Object(polymer_dom.a)(this).getOwnerRoot();if(host&&host instanceof Nuxeo.DataTable){const id=this._static.id++,item=this.parentElement;item._rowId||(this._contentElement=document.createElement("slot"),this._contentElement.setAttribute("name","item"+id),Object(polymer_dom.a)(item).appendChild(this._contentElement),item._rowId=id,Object(polymer_dom.a)(host).appendChild(this),this.slot="item"+id,this._ownerShadyRoot=void 0)}this.setAttribute("tabindex",0),this.setAttribute("role","row")}_beforeBind(beforeBind,index,item,selected,expanded){if(!beforeBind)return;beforeBind({index:index,item:item.base,expanded:expanded,selected:selected},this)}}customElements.define(DataTableRow.is,DataTableRow),Nuxeo.DataTableRow=DataTableRow}{class DataTableRowDetail extends(Object(legacy_class.b)([saulis.DataTableTemplatizerBehavior],Nuxeo.Element)){static get is(){return"nuxeo-data-table-row-detail"}static get properties(){return{beforeBind:Object}}static get observers(){return["_beforeBind(beforeBind, item.*, index, selected, expanded)"]}static get template(){return html_tag.a` + + + `}_beforeBind(beforeBind,item,index,selected,expanded){beforeBind({index:index,item:item.base,expanded:expanded,selected:selected},this)}}customElements.define(DataTableRowDetail.is,DataTableRowDetail),Nuxeo.DataTableRowDetail=DataTableRowDetail}__webpack_require__(732);{class DataTableCheckbox extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + `}static get is(){return"nuxeo-data-table-checkbox"}static get properties(){return{checked:{type:Boolean,reflectToAttribute:!0,value:!1},disabled:{type:Boolean,reflectToAttribute:!0,value:!1}}}ready(){super.ready(),this.header?this.setAttribute("role","cell"):this.setAttribute("scope","col")}}customElements.define(DataTableCheckbox.is,DataTableCheckbox),Nuxeo.DataTableCheckbox=DataTableCheckbox}__webpack_require__(208),__webpack_require__(84);{class DataTableSettings extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + +

[[i18n('tableSettings.columnSettings')]]

+ +
+
+
+ + + +
+
+
+
+
+
+
+ [[i18n('tableSettings.columnSettings.reset')]] +
+ [[i18n('tableSettings.columnSettings.done')]] +
+
+ + + + `}static get is(){return"nuxeo-data-table-settings"}static get properties(){return{columns:{type:Array,notify:!0}}}static get observers(){return["_columnDisplayChanged(columns.*)"]}toggleColsSettingsPopup(){this.$$("#columnsSettingsPopup").toggle()}_columnDisplayChanged(change){change.path.endsWith("hidden")&&this.dispatchEvent(new CustomEvent("settings-changed",{composed:!0,bubbles:!0}))}_resetSettings(){this.columns.forEach((column,idx)=>{this.set(`columns.${idx}.hidden`,column.hiddenBack)})}_onSettingsClosed(){this.columns.every(column=>column.hidden)&&this._resetSettings()}canChangeVisibility(column){return!column.alwaysVisible}}customElements.define(DataTableSettings.is,DataTableSettings),Nuxeo.DataTableSettings=DataTableSettings}const default_styles_template=html_tag.a` + + + +`;document.head.appendChild(default_styles_template.content);__webpack_require__(182);const data_table_icons_template=html_tag.a` + + + + + + + +`;document.head.appendChild(data_table_icons_template.content);__webpack_require__(68);{class DataTableRowActions extends(Object(legacy_class.b)([saulis.DataTableTemplatizerBehavior,nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ + + + + + +
+ `}static get is(){return"nuxeo-data-table-row-actions"}static get properties(){return{beforeBind:Object,size:Number,editable:Boolean,orderable:Boolean}}static get observers(){return["_beforeBind(beforeBind, item.*, index, size)"]}_beforeBind(beforeBind,item,index,size){if(!beforeBind)return;beforeBind({index:index,item:item.base,size:size},this)}_editEntry(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("edit-entry",{composed:!0,bubbles:!0,detail:{item:this.item,index:this.index}}))}_deleteEntry(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("delete-entry",{composed:!0,bubbles:!0,detail:{item:this.item,index:this.index}}))}moveUp(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("move-upward",{composed:!0,bubbles:!0,detail:{item:this.item,index:this.index}}))}moveDown(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("move-downward",{composed:!0,bubbles:!0,detail:{item:this.item,index:this.index}}))}isUpVisible(index){return this.orderable&&index>0}isDownVisible(index){return this.orderable&&index + #container { + margin: 24px; + } + + + +
+ +
+ `}static get is(){return"nuxeo-data-table-form"}static get properties(){return{item:{type:Object,notify:!0,observer:"_itemChanged"},slot:{value:"form",type:String,reflectToAttribute:!0,readonly:!0},index:Number}}ready(){super.ready();const template=this.queryEffectiveChildren("template");this._instanceProps={item:!0},this.templatize(template),this.instance=this.stamp({item:this.item}),this.instance.dispatchEvent=function(){},Object(polymer_dom.a)(this.$.container).appendChild(this.instance.root)}validateItem(){return this.$.editForm.validate()}_itemChanged(){this.instance&&(this.instance.item=this.item,this.instance.i18n=this.i18n)}_notifyInstancePropV2(inst,prop,value){this.notifyPath(prop,value)}}customElements.define(DataTableForm.is,DataTableForm),Nuxeo.DataTableForm=DataTableForm}var nuxeo_page_provider_display_behavior=__webpack_require__(164),nuxeo_draggable_list_behavior=__webpack_require__(216);{class DataTable extends(Object(legacy_class.b)([iron_resizable_behavior.a,iron_form_element_behavior.a,iron_validatable_behavior.a,nuxeo_page_provider_display_behavior.a,nuxeo_draggable_list_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + +

[[i18n('command.add')]]

+ + + +
+ [[i18n('command.cancel')]] + [[i18n('command.ok')]] +
+
+ `}static get is(){return"nuxeo-data-table"}static get properties(){return{beforeCellBind:Object,beforeDetailsBind:Object,beforeRowBind:Object,detailsEnabled:{type:Boolean,value:!1},columns:{type:Array,notify:!0,value:()=>[],observer:"_columnsChanged"},_expandedItems:{type:Array,value:()=>[]},_this:{type:Object,value(){return this}},label:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},settingsEnabled:{type:Boolean,reflectToAttribute:!0,value:!1},multiSelection:{type:Boolean,value:!0},editable:{type:Boolean,value:!1},orderable:{type:Boolean,value:!1},paginable:{type:Boolean,value:!1}}}_isChecked(selectAllActive,_excludedItems){return selectAllActive&&0===_excludedItems.length}static get observers(){return["_alignHeaderRow(items.length)"]}constructor(){super(),this.handlesSorting=!0,this.handlesSelectAll=!0,this._observer=Object(polymer_dom.a)(this).observeNodes(info=>{const hasColumns=function(node){return node.nodeType===Node.ELEMENT_NODE&&node instanceof Nuxeo.DataTableColumn};if((info.addedNodes.filter(hasColumns).length>0||info.removedNodes.filter(hasColumns).length>0)&&(this.set("columns",this.$.columns.assignedNodes().filter(hasColumns)),this._backupColumnsState(),this.notifyResize()),info.addedNodes.filter((function(node){return node.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===node.tagName&&node.hasAttribute("is")&&"row-detail"===node.getAttribute("is")})).length>0){this.set("rowDetail",this.getContentChildren('[select="template[is=row-detail]"]')[0]);const parent=Object(polymer_dom.a)(this.rowDetail).parentNode;this.rowDetail._rootDataHost=parent.dataHost?parent.dataHost._rootDataHost||parent.dataHost:parent}})}ready(){super.ready(),this.addEventListener("iron-resize",this._resizeCellContainers),this.addEventListener("item-changed",this._itemChanged),this.addEventListener("scroll",this._onHorizontalScroll),this.addEventListener("edit-entry",this._editEntry),this.addEventListener("delete-entry",this._deleteEntry),this.addEventListener("move-upward",this._moveItemUpward),this.addEventListener("move-downward",this._moveItemDownward),this.$.list._selectionHandler=function(e){const model=this.modelForElement(e.target);model&&this.toggleSelectionForItem(model[this.as])};this.shadowRoot.querySelector("#form").addEventListener("slotchange",()=>{this.getContentChildren("#form")[0].disabled=!0}),this.setAttribute("role","table"),this.setAttribute("aria-multiselectable",this.multiSelection)}_computeActionsStyle(){return this.editable&&this.orderable?"flex: 0 0 172px;":this.editable||this.orderable?"flex: 0 0 92px;":"display: none;"}_computeSelectAllVisibility(){return this.selectionEnabled?this.selectAllEnabled&&this.multiSelection?"":"visibility: hidden;":"display: none;"}_alignHeaderRow(){Object(render_status.a)(this,()=>{this.$.list.scrollHeight>=this.$.list.clientHeight?this.$.header.style.paddingRight=this.$.list.offsetWidth-this.$.list.clientWidth+"px":this.$.header.style.paddingRight="0"})}_itemChanged(e){if(this.items){let{index:index}=e.target;if(void 0===index&&(index=this.items.indexOf(e.detail.item)),index>=0){let path="items."+index;e.detail.path&&(path+="."+e.detail.path),this.set(path,e.detail.value)}}}_backupColumnsState(){this.columns.forEach(col=>{col.hiddenBack=col.hidden})}_bind(item,index){return void 0!==index?{item:item,index:index}:{column:item}}_isEven(index){return index%2==0}_columnsChanged(columns,oldColumns){oldColumns&&oldColumns.forEach(column=>{this.unlisten(column,"filter-value-changed")}),columns&&columns.forEach(column=>{column.table=this,this.listen(column,"filter-value-changed","_onColumnFilterChanged")})}_resizeCellContainers(){this.$.container.style.width="",utils_async.c.run(()=>{this.$.container.style.width=Math.min(this.scrollWidth,this.clientWidth+this.scrollLeft)+"px",this.$.header.style.paddingRight=this.$.list.offsetWidth-this.$.list.clientWidth+"px"})}_onHorizontalScroll(){this.isDebouncerActive("scrolling")||(this.$.container.style.width=this.scrollWidth+"px",this._debouncer=debounce.a.debounce(this._debouncer,utils_async.d.after(1e3),()=>{this.$.container.style.width=Math.min(this.scrollWidth,this.clientWidth+this.scrollLeft)+"px"}))}_updateSizeForItem(event){if(event.model.get("item")){const itemSet=[];for(let i=0;i-1}_isFocusable(target){return target.contains(Object(polymer_dom.a)(document.activeElement).node)||target instanceof Nuxeo.DataTableCheckbox||"A"===target.tagName}_onRowClick(ev){if(!this._isFocusable(Object(polymer_dom.a)(ev).localTarget)){const fireEvent=function(eventName,item,defaultAction){const e=new CustomEvent(eventName,{cancelable:!0,composed:!0,bubbles:!0,detail:{item:item}});this.dispatchEvent(e),e.defaultPrevented||defaultAction.call(this,item)}.bind(this);this.rowDetail&&this.detailsEnabled?this._isExpanded(ev.model.item,this._expandedItems)?fireEvent("collapsing-item",ev.model.item,this.collapseItem):fireEvent("expanding-item",ev.model.item,this.expandItem):this.dispatchEvent(new CustomEvent("row-clicked",{composed:!0,bubbles:!0,detail:{item:ev.model.item,index:ev.model.index}}))}}get settings(){const tableSettings={columns:{}};return this.columns&&this.columns.forEach((column,idx)=>{tableSettings.columns[column.field?column.field:"col-"+idx]={hidden:column.hidden}}),tableSettings}set settings(settings){settings&&this.columns&&settings.columns&&this.columns.forEach((function(column,idx){const columnField=settings.columns[column.field?column.field:"col-"+idx];this.set(`columns.${idx}.hidden`,!!columnField&&columnField.hidden)}),this)}_onCheckBoxTap(e){if(this.selectionEnabled){this.selectOnTap&&this.$.list.toggleSelectionForIndex(e.model.index);(e.target||e.srcElement).dispatchEvent(new CustomEvent("selected",{composed:!0,bubbles:!0,detail:{index:e.model.index,shiftKey:e.shiftKey}})),this._updateFlags()}}_onCheckBoxKeydown(e){if(13===e.keyCode||32===e.keyCode){(e.target||e.srcElement).click(),this._onCheckBoxTap(e)}}_editEntry(e){e.stopPropagation(),this._toggleEditDialog(e.detail.index)}_validateEntry(){const dtform=this.getContentChildren("#form")[0];if(dtform.validateItem()){const item=this._deepCopy(dtform.item);dtform.index>-1?this.set("items."+dtform.index,item):this.push("items",item),this.__renderDebouncer=debounce.a.debounce(this.__renderDebouncer,utils_async.d.after(10),()=>{this.notifyResize(),this.$.dialog.close()})}}_deepCopy(obj){let cache=[];const result=JSON.parse(JSON.stringify(obj,(key,value)=>{if("object"==typeof value&&null!==value){if(-1!==cache.indexOf(value))return;cache.push(value)}return value}));return cache=null,result}_toggleEditDialog(itemIndex){const dtform=this.getContentChildren("#form")[0];void 0!==itemIndex?(dtform.index=itemIndex,dtform.item=this._deepCopy(this.items[itemIndex])):(dtform.index=-1,this.items.length>1&&"object"!=typeof this.items[0]||1===this.columns.length?dtform.item="":dtform.item={}),this.$.dialog.toggle()}_deleteEntry(e){e.stopPropagation(),this.splice("items",e.detail.index,1),this.notifyResize()}_createEntry(){this.items||(this.items=[]),this.notifyResize(),this._toggleEditDialog()}_moveItemUpward(e){if(e.stopPropagation(),e.detail.index>0){const item=this.items[e.detail.index];this.splice("items",e.detail.index,1),this.splice("items",e.detail.index-1,0,item),this.notifyResize()}}_moveItemDownward(e){if(e.stopPropagation(),this.items.length-1>e.detail.index){const item=this.items[e.detail.index];this.splice("items",e.detail.index,1),this.splice("items",e.detail.index+1,0,item),this.notifyResize()}}_patchOverlay(e){e.target.withBackdrop&&e.target.parentNode.insertBefore(e.target.backdropElement,e.target)}fetch(){if(this._hasPageProvider()){if(!this.paginable)return this._fetchRange(0,this.nxProvider.pageSize,!0);{const result=this._fetchPage(this.nxProvider.page,this.nxProvider.pageSize);if(result)return result.then(()=>{this.nxProvider.page+=1,this.$.scrollThreshold.clearTriggers(),this.$.list.notifyResize()});this.$.scrollThreshold.clearTriggers(),this.$.list.notifyResize()}}}_threshold(){this.paginable&&this.fetch()}_scroll(){this.paginable||this._scrollChanged()}_sort(e){this.paginable&&(this.nxProvider.page=1),this._sortDirectionChanged(e)}_getValidity(){return!this.required||this.items&&this.items.length>0}draggableFilter(el){const row=el.closest("nuxeo-data-table-row");return row&&row.selected}_formDialogOpenedChanged(e){const form=this.getContentChildren("#form")[0];form&&(form.disabled=!e.detail.value)}}customElements.define(DataTable.is,DataTable),Nuxeo.DataTable=DataTable}},749:function(module,__webpack_exports__,__webpack_require__){"use strict";var html_tag=__webpack_require__(0),legacy_class=(__webpack_require__(11),__webpack_require__(71),__webpack_require__(407),__webpack_require__(44),__webpack_require__(88),__webpack_require__(297),__webpack_require__(40),__webpack_require__(4)),nuxeo_i18n_behavior=__webpack_require__(8);const AggregationBehavior={properties:{data:{type:Object},value:{type:Array,value:[],notify:!0},buckets:{type:Object,computed:"_computeBuckets(data)"},_isEmpty:{type:Boolean,value:!0},sortByLabel:Boolean,labelFormatter:{type:Function,value(){return this._computeLabel.bind(this)}}},observers:["_observeData(data)"],_observeData(){this.data&&this.data.extendedBuckets?this._isEmpty=0===this.data.extendedBuckets.length:this._isEmpty=!0},_computeBuckets(data){if(data){const buckets=data.extendedBuckets,selectedBuckets=data.selection;return buckets.forEach(item=>{item.checked=selectedBuckets.indexOf(item.key)>=0,item.label=this.labelFormatter(item)}),this.sortByLabel&&buckets.sort((a,b)=>a.labelb.label?1:0),buckets}},_computeValues(){const values=[];this.buckets.forEach(item=>{item.checked&&values.push(item.key)}),this.value=values},_computeLabel(item){let i18nKey;if(item.fetchedKey){const entry=item.fetchedKey;return"directoryEntry"===entry["entity-type"]?this.labelForDirectoryEntry(entry):"user"===entry["entity-type"]?this.labelForUserEntry(entry):"document"===entry["entity-type"]?entry.properties["dc:title"]||this.i18n("aggregation.format.document.field.unknown","dc:title"):(i18nKey=this.i18n("label.ui.aggregate."+item.key),i18nKey==="label.ui.aggregate."+item.key?item.key:i18nKey)}return i18nKey=this.i18n("label.ui.aggregate."+item.key),i18nKey==="label.ui.aggregate."+item.key?item.key:i18nKey},labelForDirectoryEntry(entry){let lang=window.nuxeo.I18n.language||"en";lang.indexOf("-")>-1&&([lang]=lang.split("-"));const labels=[];for(;entry;)entry.properties["label_"+lang]?labels.push(entry.properties["label_"+lang]):entry.properties.label?labels.push(entry.properties.label):entry.properties.label_en?labels.push(entry.properties.label_en):labels.push(entry.properties.id),entry=entry.properties.parent;return labels.reverse().join("/")},labelForUserEntry:entry=>void 0===entry.properties?entry.id:entry.properties.firstName&&entry.properties.firstName.length>0&&entry.properties.lastName&&entry.properties.lastName.length>0?`${entry.properties.firstName} ${entry.properties.lastName}`:entry.properties.username};{class CheckboxAggregation extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a,AggregationBehavior],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + + + + + + `}static get is(){return"nuxeo-checkbox-aggregation"}static get properties(){return{collapsible:{type:Boolean,value:!1,reflectToAttribute:!0},label:{type:String,value:""},opened:{type:Boolean,value:!1,reflectToAttribute:!0},visibleItems:{type:Number,value:8},_showAll:{type:Boolean,value:!1,readOnly:!0},_visibleBuckets:{type:Array,computed:"_computeVisibleBuckets(buckets, visibleItems, _showAll)"}}}ready(){super.ready(),this.setAttribute("tabindex",0)}_computeVisibleBuckets(buckets,visibleItems,_showAll){return buckets&&0!==buckets.length?_showAll?buckets:buckets.slice(0,visibleItems):[]}_toggle(){this.opened=!this.opened}_toggleIcon(opened){return"hardware:keyboard-arrow-"+(opened?"up":"down")}_toggleShow(){this._set_showAll(!this._showAll)}_computeShowMoreLabel(){return this.i18n(this._showAll?"checkboxAggregation.showLess":"checkboxAggregation.showAll")}_hideShowMoreButton(){return this.buckets&&this.buckets.length<=this.visibleItems}}customElements.define("nuxeo-checkbox-aggregation",CheckboxAggregation)}},750:function(module,__webpack_exports__,__webpack_require__){"use strict";var html_tag=__webpack_require__(0),legacy_class=__webpack_require__(4),iron_form_element_behavior=(__webpack_require__(11),__webpack_require__(98),__webpack_require__(737),__webpack_require__(1548),__webpack_require__(88),__webpack_require__(5),__webpack_require__(72)),iron_validatable_behavior=__webpack_require__(50);const DirectoryWidgetBehavior=[__webpack_require__(8).a,iron_form_element_behavior.a,iron_validatable_behavior.a,{properties:{directoryName:{type:String},dbl10n:{type:Boolean,value:!1},label:String,canSelectParent:Boolean,readonly:{type:Boolean,value:!1},idFunction:{type:Function,value(){return this._idFunction.bind(this)}},errorMessage:String,format:{type:Function,value(){return this._formatter.bind(this)}},_entries:Array},observers:["_fetchEntries(directoryName)"],_fetchEntries(){this.directoryName&&this.async(()=>{this.$.op.params={directoryName:this.directoryName,dbl10n:this.dbl10n,canSelectParent:this.canSelectParent,localize:!0,lang:window.nuxeo.I18n.language?window.nuxeo.I18n.language.split("-")[0]:"en"},this.$.op.execute().then(resp=>{this._entries=[],resp.forEach(entry=>{this._populate(entry)}),this.dispatchEvent(new CustomEvent("directory-entries-loaded",{composed:!0,bubbles:!0}))})})},_formatter:entry=>entry.absoluteLabel||entry.displayLabel,_idFunction:item=>item.id||item.computedId||item.uid,_populate(entry){!this.canSelectParent&&entry.children||(entry.checked=this._isChecked(entry),this._entries.push(entry)),entry.children&&entry.children.forEach(child=>{this._populate(child)})}}];{class DirectoryRadioGroup extends(Object(legacy_class.b)([DirectoryWidgetBehavior],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + + + + + + + + + + `}static get is(){return"nuxeo-directory-radio-group"}static get properties(){return{selectedItem:{type:Object,notify:!0},value:{type:String,notify:!0,observer:"_updateSelected"},_selected:String}}_updateItem(e){e.detail&&e.detail.value&&(this.set("selectedItem",this._entries[e.detail.value.dataIndex]),this.set("value",this.idFunction(this.selectedItem)))}_updateSelected(){this.value&&this.value.length>0&&this.value!==this._selected&&(this._selected=this.value),this._entries&&this._entries.forEach(entry=>this._isChecked(entry))}_getValidity(){return!this.required||!!this.value}_isChecked(entry){const value=this.value?this.value:this.selectedItem;return!(!value||this.idFunction(value)!==this.idFunction(entry))&&(this._selected=this.idFunction(entry),!0)}}customElements.define(DirectoryRadioGroup.is,DirectoryRadioGroup),Nuxeo.DirectoryRadioGroup=DirectoryRadioGroup}},751:function(module,__webpack_exports__,__webpack_require__){"use strict";var html_tag=__webpack_require__(0),legacy_class=__webpack_require__(4),nuxeo_i18n_behavior=__webpack_require__(8),nuxeo_notify_behavior=(__webpack_require__(11),__webpack_require__(71),__webpack_require__(297),__webpack_require__(592),__webpack_require__(89));__webpack_require__(742),__webpack_require__(743);{class ResultsView extends(Object(legacy_class.b)([nuxeo_notify_behavior.a,nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + + + + + `}static get is(){return"nuxeo-results-view"}static get properties(){return{provider:{type:String},pageSize:{type:Number,value:40},params:{type:Object,observer:"_paramsChanged",value:{}},enrichers:{type:String,value:"thumbnail, permissions, highlight"},headers:{type:Object,value:{"fetch-document":"properties","translate-directoryEntry":"label"}},schemas:{type:String},loading:{type:Boolean,reflectToAttribute:!0,value:!1},searchName:String,aggregations:{type:Object,observer:"_aggregationsChanged",notify:!0},quickFilters:{type:Array,notify:!0},visible:{type:Boolean,value:!1},auto:{type:Boolean,value:!1},showFilters:{type:Boolean,value:!1},opened:{type:Boolean,value:!1},searchForm:{type:Object,value:null,observer:"_searchFormChanged"},skipAggregates:Boolean,hrefBase:String,_params:Object,_paramsCount:Number,_nxProvider:HTMLElement,_hideCounter:{type:String,computed:"_computeHideCounter(opened, _params.*)"}}}static get observers(){return["_visibilityOrAutoChanged(visible, auto)"]}ready(){super.ready(),this._nxProvider||(this._nxProvider=this.$.provider)}get form(){const form=this.$$("#form");return form&&form.element}get results(){return this.$$("#results")}toggleExpand(){this.$$("#collapse").toggle()}_visibilityOrAutoChanged(){this.visible&&this.auto&&this._search()}_expandIcon(opened){return"hardware:keyboard-arrow-"+(opened?"down":"right")}_countParams(params){return Object.keys(params).filter(p=>params[p]&&(!Array.isArray(params[p])||params[p].length>0)).length}_getFilterCount(){return this._params?this._countParams(this._params)-this._paramsCount-("highlight"in this._params?1:0):0}_computeHideCounter(opened){const count=this._getFilterCount();return opened||0===count?"hidden":""}_paramsChanged(){this.params?(this._params=JSON.parse("string"==typeof this.params?this.params:JSON.stringify(this.params)),this._paramsCount=this._countParams(this._params)):(this._params={},this._paramsCount=0)}_search(){this.results&&(this.results.reset(),this.results.fetch())}_aggregationsChanged(){this.form&&(this.form.aggregations=this.aggregations)}_onError(e){this.notify(e.detail.error),e.stopPropagation()}_clear(){this.form&&void 0!==this.form.clear&&"function"==typeof this.form.clear&&this.form.clear(),this._paramsChanged(),this.auto||(this.aggregations={}),!this.auto&&this.visible&&this._search()}_formChanged(e){this._clear();const form=e.detail.value;form.addEventListener("params-changed",evt=>{(evt.detail.path||"value"in evt.detail)&&(this.notifyPath(evt.detail.path?"_params."+evt.detail.path.split(".")[1]:"_params",evt.detail.value),this.visible&&this.auto&&this._search())}),this.skipAggregates=form.skipAggregates,form.addEventListener("skip-aggregates-changed",evt=>{this.notifyPath("skipAggregates",evt.detail.value)}),form.addEventListener("trigger-search",this._search.bind(this)),this._search()}_resultsChanged(e){const{results:results}=this;this.searchForm&&results&&(this.searchForm.results=results.results),this.dispatchEvent(new CustomEvent("results-changed",{composed:!0,bubbles:!0,detail:e.detail}))}_searchFormChanged(searchForm){if(searchForm){this._nxProvider=searchForm.nxProvider,this.provider=this._nxProvider.provider,this.searchName=searchForm.searchName;const{results:results}=this;results&&(searchForm.results=results.results)}}_navigateFromSearch(e){this.searchForm&&this.searchForm.displayQueue(e.detail.index)}}customElements.define(ResultsView.is,ResultsView)}__webpack_require__(132),__webpack_require__(121),__webpack_require__(62);{class DocumentPicker extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ +
+
+ +
+
+ + [[i18n('command.cancel')]] + + + [[i18n('command.select')]] + +
+
+ `}static get is(){return"nuxeo-document-picker"}static get properties(){return{enrichers:String,hrefBase:String,pageSize:Number,provider:String,schemas:String,searchName:String,_aggregations:{type:Object,readOnly:!0},_params:{type:Object,readOnly:!0},_quickFilters:{type:Object,readOnly:!0}}}disconnectedCallback(){super.disconnectedCallback(),this._listenedResults&&this._boundUpdateFn&&this._listenedResults.removeEventListener("selected-items-changed",this._boundUpdateFn)}open(){this.$.resultsView&&this.$.resultsView._clear(),this._updateSelectButton(),this.$.dialog.open()}close(){this.$.dialog.close()}get _selectedItems(){return this.$.resultsView&&this.$.resultsView.results&&this.$.resultsView.results.results&&this.$.resultsView.results.results.selectedItems}_updateSelectButton(){const selectedItems=this._selectedItems;this.$.selectButton.disabled=!(selectedItems&&selectedItems.length)}_onSelect(){const selectedItems=this._selectedItems;selectedItems&&(this.dispatchEvent(new CustomEvent("picked",{composed:!0,bubbles:!0,detail:{selectedItems:selectedItems}})),this.close())}_onNavigate(e){this.$.resultsView.results.results.selectItems([e.detail.item])}_onResultsChanged(e){e.detail.value&&(this._listenedResults&&this._boundUpdateFn&&this._listenedResults.removeEventListener("selected-items-changed",this._boundUpdateFn),this._listenedResults=e.detail.value,this._boundUpdateFn=this._updateSelectButton.bind(this),this._listenedResults.addEventListener("selected-items-changed",this._boundUpdateFn))}}customElements.define(DocumentPicker.is,DocumentPicker)}},752:function(module,__webpack_exports__,__webpack_require__){"use strict";var html_tag=__webpack_require__(0),legacy_class=__webpack_require__(4),iron_form_element_behavior=__webpack_require__(72),iron_validatable_behavior=__webpack_require__(50),nuxeo_selectivity=(__webpack_require__(11),__webpack_require__(1535),__webpack_require__(153)),nuxeo_i18n_behavior=(__webpack_require__(40),__webpack_require__(8));__webpack_require__(78),__webpack_require__(736);{class UserGroupFormatter extends(Object(legacy_class.b)([nuxeo_i18n_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + +
+ + + + + + + + +
+
[[entity.displayLabel]]
+
+ [[_computeInfo(entity)]] +
+
+
+ `}static get is(){return"nuxeo-user-group-formatter"}static get properties(){return{entity:{type:Object}}}_isUser(){return"USER_TYPE"===this.entity.type}_isGroup(){return"GROUP_TYPE"===this.entity.type}_computeInfo(){return this._isUser()?`${this.entity.email} - ${this.entity.id}`:`${this.i18n("label.group")} - ${this.entity.id}`}}customElements.define(UserGroupFormatter.is,UserGroupFormatter)}{class UserSuggestion extends(Object(legacy_class.b)([iron_form_element_behavior.a,iron_validatable_behavior.a],Nuxeo.Element)){static get template(){return html_tag.a` + + + + + `}static get is(){return"nuxeo-user-suggestion"}static get properties(){return{searchType:{type:String,value:"USER_GROUP_TYPE"},groupRestriction:{type:String},label:String,operation:{type:String,value:"UserGroup.Suggestion"},params:Object,value:{type:String,notify:!0},multiple:{type:Boolean,value:!1},stayOpenOnSelect:{type:Boolean,value:!1},readonly:{type:Boolean,value:!1},minChars:{type:Number,value:3},frequency:Number,placeholder:String,errorMessage:String,selectedItems:{type:Array,notify:!0},selectedItem:{type:Object,notify:!0},selectionFormatter:{type:Function,value(){return this._selectionFormatter.bind(this)}},resultFormatter:{type:Function,value(){return this._resultFormatter.bind(this)}},resolveEntry:{type:Function,value(){return this._resolveEntry.bind(this)}},prefixed:Boolean,idFunction:{type:Function,value(){return this._idFunction.bind(this)}},queryResultsFilter:Function}}_getValidity(){return this.$.s2._getValidity()}_computeParams(){return Object.assign({},{searchType:this.searchType,groupRestriction:this.groupRestriction},this.params)}_selectionFormatter(item){let content;return item&&(content="user"===item["entity-type"]&&item.properties&&item.properties.firstName&&item.properties.lastName?`${item.properties.firstName} ${item.properties.lastName}`:"group"===item["entity-type"]?item.grouplabel?item.grouplabel:item.groupname:item.displayLabel?item.displayLabel:item.id?item.id:item),`${Object(nuxeo_selectivity.a)(content)}`}_resultFormatter(item){return!item.type||"USER_TYPE"!==item.type&&"GROUP_TYPE"!==item.type?Object(nuxeo_selectivity.a)(item.displayLabel||item.title):``}_resolveEntry(item){return item&&item["entity-type"]?item:this.prefixed?{id:item,displayLabel:item,prefixed_id:item}:{id:item,displayLabel:item}}_idFunction(item){return this.prefixed?item.prefixed_id?item.prefixed_id:`${item["entity-type"]}:${item.id}`:item.id}}customElements.define(UserSuggestion.is,UserSuggestion),Nuxeo.UserSuggestion=UserSuggestion}},753:function(module){module.exports=JSON.parse('{"schema_version":"1.0.0","elements":[{"description":"An element for viewing images.\\n\\nExample:\\n\\n \\n ","summary":"","path":"viewers/nuxeo-image-viewer.js","properties":[{"name":"src","type":"string | null | undefined","description":"The URL of an image.","privacy":"public","sourceRange":{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"controls","type":"boolean | null | undefined","description":"If true, controls for the user to interact with are displayed.","privacy":"public","sourceRange":{"start":{"line":60,"column":8},"end":{"line":63,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"zoomOnWheel","type":"boolean | null | undefined","description":"If true, allows to zoom the image by wheeling mouse.","privacy":"public","sourceRange":{"start":{"line":68,"column":8},"end":{"line":71,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"responsive","type":"boolean | null | undefined","description":"If true, the element exhibits responsive resize behavior.","privacy":"public","sourceRange":{"start":{"line":76,"column":8},"end":{"line":79,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"alt","type":"string | null | undefined","description":"A short text alternative for the image.","privacy":"public","sourceRange":{"start":{"line":84,"column":8},"end":{"line":86,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"_fitToRealSize","type":"boolean | null | undefined","description":"If false, the element will show the image in order to fit the viewer.\\nIf true, the element will show the image in real size.","privacy":"protected","sourceRange":{"start":{"line":92,"column":8},"end":{"line":95,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"ready","description":"","privacy":"protected","sourceRange":{"start":{"line":197,"column":4},"end":{"line":200,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_init","description":"","privacy":"protected","sourceRange":{"start":{"line":202,"column":4},"end":{"line":223,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_click","description":"","privacy":"protected","sourceRange":{"start":{"line":225,"column":4},"end":{"line":249,"column":5}},"metadata":{},"params":[{"name":"event"}],"return":{"type":"void"}},{"name":"_computeFitAction","description":"","privacy":"protected","sourceRange":{"start":{"line":251,"column":4},"end":{"line":253,"column":5}},"metadata":{},"params":[{"name":"fitToRealSize"}]},{"name":"_getFitIcon","description":"","privacy":"protected","sourceRange":{"start":{"line":255,"column":4},"end":{"line":257,"column":5}},"metadata":{},"params":[{"name":"fitToRealSize"}]},{"name":"_getOriginalZoomRatio","description":"","privacy":"protected","sourceRange":{"start":{"line":259,"column":4},"end":{"line":264,"column":5}},"metadata":{},"params":[]},{"name":"_resize","description":"","privacy":"protected","sourceRange":{"start":{"line":266,"column":4},"end":{"line":272,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_verifyZoomRatio","description":"","privacy":"protected","sourceRange":{"start":{"line":274,"column":4},"end":{"line":282,"column":5}},"metadata":{},"params":[{"name":"data"}],"return":{"type":"void"}},{"name":"_isCanvasVisible","description":"","privacy":"protected","sourceRange":{"start":{"line":284,"column":4},"end":{"line":287,"column":5}},"metadata":{},"params":[]},{"name":"_isToolbarVisible","description":"","privacy":"protected","sourceRange":{"start":{"line":289,"column":4},"end":{"line":291,"column":5}},"metadata":{},"params":[{"name":"controls"},{"name":"src"},{"name":"el"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-image-viewer/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":43,"column":2},"end":{"line":292,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.ImageViewer","attributes":[{"name":"src","description":"The URL of an image.","sourceRange":{"start":{"line":53,"column":8},"end":{"line":55,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"controls","description":"If true, controls for the user to interact with are displayed.","sourceRange":{"start":{"line":60,"column":8},"end":{"line":63,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"zoom-on-wheel","description":"If true, allows to zoom the image by wheeling mouse.","sourceRange":{"start":{"line":68,"column":8},"end":{"line":71,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"responsive","description":"If true, the element exhibits responsive resize behavior.","sourceRange":{"start":{"line":76,"column":8},"end":{"line":79,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"alt","description":"A short text alternative for the image.","sourceRange":{"start":{"line":84,"column":8},"end":{"line":86,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-image-viewer","mixins":["Polymer.IronResizableBehavior"]},{"description":"An element for viewing PDF files.\\n\\nExample:\\n\\n \\n\\n### Styling\\n\\nThe following custom properties and mixins are available for styling:\\n\\nCustom property | Description | Default\\n----------------|-------------|----------\\n`--nuxeo-pdf-viewer-layout` | Mixin applied to the viewer | `{}`\\n`--nuxeo-pdf-viewer-iframe` | Mixin applied to the iframe enclosing pdfjs | `{}`","summary":"","path":"viewers/nuxeo-pdf-viewer.js","properties":[{"name":"src","type":"string | null | undefined","description":"The path to the pdf file to display.","privacy":"public","sourceRange":{"start":{"line":72,"column":8},"end":{"line":74,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}}],"methods":[{"name":"_path","description":"","privacy":"protected","sourceRange":{"start":{"line":82,"column":4},"end":{"line":87,"column":5}},"metadata":{},"params":[{"name":"file"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-pdf-viewer/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":41,"column":2},"end":{"line":88,"column":3}},"privacy":"public","superclass":"Nuxeo.Element","name":"Nuxeo.PDFViewer","attributes":[{"name":"src","description":"The path to the pdf file to display.","sourceRange":{"start":{"line":72,"column":8},"end":{"line":74,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-pdf-viewer"},{"description":"An element for viewing videos.\\n\\nExample:\\n\\n ","summary":"","path":"viewers/nuxeo-video-viewer.js","properties":[{"name":"preload","type":"string | null | undefined","description":"The `preload` attribute specifies if/how the video should be loaded.","privacy":"public","sourceRange":{"start":{"line":130,"column":8},"end":{"line":133,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"auto\\""},{"name":"controls","type":"boolean | null | undefined","description":"If true, controls for the user to interact with are displayed.","privacy":"public","sourceRange":{"start":{"line":138,"column":8},"end":{"line":141,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"poster","type":"string | null | undefined","description":"The `poster` attribute specifies an image shown while downloading.","privacy":"public","sourceRange":{"start":{"line":146,"column":8},"end":{"line":146,"column":22}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"sources","type":"Object | null | undefined","description":"The `sources` to be displayed.","privacy":"public","sourceRange":{"start":{"line":151,"column":8},"end":{"line":151,"column":23}},"metadata":{"polymer":{"attributeType":"Object"}}},{"name":"storyboard","type":"Array | null | undefined","description":"The storyboard (array of thumbnails) for video navigation. If null or empty, the storyboard is not shown.","privacy":"public","sourceRange":{"start":{"line":156,"column":8},"end":{"line":159,"column":9}},"metadata":{"polymer":{"attributeType":"Array"}},"defaultValue":"[]"}],"methods":[{"name":"play","description":"","privacy":"public","sourceRange":{"start":{"line":163,"column":4},"end":{"line":165,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"stop","description":"","privacy":"public","sourceRange":{"start":{"line":167,"column":4},"end":{"line":170,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"pause","description":"","privacy":"public","sourceRange":{"start":{"line":172,"column":4},"end":{"line":174,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"isPaused","description":"","privacy":"public","sourceRange":{"start":{"line":176,"column":4},"end":{"line":178,"column":5}},"metadata":{},"params":[]},{"name":"_hasStoryboard","description":"","privacy":"protected","sourceRange":{"start":{"line":180,"column":4},"end":{"line":188,"column":5}},"metadata":{},"params":[]},{"name":"_jumpTo","description":"","privacy":"protected","sourceRange":{"start":{"line":190,"column":4},"end":{"line":192,"column":5}},"metadata":{},"params":[{"name":"e"}],"return":{"type":"void"}},{"name":"_getThumbnailUrl","description":"","privacy":"protected","sourceRange":{"start":{"line":194,"column":4},"end":{"line":196,"column":5}},"metadata":{},"params":[{"name":"thumbnail"}]},{"name":"_getSourceUrl","description":"","privacy":"protected","sourceRange":{"start":{"line":198,"column":4},"end":{"line":200,"column":5}},"metadata":{},"params":[{"name":"source"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-video-viewer/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":34,"column":2},"end":{"line":201,"column":3}},"privacy":"public","superclass":"Nuxeo.Element","name":"Nuxeo.VideoViewer","attributes":[{"name":"preload","description":"The `preload` attribute specifies if/how the video should be loaded.","sourceRange":{"start":{"line":130,"column":8},"end":{"line":133,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"controls","description":"If true, controls for the user to interact with are displayed.","sourceRange":{"start":{"line":138,"column":8},"end":{"line":141,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"poster","description":"The `poster` attribute specifies an image shown while downloading.","sourceRange":{"start":{"line":146,"column":8},"end":{"line":146,"column":22}},"metadata":{},"type":"string | null | undefined"},{"name":"sources","description":"The `sources` to be displayed.","sourceRange":{"start":{"line":151,"column":8},"end":{"line":151,"column":23}},"metadata":{},"type":"Object | null | undefined"},{"name":"storyboard","description":"The storyboard (array of thumbnails) for video navigation. If null or empty, the storyboard is not shown.","sourceRange":{"start":{"line":156,"column":8},"end":{"line":159,"column":9}},"metadata":{},"type":"Array | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-video-viewer"},{"description":"An element for generic input in forms","summary":"","path":"widgets/nuxeo-input.js","properties":[{"name":"label","type":"string | null | undefined","description":"Label.","privacy":"public","sourceRange":{"start":{"line":103,"column":8},"end":{"line":103,"column":21}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"type","type":"string | null | undefined","description":"Type.","privacy":"public","sourceRange":{"start":{"line":108,"column":8},"end":{"line":108,"column":20}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"name","type":"string | null | undefined","description":"Name.","privacy":"public","sourceRange":{"start":{"line":113,"column":8},"end":{"line":113,"column":20}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"value","type":"string | null | undefined","description":"Value.","privacy":"public","sourceRange":{"start":{"line":118,"column":8},"end":{"line":121,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"placeholder","type":"string | null | undefined","description":"Placeholder.","privacy":"public","sourceRange":{"start":{"line":126,"column":8},"end":{"line":126,"column":27}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"errorMessage","type":"string | null | undefined","description":"Error message to show when `invalid` is true.","privacy":"public","sourceRange":{"start":{"line":131,"column":8},"end":{"line":131,"column":28}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"autofocus","type":"boolean | null | undefined","description":"Autofocus.","privacy":"public","sourceRange":{"start":{"line":136,"column":8},"end":{"line":140,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"readonly","type":"boolean | null | undefined","description":"Read only.","privacy":"public","sourceRange":{"start":{"line":145,"column":8},"end":{"line":149,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"disabled","type":"boolean | null | undefined","description":"Disabled.","privacy":"public","sourceRange":{"start":{"line":154,"column":8},"end":{"line":158,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"required","type":"boolean | null | undefined","description":"Required.","privacy":"public","sourceRange":{"start":{"line":163,"column":8},"end":{"line":167,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"min","type":"string | null | undefined","description":"The minimum (numeric or date-time) input value.","privacy":"public","sourceRange":{"start":{"line":172,"column":8},"end":{"line":172,"column":19}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"max","type":"string | null | undefined","description":"The maximum (numeric or date-time) input value.","privacy":"public","sourceRange":{"start":{"line":177,"column":8},"end":{"line":177,"column":19}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"step","type":"number | null | undefined","description":"The increment value.","privacy":"public","sourceRange":{"start":{"line":182,"column":8},"end":{"line":182,"column":20}},"metadata":{"polymer":{"attributeType":"Number"}}},{"name":"minlength","type":"number | null | undefined","description":"The minimum length of the input value.","privacy":"public","sourceRange":{"start":{"line":187,"column":8},"end":{"line":187,"column":25}},"metadata":{"polymer":{"attributeType":"Number"}}},{"name":"maxlength","type":"number | null | undefined","description":"The maximum length of the input value.","privacy":"public","sourceRange":{"start":{"line":192,"column":8},"end":{"line":192,"column":25}},"metadata":{"polymer":{"attributeType":"Number"}}},{"name":"pattern","type":"string | null | undefined","description":"A pattern to validate.","privacy":"public","sourceRange":{"start":{"line":197,"column":8},"end":{"line":197,"column":23}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"validator","type":"string | null | undefined","description":"The name of the custom validator","privacy":"public","sourceRange":{"start":{"line":202,"column":8},"end":{"line":202,"column":25}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"autoValidate","type":"boolean | null | undefined","description":"Set to true to auto-validate the input value when it changes.","privacy":"public","sourceRange":{"start":{"line":207,"column":8},"end":{"line":210,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"focus","description":"","privacy":"public","sourceRange":{"start":{"line":214,"column":4},"end":{"line":216,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_getValidity","description":"Override method from Polymer.IronValidatableBehavior.","privacy":"protected","sourceRange":{"start":{"line":219,"column":4},"end":{"line":221,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-input/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":33,"column":2},"end":{"line":222,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.Input","attributes":[{"name":"label","description":"Label.","sourceRange":{"start":{"line":103,"column":8},"end":{"line":103,"column":21}},"metadata":{},"type":"string | null | undefined"},{"name":"type","description":"Type.","sourceRange":{"start":{"line":108,"column":8},"end":{"line":108,"column":20}},"metadata":{},"type":"string | null | undefined"},{"name":"name","description":"Name.","sourceRange":{"start":{"line":113,"column":8},"end":{"line":113,"column":20}},"metadata":{},"type":"string | null | undefined"},{"name":"value","description":"Value.","sourceRange":{"start":{"line":118,"column":8},"end":{"line":121,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"placeholder","description":"Placeholder.","sourceRange":{"start":{"line":126,"column":8},"end":{"line":126,"column":27}},"metadata":{},"type":"string | null | undefined"},{"name":"error-message","description":"Error message to show when `invalid` is true.","sourceRange":{"start":{"line":131,"column":8},"end":{"line":131,"column":28}},"metadata":{},"type":"string | null | undefined"},{"name":"autofocus","description":"Autofocus.","sourceRange":{"start":{"line":136,"column":8},"end":{"line":140,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"readonly","description":"Read only.","sourceRange":{"start":{"line":145,"column":8},"end":{"line":149,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"disabled","description":"Disabled.","sourceRange":{"start":{"line":154,"column":8},"end":{"line":158,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"required","description":"Required.","sourceRange":{"start":{"line":163,"column":8},"end":{"line":167,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"min","description":"The minimum (numeric or date-time) input value.","sourceRange":{"start":{"line":172,"column":8},"end":{"line":172,"column":19}},"metadata":{},"type":"string | null | undefined"},{"name":"max","description":"The maximum (numeric or date-time) input value.","sourceRange":{"start":{"line":177,"column":8},"end":{"line":177,"column":19}},"metadata":{},"type":"string | null | undefined"},{"name":"step","description":"The increment value.","sourceRange":{"start":{"line":182,"column":8},"end":{"line":182,"column":20}},"metadata":{},"type":"number | null | undefined"},{"name":"minlength","description":"The minimum length of the input value.","sourceRange":{"start":{"line":187,"column":8},"end":{"line":187,"column":25}},"metadata":{},"type":"number | null | undefined"},{"name":"maxlength","description":"The maximum length of the input value.","sourceRange":{"start":{"line":192,"column":8},"end":{"line":192,"column":25}},"metadata":{},"type":"number | null | undefined"},{"name":"pattern","description":"A pattern to validate.","sourceRange":{"start":{"line":197,"column":8},"end":{"line":197,"column":23}},"metadata":{},"type":"string | null | undefined"},{"name":"validator","description":"The name of the custom validator","sourceRange":{"start":{"line":202,"column":8},"end":{"line":202,"column":25}},"metadata":{},"type":"string | null | undefined"},{"name":"auto-validate","description":"Set to true to auto-validate the input value when it changes.","sourceRange":{"start":{"line":207,"column":8},"end":{"line":210,"column":9}},"metadata":{},"type":"boolean | null | undefined"}],"events":[{"type":"CustomEvent","name":"value-changed","description":"Fired when the `value` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-input","mixins":["Polymer.IronFormElementBehavior","Polymer.IronValidatableBehavior"]},{"description":"An element wrapping selectivity.js and relying on an operation for suggestions\\n\\n ","summary":"","path":"widgets/nuxeo-selectivity.js","properties":[{"name":"label","type":"string | null | undefined","description":"Label.","privacy":"public","sourceRange":{"start":{"line":6600,"column":8},"end":{"line":6600,"column":21}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"value","type":"?","description":"Selected value(s).","privacy":"public","sourceRange":{"start":{"line":6605,"column":8},"end":{"line":6608,"column":9}},"metadata":{"polymer":{"notify":true,"observer":"\\"_valueChanged\\""}}},{"name":"multiple","type":"boolean | null | undefined","description":"Set to `true` to allow multiple selection.","privacy":"public","sourceRange":{"start":{"line":6613,"column":8},"end":{"line":6616,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"stayOpenOnSelect","type":"boolean | null | undefined","description":"If true, the dropdown stays open after a selection is made.","privacy":"public","sourceRange":{"start":{"line":6621,"column":8},"end":{"line":6624,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"readonly","type":"boolean | null | undefined","description":"Set to `true` for read only mode.","privacy":"public","sourceRange":{"start":{"line":6629,"column":8},"end":{"line":6633,"column":9}},"metadata":{"polymer":{"observer":"\\"_readonlyChanged\\"","attributeType":"Boolean"}},"defaultValue":"false"},{"name":"minChars","type":"number | null | undefined","description":"Minimum number of chars to trigger the suggestions.","privacy":"public","sourceRange":{"start":{"line":6638,"column":8},"end":{"line":6641,"column":9}},"metadata":{"polymer":{"attributeType":"Number"}},"defaultValue":"3"},{"name":"frequency","type":"number | null | undefined","description":"Time in ms used to debounce requests.","privacy":"public","sourceRange":{"start":{"line":6646,"column":8},"end":{"line":6649,"column":9}},"metadata":{"polymer":{"attributeType":"Number"}},"defaultValue":"300"},{"name":"placeholder","type":"string | null | undefined","description":"Placeholder.","privacy":"public","sourceRange":{"start":{"line":6654,"column":8},"end":{"line":6658,"column":9}},"metadata":{"polymer":{"observer":"\\"_placeholderChanged\\"","attributeType":"String"}},"defaultValue":"\\" \\""},{"name":"separator","type":"string | null | undefined","description":"Separator to use with multiple selection.","privacy":"public","sourceRange":{"start":{"line":6663,"column":8},"end":{"line":6666,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\",\\""},{"name":"tagging","type":"boolean | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":6668,"column":8},"end":{"line":6671,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"idFunction","type":"Function | null | undefined","description":"Function used to get the id from the choice object.","privacy":"public","sourceRange":{"start":{"line":6676,"column":8},"end":{"line":6681,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"selectionFormatter","type":"Function | null | undefined","description":"Formatter for selected entries.","privacy":"public","sourceRange":{"start":{"line":6686,"column":8},"end":{"line":6691,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"resultFormatter","type":"Function | null | undefined","description":"Formatter for suggested entries.","privacy":"public","sourceRange":{"start":{"line":6696,"column":8},"end":{"line":6701,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"newEntryFormatter","type":"Function | null | undefined","description":"Formatter for new entries.","privacy":"public","sourceRange":{"start":{"line":6706,"column":8},"end":{"line":6711,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"resolveEntry","type":"Function | null | undefined","description":"Function that transforms the entries added using the value property into object","privacy":"public","sourceRange":{"start":{"line":6717,"column":8},"end":{"line":6722,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"addedEntryHandler","type":"Function | null | undefined","description":"Function called when an entry is selected.","privacy":"public","sourceRange":{"start":{"line":6727,"column":8},"end":{"line":6729,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"removedEntryHandler","type":"Function | null | undefined","description":"Function called when an entry is unselected.","privacy":"public","sourceRange":{"start":{"line":6734,"column":8},"end":{"line":6736,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"initSelection","type":"Function | null | undefined","description":"Formatter for initial selection.","privacy":"public","sourceRange":{"start":{"line":6741,"column":8},"end":{"line":6746,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"maximumSelectionSize","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":6748,"column":8},"end":{"line":6751,"column":9}},"metadata":{"polymer":{"attributeType":"Number"}},"defaultValue":"-1"},{"name":"data","type":"Array | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":6753,"column":8},"end":{"line":6756,"column":9}},"metadata":{"polymer":{"observer":"\\"_dataChanged\\"","attributeType":"Array"}}},{"name":"selectedItems","type":"Array | null | undefined","description":"Selected items.","privacy":"public","sourceRange":{"start":{"line":6761,"column":8},"end":{"line":6765,"column":9}},"metadata":{"polymer":{"notify":true,"observer":"\\"_valueChanged\\"","attributeType":"Array"}}},{"name":"selectedItem","type":"Object | null | undefined","description":"Selected item.","privacy":"public","sourceRange":{"start":{"line":6770,"column":8},"end":{"line":6774,"column":9}},"metadata":{"polymer":{"notify":true,"observer":"\\"_valueChanged\\"","attributeType":"Object"}}},{"name":"operation","type":"string | null | undefined","description":"Operation to call for suggestions.","privacy":"public","sourceRange":{"start":{"line":6779,"column":8},"end":{"line":6779,"column":25}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"params","type":"Object | null | undefined","description":"Parameters to use in the operation call (will include `searchTerm`).","privacy":"public","sourceRange":{"start":{"line":6784,"column":8},"end":{"line":6786,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}}},{"name":"queryResultsFilter","type":"Function | null | undefined","description":"Results filtering function (optional).","privacy":"public","sourceRange":{"start":{"line":6791,"column":8},"end":{"line":6791,"column":36}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"errorMessage","type":"string | null | undefined","description":"Error message to show when `invalid` is true.","privacy":"public","sourceRange":{"start":{"line":6796,"column":8},"end":{"line":6796,"column":28}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"enrichers","type":"string | null | undefined","description":"The `content enricher` of the operation.","privacy":"public","sourceRange":{"start":{"line":6801,"column":8},"end":{"line":6804,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"headers","type":"Object | null | undefined","description":"The headers of the request.","privacy":"public","sourceRange":{"start":{"line":6809,"column":8},"end":{"line":6812,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}},"defaultValue":"null"}],"methods":[{"name":"connectedCallback","description":"","privacy":"public","sourceRange":{"start":{"line":7126,"column":4},"end":{"line":7271,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"disconnectedCallback","description":"","privacy":"public","sourceRange":{"start":{"line":7273,"column":4},"end":{"line":7281,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_updateDropdownPosition","description":"","privacy":"protected","sourceRange":{"start":{"line":7283,"column":4},"end":{"line":7287,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"escapeHTML","description":"","privacy":"public","sourceRange":{"start":{"line":7289,"column":4},"end":{"line":7291,"column":5}},"metadata":{},"params":[{"name":"args","rest":true}]},{"name":"_getValidity","description":"","privacy":"protected","sourceRange":{"start":{"line":7293,"column":4},"end":{"line":7298,"column":5}},"metadata":{},"params":[]},{"name":"_initSelection","description":"","privacy":"protected","sourceRange":{"start":{"line":7300,"column":4},"end":{"line":7305,"column":5}},"metadata":{},"params":[{"name":"value"},{"name":"callback"}]},{"name":"_resolveEntry","description":"","privacy":"protected","sourceRange":{"start":{"line":7307,"column":4},"end":{"line":7317,"column":5}},"metadata":{},"params":[{"name":"entry"}]},{"name":"_updateSelection","description":"","privacy":"protected","sourceRange":{"start":{"line":7319,"column":4},"end":{"line":7344,"column":5}},"metadata":{},"params":[{"name":"e"}],"return":{"type":"void"}},{"name":"_valueChanged","description":"","privacy":"protected","sourceRange":{"start":{"line":7346,"column":4},"end":{"line":7358,"column":5}},"metadata":{},"params":[{"name":"newValue"}],"return":{"type":"void"}},{"name":"_dataChanged","description":"","privacy":"protected","sourceRange":{"start":{"line":7360,"column":4},"end":{"line":7372,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_placeholderChanged","description":"","privacy":"protected","sourceRange":{"start":{"line":7374,"column":4},"end":{"line":7385,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_readonlyChanged","description":"","privacy":"protected","sourceRange":{"start":{"line":7387,"column":4},"end":{"line":7394,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_idFunction","description":"","privacy":"protected","sourceRange":{"start":{"line":7396,"column":4},"end":{"line":7399,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_newEntryFormatter","description":"","privacy":"protected","sourceRange":{"start":{"line":7401,"column":4},"end":{"line":7403,"column":5}},"metadata":{},"params":[{"name":"term"}]},{"name":"_selectionFormatter","description":"","privacy":"protected","sourceRange":{"start":{"line":7405,"column":4},"end":{"line":7407,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_resultFormatter","description":"","privacy":"protected","sourceRange":{"start":{"line":7409,"column":4},"end":{"line":7411,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_wrap","description":"","privacy":"protected","sourceRange":{"start":{"line":7413,"column":4},"end":{"line":7429,"column":5}},"metadata":{},"params":[{"name":"value"}]},{"name":"_triggerQueryCallback","description":"","privacy":"protected","sourceRange":{"start":{"line":7431,"column":4},"end":{"line":7444,"column":5}},"metadata":{},"params":[{"name":"query"},{"name":"results"}],"return":{"type":"void"}},{"name":"_query","description":"Implements abstract Nuxeo.Select2 methods","privacy":"protected","sourceRange":{"start":{"line":7447,"column":4},"end":{"line":7461,"column":5}},"metadata":{},"params":[{"name":"query"}]},{"name":"_getScrollParent","description":"","privacy":"protected","sourceRange":{"start":{"line":7463,"column":4},"end":{"line":7490,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-selectivity/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":6588,"column":2},"end":{"line":7491,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.SelectivityElement","attributes":[{"name":"label","description":"Label.","sourceRange":{"start":{"line":6600,"column":8},"end":{"line":6600,"column":21}},"metadata":{},"type":"string | null | undefined"},{"name":"value","description":"Selected value(s).","sourceRange":{"start":{"line":6605,"column":8},"end":{"line":6608,"column":9}},"metadata":{}},{"name":"multiple","description":"Set to `true` to allow multiple selection.","sourceRange":{"start":{"line":6613,"column":8},"end":{"line":6616,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"stay-open-on-select","description":"If true, the dropdown stays open after a selection is made.","sourceRange":{"start":{"line":6621,"column":8},"end":{"line":6624,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"readonly","description":"Set to `true` for read only mode.","sourceRange":{"start":{"line":6629,"column":8},"end":{"line":6633,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"min-chars","description":"Minimum number of chars to trigger the suggestions.","sourceRange":{"start":{"line":6638,"column":8},"end":{"line":6641,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"frequency","description":"Time in ms used to debounce requests.","sourceRange":{"start":{"line":6646,"column":8},"end":{"line":6649,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"placeholder","description":"Placeholder.","sourceRange":{"start":{"line":6654,"column":8},"end":{"line":6658,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"separator","description":"Separator to use with multiple selection.","sourceRange":{"start":{"line":6663,"column":8},"end":{"line":6666,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"tagging","description":"","sourceRange":{"start":{"line":6668,"column":8},"end":{"line":6671,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"id-function","description":"Function used to get the id from the choice object.","sourceRange":{"start":{"line":6676,"column":8},"end":{"line":6681,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"selection-formatter","description":"Formatter for selected entries.","sourceRange":{"start":{"line":6686,"column":8},"end":{"line":6691,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"result-formatter","description":"Formatter for suggested entries.","sourceRange":{"start":{"line":6696,"column":8},"end":{"line":6701,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"new-entry-formatter","description":"Formatter for new entries.","sourceRange":{"start":{"line":6706,"column":8},"end":{"line":6711,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"resolve-entry","description":"Function that transforms the entries added using the value property into object","sourceRange":{"start":{"line":6717,"column":8},"end":{"line":6722,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"added-entry-handler","description":"Function called when an entry is selected.","sourceRange":{"start":{"line":6727,"column":8},"end":{"line":6729,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"removed-entry-handler","description":"Function called when an entry is unselected.","sourceRange":{"start":{"line":6734,"column":8},"end":{"line":6736,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"init-selection","description":"Formatter for initial selection.","sourceRange":{"start":{"line":6741,"column":8},"end":{"line":6746,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"maximum-selection-size","description":"","sourceRange":{"start":{"line":6748,"column":8},"end":{"line":6751,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"data","description":"","sourceRange":{"start":{"line":6753,"column":8},"end":{"line":6756,"column":9}},"metadata":{},"type":"Array | null | undefined"},{"name":"selected-items","description":"Selected items.","sourceRange":{"start":{"line":6761,"column":8},"end":{"line":6765,"column":9}},"metadata":{},"type":"Array | null | undefined"},{"name":"selected-item","description":"Selected item.","sourceRange":{"start":{"line":6770,"column":8},"end":{"line":6774,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"operation","description":"Operation to call for suggestions.","sourceRange":{"start":{"line":6779,"column":8},"end":{"line":6779,"column":25}},"metadata":{},"type":"string | null | undefined"},{"name":"params","description":"Parameters to use in the operation call (will include `searchTerm`).","sourceRange":{"start":{"line":6784,"column":8},"end":{"line":6786,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"query-results-filter","description":"Results filtering function (optional).","sourceRange":{"start":{"line":6791,"column":8},"end":{"line":6791,"column":36}},"metadata":{},"type":"Function | null | undefined"},{"name":"error-message","description":"Error message to show when `invalid` is true.","sourceRange":{"start":{"line":6796,"column":8},"end":{"line":6796,"column":28}},"metadata":{},"type":"string | null | undefined"},{"name":"enrichers","description":"The `content enricher` of the operation.","sourceRange":{"start":{"line":6801,"column":8},"end":{"line":6804,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"headers","description":"The headers of the request.","sourceRange":{"start":{"line":6809,"column":8},"end":{"line":6812,"column":9}},"metadata":{},"type":"Object | null | undefined"}],"events":[{"type":"CustomEvent","name":"value-changed","description":"Fired when the `value` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-items-changed","description":"Fired when the `selectedItems` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-item-changed","description":"Fired when the `selectedItem` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-selectivity","mixins":["Polymer.IronFormElementBehavior","Polymer.IronValidatableBehavior"]},{"description":"An element for showing a user\'s avatar if available, its initials with background otherwise.\\n\\nExample:\\n\\n ","summary":"","path":"widgets/nuxeo-user-avatar.js","properties":[{"name":"user","type":"Object | null | undefined","description":"User entity or a string","privacy":"public","sourceRange":{"start":{"line":84,"column":8},"end":{"line":86,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}}},{"name":"fetchAvatar","type":"boolean | null | undefined","description":"Fetch avatar from profile if not already loaded.","privacy":"public","sourceRange":{"start":{"line":90,"column":8},"end":{"line":93,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"height","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":94,"column":8},"end":{"line":98,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsHeight\\"","attributeType":"Number"}},"defaultValue":"48"},{"name":"width","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":99,"column":8},"end":{"line":103,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsWidth\\"","attributeType":"Number"}},"defaultValue":"48"},{"name":"textColor","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":104,"column":8},"end":{"line":108,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsTextColor\\"","attributeType":"String"}},"defaultValue":"\\"#FFFFFF\\""},{"name":"fontSize","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":109,"column":8},"end":{"line":113,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsFontSize\\"","attributeType":"Number"}},"defaultValue":"20"},{"name":"fontWeight","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":114,"column":8},"end":{"line":118,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsFontWeight\\"","attributeType":"Number"}},"defaultValue":"400"},{"name":"borderRadius","type":"number | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":119,"column":8},"end":{"line":123,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsBorderRadius\\"","attributeType":"Number"}},"defaultValue":"0"},{"name":"boxShadow","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":124,"column":8},"end":{"line":128,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsBoxShadow\\"","attributeType":"String"}},"defaultValue":"\\"0px 0px 0px 0px rgba(33,33,33,0.75)\\""},{"name":"textShadow","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":129,"column":8},"end":{"line":133,"column":9}},"metadata":{"polymer":{"observer":"\\"__obsTextShadow\\"","attributeType":"String"}},"defaultValue":"\\"0px 0px 0px rgba(33,33,33,0.75)\\""},{"name":"_output","type":"string | null | undefined","description":"","privacy":"protected","sourceRange":{"start":{"line":134,"column":8},"end":{"line":136,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}}],"methods":[{"name":"_username","description":"","privacy":"protected","sourceRange":{"start":{"line":144,"column":4},"end":{"line":146,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_isEntity","description":"","privacy":"protected","sourceRange":{"start":{"line":148,"column":4},"end":{"line":155,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_id","description":"","privacy":"protected","sourceRange":{"start":{"line":157,"column":4},"end":{"line":162,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_name","description":"","privacy":"protected","sourceRange":{"start":{"line":164,"column":4},"end":{"line":171,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_email","description":"","privacy":"protected","sourceRange":{"start":{"line":173,"column":4},"end":{"line":179,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"__obsHeight","description":"","privacy":"private","sourceRange":{"start":{"line":181,"column":4},"end":{"line":183,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsWidth","description":"","privacy":"private","sourceRange":{"start":{"line":185,"column":4},"end":{"line":187,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsTextColor","description":"","privacy":"private","sourceRange":{"start":{"line":189,"column":4},"end":{"line":191,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsFontSize","description":"","privacy":"private","sourceRange":{"start":{"line":193,"column":4},"end":{"line":195,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsFontWeight","description":"","privacy":"private","sourceRange":{"start":{"line":197,"column":4},"end":{"line":199,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsBorderRadius","description":"","privacy":"private","sourceRange":{"start":{"line":201,"column":4},"end":{"line":206,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsBoxShadow","description":"","privacy":"private","sourceRange":{"start":{"line":208,"column":4},"end":{"line":212,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__obsTextShadow","description":"","privacy":"private","sourceRange":{"start":{"line":214,"column":4},"end":{"line":218,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"__generateHue","description":"","privacy":"private","sourceRange":{"start":{"line":220,"column":4},"end":{"line":228,"column":5}},"metadata":{},"params":[]},{"name":"__makeAvatar","description":"","privacy":"private","sourceRange":{"start":{"line":230,"column":4},"end":{"line":313,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-user-avatar/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":34,"column":2},"end":{"line":314,"column":3}},"privacy":"public","superclass":"Nuxeo.Element","name":"Nuxeo.UserAvatar","attributes":[{"name":"user","description":"User entity or a string","sourceRange":{"start":{"line":84,"column":8},"end":{"line":86,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"fetch-avatar","description":"Fetch avatar from profile if not already loaded.","sourceRange":{"start":{"line":90,"column":8},"end":{"line":93,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"height","description":"","sourceRange":{"start":{"line":94,"column":8},"end":{"line":98,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"width","description":"","sourceRange":{"start":{"line":99,"column":8},"end":{"line":103,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"text-color","description":"","sourceRange":{"start":{"line":104,"column":8},"end":{"line":108,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"font-size","description":"","sourceRange":{"start":{"line":109,"column":8},"end":{"line":113,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"font-weight","description":"","sourceRange":{"start":{"line":114,"column":8},"end":{"line":118,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"border-radius","description":"","sourceRange":{"start":{"line":119,"column":8},"end":{"line":123,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"box-shadow","description":"","sourceRange":{"start":{"line":124,"column":8},"end":{"line":128,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"text-shadow","description":"","sourceRange":{"start":{"line":129,"column":8},"end":{"line":133,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-user-avatar"},{"description":"","summary":"","path":"widgets/nuxeo-user-group-formatter.js","properties":[{"name":"entity","type":"Object | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}}}],"methods":[{"name":"_isUser","description":"","privacy":"protected","sourceRange":{"start":{"line":87,"column":4},"end":{"line":89,"column":5}},"metadata":{},"params":[]},{"name":"_isGroup","description":"","privacy":"protected","sourceRange":{"start":{"line":91,"column":4},"end":{"line":93,"column":5}},"metadata":{},"params":[]},{"name":"_computeInfo","description":"","privacy":"protected","sourceRange":{"start":{"line":95,"column":4},"end":{"line":100,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[],"metadata":{},"sourceRange":{"start":{"line":26,"column":2},"end":{"line":101,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"UserGroupFormatter","attributes":[{"name":"entity","description":"","sourceRange":{"start":{"line":81,"column":8},"end":{"line":83,"column":9}},"metadata":{},"type":"Object | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-user-group-formatter"},{"description":"`nuxeo-user-suggestion` allows selecting one or more users.\\n\\n ","summary":"","path":"widgets/nuxeo-user-suggestion.js","properties":[{"name":"searchType","type":"string | null | undefined","description":"USER_TYPE or GROUP_TYPE or USER_GROUP_TYPE","privacy":"public","sourceRange":{"start":{"line":87,"column":8},"end":{"line":90,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"USER_GROUP_TYPE\\""},{"name":"groupRestriction","type":"string | null | undefined","description":"Group ID to narrow the user suggestions.","privacy":"public","sourceRange":{"start":{"line":95,"column":8},"end":{"line":97,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"label","type":"string | null | undefined","description":"Label.","privacy":"public","sourceRange":{"start":{"line":102,"column":8},"end":{"line":102,"column":21}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"operation","type":"string | null | undefined","description":"Operation to call for suggestions.","privacy":"public","sourceRange":{"start":{"line":107,"column":8},"end":{"line":110,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"UserGroup.Suggestion\\""},{"name":"params","type":"Object | null | undefined","description":"Parameters for the operation.","privacy":"public","sourceRange":{"start":{"line":115,"column":8},"end":{"line":115,"column":22}},"metadata":{"polymer":{"attributeType":"Object"}}},{"name":"value","type":"string | null | undefined","description":"Selected value(s).","privacy":"public","sourceRange":{"start":{"line":120,"column":8},"end":{"line":123,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"multiple","type":"boolean | null | undefined","description":"Set to `true` to allow multiple selection.","privacy":"public","sourceRange":{"start":{"line":128,"column":8},"end":{"line":131,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"stayOpenOnSelect","type":"boolean | null | undefined","description":"If true, the dropdown stays open after a selection is made.","privacy":"public","sourceRange":{"start":{"line":136,"column":8},"end":{"line":139,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"readonly","type":"boolean | null | undefined","description":"Set to `true` for read only mode.","privacy":"public","sourceRange":{"start":{"line":144,"column":8},"end":{"line":147,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"minChars","type":"number | null | undefined","description":"Minimum number of chars to trigger the suggestions.","privacy":"public","sourceRange":{"start":{"line":152,"column":8},"end":{"line":155,"column":9}},"metadata":{"polymer":{"attributeType":"Number"}},"defaultValue":"3"},{"name":"frequency","type":"number | null | undefined","description":"Time in ms used to debounce requests.","privacy":"public","sourceRange":{"start":{"line":160,"column":8},"end":{"line":160,"column":25}},"metadata":{"polymer":{"attributeType":"Number"}}},{"name":"placeholder","type":"string | null | undefined","description":"Placeholder.","privacy":"public","sourceRange":{"start":{"line":165,"column":8},"end":{"line":165,"column":27}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"errorMessage","type":"string | null | undefined","description":"Error message to show when `invalid` is true.","privacy":"public","sourceRange":{"start":{"line":170,"column":8},"end":{"line":170,"column":28}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"selectedItems","type":"Array | null | undefined","description":"Selected items.","privacy":"public","sourceRange":{"start":{"line":175,"column":8},"end":{"line":178,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"Array"}}},{"name":"selectedItem","type":"Object | null | undefined","description":"Selected item.","privacy":"public","sourceRange":{"start":{"line":183,"column":8},"end":{"line":186,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"Object"}}},{"name":"selectionFormatter","type":"Function | null | undefined","description":"Formatter for a selected entry.","privacy":"public","sourceRange":{"start":{"line":191,"column":8},"end":{"line":196,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"resultFormatter","type":"Function | null | undefined","description":"Formatter for suggested entries.","privacy":"public","sourceRange":{"start":{"line":201,"column":8},"end":{"line":206,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"resolveEntry","type":"Function | null | undefined","description":"Function that transforms entries added to the element using the `value` property into objects.","privacy":"public","sourceRange":{"start":{"line":211,"column":8},"end":{"line":216,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"prefixed","type":"boolean | null | undefined","description":"Set to true to submit ids prefixed with \\"user:\\" or \\"group:\\".","privacy":"public","sourceRange":{"start":{"line":221,"column":8},"end":{"line":221,"column":25}},"metadata":{"polymer":{"attributeType":"Boolean"}}},{"name":"idFunction","type":"Function | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":223,"column":8},"end":{"line":228,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"queryResultsFilter","type":"Function | null | undefined","description":"Results filtering function (optional).","privacy":"public","sourceRange":{"start":{"line":233,"column":8},"end":{"line":233,"column":36}},"metadata":{"polymer":{"attributeType":"Function"}}}],"methods":[{"name":"_getValidity","description":"Override method from Polymer.IronValidatableBehavior.","privacy":"protected","sourceRange":{"start":{"line":238,"column":4},"end":{"line":240,"column":5}},"metadata":{},"params":[]},{"name":"_computeParams","description":"","privacy":"protected","sourceRange":{"start":{"line":242,"column":4},"end":{"line":251,"column":5}},"metadata":{},"params":[]},{"name":"_selectionFormatter","description":"","privacy":"protected","sourceRange":{"start":{"line":253,"column":4},"end":{"line":272,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_resultFormatter","description":"","privacy":"protected","sourceRange":{"start":{"line":274,"column":4},"end":{"line":280,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_resolveEntry","description":"","privacy":"protected","sourceRange":{"start":{"line":282,"column":4},"end":{"line":287,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_idFunction","description":"","privacy":"protected","sourceRange":{"start":{"line":289,"column":4},"end":{"line":294,"column":5}},"metadata":{},"params":[{"name":"item"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-user-suggestion/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":40,"column":2},"end":{"line":295,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.UserSuggestion","attributes":[{"name":"search-type","description":"USER_TYPE or GROUP_TYPE or USER_GROUP_TYPE","sourceRange":{"start":{"line":87,"column":8},"end":{"line":90,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"group-restriction","description":"Group ID to narrow the user suggestions.","sourceRange":{"start":{"line":95,"column":8},"end":{"line":97,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"label","description":"Label.","sourceRange":{"start":{"line":102,"column":8},"end":{"line":102,"column":21}},"metadata":{},"type":"string | null | undefined"},{"name":"operation","description":"Operation to call for suggestions.","sourceRange":{"start":{"line":107,"column":8},"end":{"line":110,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"params","description":"Parameters for the operation.","sourceRange":{"start":{"line":115,"column":8},"end":{"line":115,"column":22}},"metadata":{},"type":"Object | null | undefined"},{"name":"value","description":"Selected value(s).","sourceRange":{"start":{"line":120,"column":8},"end":{"line":123,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"multiple","description":"Set to `true` to allow multiple selection.","sourceRange":{"start":{"line":128,"column":8},"end":{"line":131,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"stay-open-on-select","description":"If true, the dropdown stays open after a selection is made.","sourceRange":{"start":{"line":136,"column":8},"end":{"line":139,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"readonly","description":"Set to `true` for read only mode.","sourceRange":{"start":{"line":144,"column":8},"end":{"line":147,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"min-chars","description":"Minimum number of chars to trigger the suggestions.","sourceRange":{"start":{"line":152,"column":8},"end":{"line":155,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"frequency","description":"Time in ms used to debounce requests.","sourceRange":{"start":{"line":160,"column":8},"end":{"line":160,"column":25}},"metadata":{},"type":"number | null | undefined"},{"name":"placeholder","description":"Placeholder.","sourceRange":{"start":{"line":165,"column":8},"end":{"line":165,"column":27}},"metadata":{},"type":"string | null | undefined"},{"name":"error-message","description":"Error message to show when `invalid` is true.","sourceRange":{"start":{"line":170,"column":8},"end":{"line":170,"column":28}},"metadata":{},"type":"string | null | undefined"},{"name":"selected-items","description":"Selected items.","sourceRange":{"start":{"line":175,"column":8},"end":{"line":178,"column":9}},"metadata":{},"type":"Array | null | undefined"},{"name":"selected-item","description":"Selected item.","sourceRange":{"start":{"line":183,"column":8},"end":{"line":186,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"selection-formatter","description":"Formatter for a selected entry.","sourceRange":{"start":{"line":191,"column":8},"end":{"line":196,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"result-formatter","description":"Formatter for suggested entries.","sourceRange":{"start":{"line":201,"column":8},"end":{"line":206,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"resolve-entry","description":"Function that transforms entries added to the element using the `value` property into objects.","sourceRange":{"start":{"line":211,"column":8},"end":{"line":216,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"prefixed","description":"Set to true to submit ids prefixed with \\"user:\\" or \\"group:\\".","sourceRange":{"start":{"line":221,"column":8},"end":{"line":221,"column":25}},"metadata":{},"type":"boolean | null | undefined"},{"name":"id-function","description":"","sourceRange":{"start":{"line":223,"column":8},"end":{"line":228,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"query-results-filter","description":"Results filtering function (optional).","sourceRange":{"start":{"line":233,"column":8},"end":{"line":233,"column":36}},"metadata":{},"type":"Function | null | undefined"}],"events":[{"type":"CustomEvent","name":"value-changed","description":"Fired when the `value` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-items-changed","description":"Fired when the `selectedItems` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-item-changed","description":"Fired when the `selectedItem` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-user-suggestion","mixins":["Polymer.IronFormElementBehavior","Polymer.IronValidatableBehavior"]},{"description":"Used by `nuxeo-user-group-management`","summary":"","path":"nuxeo-user-group-management/nuxeo-create-group.js","properties":[{"name":"groupName","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":169,"column":8},"end":{"line":172,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"groupLabel","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":174,"column":8},"end":{"line":177,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"selectedUser","type":"Object | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":179,"column":8},"end":{"line":182,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"Object"}}},{"name":"selectedUsers","type":"Array | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":184,"column":8},"end":{"line":188,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"Array"}},"defaultValue":"[]"},{"name":"resultsFilter","type":"Function | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":190,"column":8},"end":{"line":195,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"resultFormatter","type":"Function | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":197,"column":8},"end":{"line":199,"column":9}},"metadata":{"polymer":{"attributeType":"Function"}}},{"name":"errors","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":201,"column":8},"end":{"line":204,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"_createAnother","type":"boolean | null | undefined","description":"If true, allows to create a new group immediately after the current one is created","privacy":"protected","sourceRange":{"start":{"line":209,"column":8},"end":{"line":212,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"ready","description":"","privacy":"protected","sourceRange":{"start":{"line":220,"column":4},"end":{"line":226,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_goHome","description":"","privacy":"protected","sourceRange":{"start":{"line":228,"column":4},"end":{"line":235,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_observeSelectedUser","description":"","privacy":"protected","sourceRange":{"start":{"line":237,"column":4},"end":{"line":242,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_remove","description":"","privacy":"protected","sourceRange":{"start":{"line":244,"column":4},"end":{"line":248,"column":5}},"metadata":{},"params":[{"name":"e"}],"return":{"type":"void"}},{"name":"_submitAnother","description":"Submits the form with `_createAnother` option set to true.","privacy":"protected","sourceRange":{"start":{"line":253,"column":4},"end":{"line":256,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_submit","description":"Submits the form.","privacy":"protected","sourceRange":{"start":{"line":261,"column":4},"end":{"line":264,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_create","description":"Creates a new group if the form was successfully submitted.","privacy":"protected","sourceRange":{"start":{"line":269,"column":4},"end":{"line":289,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_cancel","description":"","privacy":"protected","sourceRange":{"start":{"line":291,"column":4},"end":{"line":294,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_resetFields","description":"","privacy":"protected","sourceRange":{"start":{"line":296,"column":4},"end":{"line":301,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_computeData","description":"","privacy":"protected","sourceRange":{"start":{"line":303,"column":4},"end":{"line":315,"column":5}},"metadata":{},"params":[]},{"name":"_resultsFilter","description":"","privacy":"protected","sourceRange":{"start":{"line":317,"column":4},"end":{"line":324,"column":5}},"metadata":{},"params":[{"name":"entry"}]},{"name":"_hasErrors","description":"","privacy":"protected","sourceRange":{"start":{"line":326,"column":4},"end":{"line":328,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[],"metadata":{},"sourceRange":{"start":{"line":38,"column":2},"end":{"line":329,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.CreateGroup","attributes":[{"name":"group-name","description":"","sourceRange":{"start":{"line":169,"column":8},"end":{"line":172,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"group-label","description":"","sourceRange":{"start":{"line":174,"column":8},"end":{"line":177,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"selected-user","description":"","sourceRange":{"start":{"line":179,"column":8},"end":{"line":182,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"selected-users","description":"","sourceRange":{"start":{"line":184,"column":8},"end":{"line":188,"column":9}},"metadata":{},"type":"Array | null | undefined"},{"name":"results-filter","description":"","sourceRange":{"start":{"line":190,"column":8},"end":{"line":195,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"result-formatter","description":"","sourceRange":{"start":{"line":197,"column":8},"end":{"line":199,"column":9}},"metadata":{},"type":"Function | null | undefined"},{"name":"errors","description":"","sourceRange":{"start":{"line":201,"column":8},"end":{"line":204,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[{"type":"CustomEvent","name":"group-name-changed","description":"Fired when the `groupName` property changes.","metadata":{}},{"type":"CustomEvent","name":"group-label-changed","description":"Fired when the `groupLabel` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-user-changed","description":"Fired when the `selectedUser` property changes.","metadata":{}},{"type":"CustomEvent","name":"selected-users-changed","description":"Fired when the `selectedUsers` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-create-group","mixins":["Nuxeo.I18nBehavior"]},{"description":"An element to display errors.\\n\\nExample:\\n\\n ","summary":"","path":"nuxeo-error.js","properties":[{"name":"code","type":"string | null | undefined","description":"The error code. Description will rely on a label with key \'error.\'.","privacy":"public","sourceRange":{"start":{"line":101,"column":8},"end":{"line":104,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"message","type":"string | null | undefined","description":"Error message to display.","privacy":"public","sourceRange":{"start":{"line":109,"column":8},"end":{"line":112,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"url","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":114,"column":8},"end":{"line":117,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"hidden","type":"boolean | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":119,"column":8},"end":{"line":123,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"show","description":"","privacy":"public","sourceRange":{"start":{"line":127,"column":4},"end":{"line":134,"column":5}},"metadata":{},"params":[{"name":"code"},{"name":"url"},{"name":"message"}],"return":{"type":"void"}},{"name":"hide","description":"","privacy":"public","sourceRange":{"start":{"line":136,"column":4},"end":{"line":138,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_label","description":"","privacy":"protected","sourceRange":{"start":{"line":140,"column":4},"end":{"line":142,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-error/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":34,"column":2},"end":{"line":143,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.Error","attributes":[{"name":"code","description":"The error code. Description will rely on a label with key \'error.\'.","sourceRange":{"start":{"line":101,"column":8},"end":{"line":104,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"message","description":"Error message to display.","sourceRange":{"start":{"line":109,"column":8},"end":{"line":112,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"url","description":"","sourceRange":{"start":{"line":114,"column":8},"end":{"line":117,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"hidden","description":"","sourceRange":{"start":{"line":119,"column":8},"end":{"line":123,"column":9}},"metadata":{},"type":"boolean | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-error","mixins":["Nuxeo.I18nBehavior"]},{"description":"An element to import and stamp layout elements.\\n\\nExample:\\n\\n ","summary":"","path":"nuxeo-layout.js","properties":[{"name":"href","type":"string | null | undefined","description":"The href of the element to import.\\nThe name of the element is inferred from the filename.","privacy":"public","sourceRange":{"start":{"line":55,"column":8},"end":{"line":58,"column":9}},"metadata":{"polymer":{"observer":"\\"_stamp\\"","attributeType":"String"}}},{"name":"model","type":"Object | null | undefined","description":"Model object with properties to set on the instantiated element.","privacy":"public","sourceRange":{"start":{"line":63,"column":8},"end":{"line":66,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}},"defaultValue":"{}"},{"name":"error","type":"string | null | undefined","description":"Error message to display if layout is not found.","privacy":"public","sourceRange":{"start":{"line":71,"column":8},"end":{"line":74,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"Failed to find layout\\""},{"name":"element","type":"Object | null | undefined","description":"The stamped element.","privacy":"public","sourceRange":{"start":{"line":79,"column":8},"end":{"line":83,"column":9}},"metadata":{"polymer":{"notify":true,"readOnly":true,"attributeType":"Object"}}}],"methods":[{"name":"_getBoundElements","description":"","privacy":"protected","sourceRange":{"start":{"line":91,"column":4},"end":{"line":116,"column":5}},"metadata":{},"params":[{"name":"property"}]},{"name":"validate","description":"Trigger the layout validation if it exists.","privacy":"public","sourceRange":{"start":{"line":119,"column":4},"end":{"line":136,"column":5}},"metadata":{},"params":[]},{"name":"_getValidatableElements","description":"","privacy":"protected","sourceRange":{"start":{"line":138,"column":4},"end":{"line":152,"column":5}},"metadata":{},"params":[{"name":"parent"}]},{"name":"_isVisible","description":"","privacy":"protected","sourceRange":{"start":{"line":154,"column":4},"end":{"line":162,"column":5}},"metadata":{},"params":[{"name":"node"}]},{"name":"_stamp","description":"","privacy":"protected","sourceRange":{"start":{"line":164,"column":4},"end":{"line":200,"column":5}},"metadata":{},"params":[{"name":"href"}],"return":{"type":"void"}},{"name":"_update","description":"setup data binding","privacy":"protected","sourceRange":{"start":{"line":203,"column":4},"end":{"line":210,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}}],"staticMethods":[],"demos":[],"metadata":{},"sourceRange":{"start":{"line":37,"column":2},"end":{"line":211,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.Layout","attributes":[{"name":"href","description":"The href of the element to import.\\nThe name of the element is inferred from the filename.","sourceRange":{"start":{"line":55,"column":8},"end":{"line":58,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"model","description":"Model object with properties to set on the instantiated element.","sourceRange":{"start":{"line":63,"column":8},"end":{"line":66,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"error","description":"Error message to display if layout is not found.","sourceRange":{"start":{"line":71,"column":8},"end":{"line":74,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"element","description":"The stamped element.","sourceRange":{"start":{"line":79,"column":8},"end":{"line":83,"column":9}},"metadata":{},"type":"Object | null | undefined"}],"events":[{"type":"CustomEvent","name":"element-changed","description":"Fired when the `element` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-layout","mixins":["Polymer.IronResizableBehavior"]},{"description":"Used by `nuxeo-user-management` and `nuxeo-create-user","summary":"","path":"nuxeo-user-group-management/nuxeo-edit-password.js","properties":[{"name":"password","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":76,"column":8},"end":{"line":79,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"_confirmationPassword","type":"string | null | undefined","description":"","privacy":"protected","sourceRange":{"start":{"line":80,"column":8},"end":{"line":82,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}}],"methods":[{"name":"_computeErrorMessage","description":"","privacy":"protected","sourceRange":{"start":{"line":86,"column":4},"end":{"line":91,"column":5}},"metadata":{},"params":[{"name":"password"}]},{"name":"_getValidity","description":"","privacy":"protected","sourceRange":{"start":{"line":93,"column":4},"end":{"line":95,"column":5}},"metadata":{},"params":[]},{"name":"resetFields","description":"","privacy":"public","sourceRange":{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}}],"staticMethods":[],"demos":[],"metadata":{},"sourceRange":{"start":{"line":34,"column":2},"end":{"line":101,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.EditPassword","attributes":[{"name":"password","description":"","sourceRange":{"start":{"line":76,"column":8},"end":{"line":79,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[{"type":"CustomEvent","name":"password-changed","description":"Fired when the `password` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-edit-password","mixins":["Polymer.IronFormElementBehavior","Polymer.IronValidatableBehavior","Nuxeo.FormatBehavior"]},{"description":"Used by `nuxeo-user-group-management`","summary":"","path":"nuxeo-user-group-management/nuxeo-create-user.js","properties":[{"name":"user","type":"Object | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":130,"column":8},"end":{"line":133,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}},"defaultValue":"{}"},{"name":"usePassword","type":"boolean | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":135,"column":8},"end":{"line":138,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"errors","type":"string | null | undefined","description":"","privacy":"public","sourceRange":{"start":{"line":140,"column":8},"end":{"line":143,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"\\""},{"name":"_createAnother","type":"boolean | null | undefined","description":"If true, allows to create a new user immediately after the current one is created","privacy":"protected","sourceRange":{"start":{"line":148,"column":8},"end":{"line":151,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"_currentUser","type":"Object | null | undefined","description":"","privacy":"protected","sourceRange":{"start":{"line":153,"column":8},"end":{"line":155,"column":9}},"metadata":{"polymer":{"attributeType":"Object"}}}],"methods":[{"name":"ready","description":"","privacy":"protected","sourceRange":{"start":{"line":163,"column":4},"end":{"line":169,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_goHome","description":"","privacy":"protected","sourceRange":{"start":{"line":171,"column":4},"end":{"line":178,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_submitAnother","description":"Submits the form with `_createAnother` option set to true.","privacy":"protected","sourceRange":{"start":{"line":183,"column":4},"end":{"line":186,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_submit","description":"Submits the form.","privacy":"protected","sourceRange":{"start":{"line":191,"column":4},"end":{"line":194,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_create","description":"Creates a new user if the form was successfully submitted.","privacy":"protected","sourceRange":{"start":{"line":199,"column":4},"end":{"line":231,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_doCreate","description":"","privacy":"protected","sourceRange":{"start":{"line":233,"column":4},"end":{"line":262,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_cancel","description":"","privacy":"protected","sourceRange":{"start":{"line":264,"column":4},"end":{"line":267,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_resetFields","description":"","privacy":"protected","sourceRange":{"start":{"line":269,"column":4},"end":{"line":276,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_hasErrors","description":"","privacy":"protected","sourceRange":{"start":{"line":278,"column":4},"end":{"line":280,"column":5}},"metadata":{},"params":[]},{"name":"_isAdministrator","description":"","privacy":"protected","sourceRange":{"start":{"line":282,"column":4},"end":{"line":284,"column":5}},"metadata":{},"params":[{"name":"user"}]},{"name":"_layoutHref","description":"","privacy":"protected","sourceRange":{"start":{"line":286,"column":4},"end":{"line":288,"column":5}},"metadata":{},"params":[{"name":"layout"}]},{"name":"_layoutModel","description":"","privacy":"protected","sourceRange":{"start":{"line":290,"column":4},"end":{"line":295,"column":5}},"metadata":{},"params":[]},{"name":"_layoutElementChanged","description":"","privacy":"protected","sourceRange":{"start":{"line":297,"column":4},"end":{"line":301,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}}],"staticMethods":[],"demos":[],"metadata":{},"sourceRange":{"start":{"line":41,"column":2},"end":{"line":302,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.CreateUser","attributes":[{"name":"user","description":"","sourceRange":{"start":{"line":130,"column":8},"end":{"line":133,"column":9}},"metadata":{},"type":"Object | null | undefined"},{"name":"use-password","description":"","sourceRange":{"start":{"line":135,"column":8},"end":{"line":138,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"errors","description":"","sourceRange":{"start":{"line":140,"column":8},"end":{"line":143,"column":9}},"metadata":{},"type":"string | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-create-user","mixins":["Nuxeo.I18nBehavior"]},{"description":"An element for selecting options.\\n\\nExample:\\n\\n ","summary":"","path":"widgets/nuxeo-select.js","properties":[{"name":"label","type":"string | null | undefined","description":"Label.","privacy":"public","sourceRange":{"start":{"line":166,"column":8},"end":{"line":169,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"null"},{"name":"placeholder","type":"string | null | undefined","description":"Placeholder.","privacy":"public","sourceRange":{"start":{"line":174,"column":8},"end":{"line":177,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\" \\""},{"name":"errorMessage","type":"string | null | undefined","description":"Error message.","privacy":"public","sourceRange":{"start":{"line":182,"column":8},"end":{"line":184,"column":9}},"metadata":{"polymer":{"attributeType":"String"}}},{"name":"options","type":"Array | null | undefined","description":"Options array to show.","privacy":"public","sourceRange":{"start":{"line":189,"column":8},"end":{"line":192,"column":9}},"metadata":{"polymer":{"attributeType":"Array"}},"defaultValue":"null"},{"name":"selected","type":"string | null | undefined","description":"Gets or sets the selected option.","privacy":"public","sourceRange":{"start":{"line":197,"column":8},"end":{"line":200,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"String"}}},{"name":"attrForSelected","type":"string | null | undefined","description":"Attribute value or property of an element for `selected` instead of the default `option` value.","privacy":"public","sourceRange":{"start":{"line":205,"column":8},"end":{"line":208,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"null"},{"name":"horizontalAlign","type":"string | null | undefined","description":"The orientation against which to align the menu dropdown\\nhorizontally relative to the dropdown trigger.","privacy":"public","sourceRange":{"start":{"line":214,"column":8},"end":{"line":217,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"left\\""},{"name":"verticalAlign","type":"string | null | undefined","description":"The orientation against which to align the menu dropdown\\nvertically relative to the dropdown trigger.","privacy":"public","sourceRange":{"start":{"line":223,"column":8},"end":{"line":226,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"\\"top\\""},{"name":"dynamicAlign","type":"boolean | null | undefined","description":"Dynamically align dropdown menu.","privacy":"public","sourceRange":{"start":{"line":231,"column":8},"end":{"line":233,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}}},{"name":"readonly","type":"boolean | null | undefined","description":"Read only.","privacy":"public","sourceRange":{"start":{"line":238,"column":8},"end":{"line":242,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"disabled","type":"boolean | null | undefined","description":"Disabled.","privacy":"public","sourceRange":{"start":{"line":247,"column":8},"end":{"line":251,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"required","type":"boolean | null | undefined","description":"Required.","privacy":"public","sourceRange":{"start":{"line":256,"column":8},"end":{"line":260,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"connectedCallback","description":"","privacy":"public","sourceRange":{"start":{"line":264,"column":4},"end":{"line":270,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"disconnectedCallback","description":"","privacy":"public","sourceRange":{"start":{"line":272,"column":4},"end":{"line":275,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"close","description":"","privacy":"public","sourceRange":{"start":{"line":277,"column":4},"end":{"line":279,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_resize","description":"","privacy":"protected","sourceRange":{"start":{"line":281,"column":4},"end":{"line":289,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_id","description":"","privacy":"protected","sourceRange":{"start":{"line":291,"column":4},"end":{"line":297,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_label","description":"","privacy":"protected","sourceRange":{"start":{"line":299,"column":4},"end":{"line":301,"column":5}},"metadata":{},"params":[{"name":"item"}]},{"name":"_computeAttrForSelected","description":"","privacy":"protected","sourceRange":{"start":{"line":303,"column":4},"end":{"line":305,"column":5}},"metadata":{},"params":[{"name":"attrForSelected"},{"name":"options"}]},{"name":"_getValidity","description":"Override method from Polymer.IronValidatableBehavior.","privacy":"protected","sourceRange":{"start":{"line":308,"column":4},"end":{"line":310,"column":5}},"metadata":{},"params":[]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-select/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":41,"column":2},"end":{"line":311,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.Select","attributes":[{"name":"label","description":"Label.","sourceRange":{"start":{"line":166,"column":8},"end":{"line":169,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"placeholder","description":"Placeholder.","sourceRange":{"start":{"line":174,"column":8},"end":{"line":177,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"error-message","description":"Error message.","sourceRange":{"start":{"line":182,"column":8},"end":{"line":184,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"options","description":"Options array to show.","sourceRange":{"start":{"line":189,"column":8},"end":{"line":192,"column":9}},"metadata":{},"type":"Array | null | undefined"},{"name":"selected","description":"Gets or sets the selected option.","sourceRange":{"start":{"line":197,"column":8},"end":{"line":200,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"attr-for-selected","description":"Attribute value or property of an element for `selected` instead of the default `option` value.","sourceRange":{"start":{"line":205,"column":8},"end":{"line":208,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"horizontal-align","description":"The orientation against which to align the menu dropdown\\nhorizontally relative to the dropdown trigger.","sourceRange":{"start":{"line":214,"column":8},"end":{"line":217,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"vertical-align","description":"The orientation against which to align the menu dropdown\\nvertically relative to the dropdown trigger.","sourceRange":{"start":{"line":223,"column":8},"end":{"line":226,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"dynamic-align","description":"Dynamically align dropdown menu.","sourceRange":{"start":{"line":231,"column":8},"end":{"line":233,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"readonly","description":"Read only.","sourceRange":{"start":{"line":238,"column":8},"end":{"line":242,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"disabled","description":"Disabled.","sourceRange":{"start":{"line":247,"column":8},"end":{"line":251,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"required","description":"Required.","sourceRange":{"start":{"line":256,"column":8},"end":{"line":260,"column":9}},"metadata":{},"type":"boolean | null | undefined"}],"events":[{"type":"CustomEvent","name":"selected-changed","description":"Fired when the `selected` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-select","mixins":["Polymer.IronResizableBehavior","Polymer.IronValidatableBehavior"]},{"description":"An element to handle pagination.\\n\\nExample:\\n\\n \\n ","summary":"","path":"nuxeo-pagination-controls.js","properties":[{"name":"page","type":"number | null | undefined","description":"The current page.","privacy":"public","sourceRange":{"start":{"line":158,"column":8},"end":{"line":162,"column":9}},"metadata":{"polymer":{"notify":true,"attributeType":"Number"}},"defaultValue":"1"},{"name":"numberOfPages","type":"number | null | undefined","description":"The current number of pages.","privacy":"public","sourceRange":{"start":{"line":167,"column":8},"end":{"line":167,"column":29}},"metadata":{"polymer":{"attributeType":"Number"}}}],"methods":[{"name":"_previous","description":"","privacy":"protected","sourceRange":{"start":{"line":171,"column":4},"end":{"line":173,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_next","description":"","privacy":"protected","sourceRange":{"start":{"line":175,"column":4},"end":{"line":177,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_first","description":"","privacy":"protected","sourceRange":{"start":{"line":179,"column":4},"end":{"line":181,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_last","description":"","privacy":"protected","sourceRange":{"start":{"line":183,"column":4},"end":{"line":185,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_isFirst","description":"","privacy":"protected","sourceRange":{"start":{"line":187,"column":4},"end":{"line":189,"column":5}},"metadata":{},"params":[{"name":"page"}]},{"name":"_isLast","description":"","privacy":"protected","sourceRange":{"start":{"line":191,"column":4},"end":{"line":193,"column":5}},"metadata":{},"params":[{"name":"page"}]},{"name":"_computePageOptions","description":"","privacy":"protected","sourceRange":{"start":{"line":195,"column":4},"end":{"line":197,"column":5}},"metadata":{},"params":[{"name":"numberOfPages"}]},{"name":"_computeLimitForOptions","description":"","privacy":"protected","sourceRange":{"start":{"line":199,"column":4},"end":{"line":213,"column":5}},"metadata":{},"params":[{"name":"numberOfPages"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-pagination-controls/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":39,"column":2},"end":{"line":214,"column":3}},"privacy":"public","superclass":"Nuxeo.Element","name":"Nuxeo.PaginationControls","attributes":[{"name":"page","description":"The current page.","sourceRange":{"start":{"line":158,"column":8},"end":{"line":162,"column":9}},"metadata":{},"type":"number | null | undefined"},{"name":"number-of-pages","description":"The current number of pages.","sourceRange":{"start":{"line":167,"column":8},"end":{"line":167,"column":29}},"metadata":{},"type":"number | null | undefined"}],"events":[{"type":"CustomEvent","name":"page-changed","description":"Fired when the `page` property changes.","metadata":{}}],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-pagination-controls"},{"description":"An element for a generic card\\n\\nExample:\\n\\n content\\n\\n### Styling\\n\\nThe following custom properties and mixins are available for styling:\\n\\nCustom property | Description | Default\\n-----------------------|------------------|----------\\n`--nuxeo-card` | Mixin applied to the card | `{}`","summary":"","path":"widgets/nuxeo-card.js","properties":[{"name":"icon","type":"string | null | undefined","description":"Heading icon","privacy":"public","sourceRange":{"start":{"line":142,"column":8},"end":{"line":145,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"null"},{"name":"heading","type":"string | null | undefined","description":"Heading of the card","privacy":"public","sourceRange":{"start":{"line":150,"column":8},"end":{"line":153,"column":9}},"metadata":{"polymer":{"attributeType":"String"}},"defaultValue":"null"},{"name":"collapsible","type":"boolean | null | undefined","description":"If the card is collapsible","privacy":"public","sourceRange":{"start":{"line":158,"column":8},"end":{"line":162,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"},{"name":"opened","type":"boolean | null | undefined","description":"If is a collapsible card, if it is opened or not","privacy":"public","sourceRange":{"start":{"line":167,"column":8},"end":{"line":171,"column":9}},"metadata":{"polymer":{"attributeType":"Boolean"}},"defaultValue":"false"}],"methods":[{"name":"_hasHeading","description":"","privacy":"protected","sourceRange":{"start":{"line":175,"column":4},"end":{"line":177,"column":5}},"metadata":{},"params":[{"name":"icon"},{"name":"heading"},{"name":"collapsible"}]},{"name":"_opened","description":"","privacy":"protected","sourceRange":{"start":{"line":179,"column":4},"end":{"line":181,"column":5}},"metadata":{},"params":[{"name":"opened"},{"name":"collapsible"}]},{"name":"_toggle","description":"","privacy":"protected","sourceRange":{"start":{"line":183,"column":4},"end":{"line":193,"column":5}},"metadata":{},"params":[],"return":{"type":"void"}},{"name":"_toggleIcon","description":"","privacy":"protected","sourceRange":{"start":{"line":195,"column":4},"end":{"line":197,"column":5}},"metadata":{},"params":[{"name":"opened"}]}],"staticMethods":[],"demos":[{"url":"demo/nuxeo-card/index.html","description":""}],"metadata":{},"sourceRange":{"start":{"line":49,"column":2},"end":{"line":198,"column":3}},"privacy":"public","superclass":"HTMLElement","name":"Nuxeo.Card","attributes":[{"name":"icon","description":"Heading icon","sourceRange":{"start":{"line":142,"column":8},"end":{"line":145,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"heading","description":"Heading of the card","sourceRange":{"start":{"line":150,"column":8},"end":{"line":153,"column":9}},"metadata":{},"type":"string | null | undefined"},{"name":"collapsible","description":"If the card is collapsible","sourceRange":{"start":{"line":158,"column":8},"end":{"line":162,"column":9}},"metadata":{},"type":"boolean | null | undefined"},{"name":"opened","description":"If is a collapsible card, if it is opened or not","sourceRange":{"start":{"line":167,"column":8},"end":{"line":171,"column":9}},"metadata":{},"type":"boolean | null | undefined"}],"events":[],"styling":{"cssVariables":[],"selectors":[]},"slots":[],"tagname":"nuxeo-card","mixins":["Polymer.IronResizableBehavior"]},{"description":"A dialog element.\\n\\nIf a `