@thecodeblogs/blog 0.11.7 → 0.13.0
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/esm2020/lib/components/entry-creator/entry-creator.component.mjs +347 -0
- package/esm2020/lib/components/entry-renderer/entry-renderer.component.mjs +108 -0
- package/esm2020/lib/components/entry-renderer-wrapper/entry-renderer-wrapper.component.mjs +75 -0
- package/esm2020/lib/components/entry-selector-dialog/entry-selector-dialog-data.mjs +3 -0
- package/esm2020/lib/components/entry-selector-dialog/entry-selector-dialog.component.mjs +45 -0
- package/esm2020/lib/components/entry-summary/entry-summary.component.mjs +28 -0
- package/esm2020/lib/components/json-renderer/json-renderer.component.mjs +26 -0
- package/esm2020/lib/components/landing-page/landing-page.component.mjs +35 -0
- package/esm2020/lib/components/main/main.component.mjs +56 -0
- package/esm2020/lib/components/media-upload-modal/media-upload-modal.component.mjs +160 -0
- package/esm2020/lib/components/outline-view/outline-view.component.mjs +40 -0
- package/esm2020/lib/components/schedule-publish-dialog/schedule-publish-dialog-data.mjs +3 -0
- package/esm2020/lib/components/schedule-publish-dialog/schedule-publish-dialog.component.mjs +33 -0
- package/esm2020/lib/components/side-navigation/side-navigation.component.mjs +151 -0
- package/esm2020/lib/components/static-html/static-html.component.mjs +28 -0
- package/esm2020/lib/core.module.mjs +207 -0
- package/esm2020/lib/data/base.mjs +7 -0
- package/esm2020/lib/data/content-type.mjs +10 -0
- package/esm2020/lib/data/content.mjs +5 -0
- package/esm2020/lib/data/core-event-type.enum.mjs +7 -0
- package/esm2020/lib/data/core-event.mjs +7 -0
- package/esm2020/lib/data/entry.mjs +80 -0
- package/esm2020/lib/data/guid.mjs +12 -0
- package/esm2020/lib/data/identity.mjs +2 -0
- package/esm2020/lib/data/list-response.mjs +3 -0
- package/esm2020/lib/data/section.mjs +11 -0
- package/esm2020/lib/data/tag.mjs +7 -0
- package/esm2020/lib/data/visitor-profile.mjs +3 -0
- package/esm2020/lib/pipes/LinkyPipe.mjs +15 -0
- package/esm2020/lib/pipes/TimeAgoPipe.mjs +100 -0
- package/esm2020/lib/routing/routes.mjs +25 -0
- package/esm2020/lib/services/analytics/interaction.service.mjs +20 -0
- package/esm2020/lib/services/analytics/view.service.mjs +20 -0
- package/esm2020/lib/services/comment.service.mjs +28 -0
- package/esm2020/lib/services/django-rest-framework-endpoint.service.mjs +50 -0
- package/esm2020/lib/services/entry.service.mjs +73 -0
- package/esm2020/lib/services/identity.service.mjs +20 -0
- package/esm2020/lib/services/interaction.mjs +3 -0
- package/esm2020/lib/services/prism.service.mjs +39 -0
- package/esm2020/lib/services/static-html.service.mjs +22 -0
- package/esm2020/lib/services/tag.service.mjs +33 -0
- package/esm2020/lib/services/upload.mjs +3 -0
- package/esm2020/lib/services/upload.service.mjs +22 -0
- package/esm2020/lib/services/view.mjs +3 -0
- package/esm2020/lib/services/visitor-profile.service.mjs +35 -0
- package/esm2020/public-api.mjs +45 -0
- package/esm2020/thecodeblogs-blog.mjs +5 -0
- package/fesm2015/thecodeblogs-blog.mjs +1826 -0
- package/fesm2015/thecodeblogs-blog.mjs.map +1 -0
- package/fesm2020/thecodeblogs-blog.mjs +1820 -0
- package/fesm2020/thecodeblogs-blog.mjs.map +1 -0
- package/lib/components/entry-creator/entry-creator.component.d.ts +3 -0
- package/lib/components/entry-renderer/entry-renderer.component.d.ts +3 -0
- package/lib/components/entry-renderer-wrapper/entry-renderer-wrapper.component.d.ts +3 -0
- package/lib/components/entry-selector-dialog/entry-selector-dialog.component.d.ts +3 -0
- package/lib/components/entry-summary/entry-summary.component.d.ts +3 -0
- package/lib/components/json-renderer/json-renderer.component.d.ts +3 -0
- package/lib/components/landing-page/landing-page.component.d.ts +3 -0
- package/lib/components/main/main.component.d.ts +3 -0
- package/lib/components/media-upload-modal/media-upload-modal.component.d.ts +3 -0
- package/lib/components/outline-view/outline-view.component.d.ts +3 -0
- package/lib/components/schedule-publish-dialog/schedule-publish-dialog.component.d.ts +3 -0
- package/lib/components/side-navigation/side-navigation.component.d.ts +3 -0
- package/lib/components/static-html/static-html.component.d.ts +3 -0
- package/lib/core.module.d.ts +40 -0
- package/lib/pipes/LinkyPipe.d.ts +3 -0
- package/lib/pipes/TimeAgoPipe.d.ts +3 -0
- package/lib/services/analytics/interaction.service.d.ts +3 -0
- package/lib/services/analytics/view.service.d.ts +3 -0
- package/lib/services/comment.service.d.ts +3 -0
- package/lib/services/django-rest-framework-endpoint.service.d.ts +3 -0
- package/lib/services/entry.service.d.ts +3 -0
- package/lib/services/identity.service.d.ts +3 -0
- package/lib/services/prism.service.d.ts +3 -0
- package/lib/services/static-html.service.d.ts +3 -0
- package/lib/services/tag.service.d.ts +3 -0
- package/lib/services/upload.service.d.ts +3 -0
- package/lib/services/visitor-profile.service.d.ts +3 -0
- package/package.json +36 -24
- package/thecodeblogs-blog.d.ts +1 -3
- package/bundles/thecodeblogs-blog.umd.js +0 -2279
- package/bundles/thecodeblogs-blog.umd.js.map +0 -1
- package/bundles/thecodeblogs-blog.umd.min.js +0 -17
- package/bundles/thecodeblogs-blog.umd.min.js.map +0 -1
- package/esm2015/lib/components/entry-creator/entry-creator.component.js +0 -336
- package/esm2015/lib/components/entry-renderer/entry-renderer.component.js +0 -108
- package/esm2015/lib/components/entry-renderer-wrapper/entry-renderer-wrapper.component.js +0 -79
- package/esm2015/lib/components/entry-selector-dialog/entry-selector-dialog-data.js +0 -3
- package/esm2015/lib/components/entry-selector-dialog/entry-selector-dialog.component.js +0 -41
- package/esm2015/lib/components/entry-summary/entry-summary.component.js +0 -29
- package/esm2015/lib/components/json-renderer/json-renderer.component.js +0 -29
- package/esm2015/lib/components/landing-page/landing-page.component.js +0 -37
- package/esm2015/lib/components/main/main.component.js +0 -55
- package/esm2015/lib/components/media-upload-modal/media-upload-modal.component.js +0 -155
- package/esm2015/lib/components/outline-view/outline-view.component.js +0 -40
- package/esm2015/lib/components/schedule-publish-dialog/schedule-publish-dialog-data.js +0 -3
- package/esm2015/lib/components/schedule-publish-dialog/schedule-publish-dialog.component.js +0 -28
- package/esm2015/lib/components/side-navigation/side-navigation.component.js +0 -154
- package/esm2015/lib/components/static-html/static-html.component.js +0 -33
- package/esm2015/lib/core.module.js +0 -125
- package/esm2015/lib/data/base.js +0 -7
- package/esm2015/lib/data/content-type.js +0 -10
- package/esm2015/lib/data/content.js +0 -5
- package/esm2015/lib/data/core-event-type.enum.js +0 -7
- package/esm2015/lib/data/core-event.js +0 -7
- package/esm2015/lib/data/entry.js +0 -80
- package/esm2015/lib/data/guid.js +0 -12
- package/esm2015/lib/data/identity.js +0 -2
- package/esm2015/lib/data/list-response.js +0 -3
- package/esm2015/lib/data/section.js +0 -11
- package/esm2015/lib/data/tag.js +0 -7
- package/esm2015/lib/data/visitor-profile.js +0 -3
- package/esm2015/lib/pipes/LinkyPipe.js +0 -11
- package/esm2015/lib/pipes/TimeAgoPipe.js +0 -100
- package/esm2015/lib/routing/routes.js +0 -25
- package/esm2015/lib/services/analytics/interaction.service.js +0 -22
- package/esm2015/lib/services/analytics/view.service.js +0 -22
- package/esm2015/lib/services/comment.service.js +0 -30
- package/esm2015/lib/services/django-rest-framework-endpoint.service.js +0 -52
- package/esm2015/lib/services/entry.service.js +0 -74
- package/esm2015/lib/services/identity.service.js +0 -22
- package/esm2015/lib/services/interaction.js +0 -3
- package/esm2015/lib/services/prism.service.js +0 -37
- package/esm2015/lib/services/static-html.service.js +0 -24
- package/esm2015/lib/services/tag.service.js +0 -35
- package/esm2015/lib/services/upload.js +0 -3
- package/esm2015/lib/services/upload.service.js +0 -24
- package/esm2015/lib/services/view.js +0 -3
- package/esm2015/lib/services/visitor-profile.service.js +0 -39
- package/esm2015/public-api.js +0 -45
- package/esm2015/thecodeblogs-blog.js +0 -8
- package/fesm2015/thecodeblogs-blog.js +0 -1786
- package/fesm2015/thecodeblogs-blog.js.map +0 -1
- package/thecodeblogs-blog.metadata.json +0 -1
|
@@ -1,2279 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@angular/common'), require('clipboard'), require('prismjs'), require('prismjs/plugins/toolbar/prism-toolbar'), require('prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard'), require('prismjs/components/prism-css'), require('prismjs/components/prism-javascript'), require('prismjs/components/prism-java'), require('prismjs/components/prism-markup'), require('prismjs/components/prism-typescript'), require('prismjs/components/prism-sass'), require('prismjs/components/prism-scss'), require('ngx-device-detector'), require('@angular/platform-browser'), require('@angular/cdk/keycodes'), require('@angular/material/dialog'), require('ng2-file-upload'), require('@angular/forms'), require('@angular/router'), require('autolinker'), require('@angular/cdk/drag-drop'), require('@angular/material/divider'), require('@angular/material/card'), require('@angular/material/sidenav'), require('@angular/material/button'), require('@angular/material/input'), require('@angular/material/list'), require('@angular/material/radio'), require('@angular/material/checkbox'), require('@angular/material/autocomplete'), require('@angular/material/chips'), require('@angular/material/icon'), require('@angular/material/core'), require('@angular/material/datepicker'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('ngx-material-timepicker')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@thecodeblogs/blog', ['exports', 'lodash', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', '@angular/common', 'clipboard', 'prismjs', 'prismjs/plugins/toolbar/prism-toolbar', 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard', 'prismjs/components/prism-css', 'prismjs/components/prism-javascript', 'prismjs/components/prism-java', 'prismjs/components/prism-markup', 'prismjs/components/prism-typescript', 'prismjs/components/prism-sass', 'prismjs/components/prism-scss', 'ngx-device-detector', '@angular/platform-browser', '@angular/cdk/keycodes', '@angular/material/dialog', 'ng2-file-upload', '@angular/forms', '@angular/router', 'autolinker', '@angular/cdk/drag-drop', '@angular/material/divider', '@angular/material/card', '@angular/material/sidenav', '@angular/material/button', '@angular/material/input', '@angular/material/list', '@angular/material/radio', '@angular/material/checkbox', '@angular/material/autocomplete', '@angular/material/chips', '@angular/material/icon', '@angular/material/core', '@angular/material/datepicker', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', 'ngx-material-timepicker'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.thecodeblogs = global.thecodeblogs || {}, global.thecodeblogs.blog = {}), global.lodash, global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.ng.common, null, null, null, null, null, null, null, null, null, null, null, global.i2, global.ng.platformBrowser, global.ng.cdk.keycodes, global.ng.material.dialog, global.ng2FileUpload, global.ng.forms, global.ng.router, global.Autolinker, global.ng.cdk.dragDrop, global.ng.material.divider, global.ng.material.card, global.ng.material.sidenav, global.ng.material.button, global.ng.material.input, global.ng.material.list, global.ng.material.radio, global.ng.material.checkbox, global.ng.material.autocomplete, global.ng.material.chips, global.ng.material.icon, global.ng.material.core, global.ng.material.datepicker, global.angularFontawesome, global.freeSolidSvgIcons, global.ngxMaterialTimepicker));
|
|
5
|
-
}(this, (function (exports, lodash, i0, i1, operators, rxjs, common, clipboard, prismjs, prismToolbar, prismCopyToClipboard, prismCss, prismJavascript, prismJava, prismMarkup, prismTypescript, prismSass, prismScss, i2, i1$1, keycodes, dialog, ng2FileUpload, forms, router, Autolinker, dragDrop, divider, card, sidenav, button, input, list, radio, checkbox, autocomplete, chips, icon, core, datepicker, angularFontawesome, freeSolidSvgIcons, ngxMaterialTimepicker) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var Autolinker__default = /*#__PURE__*/_interopDefaultLegacy(Autolinker);
|
|
10
|
-
|
|
11
|
-
var Guid = /** @class */ (function () {
|
|
12
|
-
function Guid() {
|
|
13
|
-
}
|
|
14
|
-
Guid.prototype.newGuid = function () {
|
|
15
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
16
|
-
// tslint:disable-next-line:no-bitwise
|
|
17
|
-
var r = Math.random() * 16 | 0,
|
|
18
|
-
// tslint:disable-next-line:triple-equals no-bitwise
|
|
19
|
-
v = c == 'x' ? r : (r & 0x3 | 0x8);
|
|
20
|
-
return v.toString(16);
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
return Guid;
|
|
24
|
-
}());
|
|
25
|
-
|
|
26
|
-
var Base = /** @class */ (function () {
|
|
27
|
-
function Base() {
|
|
28
|
-
this.id = new Guid().newGuid();
|
|
29
|
-
}
|
|
30
|
-
return Base;
|
|
31
|
-
}());
|
|
32
|
-
|
|
33
|
-
(function (ContentType) {
|
|
34
|
-
ContentType["TEXT"] = "text";
|
|
35
|
-
ContentType["URL"] = "url";
|
|
36
|
-
ContentType["CODE"] = "code";
|
|
37
|
-
ContentType["IMAGE"] = "image";
|
|
38
|
-
ContentType["MEDIA"] = "media";
|
|
39
|
-
ContentType["HTML"] = "html";
|
|
40
|
-
})(exports.ContentType || (exports.ContentType = {}));
|
|
41
|
-
|
|
42
|
-
/*! *****************************************************************************
|
|
43
|
-
Copyright (c) Microsoft Corporation.
|
|
44
|
-
|
|
45
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
46
|
-
purpose with or without fee is hereby granted.
|
|
47
|
-
|
|
48
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
49
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
50
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
51
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
52
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
53
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
54
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
55
|
-
***************************************************************************** */
|
|
56
|
-
/* global Reflect, Promise */
|
|
57
|
-
var extendStatics = function (d, b) {
|
|
58
|
-
extendStatics = Object.setPrototypeOf ||
|
|
59
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
60
|
-
function (d, b) { for (var p in b)
|
|
61
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
62
|
-
d[p] = b[p]; };
|
|
63
|
-
return extendStatics(d, b);
|
|
64
|
-
};
|
|
65
|
-
function __extends(d, b) {
|
|
66
|
-
extendStatics(d, b);
|
|
67
|
-
function __() { this.constructor = d; }
|
|
68
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
69
|
-
}
|
|
70
|
-
var __assign = function () {
|
|
71
|
-
__assign = Object.assign || function __assign(t) {
|
|
72
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
73
|
-
s = arguments[i];
|
|
74
|
-
for (var p in s)
|
|
75
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
76
|
-
t[p] = s[p];
|
|
77
|
-
}
|
|
78
|
-
return t;
|
|
79
|
-
};
|
|
80
|
-
return __assign.apply(this, arguments);
|
|
81
|
-
};
|
|
82
|
-
function __rest(s, e) {
|
|
83
|
-
var t = {};
|
|
84
|
-
for (var p in s)
|
|
85
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
86
|
-
t[p] = s[p];
|
|
87
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
88
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
89
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
90
|
-
t[p[i]] = s[p[i]];
|
|
91
|
-
}
|
|
92
|
-
return t;
|
|
93
|
-
}
|
|
94
|
-
function __decorate(decorators, target, key, desc) {
|
|
95
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
96
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
97
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
98
|
-
else
|
|
99
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
100
|
-
if (d = decorators[i])
|
|
101
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
102
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
103
|
-
}
|
|
104
|
-
function __param(paramIndex, decorator) {
|
|
105
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
106
|
-
}
|
|
107
|
-
function __metadata(metadataKey, metadataValue) {
|
|
108
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
109
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
110
|
-
}
|
|
111
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
112
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
113
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
114
|
-
function fulfilled(value) { try {
|
|
115
|
-
step(generator.next(value));
|
|
116
|
-
}
|
|
117
|
-
catch (e) {
|
|
118
|
-
reject(e);
|
|
119
|
-
} }
|
|
120
|
-
function rejected(value) { try {
|
|
121
|
-
step(generator["throw"](value));
|
|
122
|
-
}
|
|
123
|
-
catch (e) {
|
|
124
|
-
reject(e);
|
|
125
|
-
} }
|
|
126
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
127
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function __generator(thisArg, body) {
|
|
131
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
132
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
133
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
134
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
135
|
-
function step(op) {
|
|
136
|
-
if (f)
|
|
137
|
-
throw new TypeError("Generator is already executing.");
|
|
138
|
-
while (_)
|
|
139
|
-
try {
|
|
140
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
141
|
-
return t;
|
|
142
|
-
if (y = 0, t)
|
|
143
|
-
op = [op[0] & 2, t.value];
|
|
144
|
-
switch (op[0]) {
|
|
145
|
-
case 0:
|
|
146
|
-
case 1:
|
|
147
|
-
t = op;
|
|
148
|
-
break;
|
|
149
|
-
case 4:
|
|
150
|
-
_.label++;
|
|
151
|
-
return { value: op[1], done: false };
|
|
152
|
-
case 5:
|
|
153
|
-
_.label++;
|
|
154
|
-
y = op[1];
|
|
155
|
-
op = [0];
|
|
156
|
-
continue;
|
|
157
|
-
case 7:
|
|
158
|
-
op = _.ops.pop();
|
|
159
|
-
_.trys.pop();
|
|
160
|
-
continue;
|
|
161
|
-
default:
|
|
162
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
163
|
-
_ = 0;
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
167
|
-
_.label = op[1];
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
171
|
-
_.label = t[1];
|
|
172
|
-
t = op;
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
if (t && _.label < t[2]) {
|
|
176
|
-
_.label = t[2];
|
|
177
|
-
_.ops.push(op);
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
if (t[2])
|
|
181
|
-
_.ops.pop();
|
|
182
|
-
_.trys.pop();
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
op = body.call(thisArg, _);
|
|
186
|
-
}
|
|
187
|
-
catch (e) {
|
|
188
|
-
op = [6, e];
|
|
189
|
-
y = 0;
|
|
190
|
-
}
|
|
191
|
-
finally {
|
|
192
|
-
f = t = 0;
|
|
193
|
-
}
|
|
194
|
-
if (op[0] & 5)
|
|
195
|
-
throw op[1];
|
|
196
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
200
|
-
if (k2 === undefined)
|
|
201
|
-
k2 = k;
|
|
202
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
203
|
-
}) : (function (o, m, k, k2) {
|
|
204
|
-
if (k2 === undefined)
|
|
205
|
-
k2 = k;
|
|
206
|
-
o[k2] = m[k];
|
|
207
|
-
});
|
|
208
|
-
function __exportStar(m, o) {
|
|
209
|
-
for (var p in m)
|
|
210
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
211
|
-
__createBinding(o, m, p);
|
|
212
|
-
}
|
|
213
|
-
function __values(o) {
|
|
214
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
215
|
-
if (m)
|
|
216
|
-
return m.call(o);
|
|
217
|
-
if (o && typeof o.length === "number")
|
|
218
|
-
return {
|
|
219
|
-
next: function () {
|
|
220
|
-
if (o && i >= o.length)
|
|
221
|
-
o = void 0;
|
|
222
|
-
return { value: o && o[i++], done: !o };
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
226
|
-
}
|
|
227
|
-
function __read(o, n) {
|
|
228
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
229
|
-
if (!m)
|
|
230
|
-
return o;
|
|
231
|
-
var i = m.call(o), r, ar = [], e;
|
|
232
|
-
try {
|
|
233
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
234
|
-
ar.push(r.value);
|
|
235
|
-
}
|
|
236
|
-
catch (error) {
|
|
237
|
-
e = { error: error };
|
|
238
|
-
}
|
|
239
|
-
finally {
|
|
240
|
-
try {
|
|
241
|
-
if (r && !r.done && (m = i["return"]))
|
|
242
|
-
m.call(i);
|
|
243
|
-
}
|
|
244
|
-
finally {
|
|
245
|
-
if (e)
|
|
246
|
-
throw e.error;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return ar;
|
|
250
|
-
}
|
|
251
|
-
function __spread() {
|
|
252
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
253
|
-
ar = ar.concat(__read(arguments[i]));
|
|
254
|
-
return ar;
|
|
255
|
-
}
|
|
256
|
-
function __spreadArrays() {
|
|
257
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
258
|
-
s += arguments[i].length;
|
|
259
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
260
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
261
|
-
r[k] = a[j];
|
|
262
|
-
return r;
|
|
263
|
-
}
|
|
264
|
-
;
|
|
265
|
-
function __await(v) {
|
|
266
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
267
|
-
}
|
|
268
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
269
|
-
if (!Symbol.asyncIterator)
|
|
270
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
271
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
272
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
273
|
-
function verb(n) { if (g[n])
|
|
274
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
275
|
-
function resume(n, v) { try {
|
|
276
|
-
step(g[n](v));
|
|
277
|
-
}
|
|
278
|
-
catch (e) {
|
|
279
|
-
settle(q[0][3], e);
|
|
280
|
-
} }
|
|
281
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
282
|
-
function fulfill(value) { resume("next", value); }
|
|
283
|
-
function reject(value) { resume("throw", value); }
|
|
284
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
285
|
-
resume(q[0][0], q[0][1]); }
|
|
286
|
-
}
|
|
287
|
-
function __asyncDelegator(o) {
|
|
288
|
-
var i, p;
|
|
289
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
290
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
291
|
-
}
|
|
292
|
-
function __asyncValues(o) {
|
|
293
|
-
if (!Symbol.asyncIterator)
|
|
294
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
295
|
-
var m = o[Symbol.asyncIterator], i;
|
|
296
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
297
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
298
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
299
|
-
}
|
|
300
|
-
function __makeTemplateObject(cooked, raw) {
|
|
301
|
-
if (Object.defineProperty) {
|
|
302
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
303
|
-
}
|
|
304
|
-
else {
|
|
305
|
-
cooked.raw = raw;
|
|
306
|
-
}
|
|
307
|
-
return cooked;
|
|
308
|
-
}
|
|
309
|
-
;
|
|
310
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
311
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
312
|
-
}) : function (o, v) {
|
|
313
|
-
o["default"] = v;
|
|
314
|
-
};
|
|
315
|
-
function __importStar(mod) {
|
|
316
|
-
if (mod && mod.__esModule)
|
|
317
|
-
return mod;
|
|
318
|
-
var result = {};
|
|
319
|
-
if (mod != null)
|
|
320
|
-
for (var k in mod)
|
|
321
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
322
|
-
__createBinding(result, mod, k);
|
|
323
|
-
__setModuleDefault(result, mod);
|
|
324
|
-
return result;
|
|
325
|
-
}
|
|
326
|
-
function __importDefault(mod) {
|
|
327
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
328
|
-
}
|
|
329
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
330
|
-
if (!privateMap.has(receiver)) {
|
|
331
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
332
|
-
}
|
|
333
|
-
return privateMap.get(receiver);
|
|
334
|
-
}
|
|
335
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
336
|
-
if (!privateMap.has(receiver)) {
|
|
337
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
338
|
-
}
|
|
339
|
-
privateMap.set(receiver, value);
|
|
340
|
-
return value;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
var Content = /** @class */ (function (_super) {
|
|
344
|
-
__extends(Content, _super);
|
|
345
|
-
function Content() {
|
|
346
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
347
|
-
}
|
|
348
|
-
return Content;
|
|
349
|
-
}(Base));
|
|
350
|
-
Content.KEY_MIMETYPE = 'mimeType';
|
|
351
|
-
|
|
352
|
-
var slugify = require('slugify');
|
|
353
|
-
var Entry = /** @class */ (function (_super) {
|
|
354
|
-
__extends(Entry, _super);
|
|
355
|
-
function Entry(init) {
|
|
356
|
-
var _this = _super.call(this) || this;
|
|
357
|
-
_this.should_publish_in_future = false;
|
|
358
|
-
Object.assign(_this, init);
|
|
359
|
-
if (!_this.create_date) {
|
|
360
|
-
_this.create_date = new Date();
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
_this.create_date = new Date(_this.create_date);
|
|
364
|
-
}
|
|
365
|
-
if (!_this.edit_date) {
|
|
366
|
-
_this.edit_date = new Date();
|
|
367
|
-
}
|
|
368
|
-
else {
|
|
369
|
-
_this.edit_date = new Date(_this.edit_date);
|
|
370
|
-
}
|
|
371
|
-
if (_this.publish_date) {
|
|
372
|
-
_this.publish_date = new Date(_this.publish_date);
|
|
373
|
-
}
|
|
374
|
-
if (_this.future_publish_date) {
|
|
375
|
-
_this.future_publish_date = new Date(_this.future_publish_date);
|
|
376
|
-
}
|
|
377
|
-
if (!_this.version) {
|
|
378
|
-
_this.version = 1;
|
|
379
|
-
}
|
|
380
|
-
if (!_this.tags) {
|
|
381
|
-
_this.tags = [];
|
|
382
|
-
}
|
|
383
|
-
if (_this.views) {
|
|
384
|
-
if (_this.views < 10) {
|
|
385
|
-
_this._friendly_views = 'Less than ten';
|
|
386
|
-
}
|
|
387
|
-
else if (10 < _this.views && _this.views < 100) {
|
|
388
|
-
_this._friendly_views = 'Around one hundred';
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
_this._friendly_views = _this.views.toString();
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
if (!_this.sections) {
|
|
395
|
-
_this.sections = [];
|
|
396
|
-
}
|
|
397
|
-
// For entries that existed before this variable was introduced, the server will return undefined. If this
|
|
398
|
-
// stays undefined, it will violate the null constraints on the DB, so this code checks for both null
|
|
399
|
-
// and undefined and then populates the value accordingly
|
|
400
|
-
if (typeof (_this.should_publish_in_future) === 'undefined' || _this.should_publish_in_future === null) {
|
|
401
|
-
_this.should_publish_in_future = false;
|
|
402
|
-
}
|
|
403
|
-
return _this;
|
|
404
|
-
}
|
|
405
|
-
Entry.prototype.sort = function () {
|
|
406
|
-
var e_1, _a;
|
|
407
|
-
this.sections = lodash.orderBy(this.sections, function (_a) {
|
|
408
|
-
var order = _a.order;
|
|
409
|
-
return Number(order);
|
|
410
|
-
}, ['asc']);
|
|
411
|
-
for (var i = 0; i < this.sections.length; i++) {
|
|
412
|
-
this.sections[i].order = i * 10;
|
|
413
|
-
}
|
|
414
|
-
try {
|
|
415
|
-
for (var _b = __values(this.sections), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
416
|
-
var section = _c.value;
|
|
417
|
-
section.contents = lodash.orderBy(section.contents, function (_a) {
|
|
418
|
-
var order = _a.order;
|
|
419
|
-
return Number(order);
|
|
420
|
-
}, ['asc']);
|
|
421
|
-
for (var i = 0; i < section.contents.length; i++) {
|
|
422
|
-
section.contents[i].order = i * 10;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
427
|
-
finally {
|
|
428
|
-
try {
|
|
429
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
430
|
-
}
|
|
431
|
-
finally { if (e_1) throw e_1.error; }
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
Entry.prototype.showEditInformation = function () {
|
|
435
|
-
// @ts-ignore
|
|
436
|
-
var difference = Math.floor((this.create_date - this.edit_date) / (1000 * 60 * 60 * 24));
|
|
437
|
-
return (difference > 1 || difference < -1);
|
|
438
|
-
};
|
|
439
|
-
Entry.prototype.getProp = function (prop) {
|
|
440
|
-
if (this.__server_generated_properties) {
|
|
441
|
-
return this.__server_generated_properties[prop];
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
return '';
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
return Entry;
|
|
448
|
-
}(Base));
|
|
449
|
-
|
|
450
|
-
var ListResponse = /** @class */ (function () {
|
|
451
|
-
function ListResponse() {
|
|
452
|
-
}
|
|
453
|
-
return ListResponse;
|
|
454
|
-
}());
|
|
455
|
-
|
|
456
|
-
var Section = /** @class */ (function (_super) {
|
|
457
|
-
__extends(Section, _super);
|
|
458
|
-
function Section() {
|
|
459
|
-
var _this = _super.call(this) || this;
|
|
460
|
-
if (!_this.order) {
|
|
461
|
-
_this.order = -1;
|
|
462
|
-
}
|
|
463
|
-
_this.contents = [];
|
|
464
|
-
return _this;
|
|
465
|
-
}
|
|
466
|
-
return Section;
|
|
467
|
-
}(Base));
|
|
468
|
-
|
|
469
|
-
var CoreEvent = /** @class */ (function () {
|
|
470
|
-
function CoreEvent(data, type) {
|
|
471
|
-
this.data = data;
|
|
472
|
-
this.type = type;
|
|
473
|
-
}
|
|
474
|
-
return CoreEvent;
|
|
475
|
-
}());
|
|
476
|
-
|
|
477
|
-
(function (CoreEventType) {
|
|
478
|
-
CoreEventType["UPDATE"] = "update";
|
|
479
|
-
CoreEventType["CREATE"] = "create";
|
|
480
|
-
CoreEventType["DELETE"] = "delete";
|
|
481
|
-
})(exports.CoreEventType || (exports.CoreEventType = {}));
|
|
482
|
-
|
|
483
|
-
var VisitorProfile = /** @class */ (function () {
|
|
484
|
-
function VisitorProfile() {
|
|
485
|
-
}
|
|
486
|
-
return VisitorProfile;
|
|
487
|
-
}());
|
|
488
|
-
|
|
489
|
-
var CommentService = /** @class */ (function () {
|
|
490
|
-
function CommentService(http) {
|
|
491
|
-
this.http = http;
|
|
492
|
-
this.endpoint = '/blog_api/comments/';
|
|
493
|
-
this.adminEndpoint = '/blog_api/admin/comments/';
|
|
494
|
-
}
|
|
495
|
-
CommentService.prototype.getComments = function (entry) {
|
|
496
|
-
return this.http.get(this.endpoint, { params: { entry: entry } });
|
|
497
|
-
};
|
|
498
|
-
CommentService.prototype.postComment = function (comment) {
|
|
499
|
-
return this.http.post(this.endpoint, comment, { params: { entry: comment.entry } });
|
|
500
|
-
};
|
|
501
|
-
CommentService.prototype.patchComment = function (comment) {
|
|
502
|
-
return this.http.patch(this.adminEndpoint + '/' + comment.id + '/', comment);
|
|
503
|
-
};
|
|
504
|
-
return CommentService;
|
|
505
|
-
}());
|
|
506
|
-
CommentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CommentService_Factory() { return new CommentService(i0.ɵɵinject(i1.HttpClient)); }, token: CommentService, providedIn: "root" });
|
|
507
|
-
CommentService.decorators = [
|
|
508
|
-
{ type: i0.Injectable, args: [{
|
|
509
|
-
providedIn: 'root'
|
|
510
|
-
},] }
|
|
511
|
-
];
|
|
512
|
-
CommentService.ctorParameters = function () { return [
|
|
513
|
-
{ type: i1.HttpClient }
|
|
514
|
-
]; };
|
|
515
|
-
|
|
516
|
-
var DjangoRestFrameworkEndpointService = /** @class */ (function () {
|
|
517
|
-
function DjangoRestFrameworkEndpointService(http) {
|
|
518
|
-
this.http = http;
|
|
519
|
-
this.events = new i0.EventEmitter();
|
|
520
|
-
this.endpoint = '';
|
|
521
|
-
}
|
|
522
|
-
DjangoRestFrameworkEndpointService.prototype.triggerCoreEvent = function (obj, type) {
|
|
523
|
-
this.events.next(new CoreEvent(obj, type));
|
|
524
|
-
return obj;
|
|
525
|
-
};
|
|
526
|
-
DjangoRestFrameworkEndpointService.prototype.handleResponse = function (obj) {
|
|
527
|
-
return obj;
|
|
528
|
-
};
|
|
529
|
-
DjangoRestFrameworkEndpointService.prototype.handleListResponse = function (obj) {
|
|
530
|
-
return obj;
|
|
531
|
-
};
|
|
532
|
-
DjangoRestFrameworkEndpointService.prototype.get = function () {
|
|
533
|
-
return this.http.get(this.endpoint).pipe(operators.map(this.handleListResponse.bind(this)));
|
|
534
|
-
};
|
|
535
|
-
DjangoRestFrameworkEndpointService.prototype.getById = function (id) {
|
|
536
|
-
return this.http.get(this.endpoint + id + '/').pipe(operators.map(this.handleResponse.bind(this)));
|
|
537
|
-
};
|
|
538
|
-
DjangoRestFrameworkEndpointService.prototype.create = function (entity) {
|
|
539
|
-
var _this = this;
|
|
540
|
-
return this.http.post(this.endpoint + '/', entity).pipe(operators.map(function (val) { return _this.triggerCoreEvent(val, exports.CoreEventType.CREATE); }), operators.map(this.handleResponse.bind(this)));
|
|
541
|
-
};
|
|
542
|
-
DjangoRestFrameworkEndpointService.prototype.delete = function (entity) {
|
|
543
|
-
var _this = this;
|
|
544
|
-
return this.http.delete(this.endpoint + entity.id + '/').pipe(operators.map(function (val) { return _this.triggerCoreEvent(val, exports.CoreEventType.DELETE); }), operators.map(this.handleResponse.bind(this)));
|
|
545
|
-
};
|
|
546
|
-
DjangoRestFrameworkEndpointService.prototype.update = function (entity) {
|
|
547
|
-
var _this = this;
|
|
548
|
-
return this.http.patch(this.endpoint + entity.id + '/', entity).pipe(operators.map(function (val) { return _this.triggerCoreEvent(val, exports.CoreEventType.UPDATE); }), operators.map(this.handleResponse.bind(this)));
|
|
549
|
-
};
|
|
550
|
-
DjangoRestFrameworkEndpointService.prototype.getListByUrl = function (url) {
|
|
551
|
-
return this.http.get(url).pipe(operators.map(this.handleListResponse.bind(this)));
|
|
552
|
-
};
|
|
553
|
-
return DjangoRestFrameworkEndpointService;
|
|
554
|
-
}());
|
|
555
|
-
DjangoRestFrameworkEndpointService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DjangoRestFrameworkEndpointService_Factory() { return new DjangoRestFrameworkEndpointService(i0.ɵɵinject(i1.HttpClient)); }, token: DjangoRestFrameworkEndpointService, providedIn: "root" });
|
|
556
|
-
DjangoRestFrameworkEndpointService.decorators = [
|
|
557
|
-
{ type: i0.Injectable, args: [{
|
|
558
|
-
providedIn: 'root'
|
|
559
|
-
},] }
|
|
560
|
-
];
|
|
561
|
-
DjangoRestFrameworkEndpointService.ctorParameters = function () { return [
|
|
562
|
-
{ type: i1.HttpClient }
|
|
563
|
-
]; };
|
|
564
|
-
|
|
565
|
-
var EntryService = /** @class */ (function (_super) {
|
|
566
|
-
__extends(EntryService, _super);
|
|
567
|
-
function EntryService(http) {
|
|
568
|
-
var _this = _super.call(this, http) || this;
|
|
569
|
-
_this.http = http;
|
|
570
|
-
_this.endpoint = '/blog_api/entries/';
|
|
571
|
-
_this.adminEndpoint = '/blog_api/admin/entries/';
|
|
572
|
-
_this.currentlyEditedEntry = new rxjs.Subject();
|
|
573
|
-
_this.sub = _this.currentlyEditedEntry.pipe(operators.debounceTime(3000)).subscribe(function (e) {
|
|
574
|
-
e.edit_date = new Date();
|
|
575
|
-
var params = new i1.HttpParams().set('published', JSON.stringify(false)).set('defunct', JSON.stringify(false));
|
|
576
|
-
_this.http.patch(_this.adminEndpoint + e.id + '/', e, { params: params }).pipe(operators.map(_this.handleResponse.bind(_this))).subscribe(function (response) {
|
|
577
|
-
_this.triggerCoreEvent(response, exports.CoreEventType.UPDATE);
|
|
578
|
-
console.log('Synced ' + e.id + '...');
|
|
579
|
-
}, function (err) {
|
|
580
|
-
console.log('Error encountered syncing ' + e.id + ', trying to create...');
|
|
581
|
-
_this.http.post(_this.adminEndpoint, e).pipe(operators.map(_this.handleResponse)).subscribe(function (response) {
|
|
582
|
-
_this.triggerCoreEvent(response, exports.CoreEventType.CREATE);
|
|
583
|
-
console.log('Created ' + e.id + '...');
|
|
584
|
-
}, function (createErr) {
|
|
585
|
-
console.log('Error creating ' + e.id);
|
|
586
|
-
});
|
|
587
|
-
});
|
|
588
|
-
});
|
|
589
|
-
return _this;
|
|
590
|
-
}
|
|
591
|
-
EntryService.prototype.handleResponse = function (obj) {
|
|
592
|
-
return new Entry(obj);
|
|
593
|
-
};
|
|
594
|
-
EntryService.prototype.handleListResponse = function (obj) {
|
|
595
|
-
var e_1, _a;
|
|
596
|
-
var response = obj;
|
|
597
|
-
var results = [];
|
|
598
|
-
try {
|
|
599
|
-
for (var _b = __values(response.results), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
600
|
-
var result = _c.value;
|
|
601
|
-
results.push(new Entry(result));
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
605
|
-
finally {
|
|
606
|
-
try {
|
|
607
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
608
|
-
}
|
|
609
|
-
finally { if (e_1) throw e_1.error; }
|
|
610
|
-
}
|
|
611
|
-
response.results = results;
|
|
612
|
-
return response;
|
|
613
|
-
};
|
|
614
|
-
EntryService.prototype.get = function () {
|
|
615
|
-
return this.http.get(this.endpoint).pipe(operators.map(this.handleListResponse.bind(this)));
|
|
616
|
-
};
|
|
617
|
-
EntryService.prototype.getUnpublishedEntries = function () {
|
|
618
|
-
var params = new i1.HttpParams().set('published', JSON.stringify(false)).set('defunct', JSON.stringify(false));
|
|
619
|
-
return this.http.get(this.adminEndpoint, { params: params });
|
|
620
|
-
};
|
|
621
|
-
EntryService.prototype.getBySlug = function (slug) {
|
|
622
|
-
return this.http.get(this.endpoint + slug + '/by_slug/').pipe(operators.map(this.handleResponse.bind(this)));
|
|
623
|
-
};
|
|
624
|
-
EntryService.prototype.getUnpublishedById = function (id) {
|
|
625
|
-
var params = new i1.HttpParams().set('published', JSON.stringify(false)).set('defunct', JSON.stringify(false));
|
|
626
|
-
return this.http.get(this.adminEndpoint + id, { params: params }).pipe(operators.map(this.handleResponse.bind(this)));
|
|
627
|
-
};
|
|
628
|
-
EntryService.prototype.updateUnpublishedEntry = function (entry) {
|
|
629
|
-
var _this = this;
|
|
630
|
-
var params = new i1.HttpParams().set('published', JSON.stringify(false)).set('defunct', JSON.stringify(false));
|
|
631
|
-
return this.http.patch(this.adminEndpoint + entry.id + '/', entry, { params: params }).pipe(operators.map(function (val) { return _this.triggerCoreEvent(val, exports.CoreEventType.UPDATE); }), operators.map(this.handleResponse.bind(this)));
|
|
632
|
-
};
|
|
633
|
-
return EntryService;
|
|
634
|
-
}(DjangoRestFrameworkEndpointService));
|
|
635
|
-
EntryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntryService_Factory() { return new EntryService(i0.ɵɵinject(i1.HttpClient)); }, token: EntryService, providedIn: "root" });
|
|
636
|
-
EntryService.decorators = [
|
|
637
|
-
{ type: i0.Injectable, args: [{
|
|
638
|
-
providedIn: 'root'
|
|
639
|
-
},] }
|
|
640
|
-
];
|
|
641
|
-
EntryService.ctorParameters = function () { return [
|
|
642
|
-
{ type: i1.HttpClient }
|
|
643
|
-
]; };
|
|
644
|
-
|
|
645
|
-
var IdentityService = /** @class */ (function () {
|
|
646
|
-
function IdentityService(http) {
|
|
647
|
-
this.http = http;
|
|
648
|
-
}
|
|
649
|
-
IdentityService.prototype.getMe = function () {
|
|
650
|
-
throw new Error('You must provide an implementation for this');
|
|
651
|
-
};
|
|
652
|
-
return IdentityService;
|
|
653
|
-
}());
|
|
654
|
-
IdentityService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IdentityService_Factory() { return new IdentityService(i0.ɵɵinject(i1.HttpClient)); }, token: IdentityService, providedIn: "root" });
|
|
655
|
-
IdentityService.decorators = [
|
|
656
|
-
{ type: i0.Injectable, args: [{
|
|
657
|
-
providedIn: 'root'
|
|
658
|
-
},] }
|
|
659
|
-
];
|
|
660
|
-
IdentityService.ctorParameters = function () { return [
|
|
661
|
-
{ type: i1.HttpClient }
|
|
662
|
-
]; };
|
|
663
|
-
|
|
664
|
-
var PrismService = /** @class */ (function () {
|
|
665
|
-
function PrismService(platformId) {
|
|
666
|
-
this.platformId = platformId;
|
|
667
|
-
if (Prism) {
|
|
668
|
-
Prism.manual = true;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
PrismService.prototype.highlightAll = function () {
|
|
672
|
-
if (common.isPlatformBrowser(this.platformId)) {
|
|
673
|
-
Prism.highlightAll();
|
|
674
|
-
}
|
|
675
|
-
};
|
|
676
|
-
return PrismService;
|
|
677
|
-
}());
|
|
678
|
-
PrismService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PrismService_Factory() { return new PrismService(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: PrismService, providedIn: "root" });
|
|
679
|
-
PrismService.decorators = [
|
|
680
|
-
{ type: i0.Injectable, args: [{
|
|
681
|
-
providedIn: 'root'
|
|
682
|
-
},] }
|
|
683
|
-
];
|
|
684
|
-
PrismService.ctorParameters = function () { return [
|
|
685
|
-
{ type: Object, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }
|
|
686
|
-
]; };
|
|
687
|
-
|
|
688
|
-
var UploadService = /** @class */ (function () {
|
|
689
|
-
function UploadService(http) {
|
|
690
|
-
this.http = http;
|
|
691
|
-
}
|
|
692
|
-
UploadService.prototype.get = function (id) {
|
|
693
|
-
return this.http.get(UploadService.status_endpoint.replace('{pk}', id) + '/');
|
|
694
|
-
};
|
|
695
|
-
return UploadService;
|
|
696
|
-
}());
|
|
697
|
-
UploadService.upload_endpoint = '/file_api/uploads/create_image/';
|
|
698
|
-
UploadService.status_endpoint = '/file_api/uploads/{pk}/status';
|
|
699
|
-
UploadService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UploadService_Factory() { return new UploadService(i0.ɵɵinject(i1.HttpClient)); }, token: UploadService, providedIn: "root" });
|
|
700
|
-
UploadService.decorators = [
|
|
701
|
-
{ type: i0.Injectable, args: [{
|
|
702
|
-
providedIn: 'root'
|
|
703
|
-
},] }
|
|
704
|
-
];
|
|
705
|
-
UploadService.ctorParameters = function () { return [
|
|
706
|
-
{ type: i1.HttpClient }
|
|
707
|
-
]; };
|
|
708
|
-
|
|
709
|
-
var Upload = /** @class */ (function () {
|
|
710
|
-
function Upload() {
|
|
711
|
-
}
|
|
712
|
-
return Upload;
|
|
713
|
-
}());
|
|
714
|
-
|
|
715
|
-
var ViewService = /** @class */ (function (_super) {
|
|
716
|
-
__extends(ViewService, _super);
|
|
717
|
-
function ViewService(http) {
|
|
718
|
-
var _this = _super.call(this, http) || this;
|
|
719
|
-
_this.http = http;
|
|
720
|
-
_this.endpoint = '/blog_api/views/';
|
|
721
|
-
return _this;
|
|
722
|
-
}
|
|
723
|
-
return ViewService;
|
|
724
|
-
}(DjangoRestFrameworkEndpointService));
|
|
725
|
-
ViewService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ViewService_Factory() { return new ViewService(i0.ɵɵinject(i1.HttpClient)); }, token: ViewService, providedIn: "root" });
|
|
726
|
-
ViewService.decorators = [
|
|
727
|
-
{ type: i0.Injectable, args: [{
|
|
728
|
-
providedIn: 'root'
|
|
729
|
-
},] }
|
|
730
|
-
];
|
|
731
|
-
ViewService.ctorParameters = function () { return [
|
|
732
|
-
{ type: i1.HttpClient }
|
|
733
|
-
]; };
|
|
734
|
-
|
|
735
|
-
var InteractionService = /** @class */ (function (_super) {
|
|
736
|
-
__extends(InteractionService, _super);
|
|
737
|
-
function InteractionService(http) {
|
|
738
|
-
var _this = _super.call(this, http) || this;
|
|
739
|
-
_this.http = http;
|
|
740
|
-
_this.endpoint = '/blog_api/interactions/';
|
|
741
|
-
return _this;
|
|
742
|
-
}
|
|
743
|
-
return InteractionService;
|
|
744
|
-
}(DjangoRestFrameworkEndpointService));
|
|
745
|
-
InteractionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(i0.ɵɵinject(i1.HttpClient)); }, token: InteractionService, providedIn: "root" });
|
|
746
|
-
InteractionService.decorators = [
|
|
747
|
-
{ type: i0.Injectable, args: [{
|
|
748
|
-
providedIn: 'root'
|
|
749
|
-
},] }
|
|
750
|
-
];
|
|
751
|
-
InteractionService.ctorParameters = function () { return [
|
|
752
|
-
{ type: i1.HttpClient }
|
|
753
|
-
]; };
|
|
754
|
-
|
|
755
|
-
var View = /** @class */ (function () {
|
|
756
|
-
function View() {
|
|
757
|
-
}
|
|
758
|
-
return View;
|
|
759
|
-
}());
|
|
760
|
-
|
|
761
|
-
var Interaction = /** @class */ (function () {
|
|
762
|
-
function Interaction() {
|
|
763
|
-
}
|
|
764
|
-
return Interaction;
|
|
765
|
-
}());
|
|
766
|
-
|
|
767
|
-
var VisitorProfileService = /** @class */ (function (_super) {
|
|
768
|
-
__extends(VisitorProfileService, _super);
|
|
769
|
-
function VisitorProfileService(http, deviceDetectorService) {
|
|
770
|
-
var _this = _super.call(this, http) || this;
|
|
771
|
-
_this.http = http;
|
|
772
|
-
_this.deviceDetectorService = deviceDetectorService;
|
|
773
|
-
_this.endpoint = '/blog_api/visitor_profiles/';
|
|
774
|
-
return _this;
|
|
775
|
-
}
|
|
776
|
-
VisitorProfileService.prototype.getVisitorProfile = function () {
|
|
777
|
-
var deviceInfo = this.deviceDetectorService.getDeviceInfo();
|
|
778
|
-
var vp = new VisitorProfile();
|
|
779
|
-
vp.telemetry = deviceInfo;
|
|
780
|
-
vp.name = deviceInfo.os;
|
|
781
|
-
vp.family = deviceInfo.browser;
|
|
782
|
-
vp.version = deviceInfo.browser_version;
|
|
783
|
-
vp.device = deviceInfo.device;
|
|
784
|
-
vp.os_version = deviceInfo.os_version;
|
|
785
|
-
vp.language = navigator.language;
|
|
786
|
-
return vp;
|
|
787
|
-
};
|
|
788
|
-
return VisitorProfileService;
|
|
789
|
-
}(DjangoRestFrameworkEndpointService));
|
|
790
|
-
VisitorProfileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function VisitorProfileService_Factory() { return new VisitorProfileService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.DeviceDetectorService)); }, token: VisitorProfileService, providedIn: "root" });
|
|
791
|
-
VisitorProfileService.decorators = [
|
|
792
|
-
{ type: i0.Injectable, args: [{
|
|
793
|
-
providedIn: 'root'
|
|
794
|
-
},] }
|
|
795
|
-
];
|
|
796
|
-
VisitorProfileService.ctorParameters = function () { return [
|
|
797
|
-
{ type: i1.HttpClient },
|
|
798
|
-
{ type: i2.DeviceDetectorService }
|
|
799
|
-
]; };
|
|
800
|
-
|
|
801
|
-
var StaticHtmlService = /** @class */ (function () {
|
|
802
|
-
function StaticHtmlService(domSanitizer) {
|
|
803
|
-
this.domSanitizer = domSanitizer;
|
|
804
|
-
}
|
|
805
|
-
StaticHtmlService.prototype.mapStaticHtml = function (htmlString, isTrusted) {
|
|
806
|
-
return isTrusted ?
|
|
807
|
-
htmlString :
|
|
808
|
-
this.domSanitizer.sanitize(i0.SecurityContext.HTML, htmlString);
|
|
809
|
-
};
|
|
810
|
-
return StaticHtmlService;
|
|
811
|
-
}());
|
|
812
|
-
StaticHtmlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StaticHtmlService_Factory() { return new StaticHtmlService(i0.ɵɵinject(i1$1.DomSanitizer)); }, token: StaticHtmlService, providedIn: "root" });
|
|
813
|
-
StaticHtmlService.decorators = [
|
|
814
|
-
{ type: i0.Injectable, args: [{
|
|
815
|
-
providedIn: 'root'
|
|
816
|
-
},] }
|
|
817
|
-
];
|
|
818
|
-
StaticHtmlService.ctorParameters = function () { return [
|
|
819
|
-
{ type: i1$1.DomSanitizer }
|
|
820
|
-
]; };
|
|
821
|
-
|
|
822
|
-
var Tag = /** @class */ (function () {
|
|
823
|
-
function Tag(obj) {
|
|
824
|
-
this.id = obj.id;
|
|
825
|
-
this.label = obj.label;
|
|
826
|
-
}
|
|
827
|
-
return Tag;
|
|
828
|
-
}());
|
|
829
|
-
|
|
830
|
-
var TagService = /** @class */ (function (_super) {
|
|
831
|
-
__extends(TagService, _super);
|
|
832
|
-
function TagService(http) {
|
|
833
|
-
var _this = _super.call(this, http) || this;
|
|
834
|
-
_this.http = http;
|
|
835
|
-
_this.endpoint = '/blog_api/tags/';
|
|
836
|
-
return _this;
|
|
837
|
-
}
|
|
838
|
-
TagService.prototype.handleResponse = function (obj) {
|
|
839
|
-
return new Tag(obj);
|
|
840
|
-
};
|
|
841
|
-
TagService.prototype.handleListResponse = function (obj) {
|
|
842
|
-
var response = obj;
|
|
843
|
-
var results = [];
|
|
844
|
-
for (var i = 0; i < response.results.length; i++) {
|
|
845
|
-
results.push(new Tag(response.results[i]));
|
|
846
|
-
}
|
|
847
|
-
response.results = results;
|
|
848
|
-
return response;
|
|
849
|
-
};
|
|
850
|
-
return TagService;
|
|
851
|
-
}(DjangoRestFrameworkEndpointService));
|
|
852
|
-
TagService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TagService_Factory() { return new TagService(i0.ɵɵinject(i1.HttpClient)); }, token: TagService, providedIn: "root" });
|
|
853
|
-
TagService.decorators = [
|
|
854
|
-
{ type: i0.Injectable, args: [{
|
|
855
|
-
providedIn: 'root'
|
|
856
|
-
},] }
|
|
857
|
-
];
|
|
858
|
-
TagService.ctorParameters = function () { return [
|
|
859
|
-
{ type: i1.HttpClient }
|
|
860
|
-
]; };
|
|
861
|
-
|
|
862
|
-
var EntrySelectorDialogData = /** @class */ (function () {
|
|
863
|
-
function EntrySelectorDialogData() {
|
|
864
|
-
}
|
|
865
|
-
return EntrySelectorDialogData;
|
|
866
|
-
}());
|
|
867
|
-
|
|
868
|
-
var EntrySelectorDialogComponent = /** @class */ (function () {
|
|
869
|
-
function EntrySelectorDialogComponent(dialogRef, data, entryService) {
|
|
870
|
-
this.dialogRef = dialogRef;
|
|
871
|
-
this.data = data;
|
|
872
|
-
this.entryService = entryService;
|
|
873
|
-
}
|
|
874
|
-
EntrySelectorDialogComponent.prototype.ngOnInit = function () {
|
|
875
|
-
var _this = this;
|
|
876
|
-
this.entryService.getUnpublishedEntries().subscribe(function (next) {
|
|
877
|
-
_this.entries = next.results;
|
|
878
|
-
});
|
|
879
|
-
};
|
|
880
|
-
EntrySelectorDialogComponent.prototype.onNoClick = function () {
|
|
881
|
-
this.dialogRef.close();
|
|
882
|
-
};
|
|
883
|
-
EntrySelectorDialogComponent.prototype.onYesClick = function () {
|
|
884
|
-
var _this = this;
|
|
885
|
-
this.entryService.getUnpublishedById(this.selectedId).subscribe(function (entry) {
|
|
886
|
-
localStorage.setItem(EntrySelectorDialogComponent.CURRENT_ENTRY, JSON.stringify(entry));
|
|
887
|
-
entry.sort();
|
|
888
|
-
_this.entryService.currentlyEditedEntry.next(entry);
|
|
889
|
-
_this.dialogRef.close();
|
|
890
|
-
});
|
|
891
|
-
};
|
|
892
|
-
return EntrySelectorDialogComponent;
|
|
893
|
-
}());
|
|
894
|
-
EntrySelectorDialogComponent.CURRENT_ENTRY = 'current_entry';
|
|
895
|
-
EntrySelectorDialogComponent.decorators = [
|
|
896
|
-
{ type: i0.Component, args: [{
|
|
897
|
-
selector: 'app-entry-selector-dialog',
|
|
898
|
-
template: "<h1 mat-dialog-title>Select an Entry to Edit</h1>\n<!--<mat-radio-group aria-label=\"Select an option\">-->\n<!-- <mat-radio-button class=\"option\" value=\"unpublished\">Unpublished</mat-radio-button>-->\n<!-- <mat-radio-button class=\"option\" value=\"published\">Published</mat-radio-button>-->\n<!--</mat-radio-group>-->\n<mat-divider class=\"option-list-divider\"></mat-divider>\n<div mat-dialog-content>\n <mat-radio-group [(ngModel)]=\"selectedId\">\n <mat-radio-button *ngFor=\"let entry of entries\" class=\"option\" [value]=\"entry.id\">{{entry.title}}</mat-radio-button>\n </mat-radio-group>\n <div *ngIf=\"!entries?.length\">There are no unpublished entries</div>\n</div>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button (click)=\"onYesClick()\" [mat-dialog-close]=\"this.selectedId\" cdkFocusInitial>Edit Selected Entry</button>\n</div>\n",
|
|
899
|
-
styles: [".entry-checkbox-container{display:inline-block;margin:5px 0;width:100%}.option-list-divider{margin:10px 0}.option{margin-right:5px}"]
|
|
900
|
-
},] }
|
|
901
|
-
];
|
|
902
|
-
EntrySelectorDialogComponent.ctorParameters = function () { return [
|
|
903
|
-
{ type: dialog.MatDialogRef },
|
|
904
|
-
{ type: EntrySelectorDialogData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
|
|
905
|
-
{ type: EntryService }
|
|
906
|
-
]; };
|
|
907
|
-
|
|
908
|
-
var MediaUploadModalComponent = /** @class */ (function () {
|
|
909
|
-
function MediaUploadModalComponent(dialogRef, uploadService) {
|
|
910
|
-
this.dialogRef = dialogRef;
|
|
911
|
-
this.uploadService = uploadService;
|
|
912
|
-
this.allowedMimeTypes = [
|
|
913
|
-
'image/jpeg',
|
|
914
|
-
'image/gif',
|
|
915
|
-
'image/png',
|
|
916
|
-
'image/jpg',
|
|
917
|
-
'video/mp4',
|
|
918
|
-
'video/webm',
|
|
919
|
-
'video/ogg',
|
|
920
|
-
];
|
|
921
|
-
this.uploadUrlKey = 'path_to_file';
|
|
922
|
-
this.uploading = false;
|
|
923
|
-
}
|
|
924
|
-
MediaUploadModalComponent.getCookie = function (name) {
|
|
925
|
-
var ca = document.cookie.split(';');
|
|
926
|
-
var caLen = ca.length;
|
|
927
|
-
var cookieName = name + "=";
|
|
928
|
-
var c;
|
|
929
|
-
for (var i = 0; i < caLen; i += 1) {
|
|
930
|
-
c = ca[i].replace(/^\s+/g, '');
|
|
931
|
-
if (c.indexOf(cookieName) === 0) {
|
|
932
|
-
return c.substring(cookieName.length, c.length);
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
return '';
|
|
936
|
-
};
|
|
937
|
-
MediaUploadModalComponent.prototype.pollForCompletion = function () {
|
|
938
|
-
var _this = this;
|
|
939
|
-
this.uploadService.get(this.uploadId).subscribe(function (response) {
|
|
940
|
-
if (response.processed) {
|
|
941
|
-
_this.imgLink = response[_this.uploadUrlKey];
|
|
942
|
-
_this.mimeType = response.mime_type;
|
|
943
|
-
clearInterval(_this.poller);
|
|
944
|
-
_this.poller = null;
|
|
945
|
-
_this.uploading = false;
|
|
946
|
-
}
|
|
947
|
-
});
|
|
948
|
-
};
|
|
949
|
-
MediaUploadModalComponent.prototype.ngOnInit = function () {
|
|
950
|
-
var _this = this;
|
|
951
|
-
this.uploader = new ng2FileUpload.FileUploader({
|
|
952
|
-
url: UploadService.upload_endpoint,
|
|
953
|
-
itemAlias: 'file',
|
|
954
|
-
authToken: '',
|
|
955
|
-
headers: [
|
|
956
|
-
{ name: 'X-CSRFToken', value: MediaUploadModalComponent.getCookie('csrftoken') },
|
|
957
|
-
],
|
|
958
|
-
additionalParameter: { csrf_token: MediaUploadModalComponent.getCookie('csrftoken') },
|
|
959
|
-
removeAfterUpload: true,
|
|
960
|
-
allowedMimeType: this.allowedMimeTypes,
|
|
961
|
-
});
|
|
962
|
-
this.uploader.onCompleteItem = function (item, response) {
|
|
963
|
-
var responseObj = JSON.parse(response);
|
|
964
|
-
_this.uploadId = responseObj.id;
|
|
965
|
-
_this.poller = setInterval(_this.pollForCompletion.bind(_this), 2000);
|
|
966
|
-
};
|
|
967
|
-
this.uploader.onWhenAddingFileFailed = function (item, filter, options) {
|
|
968
|
-
_this.error = 'This file is not a supported mimetype.';
|
|
969
|
-
_this.uploading = false;
|
|
970
|
-
};
|
|
971
|
-
if (this.file) {
|
|
972
|
-
this.uploader.addToQueue([this.file]);
|
|
973
|
-
this.uploader.uploadAll();
|
|
974
|
-
this.uploading = true;
|
|
975
|
-
}
|
|
976
|
-
};
|
|
977
|
-
MediaUploadModalComponent.prototype.onFileSelected = function (e) {
|
|
978
|
-
this.uploader.uploadAll();
|
|
979
|
-
this.uploading = true;
|
|
980
|
-
};
|
|
981
|
-
MediaUploadModalComponent.prototype.buildHost = function (url) {
|
|
982
|
-
return location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + url;
|
|
983
|
-
};
|
|
984
|
-
MediaUploadModalComponent.prototype.close = function () {
|
|
985
|
-
this.dialogRef.close();
|
|
986
|
-
};
|
|
987
|
-
MediaUploadModalComponent.prototype.ngOnDestroy = function () {
|
|
988
|
-
if (this.socketSub) {
|
|
989
|
-
this.socketSub.complete();
|
|
990
|
-
this.socketSub = null;
|
|
991
|
-
}
|
|
992
|
-
};
|
|
993
|
-
MediaUploadModalComponent.prototype.blobToFile = function (theBlob, fileName) {
|
|
994
|
-
// A Blob() is almost a File() - it's just missing the two properties below which we will add
|
|
995
|
-
theBlob.lastModifiedDate = new Date();
|
|
996
|
-
theBlob.name = fileName;
|
|
997
|
-
return theBlob;
|
|
998
|
-
};
|
|
999
|
-
MediaUploadModalComponent.prototype.onPaste = function (e) {
|
|
1000
|
-
if (e instanceof ClipboardEvent) {
|
|
1001
|
-
var files = e.clipboardData.files;
|
|
1002
|
-
if (files) {
|
|
1003
|
-
if (files.length < 1) {
|
|
1004
|
-
// const items = e.clipboardData.items;
|
|
1005
|
-
// for(let i = 0; i < items.length; i++) {
|
|
1006
|
-
// const item = items[i];
|
|
1007
|
-
// item.getAsString((text) => {
|
|
1008
|
-
// try {
|
|
1009
|
-
// const url = new URL(text);
|
|
1010
|
-
// if(url) {
|
|
1011
|
-
// fetch(text)
|
|
1012
|
-
// .then(res => res.blob()) // Gets the response and returns it as a blob
|
|
1013
|
-
// .then(blob => {
|
|
1014
|
-
// const file = this.blobToFile(blob, 'web-created')
|
|
1015
|
-
// this.uploader.addToQueue([file])
|
|
1016
|
-
// this.uploader.uploadAll();
|
|
1017
|
-
// this.uploading = true;
|
|
1018
|
-
// });
|
|
1019
|
-
// }
|
|
1020
|
-
// } catch(e) {
|
|
1021
|
-
//
|
|
1022
|
-
// }
|
|
1023
|
-
// });
|
|
1024
|
-
// }
|
|
1025
|
-
}
|
|
1026
|
-
else if (files.length > 1) {
|
|
1027
|
-
console.log('Multiple files detected');
|
|
1028
|
-
}
|
|
1029
|
-
else {
|
|
1030
|
-
for (var i = 0; i < files.length; i++) {
|
|
1031
|
-
this.uploader.addToQueue([files[i]]);
|
|
1032
|
-
}
|
|
1033
|
-
this.uploader.uploadAll();
|
|
1034
|
-
this.uploading = true;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
else {
|
|
1038
|
-
console.log('Stuff not working');
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
};
|
|
1042
|
-
return MediaUploadModalComponent;
|
|
1043
|
-
}());
|
|
1044
|
-
MediaUploadModalComponent.decorators = [
|
|
1045
|
-
{ type: i0.Component, args: [{
|
|
1046
|
-
selector: 'app-media-upload-modal',
|
|
1047
|
-
template: "<h1 mat-dialog-title>Upload an Image</h1>\n<!--<mat-radio-group aria-label=\"Select an option\">-->\n<!-- <mat-radio-button class=\"option\" value=\"unpublished\">Unpublished</mat-radio-button>-->\n<!-- <mat-radio-button class=\"option\" value=\"published\">Published</mat-radio-button>-->\n<!--</mat-radio-group>-->\n<mat-divider class=\"option-list-divider\"></mat-divider>\n<div mat-dialog-content>\n <div *ngIf=\"uploading\">\n <fa-icon [icon]=\"'spinner'\" [spin]=\"true\"></fa-icon>\n </div>\n <ng-container *ngIf=\"!imgLink && !uploading\">\n <h4>Select a File</h4>\n <div class=\"input-group\">\n <div class=\"form-group\">\n <!-- <label for=\"import_file\">Choose File</label>-->\n <input type=\"file\" id=\"import_file\"\n *ngIf=\"uploader.queue.length==0 && !uploading\"\n ng2FileSelect\n [uploader]=\"uploader\"\n (onFileSelected)=\"onFileSelected($event)\"\n >\n </div>\n </div>\n <br>\n <h3>Paste a File</h3>\n <p>You can use the paste command to paste any image here</p>\n </ng-container>\n <div *ngIf=\"imgLink\">\n <img *ngIf=\"imgLink\" [src]=\"imgLink\"/>\n </div>\n <div *ngIf=\"error\">\n <div class=\"alert alert-danger\">\n {{error}}\n </div>\n </div>\n</div>\n<div mat-dialog-actions>\n <button mat-button [disabled]=\"!imgLink || uploading\" (click)=\"close()\">Attach</button>\n</div>\n",
|
|
1048
|
-
styles: [""]
|
|
1049
|
-
},] }
|
|
1050
|
-
];
|
|
1051
|
-
MediaUploadModalComponent.ctorParameters = function () { return [
|
|
1052
|
-
{ type: dialog.MatDialogRef },
|
|
1053
|
-
{ type: UploadService }
|
|
1054
|
-
]; };
|
|
1055
|
-
MediaUploadModalComponent.propDecorators = {
|
|
1056
|
-
allowedMimeTypes: [{ type: i0.Input }],
|
|
1057
|
-
uploadUrlKey: [{ type: i0.Input }],
|
|
1058
|
-
file: [{ type: i0.Input }],
|
|
1059
|
-
onPaste: [{ type: i0.HostListener, args: ['document:paste', ['$event'],] }]
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
var slugify$1 = require('slugify');
|
|
1063
|
-
var EntryCreatorComponent = /** @class */ (function () {
|
|
1064
|
-
function EntryCreatorComponent(entryService, tagService, identityService, cdr, dialog) {
|
|
1065
|
-
this.entryService = entryService;
|
|
1066
|
-
this.tagService = tagService;
|
|
1067
|
-
this.identityService = identityService;
|
|
1068
|
-
this.cdr = cdr;
|
|
1069
|
-
this.dialog = dialog;
|
|
1070
|
-
this.ContentType = exports.ContentType;
|
|
1071
|
-
this.Object = Object;
|
|
1072
|
-
this.entry = new Entry();
|
|
1073
|
-
this.separatorKeysCodes = [keycodes.ENTER, keycodes.COMMA, keycodes.TAB];
|
|
1074
|
-
this.removable = true;
|
|
1075
|
-
this.all_tags = ['Angular', 'Bash', 'MacOS', 'Typescript', 'NPM', 'Databases'];
|
|
1076
|
-
this.tagCtrl = new forms.FormControl();
|
|
1077
|
-
this.publishDateControl = new forms.FormControl();
|
|
1078
|
-
this.selectable = false;
|
|
1079
|
-
this.scheduling = false;
|
|
1080
|
-
this.customScheduleTime = '';
|
|
1081
|
-
this.today = new Date();
|
|
1082
|
-
this.allowedMimeTypes = [
|
|
1083
|
-
'image/jpeg',
|
|
1084
|
-
'image/gif',
|
|
1085
|
-
'image/png',
|
|
1086
|
-
'image/jpg',
|
|
1087
|
-
'video/mp4',
|
|
1088
|
-
'video/webm',
|
|
1089
|
-
'video/ogg',
|
|
1090
|
-
];
|
|
1091
|
-
this.uploadUrlKey = 'path_to_file';
|
|
1092
|
-
this.uploader = new ng2FileUpload.FileUploader({
|
|
1093
|
-
url: '/file_api/uploads/create_image/',
|
|
1094
|
-
itemAlias: 'file',
|
|
1095
|
-
authToken: '',
|
|
1096
|
-
headers: [
|
|
1097
|
-
{
|
|
1098
|
-
name: 'X-CSRFToken',
|
|
1099
|
-
value: EntryCreatorComponent.getCookie('csrftoken')
|
|
1100
|
-
},
|
|
1101
|
-
],
|
|
1102
|
-
additionalParameter: {
|
|
1103
|
-
'csrf_token': EntryCreatorComponent.getCookie('csrftoken')
|
|
1104
|
-
},
|
|
1105
|
-
removeAfterUpload: true,
|
|
1106
|
-
allowedMimeType: this.allowedMimeTypes,
|
|
1107
|
-
});
|
|
1108
|
-
var scheduledDate = new Date();
|
|
1109
|
-
this.customScheduleTime = scheduledDate.getHours() + ':' + scheduledDate.getMinutes() + ' AM';
|
|
1110
|
-
}
|
|
1111
|
-
EntryCreatorComponent.getCookie = function (name) {
|
|
1112
|
-
var ca = document.cookie.split(';');
|
|
1113
|
-
var caLen = ca.length;
|
|
1114
|
-
var cookieName = name + "=";
|
|
1115
|
-
var c;
|
|
1116
|
-
for (var i = 0; i < caLen; i += 1) {
|
|
1117
|
-
c = ca[i].replace(/^\s+/g, '');
|
|
1118
|
-
if (c.indexOf(cookieName) === 0) {
|
|
1119
|
-
return c.substring(cookieName.length, c.length);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
return '';
|
|
1123
|
-
};
|
|
1124
|
-
EntryCreatorComponent.prototype._filter = function (value) {
|
|
1125
|
-
var filterValue = value.toLowerCase();
|
|
1126
|
-
return this.all_tags.filter(function (tag) { return tag.toLowerCase().indexOf(filterValue) === 0; });
|
|
1127
|
-
};
|
|
1128
|
-
EntryCreatorComponent.prototype.add = function (event) {
|
|
1129
|
-
var input = event.input;
|
|
1130
|
-
var value = event.value;
|
|
1131
|
-
// Add our tag
|
|
1132
|
-
if ((value || '').trim()) {
|
|
1133
|
-
this.tags.push(value.trim());
|
|
1134
|
-
}
|
|
1135
|
-
// Reset the input value
|
|
1136
|
-
if (input) {
|
|
1137
|
-
input.value = '';
|
|
1138
|
-
}
|
|
1139
|
-
this.tagCtrl.setValue(null);
|
|
1140
|
-
this.onChange();
|
|
1141
|
-
};
|
|
1142
|
-
EntryCreatorComponent.prototype.remove = function (fruit) {
|
|
1143
|
-
var index = this.tags.indexOf(fruit);
|
|
1144
|
-
if (index >= 0) {
|
|
1145
|
-
this.tags.splice(index, 1);
|
|
1146
|
-
}
|
|
1147
|
-
this.onChange();
|
|
1148
|
-
};
|
|
1149
|
-
EntryCreatorComponent.prototype.selected = function (event) {
|
|
1150
|
-
this.tags.push(event.option.viewValue);
|
|
1151
|
-
this.tagInput.nativeElement.value = '';
|
|
1152
|
-
this.tagCtrl.setValue(null);
|
|
1153
|
-
this.onChange();
|
|
1154
|
-
};
|
|
1155
|
-
EntryCreatorComponent.prototype.refreshTags = function () {
|
|
1156
|
-
var _this = this;
|
|
1157
|
-
this.tagService.get().subscribe(function (response) {
|
|
1158
|
-
_this.all_tags = lodash.map(response.results, function (t) { return t.label; });
|
|
1159
|
-
_this.filtered_tags = _this.tagCtrl.valueChanges.pipe(operators.startWith(null), operators.map(function (tag) { return tag ? _this._filter(tag) : _this.all_tags.slice(); }));
|
|
1160
|
-
});
|
|
1161
|
-
};
|
|
1162
|
-
EntryCreatorComponent.prototype.createNewEntry = function () {
|
|
1163
|
-
var _this = this;
|
|
1164
|
-
this.entry = new Entry();
|
|
1165
|
-
this.entry.title = EntryCreatorComponent.DEFAULT_NEW_ENTRY_TITLE;
|
|
1166
|
-
this.entry.published = false;
|
|
1167
|
-
this.entry.version = 1;
|
|
1168
|
-
this.entryService.create(this.entry).subscribe(function (response) {
|
|
1169
|
-
_this.entry = response;
|
|
1170
|
-
_this.entry.sort();
|
|
1171
|
-
setTimeout(function () {
|
|
1172
|
-
_this.entryService.currentlyEditedEntry.next(_this.entry);
|
|
1173
|
-
}, 10);
|
|
1174
|
-
});
|
|
1175
|
-
};
|
|
1176
|
-
EntryCreatorComponent.prototype.ngOnInit = function () {
|
|
1177
|
-
var _this = this;
|
|
1178
|
-
this.refreshTags();
|
|
1179
|
-
this.identityService.getMe().subscribe(function (me) {
|
|
1180
|
-
_this.me = me;
|
|
1181
|
-
});
|
|
1182
|
-
var savedEntry = localStorage.getItem(EntryCreatorComponent.CURRENT_ENTRY);
|
|
1183
|
-
if (savedEntry) {
|
|
1184
|
-
this.entry = new Entry(JSON.parse(savedEntry));
|
|
1185
|
-
if (this.entry.should_publish_in_future && this.entry.future_publish_date < new Date()) {
|
|
1186
|
-
this.createNewEntry();
|
|
1187
|
-
}
|
|
1188
|
-
this.entry.sort();
|
|
1189
|
-
if (this.entry.should_publish_in_future) {
|
|
1190
|
-
// Restore scheduling settings
|
|
1191
|
-
this.scheduling = true;
|
|
1192
|
-
var hours = this.entry.future_publish_date.getHours();
|
|
1193
|
-
var minutes = this.entry.future_publish_date.getMinutes();
|
|
1194
|
-
var ampm = hours >= 12 ? 'PM' : 'AM';
|
|
1195
|
-
if (hours >= 12) {
|
|
1196
|
-
hours = hours % 12;
|
|
1197
|
-
hours = hours ? hours : 12;
|
|
1198
|
-
}
|
|
1199
|
-
minutes = minutes < 10 ? '0' + minutes : minutes;
|
|
1200
|
-
this.customScheduleTime = hours + ':' + minutes + ' ' + ampm;
|
|
1201
|
-
}
|
|
1202
|
-
setTimeout(function () {
|
|
1203
|
-
_this.entryService.currentlyEditedEntry.next(_this.entry);
|
|
1204
|
-
}, 10);
|
|
1205
|
-
}
|
|
1206
|
-
else {
|
|
1207
|
-
this.createNewEntry();
|
|
1208
|
-
}
|
|
1209
|
-
this.uploader.onCompleteItem = function (item, response) {
|
|
1210
|
-
// const responseObj = JSON.parse(response)
|
|
1211
|
-
// this.uploadId = responseObj.id;
|
|
1212
|
-
};
|
|
1213
|
-
this.uploader.onWhenAddingFileFailed = function (item, uploadFilter, options) {
|
|
1214
|
-
// this.error = 'This file is not a supported mimetype.'
|
|
1215
|
-
// this.uploading = false;
|
|
1216
|
-
};
|
|
1217
|
-
this.tags = this.entry.tags;
|
|
1218
|
-
};
|
|
1219
|
-
EntryCreatorComponent.prototype.onFileSelected = function (e) {
|
|
1220
|
-
this.uploader.uploadAll();
|
|
1221
|
-
};
|
|
1222
|
-
EntryCreatorComponent.prototype.startUploader = function (content) {
|
|
1223
|
-
var _this = this;
|
|
1224
|
-
var dialogRef = this.dialog.open(MediaUploadModalComponent, {});
|
|
1225
|
-
dialogRef.componentInstance.allowedMimeTypes = this.allowedMimeTypes;
|
|
1226
|
-
dialogRef.componentInstance.uploadUrlKey = this.uploadUrlKey;
|
|
1227
|
-
dialogRef.afterClosed().subscribe(function () {
|
|
1228
|
-
content.value = dialogRef.componentInstance.imgLink;
|
|
1229
|
-
content.additional = [];
|
|
1230
|
-
content.additional.push({ key: Content.KEY_MIMETYPE, value: dialogRef.componentInstance.mimeType });
|
|
1231
|
-
_this.onChange();
|
|
1232
|
-
});
|
|
1233
|
-
};
|
|
1234
|
-
EntryCreatorComponent.prototype.addSection = function () {
|
|
1235
|
-
this.entry.sections.push(new Section());
|
|
1236
|
-
this.onChange();
|
|
1237
|
-
};
|
|
1238
|
-
EntryCreatorComponent.prototype.removeSection = function (section) {
|
|
1239
|
-
var remove = confirm('Are you sure you want to remove this section?');
|
|
1240
|
-
if (remove) {
|
|
1241
|
-
this.entry.sections =
|
|
1242
|
-
lodash.filter(this.entry.sections, function (sct) { return sct.id !== section.id; });
|
|
1243
|
-
this.onChange();
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
EntryCreatorComponent.prototype.addContent = function (section) {
|
|
1247
|
-
section.contents.push(new Content());
|
|
1248
|
-
this.onChange();
|
|
1249
|
-
};
|
|
1250
|
-
EntryCreatorComponent.prototype.removeContent = function (content) {
|
|
1251
|
-
var e_1, _a;
|
|
1252
|
-
var remove = confirm('Are you sure you want to remove this content?');
|
|
1253
|
-
if (remove) {
|
|
1254
|
-
try {
|
|
1255
|
-
for (var _b = __values(this.entry.sections), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1256
|
-
var section = _c.value;
|
|
1257
|
-
section.contents = lodash.filter(section.contents, function (ct) { return ct.id !== content.id; });
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1261
|
-
finally {
|
|
1262
|
-
try {
|
|
1263
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1264
|
-
}
|
|
1265
|
-
finally { if (e_1) throw e_1.error; }
|
|
1266
|
-
}
|
|
1267
|
-
this.onChange();
|
|
1268
|
-
}
|
|
1269
|
-
};
|
|
1270
|
-
EntryCreatorComponent.prototype.onChange = function () {
|
|
1271
|
-
this.entry.slug = slugify$1(this.entry.title).toLowerCase();
|
|
1272
|
-
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY, JSON.stringify(this.entry));
|
|
1273
|
-
this.entry.sort();
|
|
1274
|
-
this.cdr.detectChanges();
|
|
1275
|
-
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1276
|
-
this.entryService._currentlyEditedEntry = this.entry;
|
|
1277
|
-
};
|
|
1278
|
-
EntryCreatorComponent.prototype.resetDate = function () {
|
|
1279
|
-
this.entry.create_date = new Date();
|
|
1280
|
-
this.entry.edit_date = new Date();
|
|
1281
|
-
this.onChange();
|
|
1282
|
-
};
|
|
1283
|
-
EntryCreatorComponent.prototype.startNew = function () {
|
|
1284
|
-
var finish = confirm('Are you sure your finished? The JSON and entry displayed will be removed. Make sure you have already copied it.');
|
|
1285
|
-
if (finish) {
|
|
1286
|
-
this.entry = new Entry();
|
|
1287
|
-
this.entry.title = EntryCreatorComponent.DEFAULT_NEW_ENTRY_TITLE;
|
|
1288
|
-
this.entry.published = false;
|
|
1289
|
-
this.entry.version = 1;
|
|
1290
|
-
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1291
|
-
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY, JSON.stringify(this.entry));
|
|
1292
|
-
this.entryService.create(this.entry).subscribe(function (next) {
|
|
1293
|
-
});
|
|
1294
|
-
}
|
|
1295
|
-
};
|
|
1296
|
-
EntryCreatorComponent.prototype.seeEntries = function () {
|
|
1297
|
-
var _this = this;
|
|
1298
|
-
var dialogRef = this.dialog.open(EntrySelectorDialogComponent, {
|
|
1299
|
-
width: '500px',
|
|
1300
|
-
data: { name: 'test', animal: 'test' }
|
|
1301
|
-
});
|
|
1302
|
-
dialogRef.afterClosed().subscribe(function (id) {
|
|
1303
|
-
if (id) {
|
|
1304
|
-
_this.entryService.getUnpublishedById(id).subscribe(function (result) {
|
|
1305
|
-
var entry = result;
|
|
1306
|
-
_this.entryService.currentlyEditedEntry.next(entry);
|
|
1307
|
-
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY, JSON.stringify(entry));
|
|
1308
|
-
_this.entry = entry;
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
});
|
|
1312
|
-
};
|
|
1313
|
-
EntryCreatorComponent.prototype.postPublishCallback = function () {
|
|
1314
|
-
var _this = this;
|
|
1315
|
-
this.entry = new Entry();
|
|
1316
|
-
this.entry.title = EntryCreatorComponent.DEFAULT_NEW_ENTRY_TITLE;
|
|
1317
|
-
this.entry.published = false;
|
|
1318
|
-
this.entry.version = 1;
|
|
1319
|
-
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1320
|
-
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY, JSON.stringify(this.entry));
|
|
1321
|
-
this.entryService.create(this.entry).subscribe(function (next) {
|
|
1322
|
-
_this.tags = [];
|
|
1323
|
-
_this.refreshTags();
|
|
1324
|
-
});
|
|
1325
|
-
};
|
|
1326
|
-
EntryCreatorComponent.prototype.cancelScheduling = function () {
|
|
1327
|
-
this.entry.future_publish_date = null;
|
|
1328
|
-
this.entry.should_publish_in_future = false;
|
|
1329
|
-
this.scheduling = false;
|
|
1330
|
-
this.onChange();
|
|
1331
|
-
};
|
|
1332
|
-
EntryCreatorComponent.prototype.exposeScheduling = function () {
|
|
1333
|
-
var scheduledDate = new Date();
|
|
1334
|
-
scheduledDate.setDate(scheduledDate.getDate() + 1);
|
|
1335
|
-
this.entry.future_publish_date = scheduledDate;
|
|
1336
|
-
this.setTime(this.customScheduleTime);
|
|
1337
|
-
this.entry.should_publish_in_future = true;
|
|
1338
|
-
this.scheduling = true;
|
|
1339
|
-
this.onChange();
|
|
1340
|
-
};
|
|
1341
|
-
EntryCreatorComponent.prototype.publish = function () {
|
|
1342
|
-
var publish = confirm('Are you sure you want to publish? Once an article is published it is available to everyone.');
|
|
1343
|
-
if (publish) {
|
|
1344
|
-
this.entry.published = true;
|
|
1345
|
-
this.entry.publish_date = new Date();
|
|
1346
|
-
this.entry.edit_date = new Date();
|
|
1347
|
-
this.entryService.updateUnpublishedEntry(this.entry).subscribe(this.postPublishCallback.bind(this));
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
EntryCreatorComponent.prototype.delete = function () {
|
|
1351
|
-
var _this = this;
|
|
1352
|
-
var confirmDelete = confirm('Are you sure you want to delete this draft? Once it is deleted it cannot be recovered.');
|
|
1353
|
-
if (confirmDelete) {
|
|
1354
|
-
this.entryService.delete(this.entry).subscribe(function () {
|
|
1355
|
-
_this.entry = null;
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
};
|
|
1359
|
-
EntryCreatorComponent.prototype.onDateChange = function () {
|
|
1360
|
-
this.entry.future_publish_date.setHours(this.hours);
|
|
1361
|
-
this.entry.future_publish_date.setMinutes(this.minutes);
|
|
1362
|
-
this.onChange();
|
|
1363
|
-
};
|
|
1364
|
-
EntryCreatorComponent.prototype.setTime = function (e) {
|
|
1365
|
-
var firstTimeSplit = e.split(' ');
|
|
1366
|
-
var secondTimeSplit = firstTimeSplit[0].split(':');
|
|
1367
|
-
this.hours = Number(secondTimeSplit[0]);
|
|
1368
|
-
this.minutes = Number(secondTimeSplit[1]);
|
|
1369
|
-
if (firstTimeSplit[1] === 'PM') {
|
|
1370
|
-
this.hours = Number(this.hours) + 12;
|
|
1371
|
-
}
|
|
1372
|
-
this.entry.future_publish_date.setHours(this.hours);
|
|
1373
|
-
this.entry.future_publish_date.setMinutes(this.minutes);
|
|
1374
|
-
this.onChange();
|
|
1375
|
-
};
|
|
1376
|
-
return EntryCreatorComponent;
|
|
1377
|
-
}());
|
|
1378
|
-
EntryCreatorComponent.CURRENT_ENTRY = 'current_entry';
|
|
1379
|
-
EntryCreatorComponent.DEFAULT_NEW_ENTRY_TITLE = 'A New Entry';
|
|
1380
|
-
EntryCreatorComponent.decorators = [
|
|
1381
|
-
{ type: i0.Component, args: [{
|
|
1382
|
-
selector: 'app-entry-creator',
|
|
1383
|
-
template: "<div class=\"section creator fields\">\n <form #createForm=\"ngForm\" (change)=\"onChange()\" *ngIf=\"this.entry\">\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input matInput\n [(ngModel)]=\"entry.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n <mat-card class=\"form-section tags\">\n <div>\n <mat-form-field class=\"full-width\" hintLabel=\"Use a comma to seperate different tags\">\n <mat-chip-list #tagList aria-label=\"Tags\">\n <mat-chip\n *ngFor=\"let tag of tags\"\n [selectable]=\"selectable\"\n [removable]=\"removable\"\n (removed)=\"remove(tag)\">\n {{tag}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip>\n <input\n matInput\n placeholder=\"Tags...\"\n #tagInput\n [formControl]=\"tagCtrl\"\n [matAutocomplete]=\"tagauto\"\n [matChipInputFor]=\"tagList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n (matChipInputTokenEnd)=\"add($event)\">\n </mat-chip-list>\n <mat-autocomplete #tagauto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filtered_tags | async\" [value]=\"tag\">\n {{tag}}\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n </div>\n </mat-card>\n <mat-card class=\"form-section\" *ngFor=\"let section of entry.sections\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>Subheading</mat-label>\n <input matInput\n [(ngModel)]=\"section.subheading\"\n name=\"{{section.id}}-subheading\">\n </mat-form-field>\n <div class=\"form-content\" *ngFor=\"let content of section.contents\">\n <div class=\"form-group\">\n <mat-radio-group\n aria-label=\"Select the Content Type\"\n name=\"{{content.id}}-content-type\"\n class=\"radio-group\"\n [(ngModel)]=\"content.type\">\n <mat-radio-button\n *ngFor=\"let value of Object.values(ContentType)\"\n class=\"radio-button\"\n [value]=\"value\">{{value}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Title</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-title\"\n [(ngModel)]=\"content.title\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.TEXT\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"3\"\n cdkAutosizeMaxRows=\"20\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <textarea matInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"10\"\n cdkAutosizeMaxRows=\"100\"\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\"\n ></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-source\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"full-width\">\n <ng-container *ngIf=\"content.value\">\n <mat-form-field class=\"full-width\">\n <mat-label>Value</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-value\"\n [(ngModel)]=\"content.value\">\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Description</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-description\"\n [(ngModel)]=\"content.description\">\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"content.additional\">\n <ng-container *ngFor=\"let add of content.additional\">\n <mat-form-field class=\"full-width\">\n <mat-label>{{add.key}}</mat-label>\n <input\n matInput\n name=\"{{content.id}}-content-{{add.key}}\"\n [(ngModel)]=\"add.value\"\n [disabled]=\"true\"\n >\n </mat-form-field>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!content.value\">\n <button mat-raised-button (click)=startUploader(content)>Upload</button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <button mat-raised-button (click)=removeContent(content)>Remove Content</button>\n <button mat-raised-button (click)=\"addContent(section)\">+ Add Content</button>\n </div>\n <button mat-raised-button (click)=\"removeSection(section)\">Remove Section</button>\n <button mat-raised-button (click)=\"addContent(section)\" *ngIf=\"section.contents.length === 0\">+ Add\n Content\n </button>\n <button mat-raised-button (click)=\"addSection()\">+ Add Section</button>\n </div>\n\n </mat-card>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"entry.sections?.length === 0\">+ Add Section</button>\n <button mat-raised-button (click)=\"addSection()\" *ngIf=\"!entry.sections\">+ Add Section</button>\n\n <div class=\"controls\">\n <button mat-raised-button (click)=\"resetDate()\">Reset the Date</button>\n <button mat-raised-button (click)=\"delete()\">Delete</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"publish()\">Publish</button>\n <button mat-raised-button [disabled]=\"scheduling\" (click)=\"exposeScheduling()\">Schedule</button>\n <button mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n <p *ngIf=\"scheduling\">Publishing is disabled while scheduling is being used.</p>\n\n <mat-card [hidden]=\"!scheduling\">\n <h4>\n Scheduling Options\n </h4>\n\n <div class=\"form-group\">\n <mat-form-field class=\"full-width\">\n <mat-label>Date</mat-label>\n <input\n #futurePublishDate\n matInput\n [matDatepicker]=\"picker\"\n [min]=\"today\"\n (dateInput)=\"onDateChange()\"\n (dateChange)=\"onDateChange()\"\n [(ngModel)]=\"entry.future_publish_date\"\n name=\"future-publish-date\"\n >\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n #picker></mat-datepicker>\n </mat-form-field>\n\n <mat-label>Time</mat-label>\n <ngx-timepicker-field\n [defaultTime]=\"customScheduleTime\"\n [format]=\"12\"\n [buttonAlign]=\"'left'\"\n (timeChanged)=\"setTime($event)\"\n ></ngx-timepicker-field>\n <p>Times are represented in your local time zone</p>\n </div>\n\n <div mat-dialog-actions>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"cancelScheduling()\">Cancel Scheduling</button>\n </div>\n </div>\n <p>This post will be published as soon as its scheduled date and time arrive. No further action is needed by you. If you do not\n want to use scheduling, you can cancel scheduling and manually publish.</p>\n </mat-card>\n </form>\n <div class=\"controls\">\n <button mat-raised-button (click)=\"seeEntries()\">See Entries</button>\n <button *ngIf=\"!this.entry\" mat-raised-button (click)=\"startNew()\">New</button>\n </div>\n</div>\n",
|
|
1384
|
-
styles: [".creator{min-height:calc(100vh - 100px)}form{padding:20px}.content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button{margin:4px}.radio-group{display:flex;flex-direction:column;margin:15px 0}.radio-button{margin:4px}.full-width{width:100%}.content-card{margin:0 0 10px}.form-section{margin-bottom:10px}.form-content:not(:last-child){border-bottom:1px dotted #aaa;padding-bottom:10px}.controls{display:inline-block;padding:10px;width:100%}[hidden]{display:none!important}"]
|
|
1385
|
-
},] }
|
|
1386
|
-
];
|
|
1387
|
-
EntryCreatorComponent.ctorParameters = function () { return [
|
|
1388
|
-
{ type: EntryService },
|
|
1389
|
-
{ type: TagService },
|
|
1390
|
-
{ type: IdentityService },
|
|
1391
|
-
{ type: i0.ChangeDetectorRef },
|
|
1392
|
-
{ type: dialog.MatDialog }
|
|
1393
|
-
]; };
|
|
1394
|
-
EntryCreatorComponent.propDecorators = {
|
|
1395
|
-
tagInput: [{ type: i0.ViewChild, args: ['tagInput',] }],
|
|
1396
|
-
matAutocomplete: [{ type: i0.ViewChild, args: ['tagauto',] }],
|
|
1397
|
-
allowedMimeTypes: [{ type: i0.Input }],
|
|
1398
|
-
uploadUrlKey: [{ type: i0.Input }]
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
var EntryRendererComponent = /** @class */ (function () {
|
|
1402
|
-
function EntryRendererComponent(prismService, ngZone, identityService, commentService, router, entryService) {
|
|
1403
|
-
this.prismService = prismService;
|
|
1404
|
-
this.ngZone = ngZone;
|
|
1405
|
-
this.identityService = identityService;
|
|
1406
|
-
this.commentService = commentService;
|
|
1407
|
-
this.router = router;
|
|
1408
|
-
this.entryService = entryService;
|
|
1409
|
-
this.ContentType = exports.ContentType;
|
|
1410
|
-
this.comments = [];
|
|
1411
|
-
this.commentText = '';
|
|
1412
|
-
this.alert = alert;
|
|
1413
|
-
this.editMode = false;
|
|
1414
|
-
}
|
|
1415
|
-
EntryRendererComponent.prototype.ngOnInit = function () {
|
|
1416
|
-
var _this = this;
|
|
1417
|
-
this.identityService.getMe().subscribe(function (me) {
|
|
1418
|
-
_this.me = me;
|
|
1419
|
-
});
|
|
1420
|
-
this.commentService.getComments(this.entry.id).subscribe(function (response) {
|
|
1421
|
-
var e_1, _a;
|
|
1422
|
-
_this.comments = response.results;
|
|
1423
|
-
try {
|
|
1424
|
-
for (var _b = __values(_this.comments), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1425
|
-
var comment = _c.value;
|
|
1426
|
-
comment.date_obj = new Date(comment.created_on);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1430
|
-
finally {
|
|
1431
|
-
try {
|
|
1432
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1433
|
-
}
|
|
1434
|
-
finally { if (e_1) throw e_1.error; }
|
|
1435
|
-
}
|
|
1436
|
-
});
|
|
1437
|
-
};
|
|
1438
|
-
EntryRendererComponent.prototype.ngAfterViewChecked = function () {
|
|
1439
|
-
var _this = this;
|
|
1440
|
-
if (!this.editMode) {
|
|
1441
|
-
this.ngZone.runOutsideAngular(function () {
|
|
1442
|
-
try {
|
|
1443
|
-
_this.prismService.highlightAll();
|
|
1444
|
-
}
|
|
1445
|
-
catch (e) {
|
|
1446
|
-
}
|
|
1447
|
-
});
|
|
1448
|
-
}
|
|
1449
|
-
};
|
|
1450
|
-
EntryRendererComponent.prototype.edit = function (entry) {
|
|
1451
|
-
var _this = this;
|
|
1452
|
-
entry.version++;
|
|
1453
|
-
entry.published = false;
|
|
1454
|
-
delete entry.publish_date;
|
|
1455
|
-
this.entryService.create(entry).subscribe(function (response) {
|
|
1456
|
-
localStorage.setItem(EntryCreatorComponent.CURRENT_ENTRY, JSON.stringify(response));
|
|
1457
|
-
_this.router.navigateByUrl('create(left-col:create//right-col:create)').then(function () {
|
|
1458
|
-
});
|
|
1459
|
-
});
|
|
1460
|
-
};
|
|
1461
|
-
EntryRendererComponent.prototype.postComment = function (e) {
|
|
1462
|
-
var _this = this;
|
|
1463
|
-
e.preventDefault();
|
|
1464
|
-
if (this.commentText !== '') {
|
|
1465
|
-
this.commentService.postComment({ entry: this.entry.id, content: this.commentText }).subscribe(function (comment) {
|
|
1466
|
-
_this.comments.push(comment);
|
|
1467
|
-
});
|
|
1468
|
-
this.commentText = '';
|
|
1469
|
-
}
|
|
1470
|
-
};
|
|
1471
|
-
EntryRendererComponent.prototype.mediaIsZip = function (content) {
|
|
1472
|
-
var e_2, _a;
|
|
1473
|
-
var mediaIsZip = false;
|
|
1474
|
-
if (content.additional) {
|
|
1475
|
-
try {
|
|
1476
|
-
for (var _b = __values(content.additional), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1477
|
-
var add = _c.value;
|
|
1478
|
-
if (add.key === Content.KEY_MIMETYPE) {
|
|
1479
|
-
if (add.value === 'application/zip') {
|
|
1480
|
-
mediaIsZip = true;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1486
|
-
finally {
|
|
1487
|
-
try {
|
|
1488
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1489
|
-
}
|
|
1490
|
-
finally { if (e_2) throw e_2.error; }
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
return mediaIsZip;
|
|
1494
|
-
};
|
|
1495
|
-
EntryRendererComponent.prototype.approve = function (comment) {
|
|
1496
|
-
comment.approved = !comment.approved;
|
|
1497
|
-
this.commentService.patchComment(Object.assign({}, { approved: true }, comment)).subscribe(function (rComment) {
|
|
1498
|
-
});
|
|
1499
|
-
};
|
|
1500
|
-
EntryRendererComponent.prototype.unapprove = function (comment) {
|
|
1501
|
-
comment.approved = !comment.approved;
|
|
1502
|
-
this.commentService.patchComment(Object.assign({}, { approved: false }, comment)).subscribe(function (rComment) {
|
|
1503
|
-
});
|
|
1504
|
-
};
|
|
1505
|
-
return EntryRendererComponent;
|
|
1506
|
-
}());
|
|
1507
|
-
EntryRendererComponent.decorators = [
|
|
1508
|
-
{ type: i0.Component, args: [{
|
|
1509
|
-
selector: 'app-entry-renderer',
|
|
1510
|
-
template: "<div>\n <h2>{{entry?.title}}</h2>\n <a *ngIf=\"me?.id === entry?.getProp('author_id')\" href=\"javascript:void(0)\" (click)=\"edit(entry)\"><h4>[Edit]</h4></a>\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry?.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n <p *ngIf=\"entry?.tags?.length > 0\">Tags: <span *ngFor=\"let tag of entry?.tags; let last = last\">{{tag}}<ng-container *ngIf=\"!last\"> |\n </ng-container></span><span *ngIf=\"entry?.views\">, {{entry._friendly_views}} views</span></p>\n <br>\n\n <ng-container *ngFor=\"let section of entry?.sections\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a><br>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <ng-container *ngIf=\"mediaIsZip(content)\">\n <div class=\"download\">\n <a href=\"content?.value\">{{content?.description}}</a>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!mediaIsZip(content)\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container>\n <h2>Comments</h2>\n <p *ngIf=\"comments?.length == 0\">There are no comments yet.</p>\n <ng-container *ngIf=\"comments?.length > 0\">\n <div *ngFor=\"let comment of comments\">\n <mat-card style=\"margin-bottom: 20px;\" class=\"restrict\">\n <mat-card-title><img class=\"gravatar\" src=\"{{comment.gravatar_url}} + ?s=30\"> {{comment.user_display_name}}</mat-card-title>\n <mat-card-subtitle>{{comment.date_obj | timeAgo}}</mat-card-subtitle>\n <mat-card-content>\n <p>{{comment.content}}</p>\n <ng-container *ngIf=\"me?.id === entry?.__server_generated_properties?.author_id\">\n <a href=\"javascript:void(0);\" *ngIf=\"!comment?.approved\" (click)=\"approve(comment)\">Approve</a>\n <a href=\"javascript:void(0);\" *ngIf=\"comment?.approved\" (click)=\"unapprove(comment)\">Unapprove</a>\n </ng-container>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!me\">\n <a href=\"/signup\">Signup</a> or <a href=\"/login\">login</a> to join the conversation!\n </ng-container>\n <ng-container *ngIf=\"me && !me?.comments_public\">\n <p>Note, your comments will not be public be default. It is possible I will make your comments public, but for now comments are just between you and me.</p>\n </ng-container>\n <ng-container *ngIf=\"me\">\n <h2 style=\"width: 100%;\">Leave a Comment</h2>\n <br>\n <mat-form-field class=\"restrict\" style=\"width: 100%;\" appearance=\"outline\">\n <mat-label>Comment</mat-label>\n <textarea [(ngModel)]=\"commentText\" (keydown.enter)=\"postComment($event)\" matInput></textarea>\n </mat-form-field>\n <br>\n <button (click)=\"postComment($event)\" style=\"text-align: right;\" mat-button>Submit</button>\n </ng-container>\n <div style=\"margin-bottom: 30px;\"></div>\n</div>\n\n",
|
|
1511
|
-
styles: [".image{justify-content:center;text-align:center;width:100%}.description,.source{font-size:12px;text-align:center}.gravatar{margin-right:20px}.smaller{text-color:grey;text-size:12px}"]
|
|
1512
|
-
},] }
|
|
1513
|
-
];
|
|
1514
|
-
EntryRendererComponent.ctorParameters = function () { return [
|
|
1515
|
-
{ type: PrismService },
|
|
1516
|
-
{ type: i0.NgZone },
|
|
1517
|
-
{ type: IdentityService },
|
|
1518
|
-
{ type: CommentService },
|
|
1519
|
-
{ type: router.Router },
|
|
1520
|
-
{ type: EntryService }
|
|
1521
|
-
]; };
|
|
1522
|
-
EntryRendererComponent.propDecorators = {
|
|
1523
|
-
entry: [{ type: i0.Input }],
|
|
1524
|
-
editMode: [{ type: i0.Input }]
|
|
1525
|
-
};
|
|
1526
|
-
|
|
1527
|
-
var EntrySummaryComponent = /** @class */ (function () {
|
|
1528
|
-
function EntrySummaryComponent(router) {
|
|
1529
|
-
this.router = router;
|
|
1530
|
-
this.ContentType = exports.ContentType;
|
|
1531
|
-
}
|
|
1532
|
-
EntrySummaryComponent.prototype.ngOnInit = function () {
|
|
1533
|
-
};
|
|
1534
|
-
EntrySummaryComponent.prototype.routeTo = function (entry) {
|
|
1535
|
-
this.router.navigate(['/', 'blog', entry.slug]).then(function () {
|
|
1536
|
-
});
|
|
1537
|
-
};
|
|
1538
|
-
return EntrySummaryComponent;
|
|
1539
|
-
}());
|
|
1540
|
-
EntrySummaryComponent.decorators = [
|
|
1541
|
-
{ type: i0.Component, args: [{
|
|
1542
|
-
selector: 'app-entry-summary',
|
|
1543
|
-
template: "\n<div class=\"entry section restrict\">\n <h2>{{entry?.title}}</h2>\n <!-- <a href=\"javascript:void(0)\" (click)=\"edit(entry)\"><h6>[Edit]</h6></a>-->\n <h3>Posted {{entry?.create_date.toString() | timeAgo}} on {{entry?.create_date?.getMonth() + 1}}/{{entry?.create_date?.getDate()}}/{{entry?.create_date?.getFullYear()}}</h3>\n <h5 *ngIf=\"entry.showEditInformation()\">Article was last edited {{entry?.edit_date.toString() | timeAgo}}</h5>\n <br>\n\n <ng-container *ngFor=\"let section of entry?.sections.slice(0, 1)\">\n <h4>{{section?.subheading}}</h4>\n <ng-container *ngFor=\"let content of section?.contents.slice(0, 1)\">\n <ng-container [ngSwitch]=\"content.type\">\n <ng-container *ngSwitchCase=\"ContentType.CODE\">\n <pre><code class=\"language-ts\">{{content?.value}}</code></pre>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.URL\">\n <a [href]=\"content?.value\" target=\"_blank\">{{content.title}}</a>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.IMAGE\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.MEDIA\">\n <div class=\"restrict\">\n <div class=\"image\">\n <img [src]=\"content?.value\"/>\n </div>\n <div class=\"description\" *ngIf=\"content?.description\">{{content?.description}}</div>\n <div class=\"source\" *ngIf=\"content?.source\">\n <a [href]=\"content?.source\" [target]=\"'_blank'\">Source: {{content?.source}}</a>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.HTML\">\n <app-static-html\n [value]=\"content?.value\"\n >\n </app-static-html>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <p>{{content?.value}}</p>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <a href=\"javascript:void(0);\" (click)=\"routeTo(entry)\">Read more...</a>\n</div>\n",
|
|
1544
|
-
styles: [".entry{border-bottom:1px solid rgba(0,0,0,.12);padding:20px}"]
|
|
1545
|
-
},] }
|
|
1546
|
-
];
|
|
1547
|
-
EntrySummaryComponent.ctorParameters = function () { return [
|
|
1548
|
-
{ type: router.Router }
|
|
1549
|
-
]; };
|
|
1550
|
-
EntrySummaryComponent.propDecorators = {
|
|
1551
|
-
entry: [{ type: i0.Input }]
|
|
1552
|
-
};
|
|
1553
|
-
|
|
1554
|
-
var JsonRendererComponent = /** @class */ (function () {
|
|
1555
|
-
function JsonRendererComponent(entryService) {
|
|
1556
|
-
this.entryService = entryService;
|
|
1557
|
-
this.JSON = JSON;
|
|
1558
|
-
this.entry = new Entry();
|
|
1559
|
-
}
|
|
1560
|
-
JsonRendererComponent.prototype.ngOnInit = function () {
|
|
1561
|
-
var _this = this;
|
|
1562
|
-
this.entryService.currentlyEditedEntry.subscribe(function (entry) {
|
|
1563
|
-
_this.entry = entry;
|
|
1564
|
-
});
|
|
1565
|
-
};
|
|
1566
|
-
return JsonRendererComponent;
|
|
1567
|
-
}());
|
|
1568
|
-
JsonRendererComponent.decorators = [
|
|
1569
|
-
{ type: i0.Component, args: [{
|
|
1570
|
-
selector: 'app-json-renderer',
|
|
1571
|
-
template: "<div class=\"section json-render json\">\n <app-entry-renderer [editMode]=\"true\" [entry]=\"entry\"></app-entry-renderer>\n <pre>{{JSON.stringify(entry)}}</pre>\n</div>\n",
|
|
1572
|
-
styles: [".json pre{white-space:pre-wrap;word-wrap:anywhere}.json-render{padding:0 20px}"]
|
|
1573
|
-
},] }
|
|
1574
|
-
];
|
|
1575
|
-
JsonRendererComponent.ctorParameters = function () { return [
|
|
1576
|
-
{ type: EntryService }
|
|
1577
|
-
]; };
|
|
1578
|
-
JsonRendererComponent.propDecorators = {
|
|
1579
|
-
entry: [{ type: i0.Input }]
|
|
1580
|
-
};
|
|
1581
|
-
|
|
1582
|
-
var LandingPageComponent = /** @class */ (function () {
|
|
1583
|
-
function LandingPageComponent(router, entryService) {
|
|
1584
|
-
this.router = router;
|
|
1585
|
-
this.entryService = entryService;
|
|
1586
|
-
this.JSON = JSON;
|
|
1587
|
-
}
|
|
1588
|
-
LandingPageComponent.prototype.ngOnInit = function () {
|
|
1589
|
-
var _this = this;
|
|
1590
|
-
this.entryService.get().subscribe(function (response) {
|
|
1591
|
-
_this.entries = lodash.map(response.results.slice(0, 3), function (result) {
|
|
1592
|
-
return { id: result.id, entry: new Entry(result) };
|
|
1593
|
-
});
|
|
1594
|
-
});
|
|
1595
|
-
};
|
|
1596
|
-
LandingPageComponent.prototype.ngOnDestroy = function () {
|
|
1597
|
-
if (this.sourceSub) {
|
|
1598
|
-
this.sourceSub.unsubscribe();
|
|
1599
|
-
this.sourceSub = null;
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
return LandingPageComponent;
|
|
1603
|
-
}());
|
|
1604
|
-
LandingPageComponent.decorators = [
|
|
1605
|
-
{ type: i0.Component, args: [{
|
|
1606
|
-
selector: 'app-landing-page',
|
|
1607
|
-
template: "<div class=\"landing-page\">\n <ng-container *ngFor=\"let entry of entries\">\n <app-entry-summary [entry]=\"entry.entry\"></app-entry-summary>\n </ng-container>\n</div>\n",
|
|
1608
|
-
styles: [".landing-page{max-height:calc(100vh - 100px);min-height:calc(100vh - 100px)}@media screen and (max-height:560px){.landing-page{max-height:100vh}}"]
|
|
1609
|
-
},] }
|
|
1610
|
-
];
|
|
1611
|
-
LandingPageComponent.ctorParameters = function () { return [
|
|
1612
|
-
{ type: router.Router },
|
|
1613
|
-
{ type: EntryService }
|
|
1614
|
-
]; };
|
|
1615
|
-
|
|
1616
|
-
var OutlineViewComponent = /** @class */ (function () {
|
|
1617
|
-
function OutlineViewComponent(entryService) {
|
|
1618
|
-
this.entryService = entryService;
|
|
1619
|
-
this.entry = new Entry();
|
|
1620
|
-
this.Math = Math;
|
|
1621
|
-
}
|
|
1622
|
-
OutlineViewComponent.prototype.ngOnInit = function () {
|
|
1623
|
-
var _this = this;
|
|
1624
|
-
this.entryService.currentlyEditedEntry.subscribe(function (entry) {
|
|
1625
|
-
_this.entry = entry;
|
|
1626
|
-
});
|
|
1627
|
-
};
|
|
1628
|
-
OutlineViewComponent.prototype.sectionDrop = function (e) {
|
|
1629
|
-
var entry = this.entry;
|
|
1630
|
-
var diff = e.currentIndex - e.previousIndex;
|
|
1631
|
-
entry.sections[e.previousIndex].order = e.currentIndex * 10 + (diff > 0 ? 1 : -1);
|
|
1632
|
-
entry.sort();
|
|
1633
|
-
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1634
|
-
};
|
|
1635
|
-
OutlineViewComponent.prototype.contentDrop = function (e, section) {
|
|
1636
|
-
var entry = this.entry;
|
|
1637
|
-
var diff = e.currentIndex - e.previousIndex;
|
|
1638
|
-
section.contents[e.previousIndex].order = e.currentIndex * 10 + (diff > 0 ? 1 : -1);
|
|
1639
|
-
entry.sort();
|
|
1640
|
-
this.entryService.currentlyEditedEntry.next(this.entry);
|
|
1641
|
-
};
|
|
1642
|
-
return OutlineViewComponent;
|
|
1643
|
-
}());
|
|
1644
|
-
OutlineViewComponent.decorators = [
|
|
1645
|
-
{ type: i0.Component, args: [{
|
|
1646
|
-
selector: 'app-outline-view',
|
|
1647
|
-
template: "<div class=\"section outline\">\n <h1 *ngIf=\"entry?.sections?.length === 0\">Outline View</h1>\n <div cdkDropList class=\"sections\" (cdkDropListDropped)=\"sectionDrop($event)\">\n <mat-card class=\"card\" cdkDrag *ngFor=\"let section of entry.sections\">\n <h3>Section {{Math.ceil(section.order / 10) + 1}}</h3>\n {{section.subheading}}\n <div cdkDropList class=\"contents\" (cdkDropListDropped)=\"contentDrop($event, section)\">\n <h3>Contents for {{section.subheading}}</h3>\n <div class=\"content-card\" *ngFor=\"let content of section.contents\" cdkDrag>\n <div class=\"content\">{{content.value}}</div>\n <div class=\"content-placeholder\" *cdkDragPlaceholder></div>\n </div>\n </div>\n </mat-card>\n <div class=\"custom-placeholder\" *cdkDragPlaceholder></div>\n </div>\n</div>\n",
|
|
1648
|
-
styles: [".outline{padding:0 20px}.content{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card,.content-card{cursor:pointer;margin:4px}.content-card:not(:last-child){border-bottom:1px dotted #aaa}.custom-placeholder{min-height:60px}.content-placeholder,.custom-placeholder{background:#ccc;border:3px dotted #999;transition:transform .25s cubic-bezier(0,0,.2,1)}.content-placeholder{min-height:30px}"]
|
|
1649
|
-
},] }
|
|
1650
|
-
];
|
|
1651
|
-
OutlineViewComponent.ctorParameters = function () { return [
|
|
1652
|
-
{ type: EntryService }
|
|
1653
|
-
]; };
|
|
1654
|
-
|
|
1655
|
-
var SideNavigationComponent = /** @class */ (function () {
|
|
1656
|
-
function SideNavigationComponent(entryService, router, identityService) {
|
|
1657
|
-
this.entryService = entryService;
|
|
1658
|
-
this.router = router;
|
|
1659
|
-
this.identityService = identityService;
|
|
1660
|
-
this.entries = [];
|
|
1661
|
-
this.entriesByMonthAndYear = [];
|
|
1662
|
-
}
|
|
1663
|
-
SideNavigationComponent.prototype.ngOnInit = function () {
|
|
1664
|
-
var _this = this;
|
|
1665
|
-
this.identityService.getMe().subscribe(function (identity) {
|
|
1666
|
-
_this.identity = identity;
|
|
1667
|
-
}, function (err) {
|
|
1668
|
-
_this.identity = null;
|
|
1669
|
-
});
|
|
1670
|
-
this.getEntries();
|
|
1671
|
-
};
|
|
1672
|
-
SideNavigationComponent.prototype.getEntriesWithUrl = function (url) {
|
|
1673
|
-
var _this = this;
|
|
1674
|
-
this.entryService.getListByUrl(url).subscribe(function (response) {
|
|
1675
|
-
_this.entries = _this.entries.concat(lodash.map(response.results, function (result) {
|
|
1676
|
-
return { id: result.id, entry: new Entry(result) };
|
|
1677
|
-
}));
|
|
1678
|
-
if (response.next) {
|
|
1679
|
-
_this.getEntriesWithUrl(response.next);
|
|
1680
|
-
}
|
|
1681
|
-
else {
|
|
1682
|
-
_this.organizeEntries();
|
|
1683
|
-
}
|
|
1684
|
-
});
|
|
1685
|
-
};
|
|
1686
|
-
SideNavigationComponent.prototype.organizeEntries = function () {
|
|
1687
|
-
var e_1, _a;
|
|
1688
|
-
var _loop_1 = function (entryWrapper) {
|
|
1689
|
-
var entry = entryWrapper.entry;
|
|
1690
|
-
var create_date = new Date(entry.create_date);
|
|
1691
|
-
var month = create_date.getMonth();
|
|
1692
|
-
var year = create_date.getFullYear();
|
|
1693
|
-
var key = month + '/' + year;
|
|
1694
|
-
var sort_index = (year * 100) + month;
|
|
1695
|
-
var containers = lodash.filter(this_1.entriesByMonthAndYear, function (entryContainer) { return entryContainer.month_year === key; });
|
|
1696
|
-
if (containers.length > 0) {
|
|
1697
|
-
var container = containers[0];
|
|
1698
|
-
var entriesWithId = lodash.filter(container.entries, function (e) { return e.id === entryWrapper.entry.id; });
|
|
1699
|
-
if (entriesWithId.length === 0) {
|
|
1700
|
-
container.entries.push(entry);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
else {
|
|
1704
|
-
var newContainer = { month_year: key, month_year_number: sort_index, entries: [entry] };
|
|
1705
|
-
this_1.entriesByMonthAndYear.push(newContainer);
|
|
1706
|
-
}
|
|
1707
|
-
};
|
|
1708
|
-
var this_1 = this;
|
|
1709
|
-
try {
|
|
1710
|
-
for (var _b = __values(this.entries), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1711
|
-
var entryWrapper = _c.value;
|
|
1712
|
-
_loop_1(entryWrapper);
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1716
|
-
finally {
|
|
1717
|
-
try {
|
|
1718
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1719
|
-
}
|
|
1720
|
-
finally { if (e_1) throw e_1.error; }
|
|
1721
|
-
}
|
|
1722
|
-
this.entriesByMonthAndYear.sort(function (entry_a, entry_b) {
|
|
1723
|
-
return entry_a.month_year_number - entry_b.month_year_number;
|
|
1724
|
-
});
|
|
1725
|
-
this.entriesByMonthAndYear.reverse();
|
|
1726
|
-
};
|
|
1727
|
-
SideNavigationComponent.prototype.getEntries = function () {
|
|
1728
|
-
var _this = this;
|
|
1729
|
-
this.entryService.get().subscribe(function (response) {
|
|
1730
|
-
_this.entries = lodash.map(response.results, function (result) {
|
|
1731
|
-
return { id: result.id, entry: new Entry(result) };
|
|
1732
|
-
});
|
|
1733
|
-
if (response.next) {
|
|
1734
|
-
_this.getEntriesWithUrl(response.next);
|
|
1735
|
-
}
|
|
1736
|
-
else {
|
|
1737
|
-
_this.organizeEntries();
|
|
1738
|
-
}
|
|
1739
|
-
});
|
|
1740
|
-
};
|
|
1741
|
-
SideNavigationComponent.prototype.render = function () {
|
|
1742
|
-
};
|
|
1743
|
-
SideNavigationComponent.prototype.routeTo = function (entry) {
|
|
1744
|
-
if (!entry) {
|
|
1745
|
-
this.router.navigateByUrl('create(left-col:create//right-col:create)').then(function () {
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
else {
|
|
1749
|
-
this.router.navigate(['/', 'blog', entry.slug]).then(function () {
|
|
1750
|
-
// Noop
|
|
1751
|
-
});
|
|
1752
|
-
}
|
|
1753
|
-
};
|
|
1754
|
-
SideNavigationComponent.prototype.getMonthAndYearFromKey = function (key) {
|
|
1755
|
-
var subheading = '';
|
|
1756
|
-
var parts = key.split('/');
|
|
1757
|
-
switch (Number(parts[0])) {
|
|
1758
|
-
case 0:
|
|
1759
|
-
subheading += 'January ';
|
|
1760
|
-
break;
|
|
1761
|
-
case 1:
|
|
1762
|
-
subheading += 'February ';
|
|
1763
|
-
break;
|
|
1764
|
-
case 2:
|
|
1765
|
-
subheading += 'March ';
|
|
1766
|
-
break;
|
|
1767
|
-
case 3:
|
|
1768
|
-
subheading += 'April ';
|
|
1769
|
-
break;
|
|
1770
|
-
case 4:
|
|
1771
|
-
subheading += 'May ';
|
|
1772
|
-
break;
|
|
1773
|
-
case 5:
|
|
1774
|
-
subheading += 'June ';
|
|
1775
|
-
break;
|
|
1776
|
-
case 6:
|
|
1777
|
-
subheading += 'July ';
|
|
1778
|
-
break;
|
|
1779
|
-
case 7:
|
|
1780
|
-
subheading += 'August ';
|
|
1781
|
-
break;
|
|
1782
|
-
case 8:
|
|
1783
|
-
subheading += 'September ';
|
|
1784
|
-
break;
|
|
1785
|
-
case 9:
|
|
1786
|
-
subheading += 'October ';
|
|
1787
|
-
break;
|
|
1788
|
-
case 10:
|
|
1789
|
-
subheading += 'November ';
|
|
1790
|
-
break;
|
|
1791
|
-
case 11:
|
|
1792
|
-
subheading += 'December ';
|
|
1793
|
-
break;
|
|
1794
|
-
default:
|
|
1795
|
-
subheading += 'January ';
|
|
1796
|
-
}
|
|
1797
|
-
subheading += parts[1];
|
|
1798
|
-
return subheading;
|
|
1799
|
-
};
|
|
1800
|
-
SideNavigationComponent.prototype.ngOnDestroy = function () {
|
|
1801
|
-
if (this.sourceSub) {
|
|
1802
|
-
this.sourceSub.unsubscribe();
|
|
1803
|
-
this.sourceSub = null;
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
return SideNavigationComponent;
|
|
1807
|
-
}());
|
|
1808
|
-
SideNavigationComponent.decorators = [
|
|
1809
|
-
{ type: i0.Component, args: [{
|
|
1810
|
-
selector: 'app-side-navigation',
|
|
1811
|
-
template: "<div class=\"sidenav no-scrollbar\">\n <mat-nav-list *ngFor=\"let container of entriesByMonthAndYear\">\n <h3>{{getMonthAndYearFromKey(container.month_year)}}</h3>\n <a mat-list-item *ngFor=\"let entry of container.entries\" href=\"javascript:void(0)\" (click)=\"routeTo(entry)\">{{entry.title}}</a>\n </mat-nav-list>\n\n <ng-container *ngIf=\"identity?.id === 1\">\n <h2>Misc</h2>\n\n <mat-nav-list>\n <a mat-list-item href=\"javascript:void(0);\" (click)=\"routeTo(null)\">Create</a>\n </mat-nav-list>\n </ng-container>\n <h3 *ngIf=\"identity\">Logged in as {{identity?.email}}</h3>\n</div>\n\n",
|
|
1812
|
-
styles: [".sidenav{max-height:calc(100vh - 100px)}@media screen and (max-height:560px){.sidenav{max-height:100vh}}h2,h3{justify-content:right;margin-left:10px}"]
|
|
1813
|
-
},] }
|
|
1814
|
-
];
|
|
1815
|
-
SideNavigationComponent.ctorParameters = function () { return [
|
|
1816
|
-
{ type: EntryService },
|
|
1817
|
-
{ type: router.Router },
|
|
1818
|
-
{ type: IdentityService }
|
|
1819
|
-
]; };
|
|
1820
|
-
|
|
1821
|
-
var StaticHtmlComponent = /** @class */ (function () {
|
|
1822
|
-
function StaticHtmlComponent(staticHtmlService, domSanitizer) {
|
|
1823
|
-
this.staticHtmlService = staticHtmlService;
|
|
1824
|
-
this.domSanitizer = domSanitizer;
|
|
1825
|
-
}
|
|
1826
|
-
StaticHtmlComponent.prototype.refreshContent = function () {
|
|
1827
|
-
this.innerHtml = this.domSanitizer.bypassSecurityTrustHtml(this.staticHtmlService.mapStaticHtml(this.value, false));
|
|
1828
|
-
};
|
|
1829
|
-
StaticHtmlComponent.prototype.ngOnChanges = function (changes) {
|
|
1830
|
-
this.refreshContent();
|
|
1831
|
-
};
|
|
1832
|
-
StaticHtmlComponent.prototype.ngOnInit = function () {
|
|
1833
|
-
this.refreshContent();
|
|
1834
|
-
};
|
|
1835
|
-
return StaticHtmlComponent;
|
|
1836
|
-
}());
|
|
1837
|
-
StaticHtmlComponent.decorators = [
|
|
1838
|
-
{ type: i0.Component, args: [{
|
|
1839
|
-
selector: 'app-static-html',
|
|
1840
|
-
template: "<div [innerHtml]=\"innerHtml\">\n</div>\n",
|
|
1841
|
-
styles: [""]
|
|
1842
|
-
},] }
|
|
1843
|
-
];
|
|
1844
|
-
StaticHtmlComponent.ctorParameters = function () { return [
|
|
1845
|
-
{ type: StaticHtmlService },
|
|
1846
|
-
{ type: i1$1.DomSanitizer }
|
|
1847
|
-
]; };
|
|
1848
|
-
StaticHtmlComponent.propDecorators = {
|
|
1849
|
-
value: [{ type: i0.Input }]
|
|
1850
|
-
};
|
|
1851
|
-
|
|
1852
|
-
var MainComponent = /** @class */ (function () {
|
|
1853
|
-
function MainComponent(router) {
|
|
1854
|
-
this.router = router;
|
|
1855
|
-
this.loaded = true;
|
|
1856
|
-
this.subs = new rxjs.Subscription();
|
|
1857
|
-
this.resizeSubject = new rxjs.Subject();
|
|
1858
|
-
}
|
|
1859
|
-
MainComponent.prototype.ngOnInit = function () {
|
|
1860
|
-
var _this = this;
|
|
1861
|
-
this.subs.add(this.router.events.subscribe(function (e) {
|
|
1862
|
-
if (e instanceof router.NavigationEnd) {
|
|
1863
|
-
if (e.urlAfterRedirects.includes('create')) {
|
|
1864
|
-
_this.showLeftCol = true;
|
|
1865
|
-
_this.showRightCol = true;
|
|
1866
|
-
}
|
|
1867
|
-
else {
|
|
1868
|
-
_this.showLeftCol = true;
|
|
1869
|
-
_this.showRightCol = false;
|
|
1870
|
-
_this.innerWidth = window.innerWidth;
|
|
1871
|
-
_this.collapseLeftColIfTooNarrow();
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
}));
|
|
1875
|
-
this.subs.add(this.resizeSubject.pipe(operators.debounceTime(100)).subscribe(function (width) {
|
|
1876
|
-
_this.innerWidth = width;
|
|
1877
|
-
_this.collapseLeftColIfTooNarrow();
|
|
1878
|
-
}));
|
|
1879
|
-
};
|
|
1880
|
-
MainComponent.prototype.collapseLeftColIfTooNarrow = function () {
|
|
1881
|
-
this.showLeftCol = this.innerWidth >= 800;
|
|
1882
|
-
};
|
|
1883
|
-
MainComponent.prototype.onResize = function (event) {
|
|
1884
|
-
this.resizeSubject.next(window.innerWidth);
|
|
1885
|
-
};
|
|
1886
|
-
MainComponent.prototype.ngOnDestroy = function () {
|
|
1887
|
-
this.subs.unsubscribe();
|
|
1888
|
-
};
|
|
1889
|
-
return MainComponent;
|
|
1890
|
-
}());
|
|
1891
|
-
MainComponent.decorators = [
|
|
1892
|
-
{ type: i0.Component, args: [{
|
|
1893
|
-
selector: 'lib-main',
|
|
1894
|
-
template: "<ng-container *ngIf=\"loaded\">\n <div class=\"container\">\n <div class=\"body\">\n <div class=\"container-row\">\n <mat-sidenav-container [autosize]=\"true\">\n <mat-sidenav [(opened)]=\"showLeftCol\" #leftcol opened mode=\"side\" class=\"left no-scrollbar\">\n <router-outlet name=\"left-col\"></router-outlet>\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"showLeftCol\" (click)=\"leftcol.toggle()\"> << </button>\n </mat-sidenav>\n <mat-sidenav [(opened)]=\"showRightCol\" #rightcol mode=\"side\" position=\"end\" class=\"right\">\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"showRightCol\" (click)=\"rightcol.toggle()\"> >> </button>\n <router-outlet name=\"right-col\"></router-outlet>\n </mat-sidenav>\n <div class=\"middle\">\n <button mat-mini-fab color=\"primary\" class=\"fade left-toggle\" *ngIf=\"!showLeftCol\" (click)=\"leftcol.toggle()\"> >> </button>\n <button mat-mini-fab color=\"primary\" class=\"fade right-toggle\" *ngIf=\"!showRightCol\" (click)=\"rightcol.toggle()\"> << </button>\n <router-outlet></router-outlet>\n </div>\n </mat-sidenav-container>\n </div>\n </div>\n </div>\n</ng-container>\n",
|
|
1895
|
-
styles: ["a{text-decoration:none}.body{flex-grow:1;max-height:calc(100vh - 100px);overflow:scroll}@media screen and (max-height:560px){.body{max-height:100vh}}.left,.right{max-width:33vw;min-width:400px}.left-toggle{left:5px}.left-toggle,.right-toggle{position:fixed;top:50%;z-index:100}.right-toggle{right:5px}a{margin-right:10px;&:not(:last-child):after{content:\"|\";margin-left:10px}}"]
|
|
1896
|
-
},] }
|
|
1897
|
-
];
|
|
1898
|
-
MainComponent.ctorParameters = function () { return [
|
|
1899
|
-
{ type: router.Router }
|
|
1900
|
-
]; };
|
|
1901
|
-
MainComponent.propDecorators = {
|
|
1902
|
-
onResize: [{ type: i0.HostListener, args: ['window:resize', ['$event'],] }]
|
|
1903
|
-
};
|
|
1904
|
-
|
|
1905
|
-
var EntryRendererWrapperComponent = /** @class */ (function () {
|
|
1906
|
-
function EntryRendererWrapperComponent(entryService, router, route, viewService, interactionService) {
|
|
1907
|
-
this.entryService = entryService;
|
|
1908
|
-
this.router = router;
|
|
1909
|
-
this.route = route;
|
|
1910
|
-
this.viewService = viewService;
|
|
1911
|
-
this.interactionService = interactionService;
|
|
1912
|
-
this.seeAllEntries = false;
|
|
1913
|
-
}
|
|
1914
|
-
EntryRendererWrapperComponent.prototype.seeAll = function (toggle) {
|
|
1915
|
-
this.seeAllEntries = toggle;
|
|
1916
|
-
};
|
|
1917
|
-
EntryRendererWrapperComponent.prototype.getEntry = function () {
|
|
1918
|
-
var _this = this;
|
|
1919
|
-
var slug = this.route.snapshot.paramMap.get('slug');
|
|
1920
|
-
if (slug) {
|
|
1921
|
-
this.entryService.getBySlug(slug).subscribe(function (response) {
|
|
1922
|
-
_this.currentEntry = response;
|
|
1923
|
-
var view = new View();
|
|
1924
|
-
view.entry = _this.currentEntry.id;
|
|
1925
|
-
_this.viewService.create(view).subscribe(function (viewResponse) {
|
|
1926
|
-
// Noop
|
|
1927
|
-
});
|
|
1928
|
-
});
|
|
1929
|
-
}
|
|
1930
|
-
this.route.queryParams.subscribe(function (params) {
|
|
1931
|
-
var campaign = params['campaign'];
|
|
1932
|
-
if (campaign && campaign !== '') {
|
|
1933
|
-
var interaction = new Interaction();
|
|
1934
|
-
interaction.content = { 'campaign': campaign, slug: slug };
|
|
1935
|
-
_this.interactionService.create(interaction).subscribe(function (response) {
|
|
1936
|
-
});
|
|
1937
|
-
setTimeout(function () {
|
|
1938
|
-
var urlMinsCampaign = _this.router.url.replace(new RegExp('.campaign=' + campaign), '');
|
|
1939
|
-
_this.router.navigateByUrl(urlMinsCampaign);
|
|
1940
|
-
}, 0);
|
|
1941
|
-
}
|
|
1942
|
-
});
|
|
1943
|
-
};
|
|
1944
|
-
EntryRendererWrapperComponent.prototype.ngOnInit = function () {
|
|
1945
|
-
var _this = this;
|
|
1946
|
-
this.routerSub = this.router.events.subscribe(function (e) {
|
|
1947
|
-
if (e instanceof router.NavigationEnd) {
|
|
1948
|
-
_this.currentEntry = null;
|
|
1949
|
-
_this.seeAll(false);
|
|
1950
|
-
setTimeout(function () {
|
|
1951
|
-
_this.getEntry();
|
|
1952
|
-
}, 10);
|
|
1953
|
-
}
|
|
1954
|
-
});
|
|
1955
|
-
this.getEntry();
|
|
1956
|
-
};
|
|
1957
|
-
EntryRendererWrapperComponent.prototype.ngOnDestroy = function () {
|
|
1958
|
-
if (this.routerSub) {
|
|
1959
|
-
this.routerSub.complete();
|
|
1960
|
-
this.routerSub = null;
|
|
1961
|
-
}
|
|
1962
|
-
};
|
|
1963
|
-
return EntryRendererWrapperComponent;
|
|
1964
|
-
}());
|
|
1965
|
-
EntryRendererWrapperComponent.decorators = [
|
|
1966
|
-
{ type: i0.Component, args: [{
|
|
1967
|
-
selector: 'lib-entry-renderer-wrapper',
|
|
1968
|
-
template: "<div class=\"rendered-entry section\">\n <app-entry-renderer *ngIf=\"currentEntry\" [entry]=\"currentEntry\"></app-entry-renderer>\n</div>\n",
|
|
1969
|
-
styles: [".rendered-entry{padding:0 20px}"]
|
|
1970
|
-
},] }
|
|
1971
|
-
];
|
|
1972
|
-
EntryRendererWrapperComponent.ctorParameters = function () { return [
|
|
1973
|
-
{ type: EntryService },
|
|
1974
|
-
{ type: router.Router },
|
|
1975
|
-
{ type: router.ActivatedRoute },
|
|
1976
|
-
{ type: ViewService },
|
|
1977
|
-
{ type: InteractionService }
|
|
1978
|
-
]; };
|
|
1979
|
-
|
|
1980
|
-
var LinkyPipe = /** @class */ (function () {
|
|
1981
|
-
function LinkyPipe() {
|
|
1982
|
-
}
|
|
1983
|
-
LinkyPipe.prototype.transform = function (value, options) {
|
|
1984
|
-
return Autolinker__default['default'].link(value, Object.assign({}, options, { newWindow: true, stripPrefix: false }));
|
|
1985
|
-
};
|
|
1986
|
-
return LinkyPipe;
|
|
1987
|
-
}());
|
|
1988
|
-
LinkyPipe.decorators = [
|
|
1989
|
-
{ type: i0.Pipe, args: [{ name: 'linky' },] }
|
|
1990
|
-
];
|
|
1991
|
-
|
|
1992
|
-
var TimeAgoPipe = /** @class */ (function () {
|
|
1993
|
-
function TimeAgoPipe(changeDetectorRef, ngZone) {
|
|
1994
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
1995
|
-
this.ngZone = ngZone;
|
|
1996
|
-
}
|
|
1997
|
-
TimeAgoPipe.prototype.transform = function (value) {
|
|
1998
|
-
var _this = this;
|
|
1999
|
-
this.removeTimer();
|
|
2000
|
-
var d = new Date(value);
|
|
2001
|
-
var now = new Date();
|
|
2002
|
-
var seconds = Math.round(Math.abs((now.getTime() - d.getTime()) / 1000));
|
|
2003
|
-
var timeToUpdate = (Number.isNaN(seconds)) ? 1000 : this.getSecondsUntilUpdate(seconds) * 1000;
|
|
2004
|
-
this.timer = this.ngZone.runOutsideAngular(function () {
|
|
2005
|
-
if (typeof window !== 'undefined') {
|
|
2006
|
-
return window.setTimeout(function () {
|
|
2007
|
-
_this.ngZone.run(function () { return _this.changeDetectorRef.markForCheck(); });
|
|
2008
|
-
}, timeToUpdate);
|
|
2009
|
-
}
|
|
2010
|
-
return null;
|
|
2011
|
-
});
|
|
2012
|
-
var minutes = Math.round(Math.abs(seconds / 60));
|
|
2013
|
-
var hours = Math.round(Math.abs(minutes / 60));
|
|
2014
|
-
var days = Math.round(Math.abs(hours / 24));
|
|
2015
|
-
var months = Math.round(Math.abs(days / 30.416));
|
|
2016
|
-
var years = Math.round(Math.abs(days / 365));
|
|
2017
|
-
if (Number.isNaN(seconds)) {
|
|
2018
|
-
return '';
|
|
2019
|
-
}
|
|
2020
|
-
else if (seconds <= 45) {
|
|
2021
|
-
return 'a few seconds ago';
|
|
2022
|
-
}
|
|
2023
|
-
else if (seconds <= 90) {
|
|
2024
|
-
return 'a minute ago';
|
|
2025
|
-
}
|
|
2026
|
-
else if (minutes <= 45) {
|
|
2027
|
-
return minutes + ' minutes ago';
|
|
2028
|
-
}
|
|
2029
|
-
else if (minutes <= 90) {
|
|
2030
|
-
return 'an hour ago';
|
|
2031
|
-
}
|
|
2032
|
-
else if (hours <= 22) {
|
|
2033
|
-
return hours + ' hours ago';
|
|
2034
|
-
}
|
|
2035
|
-
else if (hours <= 36) {
|
|
2036
|
-
return 'a day ago';
|
|
2037
|
-
}
|
|
2038
|
-
else if (days <= 25) {
|
|
2039
|
-
return days + ' days ago';
|
|
2040
|
-
}
|
|
2041
|
-
else if (days <= 45) {
|
|
2042
|
-
return 'a month ago';
|
|
2043
|
-
}
|
|
2044
|
-
else if (days <= 345) {
|
|
2045
|
-
return months + ' months ago';
|
|
2046
|
-
}
|
|
2047
|
-
else if (days <= 545) {
|
|
2048
|
-
return 'a year ago';
|
|
2049
|
-
}
|
|
2050
|
-
else { // (days > 545)
|
|
2051
|
-
return years + ' years ago';
|
|
2052
|
-
}
|
|
2053
|
-
};
|
|
2054
|
-
TimeAgoPipe.prototype.ngOnDestroy = function () {
|
|
2055
|
-
this.removeTimer();
|
|
2056
|
-
};
|
|
2057
|
-
TimeAgoPipe.prototype.removeTimer = function () {
|
|
2058
|
-
if (this.timer) {
|
|
2059
|
-
window.clearTimeout(this.timer);
|
|
2060
|
-
this.timer = null;
|
|
2061
|
-
}
|
|
2062
|
-
};
|
|
2063
|
-
TimeAgoPipe.prototype.getSecondsUntilUpdate = function (seconds) {
|
|
2064
|
-
var min = 60;
|
|
2065
|
-
var hr = min * 60;
|
|
2066
|
-
var day = hr * 24;
|
|
2067
|
-
if (seconds < min) { // less than 1 min, update every 2 secs
|
|
2068
|
-
return 2;
|
|
2069
|
-
}
|
|
2070
|
-
else if (seconds < hr) { // less than an hour, update every 30 secs
|
|
2071
|
-
return 30;
|
|
2072
|
-
}
|
|
2073
|
-
else if (seconds < day) { // less then a day, update every 5 mins
|
|
2074
|
-
return 300;
|
|
2075
|
-
}
|
|
2076
|
-
else { // update every hour
|
|
2077
|
-
return 3600;
|
|
2078
|
-
}
|
|
2079
|
-
};
|
|
2080
|
-
return TimeAgoPipe;
|
|
2081
|
-
}());
|
|
2082
|
-
TimeAgoPipe.decorators = [
|
|
2083
|
-
{ type: i0.Pipe, args: [{
|
|
2084
|
-
name: 'timeAgo',
|
|
2085
|
-
pure: false
|
|
2086
|
-
},] }
|
|
2087
|
-
];
|
|
2088
|
-
TimeAgoPipe.ctorParameters = function () { return [
|
|
2089
|
-
{ type: i0.ChangeDetectorRef },
|
|
2090
|
-
{ type: i0.NgZone }
|
|
2091
|
-
]; };
|
|
2092
|
-
|
|
2093
|
-
var routes = [
|
|
2094
|
-
{ path: '', component: SideNavigationComponent, outlet: 'left-col' },
|
|
2095
|
-
{
|
|
2096
|
-
path: 'landing',
|
|
2097
|
-
component: MainComponent
|
|
2098
|
-
},
|
|
2099
|
-
{ path: 'blog/:slug', component: EntryRendererWrapperComponent },
|
|
2100
|
-
{ path: 'create', component: EntryCreatorComponent },
|
|
2101
|
-
{ path: 'create', component: OutlineViewComponent, outlet: 'left-col' },
|
|
2102
|
-
{ path: 'create', component: JsonRendererComponent, outlet: 'right-col' },
|
|
2103
|
-
{ path: '', redirectTo: '/landing', pathMatch: 'full' },
|
|
2104
|
-
{ path: '**', redirectTo: '/404error' }
|
|
2105
|
-
];
|
|
2106
|
-
var Routes = /** @class */ (function () {
|
|
2107
|
-
function Routes() {
|
|
2108
|
-
this.routes = routes;
|
|
2109
|
-
}
|
|
2110
|
-
return Routes;
|
|
2111
|
-
}());
|
|
2112
|
-
|
|
2113
|
-
var SchedulePublishDialogData = /** @class */ (function () {
|
|
2114
|
-
function SchedulePublishDialogData() {
|
|
2115
|
-
}
|
|
2116
|
-
return SchedulePublishDialogData;
|
|
2117
|
-
}());
|
|
2118
|
-
|
|
2119
|
-
var SchedulePublishDialogComponent = /** @class */ (function () {
|
|
2120
|
-
function SchedulePublishDialogComponent(dialogRef, data) {
|
|
2121
|
-
this.dialogRef = dialogRef;
|
|
2122
|
-
this.data = data;
|
|
2123
|
-
}
|
|
2124
|
-
SchedulePublishDialogComponent.prototype.ngOnInit = function () {
|
|
2125
|
-
};
|
|
2126
|
-
SchedulePublishDialogComponent.prototype.onNoClick = function () {
|
|
2127
|
-
};
|
|
2128
|
-
SchedulePublishDialogComponent.prototype.onYesClick = function () {
|
|
2129
|
-
this.dialogRef.close('test');
|
|
2130
|
-
};
|
|
2131
|
-
return SchedulePublishDialogComponent;
|
|
2132
|
-
}());
|
|
2133
|
-
SchedulePublishDialogComponent.decorators = [
|
|
2134
|
-
{ type: i0.Component, args: [{
|
|
2135
|
-
selector: 'lib-schedule-publish-dialog',
|
|
2136
|
-
template: "<h1 mat-dialog-title>Select a Date and Time to Schedule This Post</h1>\n<!--<mat-radio-group aria-label=\"Select an option\">-->\n<!-- <mat-radio-button class=\"option\" value=\"unpublished\">Unpublished</mat-radio-button>-->\n<!-- <mat-radio-button class=\"option\" value=\"published\">Published</mat-radio-button>-->\n<!--</mat-radio-group>-->\n<p>Date</p>\n<mat-form-field appearance=\"fill\">\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n<p>Time</p>\n<input [ngxTimepicker]=\"timepicker\" readonly>\n<ngx-material-timepicker #timepicker></ngx-material-timepicker>\n<div mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button (click)=\"onYesClick()\" cdkFocusInitial>Schedule Publish</button>\n</div>\n",
|
|
2137
|
-
styles: [""]
|
|
2138
|
-
},] }
|
|
2139
|
-
];
|
|
2140
|
-
SchedulePublishDialogComponent.ctorParameters = function () { return [
|
|
2141
|
-
{ type: dialog.MatDialogRef },
|
|
2142
|
-
{ type: SchedulePublishDialogData, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
2143
|
-
]; };
|
|
2144
|
-
|
|
2145
|
-
var CoreModule = /** @class */ (function () {
|
|
2146
|
-
function CoreModule(library) {
|
|
2147
|
-
this.library = library;
|
|
2148
|
-
this.library.addIcons(freeSolidSvgIcons.faSpinner);
|
|
2149
|
-
}
|
|
2150
|
-
return CoreModule;
|
|
2151
|
-
}());
|
|
2152
|
-
CoreModule.decorators = [
|
|
2153
|
-
{ type: i0.NgModule, args: [{
|
|
2154
|
-
declarations: [
|
|
2155
|
-
EntryRendererComponent,
|
|
2156
|
-
EntryCreatorComponent,
|
|
2157
|
-
LandingPageComponent,
|
|
2158
|
-
SideNavigationComponent,
|
|
2159
|
-
OutlineViewComponent,
|
|
2160
|
-
JsonRendererComponent,
|
|
2161
|
-
EntrySummaryComponent,
|
|
2162
|
-
EntrySelectorDialogComponent,
|
|
2163
|
-
MediaUploadModalComponent,
|
|
2164
|
-
TimeAgoPipe,
|
|
2165
|
-
LinkyPipe,
|
|
2166
|
-
StaticHtmlComponent,
|
|
2167
|
-
MainComponent,
|
|
2168
|
-
EntryRendererWrapperComponent,
|
|
2169
|
-
SchedulePublishDialogComponent,
|
|
2170
|
-
],
|
|
2171
|
-
imports: [
|
|
2172
|
-
common.CommonModule,
|
|
2173
|
-
router.RouterModule,
|
|
2174
|
-
forms.FormsModule,
|
|
2175
|
-
forms.ReactiveFormsModule,
|
|
2176
|
-
dragDrop.DragDropModule,
|
|
2177
|
-
card.MatCardModule,
|
|
2178
|
-
sidenav.MatSidenavModule,
|
|
2179
|
-
button.MatButtonModule,
|
|
2180
|
-
input.MatInputModule,
|
|
2181
|
-
list.MatListModule,
|
|
2182
|
-
radio.MatRadioModule,
|
|
2183
|
-
dialog.MatDialogModule,
|
|
2184
|
-
checkbox.MatCheckboxModule,
|
|
2185
|
-
divider.MatDividerModule,
|
|
2186
|
-
autocomplete.MatAutocompleteModule,
|
|
2187
|
-
chips.MatChipsModule,
|
|
2188
|
-
icon.MatIconModule,
|
|
2189
|
-
datepicker.MatDatepickerModule,
|
|
2190
|
-
core.MatNativeDateModule,
|
|
2191
|
-
angularFontawesome.FontAwesomeModule,
|
|
2192
|
-
ng2FileUpload.FileUploadModule,
|
|
2193
|
-
ngxMaterialTimepicker.NgxMaterialTimepickerModule,
|
|
2194
|
-
],
|
|
2195
|
-
providers: [
|
|
2196
|
-
CommentService,
|
|
2197
|
-
EntryService,
|
|
2198
|
-
UploadService,
|
|
2199
|
-
PrismService,
|
|
2200
|
-
IdentityService,
|
|
2201
|
-
DjangoRestFrameworkEndpointService,
|
|
2202
|
-
TagService,
|
|
2203
|
-
],
|
|
2204
|
-
exports: [
|
|
2205
|
-
EntryRendererComponent,
|
|
2206
|
-
EntryCreatorComponent,
|
|
2207
|
-
LandingPageComponent,
|
|
2208
|
-
SideNavigationComponent,
|
|
2209
|
-
OutlineViewComponent,
|
|
2210
|
-
JsonRendererComponent,
|
|
2211
|
-
EntrySummaryComponent,
|
|
2212
|
-
EntrySelectorDialogComponent,
|
|
2213
|
-
MediaUploadModalComponent,
|
|
2214
|
-
TimeAgoPipe,
|
|
2215
|
-
LinkyPipe,
|
|
2216
|
-
StaticHtmlComponent,
|
|
2217
|
-
MainComponent,
|
|
2218
|
-
EntryRendererWrapperComponent,
|
|
2219
|
-
]
|
|
2220
|
-
},] }
|
|
2221
|
-
];
|
|
2222
|
-
CoreModule.ctorParameters = function () { return [
|
|
2223
|
-
{ type: angularFontawesome.FaIconLibrary }
|
|
2224
|
-
]; };
|
|
2225
|
-
|
|
2226
|
-
/*
|
|
2227
|
-
* Public API Surface of core
|
|
2228
|
-
*/
|
|
2229
|
-
|
|
2230
|
-
/**
|
|
2231
|
-
* Generated bundle index. Do not edit.
|
|
2232
|
-
*/
|
|
2233
|
-
|
|
2234
|
-
exports.Base = Base;
|
|
2235
|
-
exports.CommentService = CommentService;
|
|
2236
|
-
exports.Content = Content;
|
|
2237
|
-
exports.CoreEvent = CoreEvent;
|
|
2238
|
-
exports.CoreModule = CoreModule;
|
|
2239
|
-
exports.DjangoRestFrameworkEndpointService = DjangoRestFrameworkEndpointService;
|
|
2240
|
-
exports.Entry = Entry;
|
|
2241
|
-
exports.EntryCreatorComponent = EntryCreatorComponent;
|
|
2242
|
-
exports.EntryRendererComponent = EntryRendererComponent;
|
|
2243
|
-
exports.EntryRendererWrapperComponent = EntryRendererWrapperComponent;
|
|
2244
|
-
exports.EntrySelectorDialogComponent = EntrySelectorDialogComponent;
|
|
2245
|
-
exports.EntryService = EntryService;
|
|
2246
|
-
exports.EntrySummaryComponent = EntrySummaryComponent;
|
|
2247
|
-
exports.Guid = Guid;
|
|
2248
|
-
exports.IdentityService = IdentityService;
|
|
2249
|
-
exports.Interaction = Interaction;
|
|
2250
|
-
exports.InteractionService = InteractionService;
|
|
2251
|
-
exports.JsonRendererComponent = JsonRendererComponent;
|
|
2252
|
-
exports.LandingPageComponent = LandingPageComponent;
|
|
2253
|
-
exports.LinkyPipe = LinkyPipe;
|
|
2254
|
-
exports.ListResponse = ListResponse;
|
|
2255
|
-
exports.MainComponent = MainComponent;
|
|
2256
|
-
exports.MediaUploadModalComponent = MediaUploadModalComponent;
|
|
2257
|
-
exports.OutlineViewComponent = OutlineViewComponent;
|
|
2258
|
-
exports.PrismService = PrismService;
|
|
2259
|
-
exports.Routes = Routes;
|
|
2260
|
-
exports.Section = Section;
|
|
2261
|
-
exports.SideNavigationComponent = SideNavigationComponent;
|
|
2262
|
-
exports.StaticHtmlComponent = StaticHtmlComponent;
|
|
2263
|
-
exports.StaticHtmlService = StaticHtmlService;
|
|
2264
|
-
exports.TagService = TagService;
|
|
2265
|
-
exports.TimeAgoPipe = TimeAgoPipe;
|
|
2266
|
-
exports.Upload = Upload;
|
|
2267
|
-
exports.UploadService = UploadService;
|
|
2268
|
-
exports.View = View;
|
|
2269
|
-
exports.ViewService = ViewService;
|
|
2270
|
-
exports.VisitorProfile = VisitorProfile;
|
|
2271
|
-
exports.VisitorProfileService = VisitorProfileService;
|
|
2272
|
-
exports.ɵa = EntrySelectorDialogData;
|
|
2273
|
-
exports.ɵb = SchedulePublishDialogComponent;
|
|
2274
|
-
exports.ɵc = SchedulePublishDialogData;
|
|
2275
|
-
|
|
2276
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2277
|
-
|
|
2278
|
-
})));
|
|
2279
|
-
//# sourceMappingURL=thecodeblogs-blog.umd.js.map
|