@win2win/shared 1.0.26 → 1.0.27

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.
@@ -1,4 +1,5 @@
1
1
  export * from './importaciones';
2
+ export * from './layout_documentos';
2
3
  export * from './liquidaciones';
3
4
  export * from './props';
4
5
  export * from './shared';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./importaciones"), exports);
18
+ __exportStar(require("./layout_documentos"), exports);
18
19
  __exportStar(require("./liquidaciones"), exports);
19
20
  __exportStar(require("./props"), exports);
20
21
  __exportStar(require("./shared"), exports);
@@ -0,0 +1 @@
1
+ export * from './layout';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./layout"), exports);
@@ -0,0 +1,30 @@
1
+ export declare const LAYOUT_SECTION_TYPES: readonly ["text", "table", "cards-grid"];
2
+ export type LayoutSectionType = typeof LAYOUT_SECTION_TYPES[number];
3
+ export interface TableColumn {
4
+ header: string;
5
+ key: string;
6
+ width: string | number;
7
+ align: 'left' | 'center' | 'right';
8
+ format: string;
9
+ }
10
+ export interface Card {
11
+ title: string;
12
+ subtitle?: string;
13
+ fields: CardField[];
14
+ }
15
+ export interface CardField {
16
+ label: string;
17
+ value: any;
18
+ format?: string;
19
+ }
20
+ export interface LayoutAsyncData {
21
+ key: string;
22
+ query: string;
23
+ params: any;
24
+ formatFn: string;
25
+ }
26
+ export interface LayoutStyle {
27
+ margins: number[];
28
+ background: string;
29
+ typography: string;
30
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // export interface DocumentLayout {
3
+ // context: string,
4
+ // name: string,
5
+ // description: string,
6
+ // asyncData: LayoutAsyncData[],
7
+ // styles: LayoutStyle,
8
+ // sections: LayoutSection[]
9
+ // format: {},
10
+ // }
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LAYOUT_SECTION_TYPES = void 0;
13
+ // export interface LayoutSection {
14
+ // idDocLaySection: string,
15
+ // idDocumentLayout: String;
16
+ // type: LayoutSectionType;
17
+ // asyncData: LayoutAsyncData[],
18
+ // styles: LayoutStyle,
19
+ // content: any;
20
+ // }
21
+ // export interface LayoutSectionText extends LayoutSection {
22
+ // type: 'text';
23
+ // content: { text: string };
24
+ // }
25
+ // export interface LayoutSectionTable extends LayoutSection {
26
+ // type: 'table';
27
+ // content: { columns: TableSectionColumn[] };
28
+ // }
29
+ // export interface LayoutSectionCardsGrid extends LayoutSection {
30
+ // type: 'cards-grid';
31
+ // content: { cards: CardsGridSectionCard[] };
32
+ // }
33
+ exports.LAYOUT_SECTION_TYPES = ['text', 'table', 'cards-grid'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@win2win/shared",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",