@bookipi/htmlgenerator 1.8.4 → 1.8.5-alpha1
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/.vscode/common.settings.json +38 -0
- package/dist/index.js +55 -30
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +55 -30
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/subscriptionInvoiceHtml.module.css +0 -253
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": "auto save & auto formatting on save",
|
|
3
|
+
"files.autoSave": "onFocusChange",
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
6
|
+
"prettier.requireConfig": false,
|
|
7
|
+
"editor.codeActionsOnSave": {
|
|
8
|
+
"source.organizeImports": "always",
|
|
9
|
+
"source.fixAll": "always"
|
|
10
|
+
},
|
|
11
|
+
"eslint.enable": true,
|
|
12
|
+
|
|
13
|
+
"//": "please install `Code Spell Checker` extension to use this configuration",
|
|
14
|
+
"cSpell.words": [
|
|
15
|
+
"AIPO",
|
|
16
|
+
"bds",
|
|
17
|
+
"bg",
|
|
18
|
+
"Bookipay",
|
|
19
|
+
"bw",
|
|
20
|
+
"comms",
|
|
21
|
+
"cy",
|
|
22
|
+
"devias",
|
|
23
|
+
"esign",
|
|
24
|
+
"Fcm",
|
|
25
|
+
"FRAMEBUSTED",
|
|
26
|
+
"gql",
|
|
27
|
+
"hocs",
|
|
28
|
+
"idx",
|
|
29
|
+
"noreferrer",
|
|
30
|
+
"Quickbook",
|
|
31
|
+
"Quickbooks",
|
|
32
|
+
"showmore",
|
|
33
|
+
"Signit",
|
|
34
|
+
"testid",
|
|
35
|
+
"UI",
|
|
36
|
+
"vh"
|
|
37
|
+
]
|
|
38
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -12002,12 +12002,36 @@ var COMPANY_KEYS = ['_id', 'fax', 'contactName', 'c', 'e', 'ph', 'tfn', 'la', 'c
|
|
|
12002
12002
|
|
|
12003
12003
|
var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'csd', 'tz', 'sent'];
|
|
12004
12004
|
|
|
12005
|
-
var
|
|
12005
|
+
var decodeHtml = function decodeHtml(str) {
|
|
12006
12006
|
if (str === void 0) {
|
|
12007
12007
|
str = '';
|
|
12008
12008
|
}
|
|
12009
|
-
return String(str).replace(
|
|
12009
|
+
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/ /g, ' ');
|
|
12010
12010
|
};
|
|
12011
|
+
function deepDecodeHtml(obj) {
|
|
12012
|
+
if (typeof obj === 'undefined' || obj === null) {
|
|
12013
|
+
return obj;
|
|
12014
|
+
}
|
|
12015
|
+
if (typeof obj === 'string') {
|
|
12016
|
+
return decodeHtml(obj);
|
|
12017
|
+
}
|
|
12018
|
+
if (Array.isArray(obj)) {
|
|
12019
|
+
return obj.map(function (item) {
|
|
12020
|
+
return deepDecodeHtml(item);
|
|
12021
|
+
});
|
|
12022
|
+
}
|
|
12023
|
+
if (typeof obj === 'object' && obj.constructor === Object) {
|
|
12024
|
+
var decoded = {};
|
|
12025
|
+
for (var _i = 0, _Object$entries = Object.entries(obj); _i < _Object$entries.length; _i++) {
|
|
12026
|
+
var _Object$entries$_i = _Object$entries[_i],
|
|
12027
|
+
key = _Object$entries$_i[0],
|
|
12028
|
+
value = _Object$entries$_i[1];
|
|
12029
|
+
decoded[key] = deepDecodeHtml(value);
|
|
12030
|
+
}
|
|
12031
|
+
return decoded;
|
|
12032
|
+
}
|
|
12033
|
+
return obj;
|
|
12034
|
+
}
|
|
12011
12035
|
Object.fromEntries = Object.fromEntries || function (arr) {
|
|
12012
12036
|
return arr.reduce(function (acc, curr) {
|
|
12013
12037
|
acc[curr[0]] = curr[1];
|
|
@@ -14258,17 +14282,17 @@ var coverHtml = function coverHtml(_ref) {
|
|
|
14258
14282
|
if (layout === 'split') {
|
|
14259
14283
|
var _background$right;
|
|
14260
14284
|
var rightIsImage = ((_background$right = background.right) === null || _background$right === void 0 ? void 0 : _background$right.type) === 'image';
|
|
14261
|
-
var rightBgStyle = rightIsImage ? "background-image:url(" +
|
|
14262
|
-
var outerSplitStyle = "background:" +
|
|
14285
|
+
var rightBgStyle = rightIsImage ? "background-image:url(" + background.right.value + ")" : "background:" + background.right.value;
|
|
14286
|
+
var outerSplitStyle = "background:" + themeColors.background;
|
|
14263
14287
|
return html$L(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n <div class=\"slide split\" style=\"", "\">\n <div class=\"split-inner\">\n <div class=\"left-content\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n <div class=\"right-image\" style=\"", "\"></div>\n </div>\n </div>\n "])), outerSplitStyle, topContent, centerContent, bottomContent, rightBgStyle);
|
|
14264
14288
|
}
|
|
14265
14289
|
var isImage = background.type === 'image';
|
|
14266
14290
|
var hasOverlay = isImage && background.overlay;
|
|
14267
14291
|
var bgStyle = '';
|
|
14268
14292
|
if (isImage) {
|
|
14269
|
-
bgStyle = "background-image: " + (hasOverlay ? "linear-gradient(" +
|
|
14293
|
+
bgStyle = "background-image: " + (hasOverlay ? "linear-gradient(" + background.overlay + ", " + background.overlay + "), url(" + (background.value || '') + ")" : "url(" + (background.value || '') + ")") + "; background-position: center; background-size: cover;";
|
|
14270
14294
|
} else if (background.type === 'color') {
|
|
14271
|
-
bgStyle = "background:" +
|
|
14295
|
+
bgStyle = "background:" + (background.value || '');
|
|
14272
14296
|
} else {
|
|
14273
14297
|
bgStyle = '';
|
|
14274
14298
|
}
|
|
@@ -14283,7 +14307,7 @@ var bulletHtml = function bulletHtml(_ref) {
|
|
|
14283
14307
|
customizationStyle = _ref$customizationSty === void 0 ? {} : _ref$customizationSty;
|
|
14284
14308
|
var items = (slide.bullets || []).slice(0, 3);
|
|
14285
14309
|
if (!items.length) {
|
|
14286
|
-
return html$M(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])),
|
|
14310
|
+
return html$M(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), slide.title);
|
|
14287
14311
|
}
|
|
14288
14312
|
var accentColor = customizationStyle.accentColor;
|
|
14289
14313
|
var markerBg = increaseHexColorIntensity(accentColor, 10);
|
|
@@ -14291,10 +14315,10 @@ var bulletHtml = function bulletHtml(_ref) {
|
|
|
14291
14315
|
var listItems = items.map(function (item) {
|
|
14292
14316
|
var title = (item === null || item === void 0 ? void 0 : item.title) || '';
|
|
14293
14317
|
var desc = (item === null || item === void 0 ? void 0 : item.description) || '';
|
|
14294
|
-
return html$M(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;\"\n >\n <span\n style=\"width:12px;height:12px;border-radius:50%;background:", ";border:3px solid ", ";position:relative;z-index:2;align-self:flex-start;display:block;flex-shrink:0;margin-bottom:8px;margin-left:8px;\"\n ></span>\n <div style=\"min-width:0;\">\n ", "\n ", "\n </div>\n </li>\n "])),
|
|
14318
|
+
return html$M(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;\"\n >\n <span\n style=\"width:12px;height:12px;border-radius:50%;background:", ";border:3px solid ", ";position:relative;z-index:2;align-self:flex-start;display:block;flex-shrink:0;margin-bottom:8px;margin-left:8px;\"\n ></span>\n <div style=\"min-width:0;\">\n ", "\n ", "\n </div>\n </li>\n "])), markerBg, markerBorder, title ? html$M(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["<h3\n class=\"subtitle\"\n style=\"margin:0 0 6px;font-weight:600;\"\n >\n ", "\n </h3>"])), title) : '', desc ? html$M(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["<p\n class=\"text\"\n style=\"margin:0;color:var(--theme-text-color);\"\n >\n ", "\n </p>"])), desc) : '');
|
|
14295
14319
|
}).join('');
|
|
14296
14320
|
var ulHtml = html$M(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["<ul\n class=\"bullets-ul\"\n style=\"display:flex;gap:24px;list-style:none;padding:0;justify-content:center;width:auto;\"\n >\n ", "\n </ul>"])), listItems);
|
|
14297
|
-
return html$M(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["<div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])),
|
|
14321
|
+
return html$M(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["<div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])), slide.title || '', ulHtml);
|
|
14298
14322
|
};
|
|
14299
14323
|
|
|
14300
14324
|
var _templateObject$Q, _templateObject2$r;
|
|
@@ -14303,9 +14327,9 @@ var highlightTextHtml = function highlightTextHtml(_ref) {
|
|
|
14303
14327
|
var _ref$slide = _ref.slide,
|
|
14304
14328
|
slide = _ref$slide === void 0 ? {} : _ref$slide;
|
|
14305
14329
|
var paragraphs = String(slide.text || '').split('\n').map(function (p) {
|
|
14306
|
-
return "<p>" +
|
|
14330
|
+
return "<p>" + p + "</p>";
|
|
14307
14331
|
}).join('');
|
|
14308
|
-
return html$N(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h1 class=\"title\">", "</h1>\n ", "\n </div>\n </div>\n "])),
|
|
14332
|
+
return html$N(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h1 class=\"title\">", "</h1>\n ", "\n </div>\n </div>\n "])), slide.title, paragraphs ? html$N(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["<div class=\"text\">", "</div>"])), paragraphs) : '');
|
|
14309
14333
|
};
|
|
14310
14334
|
|
|
14311
14335
|
var _templateObject$R, _templateObject2$s, _templateObject3$d, _templateObject4$3;
|
|
@@ -14318,15 +14342,15 @@ var imagesHtml = function imagesHtml(_ref) {
|
|
|
14318
14342
|
return getImage(source);
|
|
14319
14343
|
}).filter(Boolean);
|
|
14320
14344
|
if (!sources.length) {
|
|
14321
|
-
return html$O(_templateObject$R || (_templateObject$R = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])),
|
|
14345
|
+
return html$O(_templateObject$R || (_templateObject$R = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), slide.title || '');
|
|
14322
14346
|
}
|
|
14323
14347
|
if (sources.length === 1) {
|
|
14324
|
-
var imgUrl =
|
|
14325
|
-
var alt =
|
|
14348
|
+
var imgUrl = sources[0] || '';
|
|
14349
|
+
var alt = slide.title || '';
|
|
14326
14350
|
return html$O(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <img class=\"slide-bg\" src=\"", "\" alt=\"", "\" />\n </div>\n "])), imgUrl, alt);
|
|
14327
14351
|
}
|
|
14328
14352
|
var imagesRow = sources.map(function (src) {
|
|
14329
|
-
var s =
|
|
14353
|
+
var s = src;
|
|
14330
14354
|
return html$O(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n <div\n style=\"flex:1;min-width:0;display:flex;align-items:center;justify-content:center;\"\n >\n <img\n src=\"", "\"\n style=\"width:100%;height:100%;object-fit:cover;display:block;\"\n />\n </div>\n "])), s);
|
|
14331
14355
|
}).join('');
|
|
14332
14356
|
return html$O(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"slide-bg\" style=\"display:flex;inset:0;position:absolute;\">\n ", "\n </div>\n </div>\n "])), imagesRow);
|
|
@@ -14341,7 +14365,7 @@ var processHtml = function processHtml(_ref) {
|
|
|
14341
14365
|
customizationTheme = _ref.customizationTheme;
|
|
14342
14366
|
var items = (slide.steps || []).slice(0, 3);
|
|
14343
14367
|
if (!items.length) {
|
|
14344
|
-
return html$P(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])),
|
|
14368
|
+
return html$P(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), slide.title || '');
|
|
14345
14369
|
}
|
|
14346
14370
|
var accentColor = customizationStyle.accentColor;
|
|
14347
14371
|
var markerBg = increaseHexColorIntensity(accentColor, 100);
|
|
@@ -14350,33 +14374,33 @@ var processHtml = function processHtml(_ref) {
|
|
|
14350
14374
|
var listItems = items.map(function (item, index) {
|
|
14351
14375
|
var title = typeof item === 'string' ? '' : (item === null || item === void 0 ? void 0 : item.title) || '';
|
|
14352
14376
|
var desc = typeof item === 'string' ? item : (item === null || item === void 0 ? void 0 : item.description) || '';
|
|
14353
|
-
return html$P(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;display:flex;flex-direction:column;box-sizing:border-box;position:relative;\"\n >\n <span\n style=\"position:absolute
|
|
14377
|
+
return html$P(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;display:flex;flex-direction:column;box-sizing:border-box;position:relative;\"\n >\n <span\n style=\"\n position: absolute;\n top: -16px;\n left: -4px;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: ", ";\n color: ", ";\n font-weight: 700;\n transform: translateY(-50%);\n margin-bottom: 16px;\n \"\n >\n ", "\n </span>\n <div>\n ", "\n ", "\n </div>\n </li>\n "])), markerBg, markerColor, String(index + 1), title ? html$P(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["<h3\n class=\"subtitle\"\n style=\"margin:0 0 6px;font-weight:600;\"\n >\n ", "\n </h3>"])), title) : '', desc ? html$P(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"margin:0;padding:8px 0 0;\">\n ", "\n </p>"])), desc) : '');
|
|
14354
14378
|
}).join('');
|
|
14355
|
-
return html$P(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n <ul\n class=\"bullets-ul\"\n style=\"display:flex
|
|
14379
|
+
return html$P(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n <ul\n class=\"bullets-ul\"\n style=\"\n display: flex;\n gap: 24px;\n list-style: none;\n padding: 16px 0 0;\n justify-content: center;\n width: auto;\n border-top: 1px solid ", ";\n \"\n >\n ", "\n </ul>\n </div>\n </div>\n "])), slide.title, borderColor, listItems);
|
|
14356
14380
|
};
|
|
14357
14381
|
|
|
14358
|
-
var _templateObject$T, _templateObject2$u, _templateObject3$f, _templateObject4$5;
|
|
14382
|
+
var _templateObject$T, _templateObject2$u, _templateObject3$f, _templateObject4$5, _templateObject5$3;
|
|
14359
14383
|
var html$Q = String.raw;
|
|
14360
14384
|
var teamMemberHtml = function teamMemberHtml(_ref) {
|
|
14361
14385
|
var _ref$slide = _ref.slide,
|
|
14362
14386
|
slide = _ref$slide === void 0 ? {} : _ref$slide;
|
|
14363
14387
|
var members = (slide.teamMembers || []).slice(0, 3);
|
|
14364
14388
|
if (!members.length) {
|
|
14365
|
-
return html$Q(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])),
|
|
14389
|
+
return html$Q(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), slide.title || '');
|
|
14366
14390
|
}
|
|
14367
14391
|
var isRow = members.length > 1;
|
|
14368
|
-
var imageStyle = isRow ? '
|
|
14392
|
+
var imageStyle = isRow ? 'width:100%;' : '';
|
|
14369
14393
|
var memberHtml = members.map(function (member) {
|
|
14370
14394
|
var name = (member === null || member === void 0 ? void 0 : member.name) || '';
|
|
14371
14395
|
var role = (member === null || member === void 0 ? void 0 : member.role) || '';
|
|
14372
14396
|
var bio = (member === null || member === void 0 ? void 0 : member.bio) || '';
|
|
14373
14397
|
var img = getImage(member === null || member === void 0 ? void 0 : member.imageSource) || '';
|
|
14374
|
-
return html$Q(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n <div\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;\"\n >\n <span class=\"subtitle\" style=\"margin:0;font-weight:600;\"\n >", "</span\n >\n <span class=\"text\" style=\"margin:0
|
|
14398
|
+
return html$Q(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n <div\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;\"\n >\n <span class=\"subtitle\" style=\"margin:0;font-weight:600;\"\n >", "</span\n >\n <span class=\"text\" style=\"margin:0;\">", "</span>\n <div style=\"position:relative;width:100%;\">\n <img\n src=\"", "\"\n alt=\"", "-avatar\"\n style=\"max-height:20vh;", "border-radius:12px;object-fit:cover;\"\n />\n </div>\n ", "\n </div>\n "])), name, role, img, name, imageStyle, bio ? html$Q(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"margin:0;text-align:left;\">", "</p>"])), bio) : '');
|
|
14375
14399
|
}).join('');
|
|
14376
|
-
return html$Q(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\" style=\"align-items:flex-start;\">\n
|
|
14400
|
+
return html$Q(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\" style=\"align-items:flex-start;\">\n ", "\n <div style=\"display:flex;gap:24px;width:100%;align-items:stretch;\">\n ", "\n </div>\n </div>\n </div>\n "])), slide.title ? html$Q(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["<h2 class=\"title\" style=\"text-align:left;\">", "</h2>"])), slide.title) : '', memberHtml);
|
|
14377
14401
|
};
|
|
14378
14402
|
|
|
14379
|
-
var _templateObject$U, _templateObject2$v, _templateObject3$g, _templateObject4$6, _templateObject5$
|
|
14403
|
+
var _templateObject$U, _templateObject2$v, _templateObject3$g, _templateObject4$6, _templateObject5$4;
|
|
14380
14404
|
var html$R = String.raw;
|
|
14381
14405
|
var textWithImageHtml = function textWithImageHtml(_ref) {
|
|
14382
14406
|
var _ref$slide = _ref.slide,
|
|
@@ -14384,12 +14408,12 @@ var textWithImageHtml = function textWithImageHtml(_ref) {
|
|
|
14384
14408
|
themeColors = _ref.themeColors;
|
|
14385
14409
|
var rawImg = slide.imageSources[0];
|
|
14386
14410
|
if (!rawImg) {
|
|
14387
|
-
return html$R(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["<div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])),
|
|
14411
|
+
return html$R(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["<div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])), slide.title || '', slide.text ? html$R(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["<p class=\"text\">", "</p>"])), slide.text) : '');
|
|
14388
14412
|
}
|
|
14389
14413
|
var img = getImage(rawImg);
|
|
14390
|
-
var imgUrl =
|
|
14391
|
-
var bg =
|
|
14392
|
-
return html$R(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["<div class=\"slide split\">\n <div class=\"slide-bg\" style=\"background-color:", "\"></div>\n <div class=\"split-inner\">\n <div class=\"right-image\" style=\"width:50%;\">\n <img src=\"", "\" alt=\"\" />\n </div>\n <div class=\"left-content\" style=\"width:50%;box-sizing:border-box;\">\n ", "\n ", "\n </div>\n </div>\n </div>"])), bg, imgUrl, slide.title ? html$R(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["<h2 class=\"title\" style=\"text-align:left;margin:0 0 12px;\">\n ", "\n </h2>"])),
|
|
14414
|
+
var imgUrl = img;
|
|
14415
|
+
var bg = themeColors;
|
|
14416
|
+
return html$R(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["<div class=\"slide split\">\n <div class=\"slide-bg\" style=\"background-color:", "\"></div>\n <div class=\"split-inner\">\n <div class=\"right-image\" style=\"width:50%;\">\n <img src=\"", "\" alt=\"\" />\n </div>\n <div class=\"left-content\" style=\"width:50%;box-sizing:border-box;\">\n ", "\n ", "\n </div>\n </div>\n </div>"])), bg, imgUrl, slide.title ? html$R(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["<h2 class=\"title\" style=\"text-align:left;margin:0 0 12px;\">\n ", "\n </h2>"])), slide.title) : '', slide.text ? html$R(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"text-align:left;margin:0;\">\n ", "\n </p>"])), slide.text) : '');
|
|
14393
14417
|
};
|
|
14394
14418
|
|
|
14395
14419
|
var _templateObject$V;
|
|
@@ -14407,7 +14431,7 @@ var presentationStyle = function presentationStyle(_ref) {
|
|
|
14407
14431
|
return html$S(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n <style>\n :root {\n --slide-width: 1600px;\n --slide-height: 900px;\n --rounded: 24px;\n --theme-bg: ", ";\n --theme-title-color: ", ";\n --theme-subtitle-color: ", ";\n --theme-text-color: ", ";\n --print-width: 29.7cm; /* A4 long side (landscape width) */\n --print-height: 21cm; /* A4 short side (landscape height) */\n }\n @page {\n size: var(--print-width) var(--print-height);\n margin: 0;\n }\n\n @media print {\n html,\n body {\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slides-export {\n padding: 0 !important;\n margin: 0 !important;\n gap: 0 !important;\n align-items: stretch !important;\n display: block !important;\n }\n .slide {\n width: var(--print-width) !important;\n height: var(--print-height) !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden !important;\n margin: 0 !important;\n page-break-inside: avoid !important;\n break-inside: avoid !important;\n page-break-after: always !important;\n break-after: page !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide + .slide {\n page-break-before: always !important;\n break-before: page !important;\n }\n .slide:first-child {\n page-break-before: auto !important;\n }\n .slide:last-child {\n page-break-after: auto !important;\n }\n .slide-bg {\n position: absolute !important;\n inset: 0 !important;\n width: 100% !important;\n height: 100% !important;\n }\n .slide img.slide-bg,\n .right-image img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n display: block !important;\n }\n * {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n }\n body {\n background: var(--theme-bg);\n margin: 0;\n padding: 0;\n }\n .slides-export {\n font-family: ", ";\n padding: 40px;\n display: flex;\n flex-direction: column;\n gap: 32px;\n align-items: center;\n }\n .slide {\n position: relative;\n width: var(--slide-width);\n height: var(--slide-height);\n border-radius: var(--rounded);\n background: var(--theme-bg);\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n page-break-inside: avoid;\n break-inside: avoid;\n page-break-after: always;\n break-after: page;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide:last-child {\n page-break-after: auto;\n break-after: auto;\n }\n .slide.split {\n display: flex;\n }\n .split-inner {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: flex;\n }\n .cover-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n z-index: 1;\n padding: 40px;\n }\n .cover-row {\n width: 100%;\n box-sizing: border-box;\n }\n .cover-center {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n }\n .cover-title {\n font-weight: 700;\n font-size: 48px;\n color: var(--theme-title-color);\n }\n .cover-subtitle {\n margin: 0;\n font-size: 20px;\n color: var(--theme-subtitle-color);\n }\n .left-content {\n flex: 1 1 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n z-index: 1;\n }\n .right-image {\n width: 50%;\n min-width: 0;\n background-position: center;\n background-size: cover;\n z-index: 0;\n }\n .right-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n }\n .slide-bg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n }\n .content {\n position: relative;\n z-index: 1;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n padding: 40px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .page-number {\n position: absolute;\n top: 12px;\n right: 16px;\n font-size: 14px;\n color: var(--theme-subtitle-color);\n background: rgba(255,255,255,0.0);\n padding: 4px 8px;\n border-radius: 6px;\n z-index: 3;\n pointer-events: none;\n }\n .slide--bullet .content {\n align-items: flex-start;\n }\n .slide--bullet .title,\n .slide--bullet .subtitle,\n .slide--bullet .text {\n align-self: start;\n text-align: left;\n }\n .slide--bullet .bullets-ul {\n margin-top: 48px;\n }\n .slide--process .content {\n align-items: flex-start;\n }\n .slide--process .title,\n .slide--process .subtitle,\n .slide--process .text {\n align-self: start;\n text-align: left;\n }\n .slide--process .bullets-ul {\n margin-top: 48px;\n }\n .title {\n font-weight: 700;\n font-size: 48px;\n margin: 0 0 8px;\n text-align: center;\n color: var(--theme-title-color);\n }\n .subtitle {\n font-weight: 500;\n font-size: 28px;\n margin: 0;\n text-align: center;\n color: var(--theme-subtitle-color);\n }\n .text {\n font-size: 20px;\n margin-top: 16px;\n text-align: center;\n color: var(--theme-text-color);\n }\n .bullets {\n padding-left: 24px;\n font-size: 20px;\n }\n .image-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .image-wrapper img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n @media (max-width: 1200px) {\n :root {\n --slide-width: 960px;\n --slide-height: 540px;\n }\n }\n @media (max-width: 720px) {\n :root {\n --slide-width: 360px;\n --slide-height: 640px;\n }\n }\n </style>\n"])), theme.background, theme.title, theme.subtitle, theme.text, fontStack);
|
|
14408
14432
|
};
|
|
14409
14433
|
|
|
14410
|
-
var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$
|
|
14434
|
+
var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$5;
|
|
14411
14435
|
var htmlRaw$3 = String.raw;
|
|
14412
14436
|
var presentationHtml = function presentationHtml(_ref) {
|
|
14413
14437
|
var _ref$customizationSty = _ref.customizationStyle,
|
|
@@ -14424,6 +14448,7 @@ var presentationHtml = function presentationHtml(_ref) {
|
|
|
14424
14448
|
if (!slides.length) {
|
|
14425
14449
|
return htmlRaw$3(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["<div>No slides available</div>"])));
|
|
14426
14450
|
}
|
|
14451
|
+
slides = deepDecodeHtml(slides);
|
|
14427
14452
|
slides = sanitize(slides);
|
|
14428
14453
|
var _getFontResources = getFontResources(font.family),
|
|
14429
14454
|
fontStack = _getFontResources.fontStack,
|
|
@@ -14462,7 +14487,7 @@ var presentationHtml = function presentationHtml(_ref) {
|
|
|
14462
14487
|
var fontLinkTags = fontLinks.map(function (href) {
|
|
14463
14488
|
return htmlRaw$3(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["<link rel=\"stylesheet\" href=\"", "\" />"])), href);
|
|
14464
14489
|
}).join('');
|
|
14465
|
-
return htmlRaw$3(_templateObject5$
|
|
14490
|
+
return htmlRaw$3(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n ", "\n ", "\n </head>\n <body>\n <div class=\"slides-export\">\n ", "\n </div>\n </body>\n </html>"])), fontLinkTags, css, innerContent);
|
|
14466
14491
|
};
|
|
14467
14492
|
|
|
14468
14493
|
exports.ContractHtml = contractHtml;
|