@verdocs/web-sdk 1.0.3 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Content-a339b396.js → Content-986f7a13.js} +39 -6
- package/dist/cjs/document-status-indicator.cjs.entry.js +2 -2
- package/dist/cjs/dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/{index-2293949e.js → index-e2fb537e.js} +359 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/org-popup.cjs.entry.js +2 -2
- package/dist/cjs/pdf-viewer.cjs.entry.js +6 -2
- package/dist/cjs/search-box.cjs.entry.js +22 -3
- package/dist/cjs/search-embed.cjs.entry.js +1 -1
- package/dist/cjs/search-quick-functions.cjs.entry.js +2 -2
- package/dist/cjs/search-recent.cjs.entry.js +3 -3
- package/dist/cjs/search-saved.cjs.entry.js +3 -3
- package/dist/cjs/search-starred.cjs.entry.js +6 -5
- package/dist/cjs/search-tabs.cjs.entry.js +2 -1
- package/dist/cjs/tags-indicator.cjs.entry.js +2 -2
- package/dist/cjs/template-card.cjs.entry.js +2 -2
- package/dist/cjs/toggle-icon-buttons.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
- package/dist/collection/api/endpoint.js +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/controls/document-status-indicator/document-status-indicator.css +10 -4
- package/dist/collection/components/controls/document-status-indicator/document-status-indicator.js +1 -2
- package/dist/collection/components/controls/dropdown-menu/dropdown-menu.css +23 -19
- package/dist/collection/components/controls/dropdown-menu/dropdown-menu.js +1 -2
- package/dist/collection/components/controls/tags-indicator/tags-indicator.css +8 -2
- package/dist/collection/components/controls/tags-indicator/tags-indicator.js +1 -2
- package/dist/collection/components/controls/toggle-icon-buttons/toggle-icon-buttons.css +18 -12
- package/dist/collection/components/controls/toggle-icon-buttons/toggle-icon-buttons.js +1 -2
- package/dist/collection/components/elements/org-popup/org-popup.css +17 -17
- package/dist/collection/components/elements/org-popup/org-popup.js +1 -2
- package/dist/collection/components/elements/search-box/close.svg +3 -0
- package/dist/collection/components/elements/search-box/search-box.css +70 -2
- package/dist/collection/components/elements/search-box/search-box.js +70 -4
- package/dist/collection/components/elements/search-box/search-box.stories.js +7 -9
- package/dist/collection/components/elements/search-box/search.svg +3 -0
- package/dist/collection/components/elements/search-quick-functions/search-quick-functions.css +10 -12
- package/dist/collection/components/elements/search-quick-functions/search-quick-functions.js +1 -2
- package/dist/collection/components/elements/search-recent/search-recent.css +15 -22
- package/dist/collection/components/elements/search-recent/search-recent.js +1 -2
- package/dist/collection/components/elements/search-saved/search-saved.css +14 -20
- package/dist/collection/components/elements/search-saved/search-saved.js +1 -2
- package/dist/collection/components/elements/search-starred/search-starred.css +22 -40
- package/dist/collection/components/elements/search-starred/search-starred.js +31 -8
- package/dist/collection/components/elements/search-starred/search-starred.stories.js +13 -15
- package/dist/collection/components/elements/search-tabs/search-tabs.css +1 -1
- package/dist/collection/components/elements/search-tabs/search-tabs.js +8 -3
- package/dist/collection/components/elements/template-card/template-card.css +21 -13
- package/dist/collection/components/elements/template-card/template-card.js +2 -3
- package/dist/collection/components/embeds/search-embed/search-embed.css +1 -1
- package/dist/collection/components/embeds/search-embed/search-embed.js +1 -1
- package/dist/collection/components/pdf-viewer/pdf-viewer.css +7 -4
- package/dist/collection/components/pdf-viewer/pdf-viewer.js +2 -3
- package/dist/custom-elements/index.js +94 -49
- package/dist/custom-elements.json +266 -0
- package/dist/docs.json +69 -18
- package/dist/esm/{Content-68a13fb0.js → Content-386637c8.js} +39 -6
- package/dist/esm/document-status-indicator.entry.js +2 -2
- package/dist/esm/dropdown-menu.entry.js +2 -2
- package/dist/esm/{index-69a4b693.js → index-183a8995.js} +359 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/org-popup.entry.js +2 -2
- package/dist/esm/pdf-viewer.entry.js +6 -2
- package/dist/esm/search-box.entry.js +22 -3
- package/dist/esm/search-embed.entry.js +1 -1
- package/dist/esm/search-quick-functions.entry.js +2 -2
- package/dist/esm/search-recent.entry.js +3 -3
- package/dist/esm/search-saved.entry.js +3 -3
- package/dist/esm/search-starred.entry.js +6 -5
- package/dist/esm/search-tabs.entry.js +2 -1
- package/dist/esm/tags-indicator.entry.js +2 -2
- package/dist/esm/template-card.entry.js +2 -2
- package/dist/esm/toggle-icon-buttons.entry.js +2 -2
- package/dist/esm/verdocs-web-sdk.js +2 -2
- package/dist/esm-es5/{Content-68a13fb0.js → Content-386637c8.js} +1 -1
- package/dist/esm-es5/document-status-indicator.entry.js +1 -1
- package/dist/esm-es5/dropdown-menu.entry.js +1 -1
- package/dist/esm-es5/index-183a8995.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/org-popup.entry.js +1 -1
- package/dist/esm-es5/pdf-viewer.entry.js +2 -2
- package/dist/esm-es5/search-box.entry.js +1 -1
- package/dist/esm-es5/search-embed.entry.js +1 -1
- package/dist/esm-es5/search-quick-functions.entry.js +1 -1
- package/dist/esm-es5/search-recent.entry.js +1 -1
- package/dist/esm-es5/search-saved.entry.js +1 -1
- package/dist/esm-es5/search-starred.entry.js +1 -1
- package/dist/esm-es5/search-tabs.entry.js +1 -1
- package/dist/esm-es5/tags-indicator.entry.js +1 -1
- package/dist/esm-es5/template-card.entry.js +1 -1
- package/dist/esm-es5/toggle-icon-buttons.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/api/endpoint.d.ts +1 -0
- package/dist/types/components/elements/search-box/search-box.d.ts +14 -0
- package/dist/types/components/elements/search-box/search-box.stories.d.ts +3 -2
- package/dist/types/components/elements/search-starred/search-starred.d.ts +10 -1
- package/dist/types/components/elements/search-starred/search-starred.stories.d.ts +2 -1
- package/dist/types/components/elements/search-tabs/search-tabs.d.ts +2 -0
- package/dist/types/components/elements/template-card/template-card.d.ts +1 -1
- package/dist/types/components.d.ts +13 -2
- package/dist/verdocs-web-sdk/p-153879ad.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-299c2e14.system.entry.js → p-1d1bc463.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-29cb7cbc.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f6bd3c28.entry.js → p-2cec77cf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79141dc5.entry.js → p-32a5788a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad0daf3f.system.js → p-33f73371.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-349248f0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4ffe65f0.entry.js → p-36082c90.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3a032151.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3cc8281f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-440d8a73.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d498562e.system.entry.js → p-4d4e090f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-55660c24.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-63107dd5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6b569aa1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4b97efc0.system.entry.js → p-6e033b90.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6ee008ff.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7ab216be.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ea92818e.system.entry.js → p-7d10b067.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-89be87e5.js +1 -0
- package/dist/verdocs-web-sdk/p-92e7863c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-99ebfee7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9af63b8a.system.js +1 -0
- package/dist/verdocs-web-sdk/p-9da35744.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b3d5601a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b466e003.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bb99a203.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cbc784a6.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-ab5a12f2.js → p-cf030985.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f8532ba9.entry.js → p-d73f486f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-dea09611.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e34538bd.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e59eda0c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.css +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +4 -2
- package/dist/esm-es5/index-69a4b693.js +0 -1
- package/dist/verdocs-web-sdk/p-0851fc9a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-09a2b37a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0c7f99e4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-10b8a992.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-16920169.js +0 -1
- package/dist/verdocs-web-sdk/p-1d99fd7e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-20def3b4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-35c52a07.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-58183d59.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-64b6c2b3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7427f970.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7b071b76.system.js +0 -1
- package/dist/verdocs-web-sdk/p-83fe27d7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-918d1153.system.js +0 -1
- package/dist/verdocs-web-sdk/p-943c181c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a10f4a2a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a415baa5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-acbc9fd7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ad52e615.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-af8bde91.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bab548fb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cda6aa04.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-eaee7c4a.system.entry.js +0 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
const NAMESPACE = 'verdocs-web-sdk';
|
|
2
2
|
|
|
3
3
|
let scopeId;
|
|
4
|
+
let contentRef;
|
|
4
5
|
let hostTagName;
|
|
6
|
+
let useNativeShadowDom = false;
|
|
7
|
+
let checkSlotFallbackVisibility = false;
|
|
8
|
+
let checkSlotRelocate = false;
|
|
5
9
|
let isSvgMode = false;
|
|
6
10
|
let queuePending = false;
|
|
7
11
|
const win = typeof window !== 'undefined' ? window : {};
|
|
@@ -167,6 +171,7 @@ const isComplexType = (o) => {
|
|
|
167
171
|
const h = (nodeName, vnodeData, ...children) => {
|
|
168
172
|
let child = null;
|
|
169
173
|
let key = null;
|
|
174
|
+
let slotName = null;
|
|
170
175
|
let simple = false;
|
|
171
176
|
let lastSimple = false;
|
|
172
177
|
let vNodeChildren = [];
|
|
@@ -198,6 +203,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
198
203
|
if (vnodeData.key) {
|
|
199
204
|
key = vnodeData.key;
|
|
200
205
|
}
|
|
206
|
+
if (vnodeData.name) {
|
|
207
|
+
slotName = vnodeData.name;
|
|
208
|
+
}
|
|
201
209
|
{
|
|
202
210
|
const classData = vnodeData.className || vnodeData.class;
|
|
203
211
|
if (classData) {
|
|
@@ -218,6 +226,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
218
226
|
{
|
|
219
227
|
vnode.$key$ = key;
|
|
220
228
|
}
|
|
229
|
+
{
|
|
230
|
+
vnode.$name$ = slotName;
|
|
231
|
+
}
|
|
221
232
|
return vnode;
|
|
222
233
|
};
|
|
223
234
|
const newVNode = (tag, text) => {
|
|
@@ -234,6 +245,9 @@ const newVNode = (tag, text) => {
|
|
|
234
245
|
{
|
|
235
246
|
vnode.$key$ = null;
|
|
236
247
|
}
|
|
248
|
+
{
|
|
249
|
+
vnode.$name$ = null;
|
|
250
|
+
}
|
|
237
251
|
return vnode;
|
|
238
252
|
};
|
|
239
253
|
const Host = {};
|
|
@@ -372,13 +386,36 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
372
386
|
let i = 0;
|
|
373
387
|
let elm;
|
|
374
388
|
let childNode;
|
|
389
|
+
let oldVNode;
|
|
390
|
+
if (!useNativeShadowDom) {
|
|
391
|
+
// remember for later we need to check to relocate nodes
|
|
392
|
+
checkSlotRelocate = true;
|
|
393
|
+
if (newVNode.$tag$ === 'slot') {
|
|
394
|
+
if (scopeId) {
|
|
395
|
+
// scoped css needs to add its scoped id to the parent element
|
|
396
|
+
parentElm.classList.add(scopeId + '-s');
|
|
397
|
+
}
|
|
398
|
+
newVNode.$flags$ |= newVNode.$children$
|
|
399
|
+
? // slot element has fallback content
|
|
400
|
+
2 /* isSlotFallback */
|
|
401
|
+
: // slot element does not have fallback content
|
|
402
|
+
1 /* isSlotReference */;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
375
405
|
if (newVNode.$text$ !== null) {
|
|
376
406
|
// create text node
|
|
377
407
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
378
408
|
}
|
|
409
|
+
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
410
|
+
// create a slot reference node
|
|
411
|
+
elm = newVNode.$elm$ =
|
|
412
|
+
doc.createTextNode('');
|
|
413
|
+
}
|
|
379
414
|
else {
|
|
380
415
|
// create element
|
|
381
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$
|
|
416
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
417
|
+
? 'slot-fb'
|
|
418
|
+
: newVNode.$tag$));
|
|
382
419
|
// add css classes, attrs, props, listeners, etc.
|
|
383
420
|
{
|
|
384
421
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -391,7 +428,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
391
428
|
if (newVNode.$children$) {
|
|
392
429
|
for (i = 0; i < newVNode.$children$.length; ++i) {
|
|
393
430
|
// create the node
|
|
394
|
-
childNode = createElm(oldParentVNode, newVNode, i);
|
|
431
|
+
childNode = createElm(oldParentVNode, newVNode, i, elm);
|
|
395
432
|
// return node could have been null
|
|
396
433
|
if (childNode) {
|
|
397
434
|
// append our new node
|
|
@@ -400,20 +437,62 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
400
437
|
}
|
|
401
438
|
}
|
|
402
439
|
}
|
|
440
|
+
{
|
|
441
|
+
elm['s-hn'] = hostTagName;
|
|
442
|
+
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
443
|
+
// remember the content reference comment
|
|
444
|
+
elm['s-sr'] = true;
|
|
445
|
+
// remember the content reference comment
|
|
446
|
+
elm['s-cr'] = contentRef;
|
|
447
|
+
// remember the slot name, or empty string for default slot
|
|
448
|
+
elm['s-sn'] = newVNode.$name$ || '';
|
|
449
|
+
// check if we've got an old vnode for this slot
|
|
450
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
451
|
+
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
452
|
+
// we've got an old slot vnode and the wrapper is being replaced
|
|
453
|
+
// so let's move the old slot content back to it's original location
|
|
454
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
403
458
|
return elm;
|
|
404
459
|
};
|
|
460
|
+
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
461
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
462
|
+
const oldSlotChildNodes = parentElm.childNodes;
|
|
463
|
+
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
464
|
+
const childNode = oldSlotChildNodes[i];
|
|
465
|
+
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
466
|
+
// // this child node in the old element is from another component
|
|
467
|
+
// // remove this node from the old slot's parent
|
|
468
|
+
// childNode.remove();
|
|
469
|
+
// and relocate it back to it's original location
|
|
470
|
+
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
471
|
+
// remove the old original location comment entirely
|
|
472
|
+
// later on the patch function will know what to do
|
|
473
|
+
// and move this to the correct spot in need be
|
|
474
|
+
childNode['s-ol'].remove();
|
|
475
|
+
childNode['s-ol'] = undefined;
|
|
476
|
+
checkSlotRelocate = true;
|
|
477
|
+
}
|
|
478
|
+
if (recursive) {
|
|
479
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
483
|
+
};
|
|
405
484
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
406
|
-
let containerElm = (parentElm);
|
|
485
|
+
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
407
486
|
let childNode;
|
|
408
487
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
409
488
|
containerElm = containerElm.shadowRoot;
|
|
410
489
|
}
|
|
411
490
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
412
491
|
if (vnodes[startIdx]) {
|
|
413
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
492
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
414
493
|
if (childNode) {
|
|
415
494
|
vnodes[startIdx].$elm$ = childNode;
|
|
416
|
-
containerElm.insertBefore(childNode, before);
|
|
495
|
+
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
417
496
|
}
|
|
418
497
|
}
|
|
419
498
|
}
|
|
@@ -423,6 +502,20 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
423
502
|
if ((vnode = vnodes[startIdx])) {
|
|
424
503
|
elm = vnode.$elm$;
|
|
425
504
|
callNodeRefs(vnode);
|
|
505
|
+
{
|
|
506
|
+
// we're removing this element
|
|
507
|
+
// so it's possible we need to show slot fallback content now
|
|
508
|
+
checkSlotFallbackVisibility = true;
|
|
509
|
+
if (elm['s-ol']) {
|
|
510
|
+
// remove the original location comment
|
|
511
|
+
elm['s-ol'].remove();
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
// it's possible that child nodes of the node
|
|
515
|
+
// that's being removed are slot nodes
|
|
516
|
+
putBackInOriginalLocation(elm, true);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
426
519
|
// remove the vnode's element from the dom
|
|
427
520
|
elm.remove();
|
|
428
521
|
}
|
|
@@ -466,12 +559,20 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
466
559
|
newEndVnode = newCh[--newEndIdx];
|
|
467
560
|
}
|
|
468
561
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
562
|
+
// Vnode moved right
|
|
563
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
564
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
565
|
+
}
|
|
469
566
|
patch(oldStartVnode, newEndVnode);
|
|
470
567
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
471
568
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
472
569
|
newEndVnode = newCh[--newEndIdx];
|
|
473
570
|
}
|
|
474
571
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
572
|
+
// Vnode moved left
|
|
573
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
574
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
575
|
+
}
|
|
475
576
|
patch(oldEndVnode, newStartVnode);
|
|
476
577
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
477
578
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
@@ -491,7 +592,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
491
592
|
if (idxInOld >= 0) {
|
|
492
593
|
elmToMove = oldCh[idxInOld];
|
|
493
594
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
494
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
595
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
495
596
|
}
|
|
496
597
|
else {
|
|
497
598
|
patch(elmToMove, newStartVnode);
|
|
@@ -502,12 +603,12 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
502
603
|
}
|
|
503
604
|
else {
|
|
504
605
|
// new element
|
|
505
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
606
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
506
607
|
newStartVnode = newCh[++newStartIdx];
|
|
507
608
|
}
|
|
508
609
|
if (node) {
|
|
509
610
|
{
|
|
510
|
-
oldStartVnode.$elm
|
|
611
|
+
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
511
612
|
}
|
|
512
613
|
}
|
|
513
614
|
}
|
|
@@ -523,18 +624,30 @@ const isSameVnode = (vnode1, vnode2) => {
|
|
|
523
624
|
// compare if two vnode to see if they're "technically" the same
|
|
524
625
|
// need to have the same element tag, and same key to be the same
|
|
525
626
|
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
627
|
+
if (vnode1.$tag$ === 'slot') {
|
|
628
|
+
return vnode1.$name$ === vnode2.$name$;
|
|
629
|
+
}
|
|
526
630
|
{
|
|
527
631
|
return vnode1.$key$ === vnode2.$key$;
|
|
528
632
|
}
|
|
529
633
|
}
|
|
530
634
|
return false;
|
|
531
635
|
};
|
|
636
|
+
const referenceNode = (node) => {
|
|
637
|
+
// this node was relocated to a new location in the dom
|
|
638
|
+
// because of some other component's slot
|
|
639
|
+
// but we still have an html comment in place of where
|
|
640
|
+
// it's original location was according to it's original vdom
|
|
641
|
+
return (node && node['s-ol']) || node;
|
|
642
|
+
};
|
|
643
|
+
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
532
644
|
const patch = (oldVNode, newVNode) => {
|
|
533
645
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
534
646
|
const oldChildren = oldVNode.$children$;
|
|
535
647
|
const newChildren = newVNode.$children$;
|
|
536
648
|
const tag = newVNode.$tag$;
|
|
537
649
|
const text = newVNode.$text$;
|
|
650
|
+
let defaultHolder;
|
|
538
651
|
if (text === null) {
|
|
539
652
|
// element node
|
|
540
653
|
{
|
|
@@ -565,12 +678,147 @@ const patch = (oldVNode, newVNode) => {
|
|
|
565
678
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
566
679
|
}
|
|
567
680
|
}
|
|
681
|
+
else if ((defaultHolder = elm['s-cr'])) {
|
|
682
|
+
// this element has slotted content
|
|
683
|
+
defaultHolder.parentNode.textContent = text;
|
|
684
|
+
}
|
|
568
685
|
else if (oldVNode.$text$ !== text) {
|
|
569
686
|
// update the text content for the text only vnode
|
|
570
687
|
// and also only if the text is different than before
|
|
571
688
|
elm.data = text;
|
|
572
689
|
}
|
|
573
690
|
};
|
|
691
|
+
const updateFallbackSlotVisibility = (elm) => {
|
|
692
|
+
// tslint:disable-next-line: prefer-const
|
|
693
|
+
let childNodes = elm.childNodes;
|
|
694
|
+
let childNode;
|
|
695
|
+
let i;
|
|
696
|
+
let ilen;
|
|
697
|
+
let j;
|
|
698
|
+
let slotNameAttr;
|
|
699
|
+
let nodeType;
|
|
700
|
+
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
701
|
+
childNode = childNodes[i];
|
|
702
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
703
|
+
if (childNode['s-sr']) {
|
|
704
|
+
// this is a slot fallback node
|
|
705
|
+
// get the slot name for this slot reference node
|
|
706
|
+
slotNameAttr = childNode['s-sn'];
|
|
707
|
+
// by default always show a fallback slot node
|
|
708
|
+
// then hide it if there are other slots in the light dom
|
|
709
|
+
childNode.hidden = false;
|
|
710
|
+
for (j = 0; j < ilen; j++) {
|
|
711
|
+
nodeType = childNodes[j].nodeType;
|
|
712
|
+
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
713
|
+
// this sibling node is from a different component OR is a named fallback slot node
|
|
714
|
+
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
715
|
+
childNode.hidden = true;
|
|
716
|
+
break;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
else {
|
|
720
|
+
// this is a default fallback slot node
|
|
721
|
+
// any element or text node (with content)
|
|
722
|
+
// should hide the default fallback slot node
|
|
723
|
+
if (nodeType === 1 /* ElementNode */ ||
|
|
724
|
+
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
725
|
+
childNode.hidden = true;
|
|
726
|
+
break;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
// keep drilling down
|
|
732
|
+
updateFallbackSlotVisibility(childNode);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
const relocateNodes = [];
|
|
737
|
+
const relocateSlotContent = (elm) => {
|
|
738
|
+
// tslint:disable-next-line: prefer-const
|
|
739
|
+
let childNode;
|
|
740
|
+
let node;
|
|
741
|
+
let hostContentNodes;
|
|
742
|
+
let slotNameAttr;
|
|
743
|
+
let relocateNodeData;
|
|
744
|
+
let j;
|
|
745
|
+
let i = 0;
|
|
746
|
+
let childNodes = elm.childNodes;
|
|
747
|
+
let ilen = childNodes.length;
|
|
748
|
+
for (; i < ilen; i++) {
|
|
749
|
+
childNode = childNodes[i];
|
|
750
|
+
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
751
|
+
// first got the content reference comment node
|
|
752
|
+
// then we got it's parent, which is where all the host content is in now
|
|
753
|
+
hostContentNodes = node.parentNode.childNodes;
|
|
754
|
+
slotNameAttr = childNode['s-sn'];
|
|
755
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
756
|
+
node = hostContentNodes[j];
|
|
757
|
+
if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
|
|
758
|
+
// let's do some relocating to its new home
|
|
759
|
+
// but never relocate a content reference node
|
|
760
|
+
// that is suppose to always represent the original content location
|
|
761
|
+
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
762
|
+
// it's possible we've already decided to relocate this node
|
|
763
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
764
|
+
// made some changes to slots
|
|
765
|
+
// let's make sure we also double check
|
|
766
|
+
// fallbacks are correctly hidden or shown
|
|
767
|
+
checkSlotFallbackVisibility = true;
|
|
768
|
+
node['s-sn'] = node['s-sn'] || slotNameAttr;
|
|
769
|
+
if (relocateNodeData) {
|
|
770
|
+
// previously we never found a slot home for this node
|
|
771
|
+
// but turns out we did, so let's remember it now
|
|
772
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
// add to our list of nodes to relocate
|
|
776
|
+
relocateNodes.push({
|
|
777
|
+
$slotRefNode$: childNode,
|
|
778
|
+
$nodeToRelocate$: node,
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
if (node['s-sr']) {
|
|
782
|
+
relocateNodes.map((relocateNode) => {
|
|
783
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
784
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
785
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
786
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
793
|
+
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
794
|
+
// if we never find a home for this element then we'll need to hide it
|
|
795
|
+
relocateNodes.push({
|
|
796
|
+
$nodeToRelocate$: node,
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
803
|
+
relocateSlotContent(childNode);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
808
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
809
|
+
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
810
|
+
return true;
|
|
811
|
+
}
|
|
812
|
+
if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
|
|
813
|
+
return true;
|
|
814
|
+
}
|
|
815
|
+
return false;
|
|
816
|
+
}
|
|
817
|
+
if (nodeToRelocate['s-sn'] === slotNameAttr) {
|
|
818
|
+
return true;
|
|
819
|
+
}
|
|
820
|
+
return slotNameAttr === '';
|
|
821
|
+
};
|
|
574
822
|
const callNodeRefs = (vNode) => {
|
|
575
823
|
{
|
|
576
824
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -579,6 +827,7 @@ const callNodeRefs = (vNode) => {
|
|
|
579
827
|
};
|
|
580
828
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
581
829
|
const hostElm = hostRef.$hostElement$;
|
|
830
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
582
831
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
583
832
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
584
833
|
hostTagName = hostElm.tagName;
|
|
@@ -589,8 +838,90 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
589
838
|
{
|
|
590
839
|
scopeId = hostElm['s-sc'];
|
|
591
840
|
}
|
|
841
|
+
{
|
|
842
|
+
contentRef = hostElm['s-cr'];
|
|
843
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
844
|
+
// always reset
|
|
845
|
+
checkSlotFallbackVisibility = false;
|
|
846
|
+
}
|
|
592
847
|
// synchronous patch
|
|
593
848
|
patch(oldVNode, rootVnode);
|
|
849
|
+
{
|
|
850
|
+
// while we're moving nodes around existing nodes, temporarily disable
|
|
851
|
+
// the disconnectCallback from working
|
|
852
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
853
|
+
if (checkSlotRelocate) {
|
|
854
|
+
relocateSlotContent(rootVnode.$elm$);
|
|
855
|
+
let relocateData;
|
|
856
|
+
let nodeToRelocate;
|
|
857
|
+
let orgLocationNode;
|
|
858
|
+
let parentNodeRef;
|
|
859
|
+
let insertBeforeNode;
|
|
860
|
+
let refNode;
|
|
861
|
+
let i = 0;
|
|
862
|
+
for (; i < relocateNodes.length; i++) {
|
|
863
|
+
relocateData = relocateNodes[i];
|
|
864
|
+
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
865
|
+
if (!nodeToRelocate['s-ol']) {
|
|
866
|
+
// add a reference node marking this node's original location
|
|
867
|
+
// keep a reference to this node for later lookups
|
|
868
|
+
orgLocationNode =
|
|
869
|
+
doc.createTextNode('');
|
|
870
|
+
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
871
|
+
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
for (i = 0; i < relocateNodes.length; i++) {
|
|
875
|
+
relocateData = relocateNodes[i];
|
|
876
|
+
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
877
|
+
if (relocateData.$slotRefNode$) {
|
|
878
|
+
// by default we're just going to insert it directly
|
|
879
|
+
// after the slot reference node
|
|
880
|
+
parentNodeRef = relocateData.$slotRefNode$.parentNode;
|
|
881
|
+
insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
|
|
882
|
+
orgLocationNode = nodeToRelocate['s-ol'];
|
|
883
|
+
while ((orgLocationNode = orgLocationNode.previousSibling)) {
|
|
884
|
+
refNode = orgLocationNode['s-nr'];
|
|
885
|
+
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
886
|
+
refNode = refNode.nextSibling;
|
|
887
|
+
if (!refNode || !refNode['s-nr']) {
|
|
888
|
+
insertBeforeNode = refNode;
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
894
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
895
|
+
// we've checked that it's worth while to relocate
|
|
896
|
+
// since that the node to relocate
|
|
897
|
+
// has a different next sibling or parent relocated
|
|
898
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
899
|
+
if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {
|
|
900
|
+
// probably a component in the index.html that doesn't have it's hostname set
|
|
901
|
+
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
902
|
+
}
|
|
903
|
+
// add it back to the dom but in its new home
|
|
904
|
+
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
// this node doesn't have a slot home to go to, so let's hide it
|
|
910
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
911
|
+
nodeToRelocate.hidden = true;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
if (checkSlotFallbackVisibility) {
|
|
917
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
918
|
+
}
|
|
919
|
+
// done moving nodes around
|
|
920
|
+
// allow the disconnect callback to work again
|
|
921
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
922
|
+
// always reset
|
|
923
|
+
relocateNodes.length = 0;
|
|
924
|
+
}
|
|
594
925
|
};
|
|
595
926
|
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
596
927
|
const createEvent = (ref, name, flags) => {
|
|
@@ -1017,6 +1348,15 @@ const connectedCallback = (elm) => {
|
|
|
1017
1348
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1018
1349
|
// first time this component has connected
|
|
1019
1350
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1351
|
+
{
|
|
1352
|
+
// initUpdate
|
|
1353
|
+
// if the slot polyfill is required we'll need to put some nodes
|
|
1354
|
+
// in here to act as original content anchors as we move nodes around
|
|
1355
|
+
// host element has been connected to the DOM
|
|
1356
|
+
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1357
|
+
setContentReference(elm);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1020
1360
|
{
|
|
1021
1361
|
// find the first ancestor component (if there is one) and register
|
|
1022
1362
|
// this component as one of the actively loading child components for its ancestor
|
|
@@ -1056,6 +1396,17 @@ const connectedCallback = (elm) => {
|
|
|
1056
1396
|
endConnected();
|
|
1057
1397
|
}
|
|
1058
1398
|
};
|
|
1399
|
+
const setContentReference = (elm) => {
|
|
1400
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
1401
|
+
// or this browser doesn't support native shadow dom
|
|
1402
|
+
// and this host element was NOT created with SSR
|
|
1403
|
+
// let's pick out the inner content for slot projection
|
|
1404
|
+
// create a node to represent where the original
|
|
1405
|
+
// content was first placed, which is useful later on
|
|
1406
|
+
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
1407
|
+
contentRefElm['s-cn'] = true;
|
|
1408
|
+
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1409
|
+
};
|
|
1059
1410
|
const disconnectedCallback = (elm) => {
|
|
1060
1411
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1061
1412
|
const hostRef = getHostRef(elm);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-183a8995.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["document-status-indicator",[[
|
|
13
|
+
return bootstrapLazy([["document-status-indicator",[[0,"document-status-indicator",{"status":[1],"theme":[1]}]]],["dropdown-menu",[[0,"dropdown-menu",{"options":[16],"open":[4],"tall":[4],"isOpen":[32]}]]],["org-popup",[[0,"org-popup",{"organization":[8],"theme":[1]}]]],["pdf-viewer",[[0,"pdf-viewer",{"rotation":[2],"src":[1]}]]],["search-box",[[0,"search-box",{"type":[1],"q":[32]}]]],["search-embed",[[1,"search-embed"]]],["search-quick-functions",[[0,"search-quick-functions"]]],["search-recent",[[0,"search-recent",{"limit":[2],"recent":[32]}]]],["search-saved",[[0,"search-saved",{"limit":[2],"saved":[32]}]]],["search-starred",[[0,"search-starred",{"options":[8]}]]],["search-tabs",[[4,"search-tabs",{"selected":[32]}]]],["tags-indicator",[[0,"tags-indicator",{"tags":[16],"theme":[1]}]]],["template-card",[[0,"template-card",{"template":[8],"theme":[1]}]]],["toggle-icon-buttons",[[0,"toggle-icon-buttons",{"options":[16],"theme":[1]},[[6,"click","handleClick"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-183a8995.js';
|
|
2
2
|
|
|
3
3
|
const UserGroup = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#ffffff"><rect fill="none" height="24" width="24"/><g><path d="M4,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C2,12.1,2.9,13,4,13z M5.13,14.1C4.76,14.04,4.39,14,4,14 c-0.99,0-1.93,0.21-2.78,0.58C0.48,14.9,0,15.62,0,16.43V18l4.5,0v-1.61C4.5,15.56,4.73,14.78,5.13,14.1z M20,13c1.1,0,2-0.9,2-2 c0-1.1-0.9-2-2-2s-2,0.9-2,2C18,12.1,18.9,13,20,13z M24,16.43c0-0.81-0.48-1.53-1.22-1.85C21.93,14.21,20.99,14,20,14 c-0.39,0-0.76,0.04-1.13,0.1c0.4,0.68,0.63,1.46,0.63,2.29V18l4.5,0V16.43z M16.24,13.65c-1.17-0.52-2.61-0.9-4.24-0.9 c-1.63,0-3.07,0.39-4.24,0.9C6.68,14.13,6,15.21,6,16.39V18h12v-1.61C18,15.21,17.32,14.13,16.24,13.65z M8.07,16 c0.09-0.23,0.13-0.39,0.91-0.69c0.97-0.38,1.99-0.56,3.02-0.56s2.05,0.18,3.02,0.56c0.77,0.3,0.81,0.46,0.91,0.69H8.07z M12,8 c0.55,0,1,0.45,1,1s-0.45,1-1,1s-1-0.45-1-1S11.45,8,12,8 M12,6c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3 C15,7.34,13.66,6,12,6L12,6z"/></g></svg>`;
|
|
4
4
|
|
|
5
|
-
const orgPopupCss = "
|
|
5
|
+
const orgPopupCss = "org-popup{font-family:sans-serif;font-family:var(--verdocs-font)}org-popup .container{width:242px;height:64px;background-color:#33364b;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}org-popup .container:hover>.popup{display:-ms-flexbox;display:flex;background:#ffffff;color:#33364b}org-popup .icon{-ms-flex:1;flex:1;margin-left:15px;margin-right:0px}org-popup .icon svg{width:24px;margin-bottom:-5px}org-popup .content{color:#fff;-ms-flex:4;flex:4;font-family:sans-serif}org-popup .popup{position:absolute;top:-1px;left:-4px;display:none;border:1px solid var(--verdocs-background-dark);border-radius:10px;width:326px;height:220px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:space-evenly;justify-content:space-evenly;font-family:sans-serif}org-popup .popup-header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;width:242px;height:69px;-ms-flex-pack:justify;justify-content:space-between;font-size:21px;color:#4c56cb}org-popup .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;width:256.2px;height:95px;-ms-flex-pack:space-evenly;justify-content:space-evenly;font-size:13px;text-transform:uppercase}org-popup .popup-body span{display:block;-ms-flex:2 80px;flex:2 80px;margin-left:7px}org-popup .popup-body span:last-child{margin-top:5px}org-popup .status{width:29px;height:29px;background-color:#aeb4bf;border-radius:50%}";
|
|
6
6
|
|
|
7
7
|
let OrgPopup = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-183a8995.js';
|
|
2
2
|
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
|
|
@@ -13472,12 +13472,16 @@ const integerSequence = (start, count) => Array(count)
|
|
|
13472
13472
|
.fill(1)
|
|
13473
13473
|
.map((_, index) => index + start);
|
|
13474
13474
|
|
|
13475
|
-
const pdfViewerCss = ":
|
|
13475
|
+
const pdfViewerCss = "pdf-viewer{font-family:sans-serif;font-family:var(--verdocs-font);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pdf-viewer button.test{color:#fff;cursor:pointer;padding:5px 10px;border-radius:4px;background:#5a5767;border:1px solid #ccc}pdf-viewer #pdf-container canvas{max-width:100%}";
|
|
13476
13476
|
|
|
13477
13477
|
const PDF_WORKER_URL = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdf.version}/pdf.worker.min.js`;
|
|
13478
13478
|
const CMAPS_URL = `https://unpkg.com/pdfjs-dist@${pdf.version}/cmaps/`;
|
|
13479
13479
|
// https://unpkg.com/pdfjs-dist@2.0.550/cmaps/78-EUC-H.bcmap
|
|
13480
13480
|
console.log('[PDFVIEWER] Loading PDF-JS', { PDF_WORKER_URL, CMAPS_URL });
|
|
13481
|
+
// pdf.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.6.347/pdf.worker.min.js';
|
|
13482
|
+
// pdf.GlobalWorkerOptions.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${PDFJSversion}/pdf.worker.min.js`;
|
|
13483
|
+
// TODO: Re-enable this
|
|
13484
|
+
pdf$1.GlobalWorkerOptions.workerSrc = PDF_WORKER_URL;
|
|
13481
13485
|
let PdfViewer = class {
|
|
13482
13486
|
constructor(hostRef) {
|
|
13483
13487
|
registerInstance(this, hostRef);
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-183a8995.js';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const SearchIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>
|
|
5
|
+
</svg>
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
const CloseIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
const searchBoxCss = "search-box{font-family:sans-serif;font-family:var(--verdocs-font)}search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}search-box form button.search{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}search-box form svg{width:12px;height:12px;margin-right:6px}search-box ::-webkit-input-placeholder{color:#aeb4bf}search-box ::-moz-placeholder{color:#aeb4bf}search-box :-ms-input-placeholder{color:#aeb4bf}search-box ::-ms-input-placeholder{color:#aeb4bf}search-box ::placeholder{color:#aeb4bf}";
|
|
4
14
|
|
|
5
15
|
let SearchBox = class {
|
|
6
16
|
constructor(hostRef) {
|
|
7
17
|
registerInstance(this, hostRef);
|
|
18
|
+
this.search = createEvent(this, "search", 7);
|
|
19
|
+
this.type = 'all';
|
|
20
|
+
}
|
|
21
|
+
handleSubmit(e) {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
this.search.emit({ type: this.type, q: this.q });
|
|
24
|
+
}
|
|
25
|
+
handleChange(event) {
|
|
26
|
+
this.q = event.target.value;
|
|
8
27
|
}
|
|
9
28
|
render() {
|
|
10
|
-
return (h(Host, null, h("
|
|
29
|
+
return (h(Host, null, h("form", { onSubmit: e => this.handleSubmit(e) }, this.type !== undefined && this.type !== 'all' && (h("span", { class: "type" }, this.type, "s ", h("button", { class: "remove", innerHTML: CloseIcon }))), h("input", { type: "text", placeholder: "search documents, templates, people...", value: this.q, onInput: e => this.handleChange(e) }), h("button", { onClick: e => this.handleSubmit(e), class: "search" }, h("span", { innerHTML: SearchIcon }), "Search"))));
|
|
11
30
|
}
|
|
12
31
|
};
|
|
13
32
|
SearchBox.style = searchBoxCss;
|