@qaecy/cue-ui 0.0.47 → 0.0.48
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/36.js +1 -1
- package/396.js +1 -0
- package/399.js +1 -1
- package/4.js +1 -1
- package/560.js +1 -1
- package/719.js +1 -1
- package/724.js +1 -1
- package/{673.js → 773.js} +1 -1
- package/791.js +1 -1
- package/839.js +1 -0
- package/855.js +1 -0
- package/872.js +1 -1
- package/879.js +1 -1
- package/931.js +1 -1
- package/944.js +1 -0
- package/README.md +49 -50
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/2.js +0 -1
- package/882.js +0 -1
package/README.md
CHANGED
|
@@ -7,14 +7,13 @@ Drop them into any HTML page — no build step required.
|
|
|
7
7
|
|
|
8
8
|
| Custom element | Description |
|
|
9
9
|
| ------------------------------- | --------------------------------------------------------------------------------- |
|
|
10
|
-
| `<cue-logo>` | Animated
|
|
10
|
+
| `<cue-logo>` | Animated Cue logo |
|
|
11
11
|
| `<cue-document-viewer>` | Document viewer with Cue SDK integration (PDF, BIM, CAD, images, spreadsheets, …) |
|
|
12
12
|
| `<cue-document-list>` | Lazy document list that fetches metadata from the Cue SDK |
|
|
13
13
|
| `<cue-entity-list>` | Lazy entity list that fetches entity data from the Cue SDK |
|
|
14
14
|
| `<cue-entity-viewer>` | Full entity detail view — info, relationships, documents, and optional map |
|
|
15
|
+
| `<cue-context-viewer>` | Context document viewer — shows documents, entities, or both based on context |
|
|
15
16
|
| `<cue-project-list>` | Lists all projects the authenticated user is a member of, with an optional map |
|
|
16
|
-
| `<cue-id-builder>` | Interactive IFC/SPARQL ID builder |
|
|
17
|
-
| `<cue-block-project-documents>` | Project documents content block with charts and statistics |
|
|
18
17
|
| `<cue-document-charts>` | Interactive document-statistics charts (by file type and/or content category) |
|
|
19
18
|
| `<cue-sparql-table>` | Declarative, column-configurable SPARQL table with built-in Cue SDK integration |
|
|
20
19
|
|
|
@@ -174,18 +173,6 @@ document.getElementById('list-host').appendChild(list);
|
|
|
174
173
|
|
|
175
174
|
---
|
|
176
175
|
|
|
177
|
-
## `<cue-id-builder>`
|
|
178
|
-
|
|
179
|
-
A self-contained interactive tool that converts a text string into a context-based GUID (used for IFC/SPARQL identifiers). No external inputs required — drop it in and it works standalone.
|
|
180
|
-
|
|
181
|
-
```html
|
|
182
|
-
<cue-id-builder></cue-id-builder>
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
> **Loader** — add `cue-id-builder` to `data-components` if you create it dynamically; otherwise it is detected automatically. See [CDN quickstart](#cdn-quickstart).
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
176
|
## `<cue-document-viewer>`
|
|
190
177
|
|
|
191
178
|
Fetches and renders a Cue document. Automatically picks the best viewer based on the file type. Requires an authenticated `Cue` SDK instance.
|
|
@@ -446,41 +433,6 @@ charts.sdkState = { documents: myProjectDocs, availableContentCategories: myCate
|
|
|
446
433
|
|
|
447
434
|
---
|
|
448
435
|
|
|
449
|
-
## `<cue-block-project-documents>`
|
|
450
|
-
|
|
451
|
-
A content block that visualises project document statistics — documents by content category, by file type, total size, and duplicates — using interactive pie charts.
|
|
452
|
-
|
|
453
|
-
| Property | Type | Required | Description |
|
|
454
|
-
| -------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------ |
|
|
455
|
-
| `data` | `ProjectDocumentsData` | ❌ | Document statistics payload. The component renders empty until set. |
|
|
456
|
-
| `config` | `BlockConfig` | ✅ | Block configuration including `projectId`, `handlers`, and privileges. **Set as a JS property.** |
|
|
457
|
-
|
|
458
|
-
```js
|
|
459
|
-
await customElements.whenDefined('cue-block-project-documents');
|
|
460
|
-
|
|
461
|
-
const block = document.createElement('cue-block-project-documents');
|
|
462
|
-
|
|
463
|
-
block.config = {
|
|
464
|
-
projectId: 'your-project-id',
|
|
465
|
-
graphIsSaturated: false,
|
|
466
|
-
privileges: { canEdit: false },
|
|
467
|
-
portalBaseURL: 'https://app.qaecy.com',
|
|
468
|
-
resourceBaseURL: 'https://cue.qaecy.com/r/',
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
block.data = {
|
|
472
|
-
documentsBySuffix: { pdf: { count: 12, size: 4096000 } },
|
|
473
|
-
documentsByContentCategory: { drawings: { count: 5, size: 1024000 } },
|
|
474
|
-
duplicateCount: 2,
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
document.getElementById('block-host').appendChild(block);
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
> **Loader** — add `cue-block-project-documents` to `data-components` if you create it dynamically; otherwise it is detected automatically. See [CDN quickstart](#cdn-quickstart).
|
|
481
|
-
|
|
482
|
-
---
|
|
483
|
-
|
|
484
436
|
## `<cue-entity-viewer>`
|
|
485
437
|
|
|
486
438
|
Renders the full detail view for a single entity: an info panel (label + categories), a relationship graph, linked documents, and an optional location map.
|
|
@@ -527,6 +479,53 @@ document.getElementById('viewer-host').appendChild(viewer);
|
|
|
527
479
|
|
|
528
480
|
---
|
|
529
481
|
|
|
482
|
+
## `<cue-context-viewer>`
|
|
483
|
+
|
|
484
|
+
Fetches a context document from the Cue backend and renders its items as a lazy document list, an entity list, or a tabbed view combining both — depending on what item types the context contains.
|
|
485
|
+
|
|
486
|
+
Requires an authenticated `Cue` SDK instance. Context documents are fetched via `cue.api.contexts.getContext()`. Document and entity metadata are loaded lazily as the user scrolls.
|
|
487
|
+
|
|
488
|
+
| Property | Type | Required | Description |
|
|
489
|
+
| ----------- | -------------------- | -------- | -------------------------------------------------------------------------------- |
|
|
490
|
+
| `cue` | `Cue` (SDK instance) | ✅ | Authenticated Cue SDK instance. **Set as a JS property**, not an HTML attribute. |
|
|
491
|
+
| `projectId` | `string` | ✅ | Cue project (space) ID the context belongs to. |
|
|
492
|
+
| `contextId` | `string` | ✅ | Context document UUID to display. |
|
|
493
|
+
| `variant` | `'none' \| 'default' \| 'primary' \| 'secondary' \| 'accent' \| 'fade'` | ❌ | Card styling variant passed to the inner document list. Default: `'none'`. |
|
|
494
|
+
| `showLogo` | `boolean` | ❌ | Show the Cue logo link in the top-right corner. Default: `false`. |
|
|
495
|
+
|
|
496
|
+
The component automatically determines which view to render:
|
|
497
|
+
|
|
498
|
+
- **Documents only** — a lazy document table (same as `<cue-document-list>`)
|
|
499
|
+
- **Entities only** — a lazy entity table with optional map (same as `<cue-entity-list>`)
|
|
500
|
+
- **Both** — a tabbed view with a Documents tab and an Entities tab
|
|
501
|
+
|
|
502
|
+
The component emits one event:
|
|
503
|
+
|
|
504
|
+
| Event | Payload | Description |
|
|
505
|
+
| ------------------ | ----------- | ----------------------------------------- |
|
|
506
|
+
| `entityRowClicked` | `EntityRow` | Fires when the user clicks an entity row. |
|
|
507
|
+
|
|
508
|
+
```js
|
|
509
|
+
await customElements.whenDefined('cue-context-viewer');
|
|
510
|
+
|
|
511
|
+
const viewer = document.createElement('cue-context-viewer');
|
|
512
|
+
|
|
513
|
+
// Required: set as JS properties, not HTML attributes
|
|
514
|
+
viewer.cue = cue;
|
|
515
|
+
viewer.projectId = 'your-project-id';
|
|
516
|
+
viewer.contextId = 'your-context-id';
|
|
517
|
+
|
|
518
|
+
viewer.addEventListener('entityRowClicked', (e) => {
|
|
519
|
+
console.log('Entity clicked:', e.detail);
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
document.getElementById('viewer-host').appendChild(viewer);
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
> **Loader** — add `cue-context-viewer` to `data-components` if you create it dynamically; otherwise it is detected automatically. See [CDN quickstart](#cdn-quickstart).
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
530
529
|
## `<cue-project-list>`
|
|
531
530
|
|
|
532
531
|
Fetches all projects the authenticated user is a member of via `cue.projects.listProjects()` and renders them in a sortable, selectable ag-grid table. Projects that carry a `location` (WKT string) automatically show a **Map** tab alongside the **List** tab. Clicking a row emits the project's UUID.
|
package/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{6034(v,p,o){o.d(p,{y:()=>_});var n=o(7705),u=o(7598),m=o(9769),a=o(5187),h=o(2271),e=o(5547);const C=["*"];let y=(()=>{class l{style=(0,n.hFB)("");gap=(0,n.hFB)("m");columns=(0,n.hFB)(1);getStyles=(0,h.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(i){return new(i||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(i,t){2&i&&e.Aen(t.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:C,decls:1,vars:0,template:function(i,t){1&i&&(e.NAR(),e.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return l})();var g=o(2245),s=o(5381),c=o(29);const r=["*"];function b(l,M){if(1&l&&(e.j41(0,"cue-typography",2),e.EFF(1),e.k0s()),2&l){const d=e.XpG();e.R7$(),e.SpI(" ",d.label()," ")}}let _=(()=>{class l{label=(0,n.hFB)("");variant=(0,n.hFB)("default");shadow=(0,n.hFB)(!1);padded=(0,n.hFB)(!0);showCloseBtn=(0,n.hFB)(!0);position=(0,n.hFB)("top-left");clickedClose=(0,n.CGW)();margin=(0,n.hFB)("0.5rem");close(d){d.stopPropagation(),d.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(i){return new(i||l)};static \u0275cmp=e.VBU({type:l,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:r,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(i,t){1&i&&(e.NAR(),e.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),e.nVh(4,b,2,1,"cue-typography",2),e.nrm(5,"span",3),e.j41(6,"cue-svg-icon",4),e.bIt("click",function(f){return t.close(f)}),e.k0s()(),e.SdG(7),e.k0s()()()),2&i&&(e.xc7("top","top-left"===t.position()||"top-right"===t.position()?t.margin():"null")("bottom","bottom-left"===t.position()||"bottom-right"===t.position()?t.margin():"null")("left","top-left"===t.position()||"bottom-left"===t.position()?t.margin():"null")("right","top-right"===t.position()||"bottom-right"===t.position()?t.margin():"null"),e.Y8G("variant",t.variant())("shadow",t.shadow())("padded",t.padded()),e.R7$(3),e.xc7("padding",t.padded()?"0":"10px"),e.R7$(),e.vxM(t.label()&&"undefined"!==t.label()?4:-1))},dependencies:[m.MD,a.Z,y,g.Typography,s.n,c.A,u.T1],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content;z-index:100}"]})}return l})()},9134(v,p,o){o.d(p,{v:()=>h});var n=o(7705),u=o(6034),m=o(7517),a=o(5547);let h=(()=>{class e{title=(0,n.hFB)("Legend");layers=(0,n.hFB)([]);position=(0,n.hFB)("top-left");close=(0,n.CGW)();visibilityChange=(0,n.CGW)();layerChange=(0,n.CGW)();visibilityAll=(0,n.CGW)();static \u0275fac=function(g){return new(g||e)};static \u0275cmp=a.VBU({type:e,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(g,s){1&g&&(a.j41(0,"cue-draggable-card",0),a.bIt("clickedClose",function(){return s.close.emit()}),a.j41(1,"div",1)(2,"cue-layer-legend",2),a.bIt("visibilityAll",function(r){return s.visibilityAll.emit(r)})("layerChange",function(r){return s.layerChange.emit(r)})("visibilityChange",function(r){return s.visibilityChange.emit(r)}),a.k0s()()()),2&g&&(a.Y8G("label",s.title())("padded",!1)("position",s.position()),a.R7$(2),a.Y8G("layers",s.layers()))},dependencies:[u.y,m.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return e})()}}]);
|