@uxland/primary-shell 1.0.1 → 1.0.3

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/index.js CHANGED
@@ -94,7 +94,7 @@
94
94
  * @license
95
95
  * Copyright 2017 Google LLC
96
96
  * SPDX-License-Identifier: BSD-3-Clause
97
- */function Bs(r,t){return(e,i,s)=>{const n=o=>{var a;return((a=o.renderRoot)==null?void 0:a.querySelector(r))??null};if(t){const{get:o,set:a}=typeof i=="object"?e:s??(()=>{const c=Symbol();return{get(){return this[c]},set(l){this[c]=l}}})();return Qe(e,i,{get(){let c=o.call(this);return c===void 0&&(c=n(this),(c!==null||this.hasUpdated)&&a.call(this,c)),c}})}return Qe(e,i,{get(){return n(this)}})}}const lt={header:"header-region",actionsToolbar:"actions-toolbar-region",main:"main-region",sidebar:"asidebar-region"};function v(r,t,e,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(n=(s<3?o(n):s>3?o(t,e,n):o(t,e))||n);return s>3&&n&&Object.defineProperty(t,e,n),n}/**
97
+ */function Bs(r,t){return(e,i,s)=>{const n=o=>{var a;return((a=o.renderRoot)==null?void 0:a.querySelector(r))??null};if(t){const{get:o,set:a}=typeof i=="object"?e:s??(()=>{const c=Symbol();return{get(){return this[c]},set(l){this[c]=l}}})();return Qe(e,i,{get(){let c=o.call(this);return c===void 0&&(c=n(this),(c!==null||this.hasUpdated)&&a.call(this,c)),c}})}return Qe(e,i,{get(){return n(this)}})}}const lt={header:"header-region",actionsToolbar:"actions-toolbar-region",main:"main-region",sidebar:"asidebar-region",footer:"footer-region"};function v(r,t,e,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(n=(s<3?o(n):s>3?o(t,e,n):o(t,e))||n);return s>3&&n&&Object.defineProperty(t,e,n),n}/**
98
98
  * @license
99
99
  * Copyright 2022 Google LLC
100
100
  * SPDX-License-Identifier: Apache-2.0
package/dist/index.mjs CHANGED
@@ -2278,7 +2278,8 @@ const Pt = {
2278
2278
  header: "header-region",
2279
2279
  actionsToolbar: "actions-toolbar-region",
2280
2280
  main: "main-region",
2281
- sidebar: "asidebar-region"
2281
+ sidebar: "asidebar-region",
2282
+ footer: "footer-region"
2282
2283
  };
2283
2284
  function v(r, t, e, i) {
2284
2285
  var s = arguments.length, n = s < 3 ? t : i === null ? i = Object.getOwnPropertyDescriptor(t, e) : i, o;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Framework Integració modular",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/fim-sandbox/tree/app#readme",
7
7
  "license": "UNLICENSED",
8
8
  "main": "index.ts",
9
9
  "types": "lib/index.d.ts",
10
- "module": "dist/index.js",
11
10
  "files": [
11
+ "src",
12
12
  "lib",
13
13
  "es",
14
14
  "dist"
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/uxland/fim-sandbox-region-test/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@fim-sandbox/core": "^1.0.0",
29
- "@primary/ui-components": "^1.0.0",
28
+ "@uxland/fim-core": "^1.0.0",
29
+ "@uxland/primary-ui-components": "^1.0.0",
30
30
  "@uxland/regions": "^1.0.0",
31
31
  "tslib": "^2.3.0",
32
32
  "lit": "^3.1.0",
@@ -0,0 +1,5 @@
1
+ import { PrimaryShell } from "./primary-shell";
2
+
3
+ export const initializeShell = (element : HTMLElement) => {
4
+ element.appendChild(new PrimaryShell());
5
+ }
@@ -0,0 +1,78 @@
1
+ import {ShellLitRegionHost} from '@uxland/fim-core';
2
+ import {IRegion, region} from '@uxland/regions';
3
+ import {LitElement, css, html} from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { regions} from './regions';
6
+ import '@uxland/primary-ui-components';
7
+
8
+ //@ts-ignore
9
+ @customElement('primary-shell')
10
+ //@ts-ignore
11
+ export class PrimaryShell extends ShellLitRegionHost(LitElement) {
12
+ override render() {
13
+ return html` <div class="container">
14
+ <div class="header">
15
+ <div id="header-region-container"></div>
16
+ <div id="actions-toolbar-region-container"></div>
17
+ </div>
18
+
19
+ <div class="main-container">
20
+ <div id="sidebar-region-region-container"></div>
21
+ <div id="main-region-region-container"></div>
22
+ </div>
23
+ </div>`;
24
+ }
25
+
26
+ static styles = css`
27
+ :host {
28
+ width: 100%;
29
+ overflow: hidden;
30
+ }
31
+ .container {
32
+ width: 100%;
33
+ height: 100%;
34
+ display: flex;
35
+ flex-direction: column;
36
+ background: aliceblue;
37
+ }
38
+ .header {
39
+ display: flex;
40
+ flex-direction: row;
41
+ justify-content: space-between;
42
+ background-color: blue;
43
+ height: 60px;
44
+ background-color: white;
45
+ color: black;
46
+ box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
47
+ z-index: 1;
48
+
49
+ #actions-toolbar-region-container{
50
+ display: flex;
51
+ flex-direction:row;
52
+ }
53
+ }
54
+ .main-container {
55
+ min-height: 1px;
56
+ height: 100%;
57
+ display: flex;
58
+ flex-direction: row;
59
+ #sidebar-region-region-container {
60
+ background: white;
61
+ width: 15vw;
62
+ box-shadow: rgba(0, 0, 0, 0.12) 4px -1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
63
+ }
64
+ }
65
+ `;
66
+
67
+ @region({targetId: 'header-region-container', name: regions.header})
68
+ headerRegion: IRegion | undefined;
69
+
70
+ @region({targetId: 'actions-toolbar-region-container', name: regions.actionsToolbar})
71
+ actionsToolbarRegion: IRegion | undefined;
72
+
73
+ @region({targetId: 'sidebar-region-region-container', name: regions.sidebar})
74
+ sidebarRegion: IRegion | undefined;
75
+
76
+ @region({targetId: 'main-region-region-container', name: regions.main})
77
+ mainRegion: IRegion | undefined;
78
+ }
package/src/regions.ts ADDED
@@ -0,0 +1,7 @@
1
+ export const regions = {
2
+ header: 'header-region',
3
+ actionsToolbar: 'actions-toolbar-region',
4
+ main: 'main-region',
5
+ sidebar: 'asidebar-region',
6
+ footer: 'footer-region'
7
+ };