slick-table 1.1.80 → 1.1.82
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.cjs.js +114 -94
- package/dist/index.es.js +56 -39
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts +1 -2
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/index.d.ts +1 -0
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.d.ts +2 -0
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.d.ts.map +1 -0
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/model/index.d.ts +1 -1
- package/dist/types/shared/lib/slickgrid/model/index.d.ts.map +1 -1
- package/dist/types/shared/model/types/IPrinter.d.ts +1 -2
- package/dist/types/shared/model/types/IPrinter.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/shared/lib/slickgrid/index.ts +1 -0
- package/src/shared/lib/slickgrid/model/SlickTable/index.ts +1 -1
- package/src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts +22 -22
- package/src/shared/lib/slickgrid/model/SlickTable/printer/index.ts +1 -0
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.ts +1 -1
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.ts +64 -0
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/index.ts +1 -1
- package/src/shared/lib/slickgrid/model/index.ts +1 -0
- package/src/shared/model/types/IPrinter.ts +1 -2
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts +0 -2
- package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts.map +0 -1
- package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.ts +0 -44
package/dist/index.es.js
CHANGED
|
@@ -43836,39 +43836,59 @@ const GW = `
|
|
|
43836
43836
|
border-collapse: collapse;
|
|
43837
43837
|
font-size: 12px;
|
|
43838
43838
|
}
|
|
43839
|
-
table thead {
|
|
43840
|
-
border-bottom: 1px solid gray;
|
|
43841
|
-
}
|
|
43842
43839
|
table th,
|
|
43843
43840
|
table td {
|
|
43844
|
-
padding: 0
|
|
43841
|
+
padding: 0 4px;
|
|
43845
43842
|
font-weight: normal;
|
|
43846
43843
|
}
|
|
43847
|
-
|
|
43848
|
-
|
|
43849
|
-
}
|
|
43850
|
-
table td.text-right {
|
|
43851
|
-
text-align: right;
|
|
43852
|
-
}
|
|
43853
|
-
.heading {
|
|
43854
|
-
height: 30px;
|
|
43844
|
+
.main-table > thead {
|
|
43845
|
+
border-bottom: 1px solid gray;
|
|
43855
43846
|
}
|
|
43856
|
-
.
|
|
43847
|
+
.client-name {
|
|
43848
|
+
font-size: 16px;
|
|
43849
|
+
font-weight: bold;
|
|
43850
|
+
padding: 6px 4px;
|
|
43857
43851
|
text-align: left;
|
|
43858
43852
|
}
|
|
43859
|
-
.
|
|
43860
|
-
|
|
43853
|
+
.empty-row {
|
|
43854
|
+
height: 15px
|
|
43861
43855
|
}
|
|
43862
|
-
.
|
|
43863
|
-
padding-top: 1em;
|
|
43856
|
+
.font-bold {
|
|
43864
43857
|
font-weight: bold;
|
|
43865
43858
|
}
|
|
43866
|
-
.
|
|
43867
|
-
|
|
43859
|
+
.row-column-names {
|
|
43860
|
+
border-bottom: 1px solid gray;
|
|
43861
|
+
border-top: 1px solid gray;
|
|
43862
|
+
line-height: 2.5;
|
|
43868
43863
|
}
|
|
43869
|
-
.
|
|
43864
|
+
.slick-table {
|
|
43865
|
+
border-bottom: double gray;
|
|
43866
|
+
}
|
|
43867
|
+
.text-center {
|
|
43868
|
+
text-align: center;
|
|
43869
|
+
}
|
|
43870
|
+
.text-left {
|
|
43870
43871
|
text-align: left;
|
|
43871
43872
|
}
|
|
43873
|
+
.text-right {
|
|
43874
|
+
text-align: right;
|
|
43875
|
+
}
|
|
43876
|
+
.w-full {
|
|
43877
|
+
width: 100%;
|
|
43878
|
+
}
|
|
43879
|
+
@page {
|
|
43880
|
+
@bottom-right {
|
|
43881
|
+
content: counter(page)"/"counter(pages);
|
|
43882
|
+
font-size: 14px;
|
|
43883
|
+
margin-bottom: 8px;
|
|
43884
|
+
}
|
|
43885
|
+
@bottom-left {
|
|
43886
|
+
content: "Generated by Writeup - Powered by MyWork";
|
|
43887
|
+
font-family: Carlito, Calibri, Arial, Helvetica, sans-serif;
|
|
43888
|
+
font-size: 14px;
|
|
43889
|
+
color: gray;
|
|
43890
|
+
}
|
|
43891
|
+
}
|
|
43872
43892
|
`;
|
|
43873
43893
|
class KW {
|
|
43874
43894
|
constructor() {
|
|
@@ -43876,7 +43896,7 @@ class KW {
|
|
|
43876
43896
|
}
|
|
43877
43897
|
getClientName() {
|
|
43878
43898
|
const t = document.createElement("tr"), n = document.createElement("th");
|
|
43879
|
-
return n.classList.add("
|
|
43899
|
+
return n.classList.add("client-name"), n.setAttribute("colspan", "100%"), n.innerText = `${this.clientName} [${this.clientId}]`, t.append(n), t;
|
|
43880
43900
|
}
|
|
43881
43901
|
getHtmlTemplate(t) {
|
|
43882
43902
|
const {
|
|
@@ -43901,11 +43921,11 @@ class KW {
|
|
|
43901
43921
|
<style>${i}</style>
|
|
43902
43922
|
</head>
|
|
43903
43923
|
<body>
|
|
43904
|
-
<table>
|
|
43924
|
+
<table class="main-table w-full">
|
|
43905
43925
|
${r}
|
|
43906
43926
|
<tbody>
|
|
43907
43927
|
<tr>
|
|
43908
|
-
<td>
|
|
43928
|
+
<td colspan="100%">
|
|
43909
43929
|
${n}
|
|
43910
43930
|
</td>
|
|
43911
43931
|
</tr>
|
|
@@ -43917,23 +43937,23 @@ class KW {
|
|
|
43917
43937
|
`;
|
|
43918
43938
|
}
|
|
43919
43939
|
columnNames(t) {
|
|
43920
|
-
const n = document.createElement("tr");
|
|
43921
|
-
|
|
43922
|
-
|
|
43923
|
-
|
|
43924
|
-
|
|
43940
|
+
const n = document.createElement("thead"), o = document.createElement("tr");
|
|
43941
|
+
o.classList.add("empty-row");
|
|
43942
|
+
const r = document.createElement("tr");
|
|
43943
|
+
return r.classList.add("row-column-names"), (t.grid?.getColumns() || []).filter((d) => d.forPrint).forEach(({ name: d }) => {
|
|
43944
|
+
const u = document.createElement("th");
|
|
43945
|
+
u.classList.add("text-left"), typeof d == "string" ? u.innerText = d : u.innerText = " ", r.append(u);
|
|
43946
|
+
}), n.append(o), n.append(r), n;
|
|
43925
43947
|
}
|
|
43926
43948
|
tableNameAndTime(t) {
|
|
43927
|
-
const n = document.createElement("tr");
|
|
43928
|
-
|
|
43929
|
-
const o = document.createElement("th");
|
|
43930
|
-
o.setAttribute("colspan", "2"), o.classList.add("table-name"), o.innerText = t.name || t.id, n.append(o);
|
|
43949
|
+
const n = document.createElement("tr"), o = document.createElement("th");
|
|
43950
|
+
o.classList.add("text-left"), o.innerText = t.name || t.id, n.append(o);
|
|
43931
43951
|
const r = document.createElement("th");
|
|
43932
|
-
return r.
|
|
43952
|
+
return r.classList.add("text-right"), r.innerText = xe().format("MM/DD/YYYY h:mm A"), n.append(r), n;
|
|
43933
43953
|
}
|
|
43934
43954
|
createTableElement(t) {
|
|
43935
43955
|
const n = document.createElement("table");
|
|
43936
|
-
return n.append(this.
|
|
43956
|
+
return n.classList.add("slick-table"), n.style.width = "100%", n.append(this.columnNames(t)), n.append(this.createTbody(t)), n;
|
|
43937
43957
|
}
|
|
43938
43958
|
createTbody(t) {
|
|
43939
43959
|
const n = document.createElement("tbody"), o = t.grid;
|
|
@@ -43950,7 +43970,7 @@ class KW {
|
|
|
43950
43970
|
const o = t.filter.print(t);
|
|
43951
43971
|
if (o.length) {
|
|
43952
43972
|
const r = document.createElement("tr"), i = document.createElement("th");
|
|
43953
|
-
i.setAttribute("colspan", "100%"), i.classList.add("
|
|
43973
|
+
i.setAttribute("colspan", "100%"), i.classList.add("text-left"), i.innerText = "Applied filters", r.append(i), n.push(r);
|
|
43954
43974
|
}
|
|
43955
43975
|
o.forEach((r) => {
|
|
43956
43976
|
n.push(r);
|
|
@@ -43966,10 +43986,6 @@ class KW {
|
|
|
43966
43986
|
const n = document.createElement("thead");
|
|
43967
43987
|
return n.append(this.getClientName()), n.append(this.tableNameAndTime(t)), n.append(...this.filters(t)), n;
|
|
43968
43988
|
}
|
|
43969
|
-
createColumnNames(t) {
|
|
43970
|
-
const n = document.createElement("thead");
|
|
43971
|
-
return n.append(this.columnNames(t)), n;
|
|
43972
|
-
}
|
|
43973
43989
|
createTr(t, n, o) {
|
|
43974
43990
|
const r = document.createElement("tr"), i = o.getData(), a = i.getItem(n), l = a.__group, d = a.__groupTotals;
|
|
43975
43991
|
if (l) {
|
|
@@ -45716,6 +45732,7 @@ export {
|
|
|
45716
45732
|
Mb as hotKeysRedo,
|
|
45717
45733
|
Ib as hotKeysUndo,
|
|
45718
45734
|
zB as openColumnFilter,
|
|
45735
|
+
GW as printStyles,
|
|
45719
45736
|
r2 as printerCheckMark,
|
|
45720
45737
|
XB as useListenIfTablesWereEdited
|
|
45721
45738
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Skeleton } from './entities/skeleton';
|
|
2
|
-
export { Autocomplete, ColumnPicker, ColumnSorter, DecoratorColumnFilter, DecoratorFilter, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, EditorAutocomplete, EditorSelectNumber, EditorSelectString, FORMATTER_NUMBER, Filter, HotKeysDecorator, IGNORE, PreventCopying, RedoUndoOnly, SlickTable, SlickgridTable, TotalCalculator, WithSummary, WithoutHotKeys, columnIsEdited, columnCheckboxSelector, commitCurrentEdit, copySelectedRows, eventContextMenu, formatterGroupTotals, formatterCheckMark, getDisplayedRows, getFormatterNumber, getNextId, getOnHeaderMenuCommand, handleHeaderButtons, headerButtons, highlightCell, highlightColumns, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, openColumnFilter, printerCheckMark, useListenIfTablesWereEdited, } from './shared/lib/slickgrid';
|
|
2
|
+
export { Autocomplete, ColumnPicker, ColumnSorter, DecoratorColumnFilter, DecoratorFilter, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, EditorAutocomplete, EditorSelectNumber, EditorSelectString, FORMATTER_NUMBER, Filter, HotKeysDecorator, IGNORE, PreventCopying, RedoUndoOnly, SlickTable, SlickgridTable, TotalCalculator, WithSummary, WithoutHotKeys, columnIsEdited, columnCheckboxSelector, commitCurrentEdit, copySelectedRows, eventContextMenu, formatterGroupTotals, formatterCheckMark, getDisplayedRows, getFormatterNumber, getNextId, getOnHeaderMenuCommand, handleHeaderButtons, headerButtons, highlightCell, highlightColumns, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, openColumnFilter, printerCheckMark, printStyles, useListenIfTablesWereEdited, } from './shared/lib/slickgrid';
|
|
3
3
|
export { formatNumber } from './shared/lib/format';
|
|
4
4
|
export type { IColumn, IFilter, IFilterArguments, IFormatterNumberOptions, IHotKeysBehavior, IPrinter, ISlickTable, ITotalCalculator, } from './shared/model/types';
|
|
5
5
|
export { BOLD, WINK } from './shared/model/consts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Autocomplete, ColumnSorter, DateFormatter, DateValidator, IGNORE, EditorAmount, EditorAutocomplete, EditorDate, EditorSelectString, EditorSelectNumber, EmptyStringValidator, FORMATTER_NUMBER, LengthValidator, PercentFormatter, StringFormatter, TotalCalculator, formatterCheckMark, formatterGroupTotals, getFormatterNumber, columnSorter, commitCurrentEdit, copySelectedRows, deleteRows, getDisplayedRows, getLastRow, getNextId, getOnHeaderMenuCommand, getUpdates, highlightCell, highlightColumns, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, isDeletionDangerous, onCellChange, onRowCountChanged, onRowsChanged, openContextMenu, positionToPaste, printerCheckMark, selectedRows, useHotKeys, useListenIfTablesWereEdited, useUpdateTotal, wereEdited, } from './lib';
|
|
2
|
-
export { ColumnPicker, DownloadManager, DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, WithConfirmationOfDeletion, WithSummary, WithoutHotKeys, eventContextMenu, eventHeaderContextMenu, eventSummary, } from './model';
|
|
2
|
+
export { ColumnPicker, DownloadManager, DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, WithConfirmationOfDeletion, WithSummary, WithoutHotKeys, eventContextMenu, eventHeaderContextMenu, eventSummary, printStyles, } from './model';
|
|
3
3
|
export { SlickgridTable, columnCheckboxSelector, columnIsEdited, eventOpenColumnFilters, handleHeaderButtons, headerButtons, openColumnFilter, } from './ui';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/slickgrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,MAAM,EACN,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,2BAA2B,EAC3B,cAAc,EACd,UAAU,GACV,MAAM,OAAO,CAAC;AACf,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/lib/slickgrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,MAAM,EACN,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,2BAA2B,EAC3B,cAAc,EACd,UAAU,GACV,MAAM,OAAO,CAAC;AACf,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,WAAW,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GAChB,MAAM,MAAM,CAAC"}
|
|
@@ -2,6 +2,6 @@ export { ColumnPicker } from './column-picker';
|
|
|
2
2
|
export { DownloadManager } from './csvDownloadManager';
|
|
3
3
|
export { DefaultHotKeys, HotKeysDecorator, PreventCopying, RedoUndoOnly, WithConfirmationOfDeletion, WithSummary, WithoutHotKeys, } from './hotKeys';
|
|
4
4
|
export { DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DeletedRowsFilter, Filter, } from './filters';
|
|
5
|
-
export { DefaultPrinter } from './printer';
|
|
5
|
+
export { DefaultPrinter, printStyles } from './printer';
|
|
6
6
|
export { SlickTable } from './table';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/model/SlickTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,0BAA0B,EAC1B,WAAW,EACX,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,MAAM,GACN,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/model/SlickTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,0BAA0B,EAC1B,WAAW,EACX,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,MAAM,GACN,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare class DefaultPrinter implements IPrinter {
|
|
|
6
6
|
cssStyles: string;
|
|
7
7
|
getClientName(): HTMLTableRowElement;
|
|
8
8
|
getHtmlTemplate(args: IHtmlDocElements): string;
|
|
9
|
-
columnNames(table: ISlickTable):
|
|
9
|
+
columnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
10
10
|
tableNameAndTime(table: ISlickTable): HTMLTableRowElement;
|
|
11
11
|
createTableElement(table: ISlickTable): HTMLTableElement;
|
|
12
12
|
createTbody(table: ISlickTable): HTMLTableSectionElement;
|
|
@@ -14,7 +14,6 @@ export declare class DefaultPrinter implements IPrinter {
|
|
|
14
14
|
/** for tables with total calculations */
|
|
15
15
|
totals(_table: ISlickTable): HTMLTableRowElement[];
|
|
16
16
|
createHeader(table: ISlickTable): HTMLTableSectionElement;
|
|
17
|
-
createColumnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
18
17
|
createTr(columns: IColumn[], rowIndex: number, grid: SlickGrid): HTMLTableRowElement;
|
|
19
18
|
print(table: ISlickTable, clientId: number, clientName: string): void;
|
|
20
19
|
createFooter(): HTMLTableSectionElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultPrinter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,MAAM,WAAW,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAa,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,qBAAa,cAAe,YAAW,QAAQ;IAC9C,QAAQ,SAAK;IACb,UAAU,SAAM;IAChB,SAAS,
|
|
1
|
+
{"version":3,"file":"DefaultPrinter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,MAAM,WAAW,CAAC;AAGrD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAa,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,qBAAa,cAAe,YAAW,QAAQ;IAC9C,QAAQ,SAAK;IACb,UAAU,SAAM;IAChB,SAAS,SAAe;IAExB,aAAa,IAAI,mBAAmB;IAWpC,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM;IAsC/C,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB;IAyBxD,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB;IAezD,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB;IAQxD,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB;IAmBxD,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,EAAE;IAmBlD,yCAAyC;IACzC,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE;IAGlD,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB;IAOzD,QAAQ,CACP,OAAO,EAAE,OAAO,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,GACb,mBAAmB;IAkCtB,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAiBrE,YAAY,IAAI,uBAAuB;CAIvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { printStyles } from './printStyles';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const printStyles = "\n\t\thtml body {\n\t\t\tfont-family: Carlito, Calibri, Arial, Helvetica, sans-serif;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\tbody table {\n\t\t\tmargin: 0 auto;\n\t\t\tborder-collapse: collapse;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\ttable th,\n\t\ttable td {\n\t\t\tpadding: 0 4px;\n\t\t\tfont-weight: normal;\n\t\t}\n\t\t.main-table > thead {\n\t\t\tborder-bottom: 1px solid gray;\n\t\t}\n\t\t.client-name {\n\t\t\tfont-size: 16px;\n\t\t\tfont-weight: bold;\n\t\t\tpadding: 6px 4px;\n\t\t\ttext-align: left;\n\t\t}\n\t\t.empty-row {\n\t\t\theight: 15px\n\t\t}\n\t\t.font-bold {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.row-column-names {\n\t\t\tborder-bottom: 1px solid gray;\n\t\t\tborder-top: 1px solid gray;\n\t\t\tline-height: 2.5;\n\t\t}\n\t\t.slick-table {\n\t\t\tborder-bottom: double gray;\n\t\t}\n\t\t.text-center {\n\t\t\ttext-align: center;\n\t\t}\n\t\t.text-left {\n\t\t\ttext-align: left;\n\t\t}\n\t\t.text-right {\n\t\t\ttext-align: right;\n\t\t}\n\t\t.w-full {\n\t\t\twidth: 100%;\n\t\t}\n\t\t@page {\n\t\t\t@bottom-right {\n\t\t\t\tcontent: counter(page)\"/\"counter(pages);\n\t\t\t\tfont-size: 14px;\n\t\t\t\tmargin-bottom: 8px;\n\t\t\t}\n\t\t\t@bottom-left {\n\t\t\t\tcontent: \"Generated by Writeup - Powered by MyWork\";\n\t\t\t\tfont-family: Carlito, Calibri, Arial, Helvetica, sans-serif;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tcolor: gray;\n\t\t\t}\n\t\t}\n\t";
|
|
2
|
+
//# sourceMappingURL=printStyles.d.ts.map
|
package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printStyles.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/printStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,i2CA+DtB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { printStyles } from './consts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ColumnPicker, DownloadManager, DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, WithConfirmationOfDeletion, WithSummary, WithoutHotKeys, } from './SlickTable';
|
|
1
|
+
export { ColumnPicker, DownloadManager, DecoratorEndingDate, DecoratorFilter, DecoratorColumnFilter, DecoratorPeriod, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, WithConfirmationOfDeletion, WithSummary, WithoutHotKeys, printStyles, } from './SlickTable';
|
|
2
2
|
export { eventContextMenu, eventHeaderContextMenu, eventSummary, } from './events';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/lib/slickgrid/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/lib/slickgrid/model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,cAAc,EACd,WAAW,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,GACZ,MAAM,UAAU,CAAC"}
|
|
@@ -8,8 +8,7 @@ export interface IPrinter {
|
|
|
8
8
|
cssStyles: string;
|
|
9
9
|
getClientName(): HTMLTableRowElement;
|
|
10
10
|
getHtmlTemplate(args: IHtmlDocElements): string;
|
|
11
|
-
columnNames(table: ISlickTable):
|
|
12
|
-
createColumnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
11
|
+
columnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
13
12
|
createHeader(table: ISlickTable): HTMLTableSectionElement;
|
|
14
13
|
createFooter(table: ISlickTable): HTMLTableSectionElement;
|
|
15
14
|
createTableElement(table: ISlickTable): HTMLTableElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPrinter.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/types/IPrinter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,IAAI,mBAAmB,CAAC;IACrC,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAAC;IAChD,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"IPrinter.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/types/IPrinter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,IAAI,mBAAmB,CAAC;IACrC,eAAe,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAAC;IAChD,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB,CAAC;IACzD,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB,CAAC;IAC1D,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB,CAAC;IAC1D,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB,CAAC;IACzD,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,uBAAuB,CAAC;IACzD,QAAQ,CACP,OAAO,EAAE,OAAO,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,GACb,mBAAmB,CAAC;IACvB,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACtE,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;IAC1D,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAAC;CAClD"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -7,18 +7,18 @@ import { IHtmlDocElements } from "shared/model/types";
|
|
|
7
7
|
|
|
8
8
|
import { getDisplayedRows } from "../../../lib";
|
|
9
9
|
import { applyHtmlToDocument } from "./lib";
|
|
10
|
-
import {
|
|
10
|
+
import { printStyles } from "./model";
|
|
11
11
|
|
|
12
12
|
export class DefaultPrinter implements IPrinter {
|
|
13
13
|
clientId = 0;
|
|
14
14
|
clientName = "";
|
|
15
|
-
cssStyles =
|
|
15
|
+
cssStyles = printStyles;
|
|
16
16
|
|
|
17
17
|
getClientName(): HTMLTableRowElement {
|
|
18
18
|
const result = document.createElement("tr");
|
|
19
19
|
|
|
20
20
|
const name = document.createElement("th");
|
|
21
|
-
name.classList.add("
|
|
21
|
+
name.classList.add("client-name");
|
|
22
22
|
name.setAttribute("colspan", "100%");
|
|
23
23
|
name.innerText = `${this.clientName} [${this.clientId}]`;
|
|
24
24
|
result.append(name);
|
|
@@ -48,11 +48,11 @@ export class DefaultPrinter implements IPrinter {
|
|
|
48
48
|
<style>${styles}</style>
|
|
49
49
|
</head>
|
|
50
50
|
<body>
|
|
51
|
-
<table>
|
|
51
|
+
<table class="main-table w-full">
|
|
52
52
|
${header}
|
|
53
53
|
<tbody>
|
|
54
54
|
<tr>
|
|
55
|
-
<td>
|
|
55
|
+
<td colspan="100%">
|
|
56
56
|
${body}
|
|
57
57
|
</td>
|
|
58
58
|
</tr>
|
|
@@ -63,38 +63,41 @@ export class DefaultPrinter implements IPrinter {
|
|
|
63
63
|
</html>
|
|
64
64
|
`;
|
|
65
65
|
}
|
|
66
|
-
columnNames(table: ISlickTable):
|
|
67
|
-
const result = document.createElement("
|
|
66
|
+
columnNames(table: ISlickTable): HTMLTableSectionElement {
|
|
67
|
+
const result = document.createElement("thead");
|
|
68
|
+
const tr1 = document.createElement("tr");
|
|
69
|
+
tr1.classList.add("empty-row");
|
|
70
|
+
const tr2 = document.createElement("tr");
|
|
71
|
+
tr2.classList.add("row-column-names");
|
|
68
72
|
|
|
69
73
|
const grid = table.grid;
|
|
70
74
|
const columns: IColumn[] = grid?.getColumns() || [];
|
|
71
75
|
const columnsFiltered = columns.filter((el) => el.forPrint);
|
|
72
|
-
|
|
73
76
|
columnsFiltered.forEach(({ name }) => {
|
|
74
77
|
const th = document.createElement("th");
|
|
75
|
-
th.classList.add("
|
|
78
|
+
th.classList.add("text-left");
|
|
76
79
|
if (typeof name === "string") {
|
|
77
80
|
th.innerText = name;
|
|
78
81
|
} else {
|
|
79
82
|
th.innerText = " ";
|
|
80
83
|
}
|
|
81
|
-
|
|
84
|
+
tr2.append(th);
|
|
82
85
|
});
|
|
86
|
+
|
|
87
|
+
result.append(tr1);
|
|
88
|
+
result.append(tr2);
|
|
83
89
|
return result;
|
|
84
90
|
}
|
|
85
91
|
tableNameAndTime(table: ISlickTable): HTMLTableRowElement {
|
|
86
92
|
const result = document.createElement("tr");
|
|
87
|
-
result.classList.add("heading");
|
|
88
93
|
|
|
89
94
|
const tableName = document.createElement("th");
|
|
90
|
-
tableName.
|
|
91
|
-
tableName.classList.add("table-name");
|
|
95
|
+
tableName.classList.add("text-left");
|
|
92
96
|
tableName.innerText = table.name || table.id;
|
|
93
97
|
result.append(tableName);
|
|
94
98
|
|
|
95
99
|
const dateStamp = document.createElement("th");
|
|
96
|
-
dateStamp.
|
|
97
|
-
dateStamp.classList.add("date-stamp");
|
|
100
|
+
dateStamp.classList.add("text-right");
|
|
98
101
|
dateStamp.innerText = moment().format("MM/DD/YYYY h:mm A");
|
|
99
102
|
result.append(dateStamp);
|
|
100
103
|
|
|
@@ -102,7 +105,9 @@ export class DefaultPrinter implements IPrinter {
|
|
|
102
105
|
}
|
|
103
106
|
createTableElement(table: ISlickTable): HTMLTableElement {
|
|
104
107
|
const result = document.createElement("table");
|
|
105
|
-
result.
|
|
108
|
+
result.classList.add("slick-table");
|
|
109
|
+
result.style.width = "100%";
|
|
110
|
+
result.append(this.columnNames(table));
|
|
106
111
|
result.append(this.createTbody(table));
|
|
107
112
|
return result;
|
|
108
113
|
}
|
|
@@ -133,7 +138,7 @@ export class DefaultPrinter implements IPrinter {
|
|
|
133
138
|
const tr = document.createElement("tr");
|
|
134
139
|
const th = document.createElement("th");
|
|
135
140
|
th.setAttribute("colspan", "100%");
|
|
136
|
-
th.classList.add("
|
|
141
|
+
th.classList.add("text-left");
|
|
137
142
|
th.innerText = "Applied filters";
|
|
138
143
|
tr.append(th);
|
|
139
144
|
result.push(tr);
|
|
@@ -155,11 +160,6 @@ export class DefaultPrinter implements IPrinter {
|
|
|
155
160
|
result.append(...this.filters(table));
|
|
156
161
|
return result;
|
|
157
162
|
}
|
|
158
|
-
createColumnNames(table: ISlickTable): HTMLTableSectionElement {
|
|
159
|
-
const result = document.createElement("thead");
|
|
160
|
-
result.append(this.columnNames(table));
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
163
|
createTr(
|
|
164
164
|
columns: IColumn[],
|
|
165
165
|
rowIndex: number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { printStyles } from "./printStyles";
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const printStyles = `
|
|
2
|
+
html body {
|
|
3
|
+
font-family: Carlito, Calibri, Arial, Helvetica, sans-serif;
|
|
4
|
+
font-size: 12px;
|
|
5
|
+
}
|
|
6
|
+
body table {
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
border-collapse: collapse;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
}
|
|
11
|
+
table th,
|
|
12
|
+
table td {
|
|
13
|
+
padding: 0 4px;
|
|
14
|
+
font-weight: normal;
|
|
15
|
+
}
|
|
16
|
+
.main-table > thead {
|
|
17
|
+
border-bottom: 1px solid gray;
|
|
18
|
+
}
|
|
19
|
+
.client-name {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
padding: 6px 4px;
|
|
23
|
+
text-align: left;
|
|
24
|
+
}
|
|
25
|
+
.empty-row {
|
|
26
|
+
height: 15px
|
|
27
|
+
}
|
|
28
|
+
.font-bold {
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
}
|
|
31
|
+
.row-column-names {
|
|
32
|
+
border-bottom: 1px solid gray;
|
|
33
|
+
border-top: 1px solid gray;
|
|
34
|
+
line-height: 2.5;
|
|
35
|
+
}
|
|
36
|
+
.slick-table {
|
|
37
|
+
border-bottom: double gray;
|
|
38
|
+
}
|
|
39
|
+
.text-center {
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
.text-left {
|
|
43
|
+
text-align: left;
|
|
44
|
+
}
|
|
45
|
+
.text-right {
|
|
46
|
+
text-align: right;
|
|
47
|
+
}
|
|
48
|
+
.w-full {
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
@page {
|
|
52
|
+
@bottom-right {
|
|
53
|
+
content: counter(page)"/"counter(pages);
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
margin-bottom: 8px;
|
|
56
|
+
}
|
|
57
|
+
@bottom-left {
|
|
58
|
+
content: "Generated by Writeup - Powered by MyWork";
|
|
59
|
+
font-family: Carlito, Calibri, Arial, Helvetica, sans-serif;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
color: gray;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { printStyles } from "./consts";
|
|
@@ -10,8 +10,7 @@ export interface IPrinter {
|
|
|
10
10
|
cssStyles: string;
|
|
11
11
|
getClientName(): HTMLTableRowElement;
|
|
12
12
|
getHtmlTemplate(args: IHtmlDocElements): string;
|
|
13
|
-
columnNames(table: ISlickTable):
|
|
14
|
-
createColumnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
13
|
+
columnNames(table: ISlickTable): HTMLTableSectionElement;
|
|
15
14
|
createHeader(table: ISlickTable): HTMLTableSectionElement;
|
|
16
15
|
createFooter(table: ISlickTable): HTMLTableSectionElement;
|
|
17
16
|
createTableElement(table: ISlickTable): HTMLTableElement;
|
package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const cssStyles = "\n\t\thtml body {\n\t\t\tfont-family: Carlito, Calibri, Arial, Helvetica, sans-serif;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\tbody table {\n\t\t\tmargin: 0 auto;\n\t\t\tborder-collapse: collapse;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\ttable thead {\n\t\t\tborder-bottom: 1px solid gray;\n\t\t}\n\t\ttable th,\n\t\ttable td {\n\t\t\tpadding: 0 10px;\n\t\t\tfont-weight: normal;\n\t\t}\n\t\ttable td.text-center {\n\t\t\ttext-align: center;\n\t\t}\n\t\ttable td.text-right {\n\t\t\ttext-align: right;\n\t\t}\n\t\t.heading {\n\t\t\theight: 30px;\n\t\t}\n\t\t.heading .table-name {\n\t\t\ttext-align: left;\n\t\t}\n\t\t.heading .date-stamp {\n\t\t\ttext-align: right;\n\t\t}\n\t\t.column-name {\n\t\t\tpadding-top: 1em;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.align-right {\n\t\t\ttext-align: right;\n\t\t}\n\t\t.align-left {\n\t\t\ttext-align: left;\n\t\t}\n\t";
|
|
2
|
-
//# sourceMappingURL=cssStyles.d.ts.map
|
package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cssStyles.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,s1BA2CpB,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export const cssStyles = `
|
|
2
|
-
html body {
|
|
3
|
-
font-family: Carlito, Calibri, Arial, Helvetica, sans-serif;
|
|
4
|
-
font-size: 12px;
|
|
5
|
-
}
|
|
6
|
-
body table {
|
|
7
|
-
margin: 0 auto;
|
|
8
|
-
border-collapse: collapse;
|
|
9
|
-
font-size: 12px;
|
|
10
|
-
}
|
|
11
|
-
table thead {
|
|
12
|
-
border-bottom: 1px solid gray;
|
|
13
|
-
}
|
|
14
|
-
table th,
|
|
15
|
-
table td {
|
|
16
|
-
padding: 0 10px;
|
|
17
|
-
font-weight: normal;
|
|
18
|
-
}
|
|
19
|
-
table td.text-center {
|
|
20
|
-
text-align: center;
|
|
21
|
-
}
|
|
22
|
-
table td.text-right {
|
|
23
|
-
text-align: right;
|
|
24
|
-
}
|
|
25
|
-
.heading {
|
|
26
|
-
height: 30px;
|
|
27
|
-
}
|
|
28
|
-
.heading .table-name {
|
|
29
|
-
text-align: left;
|
|
30
|
-
}
|
|
31
|
-
.heading .date-stamp {
|
|
32
|
-
text-align: right;
|
|
33
|
-
}
|
|
34
|
-
.column-name {
|
|
35
|
-
padding-top: 1em;
|
|
36
|
-
font-weight: bold;
|
|
37
|
-
}
|
|
38
|
-
.align-right {
|
|
39
|
-
text-align: right;
|
|
40
|
-
}
|
|
41
|
-
.align-left {
|
|
42
|
-
text-align: left;
|
|
43
|
-
}
|
|
44
|
-
`;
|