@bookipi/htmlgenerator 1.8.3 → 1.8.4-alpha2
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 +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -12001,12 +12001,36 @@ var COMPANY_KEYS = ['_id', 'fax', 'contactName', 'c', 'e', 'ph', 'tfn', 'la', 'c
|
|
|
12001
12001
|
|
|
12002
12002
|
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'];
|
|
12003
12003
|
|
|
12004
|
-
var
|
|
12004
|
+
var decodeHtml = function decodeHtml(str) {
|
|
12005
12005
|
if (str === void 0) {
|
|
12006
12006
|
str = '';
|
|
12007
12007
|
}
|
|
12008
|
-
return String(str).replace(
|
|
12008
|
+
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/ /g, ' ');
|
|
12009
12009
|
};
|
|
12010
|
+
function deepDecodeHtml(obj) {
|
|
12011
|
+
if (typeof obj === 'undefined' || obj === null) {
|
|
12012
|
+
return obj;
|
|
12013
|
+
}
|
|
12014
|
+
if (typeof obj === 'string') {
|
|
12015
|
+
return decodeHtml(obj);
|
|
12016
|
+
}
|
|
12017
|
+
if (Array.isArray(obj)) {
|
|
12018
|
+
return obj.map(function (item) {
|
|
12019
|
+
return deepDecodeHtml(item);
|
|
12020
|
+
});
|
|
12021
|
+
}
|
|
12022
|
+
if (typeof obj === 'object' && obj.constructor === Object) {
|
|
12023
|
+
var decoded = {};
|
|
12024
|
+
for (var _i = 0, _Object$entries = Object.entries(obj); _i < _Object$entries.length; _i++) {
|
|
12025
|
+
var _Object$entries$_i = _Object$entries[_i],
|
|
12026
|
+
key = _Object$entries$_i[0],
|
|
12027
|
+
value = _Object$entries$_i[1];
|
|
12028
|
+
decoded[key] = deepDecodeHtml(value);
|
|
12029
|
+
}
|
|
12030
|
+
return decoded;
|
|
12031
|
+
}
|
|
12032
|
+
return obj;
|
|
12033
|
+
}
|
|
12010
12034
|
Object.fromEntries = Object.fromEntries || function (arr) {
|
|
12011
12035
|
return arr.reduce(function (acc, curr) {
|
|
12012
12036
|
acc[curr[0]] = curr[1];
|
|
@@ -14201,17 +14225,17 @@ var coverHtml = function coverHtml(_ref) {
|
|
|
14201
14225
|
if (layout === 'split') {
|
|
14202
14226
|
var _background$right;
|
|
14203
14227
|
var rightIsImage = ((_background$right = background.right) === null || _background$right === void 0 ? void 0 : _background$right.type) === 'image';
|
|
14204
|
-
var rightBgStyle = rightIsImage ? "background-image:url(" +
|
|
14205
|
-
var outerSplitStyle = "background:" +
|
|
14228
|
+
var rightBgStyle = rightIsImage ? "background-image:url(" + background.right.value + ")" : "background:" + background.right.value;
|
|
14229
|
+
var outerSplitStyle = "background:" + themeColors.background;
|
|
14206
14230
|
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);
|
|
14207
14231
|
}
|
|
14208
14232
|
var isImage = background.type === 'image';
|
|
14209
14233
|
var hasOverlay = isImage && background.overlay;
|
|
14210
14234
|
var bgStyle = '';
|
|
14211
14235
|
if (isImage) {
|
|
14212
|
-
bgStyle = "background-image: " + (hasOverlay ? "linear-gradient(" +
|
|
14236
|
+
bgStyle = "background-image: " + (hasOverlay ? "linear-gradient(" + background.overlay + ", " + background.overlay + "), url(" + (background.value || '') + ")" : "url(" + (background.value || '') + ")") + "; background-position: center; background-size: cover;";
|
|
14213
14237
|
} else if (background.type === 'color') {
|
|
14214
|
-
bgStyle = "background:" +
|
|
14238
|
+
bgStyle = "background:" + (background.value || '');
|
|
14215
14239
|
} else {
|
|
14216
14240
|
bgStyle = '';
|
|
14217
14241
|
}
|
|
@@ -14226,7 +14250,7 @@ var bulletHtml = function bulletHtml(_ref) {
|
|
|
14226
14250
|
customizationStyle = _ref$customizationSty === void 0 ? {} : _ref$customizationSty;
|
|
14227
14251
|
var items = (slide.bullets || []).slice(0, 3);
|
|
14228
14252
|
if (!items.length) {
|
|
14229
|
-
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 "])),
|
|
14253
|
+
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);
|
|
14230
14254
|
}
|
|
14231
14255
|
var accentColor = customizationStyle.accentColor;
|
|
14232
14256
|
var markerBg = increaseHexColorIntensity(accentColor, 10);
|
|
@@ -14234,10 +14258,10 @@ var bulletHtml = function bulletHtml(_ref) {
|
|
|
14234
14258
|
var listItems = items.map(function (item) {
|
|
14235
14259
|
var title = (item === null || item === void 0 ? void 0 : item.title) || '';
|
|
14236
14260
|
var desc = (item === null || item === void 0 ? void 0 : item.description) || '';
|
|
14237
|
-
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 "])),
|
|
14261
|
+
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) : '');
|
|
14238
14262
|
}).join('');
|
|
14239
14263
|
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);
|
|
14240
|
-
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>"])),
|
|
14264
|
+
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);
|
|
14241
14265
|
};
|
|
14242
14266
|
|
|
14243
14267
|
var _templateObject$Q, _templateObject2$r;
|
|
@@ -14246,9 +14270,9 @@ var highlightTextHtml = function highlightTextHtml(_ref) {
|
|
|
14246
14270
|
var _ref$slide = _ref.slide,
|
|
14247
14271
|
slide = _ref$slide === void 0 ? {} : _ref$slide;
|
|
14248
14272
|
var paragraphs = String(slide.text || '').split('\n').map(function (p) {
|
|
14249
|
-
return "<p>" +
|
|
14273
|
+
return "<p>" + p + "</p>";
|
|
14250
14274
|
}).join('');
|
|
14251
|
-
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 "])),
|
|
14275
|
+
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) : '');
|
|
14252
14276
|
};
|
|
14253
14277
|
|
|
14254
14278
|
var _templateObject$R, _templateObject2$s, _templateObject3$d, _templateObject4$3;
|
|
@@ -14261,15 +14285,15 @@ var imagesHtml = function imagesHtml(_ref) {
|
|
|
14261
14285
|
return getImage(source);
|
|
14262
14286
|
}).filter(Boolean);
|
|
14263
14287
|
if (!sources.length) {
|
|
14264
|
-
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 "])),
|
|
14288
|
+
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 || '');
|
|
14265
14289
|
}
|
|
14266
14290
|
if (sources.length === 1) {
|
|
14267
|
-
var imgUrl =
|
|
14268
|
-
var alt =
|
|
14291
|
+
var imgUrl = sources[0] || '';
|
|
14292
|
+
var alt = slide.title || '';
|
|
14269
14293
|
return html$O(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <img class=\"slide-bg\" src=\"", "\" alt=\"", "\" />\n </div>\n "])), imgUrl, alt);
|
|
14270
14294
|
}
|
|
14271
14295
|
var imagesRow = sources.map(function (src) {
|
|
14272
|
-
var s =
|
|
14296
|
+
var s = src;
|
|
14273
14297
|
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);
|
|
14274
14298
|
}).join('');
|
|
14275
14299
|
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);
|
|
@@ -14284,7 +14308,7 @@ var processHtml = function processHtml(_ref) {
|
|
|
14284
14308
|
customizationTheme = _ref.customizationTheme;
|
|
14285
14309
|
var items = (slide.steps || []).slice(0, 3);
|
|
14286
14310
|
if (!items.length) {
|
|
14287
|
-
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 "])),
|
|
14311
|
+
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 || '');
|
|
14288
14312
|
}
|
|
14289
14313
|
var accentColor = customizationStyle.accentColor;
|
|
14290
14314
|
var markerBg = increaseHexColorIntensity(accentColor, 100);
|
|
@@ -14293,33 +14317,33 @@ var processHtml = function processHtml(_ref) {
|
|
|
14293
14317
|
var listItems = items.map(function (item, index) {
|
|
14294
14318
|
var title = typeof item === 'string' ? '' : (item === null || item === void 0 ? void 0 : item.title) || '';
|
|
14295
14319
|
var desc = typeof item === 'string' ? item : (item === null || item === void 0 ? void 0 : item.description) || '';
|
|
14296
|
-
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
|
|
14320
|
+
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) : '');
|
|
14297
14321
|
}).join('');
|
|
14298
|
-
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
|
|
14322
|
+
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);
|
|
14299
14323
|
};
|
|
14300
14324
|
|
|
14301
|
-
var _templateObject$T, _templateObject2$u, _templateObject3$f, _templateObject4$5;
|
|
14325
|
+
var _templateObject$T, _templateObject2$u, _templateObject3$f, _templateObject4$5, _templateObject5$3;
|
|
14302
14326
|
var html$Q = String.raw;
|
|
14303
14327
|
var teamMemberHtml = function teamMemberHtml(_ref) {
|
|
14304
14328
|
var _ref$slide = _ref.slide,
|
|
14305
14329
|
slide = _ref$slide === void 0 ? {} : _ref$slide;
|
|
14306
14330
|
var members = (slide.teamMembers || []).slice(0, 3);
|
|
14307
14331
|
if (!members.length) {
|
|
14308
|
-
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 "])),
|
|
14332
|
+
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 || '');
|
|
14309
14333
|
}
|
|
14310
14334
|
var isRow = members.length > 1;
|
|
14311
|
-
var imageStyle = isRow ? '
|
|
14335
|
+
var imageStyle = isRow ? 'width:100%;' : '';
|
|
14312
14336
|
var memberHtml = members.map(function (member) {
|
|
14313
14337
|
var name = (member === null || member === void 0 ? void 0 : member.name) || '';
|
|
14314
14338
|
var role = (member === null || member === void 0 ? void 0 : member.role) || '';
|
|
14315
14339
|
var bio = (member === null || member === void 0 ? void 0 : member.bio) || '';
|
|
14316
14340
|
var img = getImage(member === null || member === void 0 ? void 0 : member.imageSource) || '';
|
|
14317
|
-
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
|
|
14341
|
+
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) : '');
|
|
14318
14342
|
}).join('');
|
|
14319
|
-
return html$Q(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\" style=\"align-items:flex-start;\">\n
|
|
14343
|
+
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);
|
|
14320
14344
|
};
|
|
14321
14345
|
|
|
14322
|
-
var _templateObject$U, _templateObject2$v, _templateObject3$g, _templateObject4$6, _templateObject5$
|
|
14346
|
+
var _templateObject$U, _templateObject2$v, _templateObject3$g, _templateObject4$6, _templateObject5$4;
|
|
14323
14347
|
var html$R = String.raw;
|
|
14324
14348
|
var textWithImageHtml = function textWithImageHtml(_ref) {
|
|
14325
14349
|
var _ref$slide = _ref.slide,
|
|
@@ -14327,12 +14351,12 @@ var textWithImageHtml = function textWithImageHtml(_ref) {
|
|
|
14327
14351
|
themeColors = _ref.themeColors;
|
|
14328
14352
|
var rawImg = slide.imageSources[0];
|
|
14329
14353
|
if (!rawImg) {
|
|
14330
|
-
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>"])),
|
|
14354
|
+
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) : '');
|
|
14331
14355
|
}
|
|
14332
14356
|
var img = getImage(rawImg);
|
|
14333
|
-
var imgUrl =
|
|
14334
|
-
var bg =
|
|
14335
|
-
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>"])),
|
|
14357
|
+
var imgUrl = img;
|
|
14358
|
+
var bg = themeColors;
|
|
14359
|
+
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) : '');
|
|
14336
14360
|
};
|
|
14337
14361
|
|
|
14338
14362
|
var _templateObject$V;
|
|
@@ -14350,7 +14374,7 @@ var presentationStyle = function presentationStyle(_ref) {
|
|
|
14350
14374
|
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);
|
|
14351
14375
|
};
|
|
14352
14376
|
|
|
14353
|
-
var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$
|
|
14377
|
+
var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$5;
|
|
14354
14378
|
var htmlRaw$3 = String.raw;
|
|
14355
14379
|
var presentationHtml = function presentationHtml(_ref) {
|
|
14356
14380
|
var _ref$customizationSty = _ref.customizationStyle,
|
|
@@ -14367,6 +14391,7 @@ var presentationHtml = function presentationHtml(_ref) {
|
|
|
14367
14391
|
if (!slides.length) {
|
|
14368
14392
|
return htmlRaw$3(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["<div>No slides available</div>"])));
|
|
14369
14393
|
}
|
|
14394
|
+
slides = deepDecodeHtml(slides);
|
|
14370
14395
|
slides = sanitize(slides);
|
|
14371
14396
|
var _getFontResources = getFontResources(font.family),
|
|
14372
14397
|
fontStack = _getFontResources.fontStack,
|
|
@@ -14405,7 +14430,7 @@ var presentationHtml = function presentationHtml(_ref) {
|
|
|
14405
14430
|
var fontLinkTags = fontLinks.map(function (href) {
|
|
14406
14431
|
return htmlRaw$3(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["<link rel=\"stylesheet\" href=\"", "\" />"])), href);
|
|
14407
14432
|
}).join('');
|
|
14408
|
-
return htmlRaw$3(_templateObject5$
|
|
14433
|
+
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);
|
|
14409
14434
|
};
|
|
14410
14435
|
|
|
14411
14436
|
export { contractHtml as ContractHtml, InvoiceCompatHtml, InvoiceCompatHtml$1 as InvoiceCompatJapanHtml, invoiceHtml as InvoiceHtml, invoiceHtml$1 as InvoiceJapanHtml, presentationHtml as PresentationHtml, subscriptionInvoiceHtml as SubscriptionInvoiceHtml, renderOldLayout as invoiceHtmlWithDetails, renderNewLayout as invoiceHtmlWithDetailsNew, renderLayout as invoiceJapanHtmlWithDetails, renderLayout as renderJapanInvoice, renderNewLayout as renderNewInvoice, renderOldLayout as renderOldInvoice };
|