@posiwise/resource-module 0.0.193 → 0.0.195
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/fesm2022/posiwise-resource-module-base-top-banner.component-DSirXfem.mjs +142 -0
- package/fesm2022/posiwise-resource-module-base-top-banner.component-DSirXfem.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DIh--y78.mjs +264 -0
- package/fesm2022/posiwise-resource-module-resource-blogs.module-DIh--y78.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs +1928 -0
- package/fesm2022/posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs +246 -0
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BwK6UfCq.mjs +460 -0
- package/fesm2022/posiwise-resource-module-resource-events.module-BwK6UfCq.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-BWvid8gs.mjs +443 -0
- package/fesm2022/posiwise-resource-module-resource-hub.module-BWvid8gs.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-qudabfwX.mjs +604 -0
- package/fesm2022/posiwise-resource-module-resource-integrations.module-qudabfwX.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BJnApbtU.mjs +777 -0
- package/fesm2022/posiwise-resource-module-resource-post.module-BJnApbtU.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-TH1usNf-.mjs +294 -0
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-TH1usNf-.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-root.module-DP0EMP-_.mjs +769 -0
- package/fesm2022/posiwise-resource-module-resource-root.module-DP0EMP-_.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-DR7dQ_8r.mjs +258 -0
- package/fesm2022/posiwise-resource-module-resource-videos.module-DR7dQ_8r.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C8J9-eqL.mjs +259 -0
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C8J9-eqL.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module-resource.service-DjeMJX1O.mjs +88 -0
- package/fesm2022/posiwise-resource-module-resource.service-DjeMJX1O.mjs.map +1 -0
- package/fesm2022/posiwise-resource-module.mjs +1603 -2
- package/fesm2022/posiwise-resource-module.mjs.map +1 -1
- package/package.json +6 -5
- package/types/posiwise-resource-module.d.ts +794 -506
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CD5atqs7.mjs +0 -116
- package/fesm2022/posiwise-resource-module-base-top-banner.component-CD5atqs7.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-C-e2dNwR.mjs +0 -1888
- package/fesm2022/posiwise-resource-module-posiwise-resource-module-C-e2dNwR.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BBFWP2C7.mjs +0 -69
- package/fesm2022/posiwise-resource-module-resource-blogs.module-BBFWP2C7.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-ByTD2_48.mjs +0 -135
- package/fesm2022/posiwise-resource-module-resource-case-studies.module-ByTD2_48.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-events.module-DDRHt23j.mjs +0 -241
- package/fesm2022/posiwise-resource-module-resource-events.module-DDRHt23j.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-hub.module-BfsDOG9Y.mjs +0 -244
- package/fesm2022/posiwise-resource-module-resource-hub.module-BfsDOG9Y.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-integrations.module-HnP4CCtr.mjs +0 -295
- package/fesm2022/posiwise-resource-module-resource-integrations.module-HnP4CCtr.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-post.module-D1Y2bs-g.mjs +0 -334
- package/fesm2022/posiwise-resource-module-resource-post.module-D1Y2bs-g.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DXwH6xe3.mjs +0 -110
- package/fesm2022/posiwise-resource-module-resource-release-notes.module-DXwH6xe3.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-root.module-CFCC4-Ht.mjs +0 -398
- package/fesm2022/posiwise-resource-module-resource-root.module-CFCC4-Ht.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-videos.module-cV-K0XzH.mjs +0 -68
- package/fesm2022/posiwise-resource-module-resource-videos.module-cV-K0XzH.mjs.map +0 -1
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C9piJ56m.mjs +0 -70
- package/fesm2022/posiwise-resource-module-resource-white-papers.module-C9piJ56m.mjs.map +0 -1
|
@@ -1,2 +1,1603 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { t as ResourceService } from "./posiwise-resource-module-resource.service-DjeMJX1O.mjs";
|
|
2
|
+
import { c as ResourceNoteCardComponent, i as ResourceVaultComponent, l as ResourceEditCardLazyComponent, n as UpcomingEventCardComponent, o as ResourceCardComponent, r as ResourceVideoCardComponent, s as CaseStudyCardComponent, t as ResourceCardsModule, u as Trial4ContactUsModule } from "./posiwise-resource-module-resource-cards.module-Bp4BgXL2.mjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, EventEmitter, Input, NgModule, Output, ViewChild } from "@angular/core";
|
|
5
|
+
import { HelperService } from "@posiwise/helper-service";
|
|
6
|
+
import * as i3 from "@posiwise/common-services";
|
|
7
|
+
import * as i1$2 from "@angular/router";
|
|
8
|
+
import { RouterModule } from "@angular/router";
|
|
9
|
+
import * as i1$1 from "@angular/common";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import * as i1 from "@angular/forms";
|
|
12
|
+
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
13
|
+
import { HubSpotMeetingsSharedModule } from "@posiwise/alpha-module";
|
|
14
|
+
import { CoreTranslocoModule } from "@posiwise/core-transloco";
|
|
15
|
+
import * as i3$1 from "@posiwise/directives";
|
|
16
|
+
import { DirectivesModule } from "@posiwise/directives";
|
|
17
|
+
import { PipesModule } from "@posiwise/pipes";
|
|
18
|
+
import * as i2$1 from "@posiwise/shared-components";
|
|
19
|
+
import { ResourceSharedComponentsModule } from "@posiwise/shared-components";
|
|
20
|
+
import { IconFieldModule } from "primeng/iconfield";
|
|
21
|
+
import { InputIconModule } from "primeng/inputicon";
|
|
22
|
+
import { InputTextModule } from "primeng/inputtext";
|
|
23
|
+
import { TextareaModule } from "primeng/textarea";
|
|
24
|
+
import * as i6$1 from "@jsverse/transloco";
|
|
25
|
+
import { TranslocoModule } from "@jsverse/transloco";
|
|
26
|
+
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
27
|
+
import { Subject } from "rxjs";
|
|
28
|
+
import * as i5 from "primeng/paginator";
|
|
29
|
+
import * as i2 from "@ng-bootstrap/ng-bootstrap";
|
|
30
|
+
import * as i4 from "@posiwise/utils";
|
|
31
|
+
import * as i11 from "ngx-quill";
|
|
32
|
+
import { QuillModule } from "ngx-quill";
|
|
33
|
+
import * as i12 from "ngx-ui-switch";
|
|
34
|
+
import { UiSwitchModule } from "ngx-ui-switch";
|
|
35
|
+
import * as i7 from "primeng/autocomplete";
|
|
36
|
+
import { AutoCompleteModule } from "primeng/autocomplete";
|
|
37
|
+
import * as i6 from "primeng/datepicker";
|
|
38
|
+
import { DatePickerModule } from "primeng/datepicker";
|
|
39
|
+
import moment from "moment";
|
|
40
|
+
var __defProp = Object.defineProperty;
|
|
41
|
+
var __exportAll = (all, no_symbols) => {
|
|
42
|
+
let target = {};
|
|
43
|
+
for (var name in all) __defProp(target, name, {
|
|
44
|
+
get: all[name],
|
|
45
|
+
enumerable: true
|
|
46
|
+
});
|
|
47
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
48
|
+
return target;
|
|
49
|
+
};
|
|
50
|
+
const routes = [
|
|
51
|
+
{
|
|
52
|
+
path: "",
|
|
53
|
+
pathMatch: "full",
|
|
54
|
+
loadChildren: () => import("./posiwise-resource-module-resource-root.module-DP0EMP-_.mjs").then((m) => m.ResourceRootModule)
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: "hub",
|
|
58
|
+
loadChildren: () => import("./posiwise-resource-module-resource-hub.module-BWvid8gs.mjs").then((m) => m.ResourceHubModule)
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: "blogs",
|
|
62
|
+
loadChildren: () => import("./posiwise-resource-module-resource-blogs.module-DIh--y78.mjs").then((m) => m.ResourceBlogsModule)
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
path: "videos",
|
|
66
|
+
loadChildren: () => import("./posiwise-resource-module-resource-videos.module-DR7dQ_8r.mjs").then((m) => m.ResourceVideosModule)
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
path: "integrations",
|
|
70
|
+
loadChildren: () => import("./posiwise-resource-module-resource-integrations.module-qudabfwX.mjs").then((m) => m.ResourceIntegrationsModule)
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: "release-notes",
|
|
74
|
+
loadChildren: () => import("./posiwise-resource-module-resource-release-notes.module-TH1usNf-.mjs").then((m) => m.ResourceReleaseNotesModule)
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
path: "events",
|
|
78
|
+
loadChildren: () => import("./posiwise-resource-module-resource-events.module-BwK6UfCq.mjs").then((m) => m.ResourceEventsModule)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: "white-papers",
|
|
82
|
+
loadChildren: () => import("./posiwise-resource-module-resource-white-papers.module-C8J9-eqL.mjs").then((m) => m.ResourceWhitePapersModule)
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: "case-studies",
|
|
86
|
+
loadChildren: () => import("./posiwise-resource-module-resource-case-studies.module-BtkkgIFa.mjs").then((m) => m.ResourceCaseStudiesModule)
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: "view/:slug",
|
|
90
|
+
loadChildren: () => import("./posiwise-resource-module-resource-post.module-BJnApbtU.mjs").then((m) => m.ResourcePostModule)
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
var BlogPublicRoutingModule = class BlogPublicRoutingModule {
|
|
94
|
+
static {
|
|
95
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
96
|
+
minVersion: "12.0.0",
|
|
97
|
+
version: "22.2.0",
|
|
98
|
+
ngImport: i0,
|
|
99
|
+
type: BlogPublicRoutingModule,
|
|
100
|
+
deps: [],
|
|
101
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
106
|
+
minVersion: "14.0.0",
|
|
107
|
+
version: "22.2.0",
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
type: BlogPublicRoutingModule,
|
|
110
|
+
imports: [i1$2.RouterModule],
|
|
111
|
+
exports: [RouterModule]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
116
|
+
minVersion: "12.0.0",
|
|
117
|
+
version: "22.2.0",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: BlogPublicRoutingModule,
|
|
120
|
+
imports: [RouterModule.forChild(routes), RouterModule]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.0",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: BlogPublicRoutingModule,
|
|
129
|
+
decorators: [{
|
|
130
|
+
type: NgModule,
|
|
131
|
+
args: [{
|
|
132
|
+
imports: [RouterModule.forChild(routes)],
|
|
133
|
+
exports: [RouterModule]
|
|
134
|
+
}]
|
|
135
|
+
}]
|
|
136
|
+
});
|
|
137
|
+
var ResourcePublicModule = class ResourcePublicModule {
|
|
138
|
+
static {
|
|
139
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
140
|
+
minVersion: "12.0.0",
|
|
141
|
+
version: "22.2.0",
|
|
142
|
+
ngImport: i0,
|
|
143
|
+
type: ResourcePublicModule,
|
|
144
|
+
deps: [],
|
|
145
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
static {
|
|
149
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
150
|
+
minVersion: "14.0.0",
|
|
151
|
+
version: "22.2.0",
|
|
152
|
+
ngImport: i0,
|
|
153
|
+
type: ResourcePublicModule,
|
|
154
|
+
imports: [BlogPublicRoutingModule]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
static {
|
|
158
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
159
|
+
minVersion: "12.0.0",
|
|
160
|
+
version: "22.2.0",
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
type: ResourcePublicModule,
|
|
163
|
+
providers: [ResourceService],
|
|
164
|
+
imports: [BlogPublicRoutingModule]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
169
|
+
minVersion: "12.0.0",
|
|
170
|
+
version: "22.2.0",
|
|
171
|
+
ngImport: i0,
|
|
172
|
+
type: ResourcePublicModule,
|
|
173
|
+
decorators: [{
|
|
174
|
+
type: NgModule,
|
|
175
|
+
args: [{
|
|
176
|
+
imports: [BlogPublicRoutingModule],
|
|
177
|
+
providers: [ResourceService],
|
|
178
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
179
|
+
}]
|
|
180
|
+
}]
|
|
181
|
+
});
|
|
182
|
+
var ResourceModule = class ResourceModule {
|
|
183
|
+
static {
|
|
184
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
185
|
+
minVersion: "12.0.0",
|
|
186
|
+
version: "22.2.0",
|
|
187
|
+
ngImport: i0,
|
|
188
|
+
type: ResourceModule,
|
|
189
|
+
deps: [],
|
|
190
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
static {
|
|
194
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
195
|
+
minVersion: "14.0.0",
|
|
196
|
+
version: "22.2.0",
|
|
197
|
+
ngImport: i0,
|
|
198
|
+
type: ResourceModule,
|
|
199
|
+
imports: [ResourcePublicModule]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
static {
|
|
203
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
204
|
+
minVersion: "12.0.0",
|
|
205
|
+
version: "22.2.0",
|
|
206
|
+
ngImport: i0,
|
|
207
|
+
type: ResourceModule,
|
|
208
|
+
imports: [ResourcePublicModule]
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
213
|
+
minVersion: "12.0.0",
|
|
214
|
+
version: "22.2.0",
|
|
215
|
+
ngImport: i0,
|
|
216
|
+
type: ResourceModule,
|
|
217
|
+
decorators: [{
|
|
218
|
+
type: NgModule,
|
|
219
|
+
args: [{ imports: [ResourcePublicModule] }]
|
|
220
|
+
}]
|
|
221
|
+
});
|
|
222
|
+
var ResourceCompanyCardComponent = class ResourceCompanyCardComponent extends AppBaseComponent {
|
|
223
|
+
constructor(injector, cdr) {
|
|
224
|
+
super(injector);
|
|
225
|
+
this.cdr = cdr;
|
|
226
|
+
this.getPosts = new EventEmitter();
|
|
227
|
+
this.destroy$ = new Subject();
|
|
228
|
+
this.canEditResourcesValue = false;
|
|
229
|
+
this.header = "";
|
|
230
|
+
this.data = [];
|
|
231
|
+
this.vendor = false;
|
|
232
|
+
this.postData = false;
|
|
233
|
+
this.filteredData = [];
|
|
234
|
+
this.first = 0;
|
|
235
|
+
this.rows = 12;
|
|
236
|
+
}
|
|
237
|
+
ngOnChanges() {
|
|
238
|
+
this.search();
|
|
239
|
+
}
|
|
240
|
+
ngOnInit() {
|
|
241
|
+
if (this.userLoggedIn) {
|
|
242
|
+
this.updateCanEditResourcesValue();
|
|
243
|
+
this.localStorage.getItem$("product").subscribe((res) => {
|
|
244
|
+
const data = res ? JSON.parse(res) : null;
|
|
245
|
+
this.subscriptionId = data?.subscriptionId;
|
|
246
|
+
this.cdr.markForCheck();
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
search(keywords) {
|
|
251
|
+
if (keywords) {
|
|
252
|
+
this.filteredData = this.data.filter((x) => x.title.toLowerCase().includes(keywords.toLowerCase()));
|
|
253
|
+
if (this.filteredData.length === 0) this.postData = true;
|
|
254
|
+
else this.postData = false;
|
|
255
|
+
} else {
|
|
256
|
+
this.filteredData = [...this.data];
|
|
257
|
+
this.postData = false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
onPageChange(event) {
|
|
261
|
+
this.first = event.first;
|
|
262
|
+
this.rows = event.rows;
|
|
263
|
+
}
|
|
264
|
+
ngOnDestroy() {
|
|
265
|
+
this.destroy$.next();
|
|
266
|
+
this.destroy$.complete();
|
|
267
|
+
}
|
|
268
|
+
updateCanEditResourcesValue() {
|
|
269
|
+
this.canEditResourcesValue = HelperService.canEditResources(this.user, this.userLoggedIn, this.permissionService);
|
|
270
|
+
}
|
|
271
|
+
canEditResources() {
|
|
272
|
+
return this.canEditResourcesValue;
|
|
273
|
+
}
|
|
274
|
+
get showNoPostsMessage() {
|
|
275
|
+
return this.integrationCountDisplay > 0 && !this.postData && (!this.filteredData || this.filteredData.length === 0);
|
|
276
|
+
}
|
|
277
|
+
static {
|
|
278
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
279
|
+
minVersion: "12.0.0",
|
|
280
|
+
version: "22.2.0",
|
|
281
|
+
ngImport: i0,
|
|
282
|
+
type: ResourceCompanyCardComponent,
|
|
283
|
+
deps: [{ token: i0.Injector }, { token: i0.ChangeDetectorRef }],
|
|
284
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
static {
|
|
288
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
289
|
+
minVersion: "17.0.0",
|
|
290
|
+
version: "22.2.0",
|
|
291
|
+
type: ResourceCompanyCardComponent,
|
|
292
|
+
isStandalone: false,
|
|
293
|
+
selector: "pw-resource-company-card",
|
|
294
|
+
inputs: {
|
|
295
|
+
header: "header",
|
|
296
|
+
data: "data",
|
|
297
|
+
integrationCountDisplay: "integrationCountDisplay",
|
|
298
|
+
vendor: "vendor",
|
|
299
|
+
user: "user",
|
|
300
|
+
userLoggedIn: "userLoggedIn"
|
|
301
|
+
},
|
|
302
|
+
outputs: { getPosts: "getPosts" },
|
|
303
|
+
usesInheritance: true,
|
|
304
|
+
usesOnChanges: true,
|
|
305
|
+
ngImport: i0,
|
|
306
|
+
template: "<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n",
|
|
307
|
+
styles: [".top-search-input{color:#000!important;border:3px solid #d4d4d4!important;padding:5px 30px!important;border-radius:29px!important}::placeholder{color:#d4d4d4}.vendors-distributor-wrapper{margin-top:5rem!important}.vendor-icon{max-width:180px;max-height:100%;width:100%!important}.vendor-name{font-size:3rem;line-height:3rem;color:var(--text-color, black)}::ng-deep .customPaginator .p-paginator{border:none!important}::ng-deep .customPaginator .p-paginator button{border:none!important}.int-span{text-transform:uppercase;font-size:2.5rem;color:var(--first)}.boxes{width:100%;min-height:150px;display:flex;align-items:center;justify-content:center;text-align:center;padding:15px;border:1px dashed #ccc;border-radius:8px;overflow-wrap:break-word;white-space:normal;height:100%}a.vendor-link{display:inline-block;transition:transform .2s ease}a.vendor-link:hover{transform:scale(1.05);cursor:pointer}.search-wrapper{position:relative;width:300px}.search-input{width:100%;padding:10px 20px 10px 40px;border:2px solid #d4d4d4;border-radius:30px;font-size:1rem;color:#000;background-color:#fff}.search-input::placeholder{color:silver}.search-input:focus{outline:none;border-color:var(--first)}.search-icon{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:#d4d4d4;font-size:1.1rem}@media(width<=768px){.vendor-icon{width:50!important}.search-container{flex-wrap:wrap!important;gap:2rem}.int-span{font-size:1.75rem}}\n"],
|
|
308
|
+
dependencies: [
|
|
309
|
+
{
|
|
310
|
+
kind: "directive",
|
|
311
|
+
type: i1$1.NgClass,
|
|
312
|
+
selector: "[ngClass]",
|
|
313
|
+
inputs: ["class", "ngClass"]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
kind: "directive",
|
|
317
|
+
type: i1$1.NgTemplateOutlet,
|
|
318
|
+
selector: "[ngTemplateOutlet]",
|
|
319
|
+
inputs: [
|
|
320
|
+
"ngTemplateOutletContext",
|
|
321
|
+
"ngTemplateOutlet",
|
|
322
|
+
"ngTemplateOutletInjector"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
kind: "component",
|
|
327
|
+
type: i2$1.NoDataComponent,
|
|
328
|
+
selector: "pw-no-data",
|
|
329
|
+
inputs: [
|
|
330
|
+
"message",
|
|
331
|
+
"description",
|
|
332
|
+
"withImage"
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
kind: "directive",
|
|
337
|
+
type: i3$1.LazyImgDirective,
|
|
338
|
+
selector: "img"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
kind: "component",
|
|
342
|
+
type: ResourceEditCardLazyComponent,
|
|
343
|
+
selector: "pw-resource-edit-card-lazy",
|
|
344
|
+
inputs: [
|
|
345
|
+
"id",
|
|
346
|
+
"resourceData",
|
|
347
|
+
"canEdit"
|
|
348
|
+
],
|
|
349
|
+
outputs: ["updated"]
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
kind: "component",
|
|
353
|
+
type: i5.Paginator,
|
|
354
|
+
selector: "p-paginator",
|
|
355
|
+
inputs: [
|
|
356
|
+
"pageLinkSize",
|
|
357
|
+
"alwaysShow",
|
|
358
|
+
"templateLeft",
|
|
359
|
+
"templateRight",
|
|
360
|
+
"dropdownScrollHeight",
|
|
361
|
+
"currentPageReportTemplate",
|
|
362
|
+
"showCurrentPageReport",
|
|
363
|
+
"showFirstLastIcon",
|
|
364
|
+
"totalRecords",
|
|
365
|
+
"rows",
|
|
366
|
+
"first",
|
|
367
|
+
"rowsPerPageOptions",
|
|
368
|
+
"showJumpToPageDropdown",
|
|
369
|
+
"showJumpToPageInput",
|
|
370
|
+
"jumpToPageItemTemplate",
|
|
371
|
+
"showPageLinks",
|
|
372
|
+
"locale",
|
|
373
|
+
"dropdownItemTemplate",
|
|
374
|
+
"appendTo"
|
|
375
|
+
],
|
|
376
|
+
outputs: [
|
|
377
|
+
"rowsChange",
|
|
378
|
+
"firstChange",
|
|
379
|
+
"onPageChange"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
kind: "pipe",
|
|
384
|
+
type: i1$1.SlicePipe,
|
|
385
|
+
name: "slice"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
kind: "pipe",
|
|
389
|
+
type: i6$1.TranslocoPipe,
|
|
390
|
+
name: "transloco"
|
|
391
|
+
}
|
|
392
|
+
],
|
|
393
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
398
|
+
minVersion: "12.0.0",
|
|
399
|
+
version: "22.2.0",
|
|
400
|
+
ngImport: i0,
|
|
401
|
+
type: ResourceCompanyCardComponent,
|
|
402
|
+
decorators: [{
|
|
403
|
+
type: Component,
|
|
404
|
+
args: [{
|
|
405
|
+
selector: "pw-resource-company-card",
|
|
406
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
407
|
+
standalone: false,
|
|
408
|
+
template: "<div [ngClass]=\"{ 'vendors-distributor-wrapper': !vendor }\">\n <div class=\"d-flex justify-content-between align-items-center mb-3 search-container\">\n <div>\n <span class=\"int-span\">{{header}}</span>\n </div>\n @if (integrationCountDisplay > 0) {\n <div class=\"search-wrapper position-relative\">\n <i class=\"fa fa-search search-icon\"></i>\n <input type=\"text\"\n (keyup)=\"search($event.target.value)\"\n placeholder=\"Search eg security\"\n class=\"search-input top-search-input\" id=\"input_search_eg_security_9712\" name=\"input_search_eg_security_9712\"\n aria-label=\"Search eg security\" />\n </div>\n }\n\n </div>\n\n @if (postData) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n\n @if (showNoPostsMessage) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"></pw-no-data>\n </div>\n }\n\n @if (!postData && integrationCountDisplay > 0 && filteredData.length > 0) {\n <div class=\"row\">\n @for (img of filteredData | slice:first:(first + rows); track img) {\n <div class=\"col-md-3 mt-4\"\n >\n <div class=\"boxes d-flex align-items-center justify-content-center\">\n @if (img?.companyImg) {\n <img [src]=\"img.companyImg\" alt=\"Vendor Company Icon\" class=\"vendor-icon\" />\n } @else {\n @if (img?.rectangular_picture?.url) {\n @if (!img.rectangular_picture.url.includes('default-photo')) {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n </a>\n } @else {\n <img [src]=\"img.rectangular_picture.url\" alt=\"Vendor Rectangular Company Icon\" class=\"vendor-icon\" />\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n } @else {\n @if (img?.showcase) {\n <a class=\"vendor-link\" [href]=\"img.external_url || ('/resources/view/' + img.slug)\">\n <span class=\"vendor-name text-center mt-2\">{{ img?.title }}</span>\n </a>\n } @else {\n <span class=\"vendor-name text-center\">{{ img?.title }}</span>\n }\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEditResourcesValue\"\n [id]=\"img?.id\"\n [resourceData]=\"img\"\n (updated)=\"getPosts.emit()\">\n </pw-resource-edit-card-lazy>\n }\n } @else {\n <ng-template [ngTemplateOutlet]=\"noImage\"></ng-template>\n }\n }\n </div>\n </div>\n }\n @if (filteredData.length > 0) {\n <div class=\"customPaginator d-flex align-items-center mt-5 justify-content-center\"\n >\n <p-paginator\n [first]=\"first\"\n [rows]=\"rows\"\n [totalRecords]=\"filteredData.length\"\n (onPageChange)=\"onPageChange($event)\"></p-paginator>\n </div>\n }\n </div>\n }\n</div>\n",
|
|
409
|
+
styles: [".top-search-input{color:#000!important;border:3px solid #d4d4d4!important;padding:5px 30px!important;border-radius:29px!important}::placeholder{color:#d4d4d4}.vendors-distributor-wrapper{margin-top:5rem!important}.vendor-icon{max-width:180px;max-height:100%;width:100%!important}.vendor-name{font-size:3rem;line-height:3rem;color:var(--text-color, black)}::ng-deep .customPaginator .p-paginator{border:none!important}::ng-deep .customPaginator .p-paginator button{border:none!important}.int-span{text-transform:uppercase;font-size:2.5rem;color:var(--first)}.boxes{width:100%;min-height:150px;display:flex;align-items:center;justify-content:center;text-align:center;padding:15px;border:1px dashed #ccc;border-radius:8px;overflow-wrap:break-word;white-space:normal;height:100%}a.vendor-link{display:inline-block;transition:transform .2s ease}a.vendor-link:hover{transform:scale(1.05);cursor:pointer}.search-wrapper{position:relative;width:300px}.search-input{width:100%;padding:10px 20px 10px 40px;border:2px solid #d4d4d4;border-radius:30px;font-size:1rem;color:#000;background-color:#fff}.search-input::placeholder{color:silver}.search-input:focus{outline:none;border-color:var(--first)}.search-icon{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:#d4d4d4;font-size:1.1rem}@media(width<=768px){.vendor-icon{width:50!important}.search-container{flex-wrap:wrap!important;gap:2rem}.int-span{font-size:1.75rem}}\n"]
|
|
410
|
+
}]
|
|
411
|
+
}],
|
|
412
|
+
ctorParameters: () => [{ type: i0.Injector }, { type: i0.ChangeDetectorRef }],
|
|
413
|
+
propDecorators: {
|
|
414
|
+
getPosts: [{ type: Output }],
|
|
415
|
+
header: [{ type: Input }],
|
|
416
|
+
data: [{ type: Input }],
|
|
417
|
+
integrationCountDisplay: [{ type: Input }],
|
|
418
|
+
vendor: [{ type: Input }],
|
|
419
|
+
user: [{ type: Input }],
|
|
420
|
+
userLoggedIn: [{ type: Input }]
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
var ResourceTopBannerEditComponent = class ResourceTopBannerEditComponent extends AppBaseComponent {
|
|
424
|
+
constructor(fb, modalService, tagService, cdr, injector) {
|
|
425
|
+
super(injector);
|
|
426
|
+
this.fb = fb;
|
|
427
|
+
this.modalService = modalService;
|
|
428
|
+
this.tagService = tagService;
|
|
429
|
+
this.cdr = cdr;
|
|
430
|
+
this.getUpdatedTag = new EventEmitter();
|
|
431
|
+
this.image = null;
|
|
432
|
+
this.defaultImage = "assets/img/resource/blog.png";
|
|
433
|
+
}
|
|
434
|
+
ngOnInit() {
|
|
435
|
+
if (this.userLoggedIn) this.localStorage.getItem$("product").subscribe((res) => {
|
|
436
|
+
const data = res ? JSON.parse(res) : null;
|
|
437
|
+
this.subscriptionId = data?.subscriptionId;
|
|
438
|
+
this.cdr.markForCheck();
|
|
439
|
+
});
|
|
440
|
+
this.form = this.fb.group({
|
|
441
|
+
title: [this.blogPostTag?.title ?? ""],
|
|
442
|
+
description: [this.blogPostTag?.description ?? ""],
|
|
443
|
+
meta_title: [this.blogPostTag?.meta_title ?? ""],
|
|
444
|
+
meta_description: [this.blogPostTag?.meta_description ?? ""]
|
|
445
|
+
});
|
|
446
|
+
this.image = this.blogPostTag?.image?.url ?? null;
|
|
447
|
+
}
|
|
448
|
+
openEditModal() {
|
|
449
|
+
this.modalService.open(this.editModal, {
|
|
450
|
+
centered: true,
|
|
451
|
+
size: "lg"
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
openImageModal(modalRef) {
|
|
455
|
+
this.imageModalRef = this.modalService.open(modalRef, { centered: true });
|
|
456
|
+
}
|
|
457
|
+
onImageSelected(base64) {
|
|
458
|
+
this.image = base64;
|
|
459
|
+
this.file = HelperService.convertBase64ToFile(base64);
|
|
460
|
+
this.imageModalRef?.close();
|
|
461
|
+
}
|
|
462
|
+
onClose() {
|
|
463
|
+
this.imageModalRef?.close();
|
|
464
|
+
}
|
|
465
|
+
removeImage() {
|
|
466
|
+
this.image = null;
|
|
467
|
+
}
|
|
468
|
+
handleImageError(event) {
|
|
469
|
+
event.target.src = this.defaultImage;
|
|
470
|
+
}
|
|
471
|
+
save() {
|
|
472
|
+
this.buttonBusy = true;
|
|
473
|
+
const payload = {
|
|
474
|
+
title: this.form.value.title ?? this.blogPostTag?.title,
|
|
475
|
+
description: this.form.value.description ?? this.blogPostTag?.description,
|
|
476
|
+
meta_title: this.form.value.meta_title ?? this.blogPostTag?.meta_title,
|
|
477
|
+
meta_description: this.form.value.meta_description ?? this.blogPostTag?.meta_description,
|
|
478
|
+
tag_category_id: this.blogPostTag?.tag_category_id,
|
|
479
|
+
tag_type: this.blogPostTag?.tag_type,
|
|
480
|
+
subscription_id: this.subscriptionId,
|
|
481
|
+
name: this.blogPostTag?.name
|
|
482
|
+
};
|
|
483
|
+
if (this.file) payload["image"] = this.file;
|
|
484
|
+
else if (!this.image) payload["remove_image"] = true;
|
|
485
|
+
this.tagService.updateTagById(this.blogPostTag?.id, payload).subscribe(() => {
|
|
486
|
+
this.buttonBusy = false;
|
|
487
|
+
this.toast.success("Tag Updated");
|
|
488
|
+
this.getUpdatedTag.emit();
|
|
489
|
+
this.modalService.dismissAll();
|
|
490
|
+
this.cdr.markForCheck();
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
static {
|
|
494
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
495
|
+
minVersion: "12.0.0",
|
|
496
|
+
version: "22.2.0",
|
|
497
|
+
ngImport: i0,
|
|
498
|
+
type: ResourceTopBannerEditComponent,
|
|
499
|
+
deps: [
|
|
500
|
+
{ token: i1.FormBuilder },
|
|
501
|
+
{ token: i2.NgbModal },
|
|
502
|
+
{ token: i3.TagService },
|
|
503
|
+
{ token: i0.ChangeDetectorRef },
|
|
504
|
+
{ token: i0.Injector }
|
|
505
|
+
],
|
|
506
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
static {
|
|
510
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
511
|
+
minVersion: "17.0.0",
|
|
512
|
+
version: "22.2.0",
|
|
513
|
+
type: ResourceTopBannerEditComponent,
|
|
514
|
+
isStandalone: false,
|
|
515
|
+
selector: "pw-resource-top-banner-edit",
|
|
516
|
+
inputs: {
|
|
517
|
+
blogPostTag: "blogPostTag",
|
|
518
|
+
user: "user",
|
|
519
|
+
userLoggedIn: "userLoggedIn"
|
|
520
|
+
},
|
|
521
|
+
outputs: { getUpdatedTag: "getUpdatedTag" },
|
|
522
|
+
viewQueries: [{
|
|
523
|
+
propertyName: "editModal",
|
|
524
|
+
first: true,
|
|
525
|
+
predicate: ["editModal"],
|
|
526
|
+
descendants: true
|
|
527
|
+
}, {
|
|
528
|
+
propertyName: "imageCropContent",
|
|
529
|
+
first: true,
|
|
530
|
+
predicate: ["imageCropContent"],
|
|
531
|
+
descendants: true
|
|
532
|
+
}],
|
|
533
|
+
usesInheritance: true,
|
|
534
|
+
ngImport: i0,
|
|
535
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </a>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n",
|
|
536
|
+
dependencies: [
|
|
537
|
+
{
|
|
538
|
+
kind: "directive",
|
|
539
|
+
type: i1.ɵNgNoValidate,
|
|
540
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
kind: "directive",
|
|
544
|
+
type: i1.DefaultValueAccessor,
|
|
545
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
kind: "directive",
|
|
549
|
+
type: i1.NgControlStatus,
|
|
550
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
kind: "directive",
|
|
554
|
+
type: i1.NgControlStatusGroup,
|
|
555
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
kind: "directive",
|
|
559
|
+
type: i1.FormGroupDirective,
|
|
560
|
+
selector: "[formGroup]",
|
|
561
|
+
inputs: ["formGroup"],
|
|
562
|
+
outputs: ["ngSubmit"],
|
|
563
|
+
exportAs: ["ngForm"]
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
kind: "directive",
|
|
567
|
+
type: i1.FormControlName,
|
|
568
|
+
selector: "[formControlName]",
|
|
569
|
+
inputs: [
|
|
570
|
+
"formControlName",
|
|
571
|
+
"disabled",
|
|
572
|
+
"ngModel"
|
|
573
|
+
],
|
|
574
|
+
outputs: ["ngModelChange"]
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
kind: "component",
|
|
578
|
+
type: i4.ProfileImageCropperComponent,
|
|
579
|
+
selector: "pw-image-cropper",
|
|
580
|
+
inputs: ["aspectRatio", "dynamicData"],
|
|
581
|
+
outputs: [
|
|
582
|
+
"imageSelectionEvent",
|
|
583
|
+
"closeEvent",
|
|
584
|
+
"fileChangeEvent"
|
|
585
|
+
]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
kind: "component",
|
|
589
|
+
type: i2$1.InputContainerComponent,
|
|
590
|
+
selector: "pw-input-container",
|
|
591
|
+
inputs: [
|
|
592
|
+
"name",
|
|
593
|
+
"controlId",
|
|
594
|
+
"useAriaLabelledbyOnly",
|
|
595
|
+
"label",
|
|
596
|
+
"labelClass",
|
|
597
|
+
"tooltipPosition",
|
|
598
|
+
"required",
|
|
599
|
+
"errorMsg",
|
|
600
|
+
"isReadOnly",
|
|
601
|
+
"showTooltip",
|
|
602
|
+
"tooltipText",
|
|
603
|
+
"showTriangle",
|
|
604
|
+
"afterLabel",
|
|
605
|
+
"showAfterLabel",
|
|
606
|
+
"showTriangleText",
|
|
607
|
+
"isLeftTooltip"
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
kind: "directive",
|
|
612
|
+
type: i3$1.ButtonBusyDirective,
|
|
613
|
+
selector: "[buttonBusy]",
|
|
614
|
+
inputs: ["buttonBusy", "busyText"]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
kind: "directive",
|
|
618
|
+
type: i3$1.LazyImgDirective,
|
|
619
|
+
selector: "img"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
627
|
+
minVersion: "12.0.0",
|
|
628
|
+
version: "22.2.0",
|
|
629
|
+
ngImport: i0,
|
|
630
|
+
type: ResourceTopBannerEditComponent,
|
|
631
|
+
decorators: [{
|
|
632
|
+
type: Component,
|
|
633
|
+
args: [{
|
|
634
|
+
selector: "pw-resource-top-banner-edit",
|
|
635
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
636
|
+
standalone: false,
|
|
637
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-black in-page-edit-icon mb-1 ms-3\"\n (click)=\"openEditModal()\"\n (keydown.enter)=\"openEditModal()\"\n (keydown.space)=\"openEditModal()\"\n title=\"Edit Blog Tag\"></i>\n</div>\n\n<ng-template #editModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Blog Post Tag</h5>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row\">\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Description\" name=\"description\" controlId=\"resource-top-banner-description\">\n <textarea id=\"resource-top-banner-description\" name=\"description\" class=\"form-control\" rows=\"4\" formControlName=\"description\"\n aria-label=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Title\" name=\"meta_title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"meta_title\" placeholder=\"Meta Title for SEO\" id=\"input_meta_title_2\" name=\"input_meta_title_2\"\n aria-label=\"Meta Title for SEO\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container label=\"Meta Description\" name=\"meta_description\" controlId=\"resource-top-banner-meta_description\">\n <textarea id=\"resource-top-banner-meta_description\" name=\"meta_description\" class=\"form-control\" rows=\"3\" formControlName=\"meta_description\" placeholder=\"Meta Description for SEO\"\n aria-label=\"Meta Description for SEO\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 my-4\">\n <span id=\"resource-top-banner-tag-image-label\" class=\"pw-label-style\">Blog Tag Image</span>\n <div class=\"text-center d-flex flex-column align-items-center col-6\">\n <img [src]=\"image || defaultImage\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n (keydown.space)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Blog\"\n (error)=\"handleImageError($event)\"\n />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block mt-2\"\n (click)=\"openImageModal(imageCropContent)\">\n {{ image ? 'Update' : 'Add' }} Image\n </a>\n @if (image) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (keydown.enter)=\"removeImage()\"\n (keydown.space)=\"removeImage()\"\n (click)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"save()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n"
|
|
638
|
+
}]
|
|
639
|
+
}],
|
|
640
|
+
ctorParameters: () => [
|
|
641
|
+
{ type: i1.FormBuilder },
|
|
642
|
+
{ type: i2.NgbModal },
|
|
643
|
+
{ type: i3.TagService },
|
|
644
|
+
{ type: i0.ChangeDetectorRef },
|
|
645
|
+
{ type: i0.Injector }
|
|
646
|
+
],
|
|
647
|
+
propDecorators: {
|
|
648
|
+
blogPostTag: [{ type: Input }],
|
|
649
|
+
user: [{ type: Input }],
|
|
650
|
+
userLoggedIn: [{ type: Input }],
|
|
651
|
+
getUpdatedTag: [{ type: Output }],
|
|
652
|
+
editModal: [{
|
|
653
|
+
type: ViewChild,
|
|
654
|
+
args: ["editModal"]
|
|
655
|
+
}],
|
|
656
|
+
imageCropContent: [{
|
|
657
|
+
type: ViewChild,
|
|
658
|
+
args: ["imageCropContent"]
|
|
659
|
+
}]
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
var ResourceSharedModule = class ResourceSharedModule {
|
|
663
|
+
static {
|
|
664
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
665
|
+
minVersion: "12.0.0",
|
|
666
|
+
version: "22.2.0",
|
|
667
|
+
ngImport: i0,
|
|
668
|
+
type: ResourceSharedModule,
|
|
669
|
+
deps: [],
|
|
670
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
static {
|
|
674
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
675
|
+
minVersion: "14.0.0",
|
|
676
|
+
version: "22.2.0",
|
|
677
|
+
ngImport: i0,
|
|
678
|
+
type: ResourceSharedModule,
|
|
679
|
+
declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent],
|
|
680
|
+
imports: [
|
|
681
|
+
CommonModule,
|
|
682
|
+
RouterModule,
|
|
683
|
+
FormsModule,
|
|
684
|
+
ReactiveFormsModule,
|
|
685
|
+
PipesModule,
|
|
686
|
+
ResourceSharedComponentsModule,
|
|
687
|
+
CoreTranslocoModule,
|
|
688
|
+
TranslocoModule,
|
|
689
|
+
DirectivesModule,
|
|
690
|
+
InputTextModule,
|
|
691
|
+
IconFieldModule,
|
|
692
|
+
InputIconModule,
|
|
693
|
+
TextareaModule,
|
|
694
|
+
ResourceCardsModule,
|
|
695
|
+
HubSpotMeetingsSharedModule
|
|
696
|
+
],
|
|
697
|
+
exports: [
|
|
698
|
+
ResourceCompanyCardComponent,
|
|
699
|
+
ResourceTopBannerEditComponent,
|
|
700
|
+
ResourceCardsModule,
|
|
701
|
+
HubSpotMeetingsSharedModule,
|
|
702
|
+
CommonModule,
|
|
703
|
+
RouterModule,
|
|
704
|
+
FormsModule,
|
|
705
|
+
ReactiveFormsModule,
|
|
706
|
+
PipesModule,
|
|
707
|
+
ResourceSharedComponentsModule,
|
|
708
|
+
CoreTranslocoModule,
|
|
709
|
+
TranslocoModule,
|
|
710
|
+
DirectivesModule,
|
|
711
|
+
InputTextModule,
|
|
712
|
+
IconFieldModule,
|
|
713
|
+
InputIconModule,
|
|
714
|
+
TextareaModule
|
|
715
|
+
]
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
static {
|
|
719
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
720
|
+
minVersion: "12.0.0",
|
|
721
|
+
version: "22.2.0",
|
|
722
|
+
ngImport: i0,
|
|
723
|
+
type: ResourceSharedModule,
|
|
724
|
+
imports: [
|
|
725
|
+
CommonModule,
|
|
726
|
+
RouterModule,
|
|
727
|
+
FormsModule,
|
|
728
|
+
ReactiveFormsModule,
|
|
729
|
+
PipesModule,
|
|
730
|
+
ResourceSharedComponentsModule,
|
|
731
|
+
CoreTranslocoModule,
|
|
732
|
+
TranslocoModule,
|
|
733
|
+
DirectivesModule,
|
|
734
|
+
InputTextModule,
|
|
735
|
+
IconFieldModule,
|
|
736
|
+
InputIconModule,
|
|
737
|
+
TextareaModule,
|
|
738
|
+
ResourceCardsModule,
|
|
739
|
+
HubSpotMeetingsSharedModule,
|
|
740
|
+
ResourceCardsModule,
|
|
741
|
+
HubSpotMeetingsSharedModule,
|
|
742
|
+
CommonModule,
|
|
743
|
+
RouterModule,
|
|
744
|
+
FormsModule,
|
|
745
|
+
ReactiveFormsModule,
|
|
746
|
+
PipesModule,
|
|
747
|
+
ResourceSharedComponentsModule,
|
|
748
|
+
CoreTranslocoModule,
|
|
749
|
+
TranslocoModule,
|
|
750
|
+
DirectivesModule,
|
|
751
|
+
InputTextModule,
|
|
752
|
+
IconFieldModule,
|
|
753
|
+
InputIconModule,
|
|
754
|
+
TextareaModule
|
|
755
|
+
]
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
760
|
+
minVersion: "12.0.0",
|
|
761
|
+
version: "22.2.0",
|
|
762
|
+
ngImport: i0,
|
|
763
|
+
type: ResourceSharedModule,
|
|
764
|
+
decorators: [{
|
|
765
|
+
type: NgModule,
|
|
766
|
+
args: [{
|
|
767
|
+
declarations: [ResourceCompanyCardComponent, ResourceTopBannerEditComponent],
|
|
768
|
+
imports: [
|
|
769
|
+
CommonModule,
|
|
770
|
+
RouterModule,
|
|
771
|
+
FormsModule,
|
|
772
|
+
ReactiveFormsModule,
|
|
773
|
+
PipesModule,
|
|
774
|
+
ResourceSharedComponentsModule,
|
|
775
|
+
CoreTranslocoModule,
|
|
776
|
+
TranslocoModule,
|
|
777
|
+
DirectivesModule,
|
|
778
|
+
InputTextModule,
|
|
779
|
+
IconFieldModule,
|
|
780
|
+
InputIconModule,
|
|
781
|
+
TextareaModule,
|
|
782
|
+
ResourceCardsModule,
|
|
783
|
+
HubSpotMeetingsSharedModule
|
|
784
|
+
],
|
|
785
|
+
exports: [
|
|
786
|
+
ResourceCompanyCardComponent,
|
|
787
|
+
ResourceTopBannerEditComponent,
|
|
788
|
+
ResourceCardsModule,
|
|
789
|
+
HubSpotMeetingsSharedModule,
|
|
790
|
+
CommonModule,
|
|
791
|
+
RouterModule,
|
|
792
|
+
FormsModule,
|
|
793
|
+
ReactiveFormsModule,
|
|
794
|
+
PipesModule,
|
|
795
|
+
ResourceSharedComponentsModule,
|
|
796
|
+
CoreTranslocoModule,
|
|
797
|
+
TranslocoModule,
|
|
798
|
+
DirectivesModule,
|
|
799
|
+
InputTextModule,
|
|
800
|
+
IconFieldModule,
|
|
801
|
+
InputIconModule,
|
|
802
|
+
TextareaModule
|
|
803
|
+
],
|
|
804
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
805
|
+
}]
|
|
806
|
+
}]
|
|
807
|
+
});
|
|
808
|
+
var resource_edit_card_component_exports = /* @__PURE__ */ __exportAll({ ResourceEditCardComponent: () => ResourceEditCardComponent });
|
|
809
|
+
var ResourceEditCardComponent = class ResourceEditCardComponent extends AppBaseComponent {
|
|
810
|
+
constructor(fb, modalService, resourceService, authService, tagService, cdr, injector) {
|
|
811
|
+
super(injector);
|
|
812
|
+
this.fb = fb;
|
|
813
|
+
this.modalService = modalService;
|
|
814
|
+
this.resourceService = resourceService;
|
|
815
|
+
this.authService = authService;
|
|
816
|
+
this.tagService = tagService;
|
|
817
|
+
this.cdr = cdr;
|
|
818
|
+
this.updated = new EventEmitter();
|
|
819
|
+
this.image = "";
|
|
820
|
+
this.rectangularImage = "";
|
|
821
|
+
this.file = null;
|
|
822
|
+
this.rectangularFile = null;
|
|
823
|
+
this.selectedTags = [];
|
|
824
|
+
this.allTags = [];
|
|
825
|
+
this.tagsSuggestion = [];
|
|
826
|
+
this.buttonBusy = false;
|
|
827
|
+
this.editForm = this.fb.group({
|
|
828
|
+
title: [""],
|
|
829
|
+
external_url: [""],
|
|
830
|
+
cta_text: [""],
|
|
831
|
+
when: [""],
|
|
832
|
+
showcase: [false],
|
|
833
|
+
published_at: [false],
|
|
834
|
+
accepted_at: [false],
|
|
835
|
+
body: [""]
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
ngOnInit() {
|
|
839
|
+
this.authService.getToken$().subscribe((res) => {
|
|
840
|
+
this.userLoggedIn = !!res;
|
|
841
|
+
if (this.userLoggedIn) this.localStorage.getItem$("product").subscribe((res) => {
|
|
842
|
+
const data = res ? JSON.parse(res) : null;
|
|
843
|
+
this.subscriptionId = data?.subscriptionId;
|
|
844
|
+
this.cdr.markForCheck();
|
|
845
|
+
});
|
|
846
|
+
this.cdr.markForCheck();
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
navigateToResourceEdit() {
|
|
850
|
+
const basePath = `/admin/resources/${this.resourceData?.slug}`;
|
|
851
|
+
const fullUrl = `${location.origin}${basePath}`;
|
|
852
|
+
window.open(fullUrl, "_blank");
|
|
853
|
+
}
|
|
854
|
+
openModal(modalTemplate) {
|
|
855
|
+
if (this.resourceData) {
|
|
856
|
+
const when = this.resourceData.when ? new Date(this.resourceData.when) : null;
|
|
857
|
+
this.editForm.setValue({
|
|
858
|
+
title: this.resourceData.title ?? "",
|
|
859
|
+
external_url: this.resourceData.external_url ?? "",
|
|
860
|
+
cta_text: this.resourceData.cta_text ?? "",
|
|
861
|
+
when: when ?? "",
|
|
862
|
+
showcase: !!this.resourceData.showcase,
|
|
863
|
+
published_at: !!this.resourceData.published_at,
|
|
864
|
+
accepted_at: !!this.resourceData.accepted_at,
|
|
865
|
+
body: this.resourceData.body
|
|
866
|
+
});
|
|
867
|
+
this.image = this.resourceData.picture?.url ?? "";
|
|
868
|
+
this.selectedTags = this.resourceData?.tags?.length ? [...this.resourceData.tags] : [];
|
|
869
|
+
this.rectangularImage = this.resourceData.rectangular_picture?.url ?? "";
|
|
870
|
+
}
|
|
871
|
+
this.modalService.open(modalTemplate, {
|
|
872
|
+
centered: true,
|
|
873
|
+
size: "lg"
|
|
874
|
+
});
|
|
875
|
+
this.getPostTags();
|
|
876
|
+
}
|
|
877
|
+
search(event) {
|
|
878
|
+
let values = [];
|
|
879
|
+
if (event.query) values = this.allTags.filter((x) => x.name.toLowerCase().includes(event.query.toLowerCase()));
|
|
880
|
+
else this.allTags.forEach((element) => {
|
|
881
|
+
values.push(element);
|
|
882
|
+
});
|
|
883
|
+
this.tagsSuggestion = values;
|
|
884
|
+
}
|
|
885
|
+
getPostTags() {
|
|
886
|
+
this.tagService.getTagsByType("post_categories", {}, this.subscriptionId).subscribe((response) => {
|
|
887
|
+
this.allTags = response.tags;
|
|
888
|
+
this.cdr.markForCheck();
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
deleteRectangularImage() {
|
|
892
|
+
this.rectangularImage = null;
|
|
893
|
+
this.rectangularFile = null;
|
|
894
|
+
}
|
|
895
|
+
openImageModal(modalTemplate) {
|
|
896
|
+
this.imageModalRef = this.modalService.open(modalTemplate, {
|
|
897
|
+
centered: true,
|
|
898
|
+
size: "md"
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
onImageSelected(base64) {
|
|
902
|
+
this.image = base64;
|
|
903
|
+
this.file = HelperService.convertBase64ToFile(base64);
|
|
904
|
+
this.imageModalRef?.close();
|
|
905
|
+
}
|
|
906
|
+
onRectangularImageSelection(base64) {
|
|
907
|
+
this.rectangularImage = base64;
|
|
908
|
+
this.rectangularFile = HelperService.convertBase64ToFile(base64);
|
|
909
|
+
this.imageModalRef?.close();
|
|
910
|
+
}
|
|
911
|
+
removeImage() {
|
|
912
|
+
this.image = null;
|
|
913
|
+
this.file = null;
|
|
914
|
+
}
|
|
915
|
+
saveResource() {
|
|
916
|
+
this.buttonBusy = true;
|
|
917
|
+
this.saveTags(this.id);
|
|
918
|
+
const payload = {
|
|
919
|
+
...this.editForm.value,
|
|
920
|
+
subscription_id: this.subscriptionId
|
|
921
|
+
};
|
|
922
|
+
this.handlePicture(payload);
|
|
923
|
+
this.handlePublishedAt(payload);
|
|
924
|
+
this.handleAcceptedAt(payload);
|
|
925
|
+
this.handleAcceptedAt(payload);
|
|
926
|
+
this.handleOptionalFields(payload);
|
|
927
|
+
this.handleRectangularPicture(payload);
|
|
928
|
+
this.handleRemovals(payload);
|
|
929
|
+
this.resourceService.updatePost(payload, this.id).subscribe({
|
|
930
|
+
next: () => {
|
|
931
|
+
setTimeout(() => {
|
|
932
|
+
this.buttonBusy = false;
|
|
933
|
+
this.cdr.markForCheck();
|
|
934
|
+
setTimeout(() => {
|
|
935
|
+
this.toast.success("Blog Post Updated");
|
|
936
|
+
this.updated.emit();
|
|
937
|
+
this.modalService.dismissAll();
|
|
938
|
+
this.cdr.markForCheck();
|
|
939
|
+
}, 0);
|
|
940
|
+
}, 0);
|
|
941
|
+
},
|
|
942
|
+
error: () => {
|
|
943
|
+
setTimeout(() => {
|
|
944
|
+
this.buttonBusy = false;
|
|
945
|
+
this.cdr.markForCheck();
|
|
946
|
+
}, 0);
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
saveTags(id) {
|
|
951
|
+
if (this.selectedTags.length) {
|
|
952
|
+
const data = {
|
|
953
|
+
entity_tags: this.selectedTags.map((tag) => ({ tag_id: tag.id })),
|
|
954
|
+
slug: id,
|
|
955
|
+
tag_entity: "Post"
|
|
956
|
+
};
|
|
957
|
+
this.tagService.addTags(data, this.subscriptionId).subscribe(() => {
|
|
958
|
+
this.cdr.markForCheck();
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
handlePicture(data) {
|
|
963
|
+
if (this.file) data.picture = this.file;
|
|
964
|
+
else delete data.picture;
|
|
965
|
+
}
|
|
966
|
+
handlePublishedAt(data) {
|
|
967
|
+
const control = this.editForm.get("published_at");
|
|
968
|
+
if (control?.dirty) data.published_at = control.value ? moment().format("DD-MMM-YYYY") : "";
|
|
969
|
+
else delete data.published_at;
|
|
970
|
+
}
|
|
971
|
+
handleAcceptedAt(data) {
|
|
972
|
+
const control = this.editForm.get("accepted_at");
|
|
973
|
+
if (control?.dirty) data.accepted_at = control.value ? moment().format("DD-MMM-YYYY") : "";
|
|
974
|
+
else delete data.accepted_at;
|
|
975
|
+
}
|
|
976
|
+
handleOptionalFields(data) {
|
|
977
|
+
if (!this.editForm.get("when")?.value) data.when = "";
|
|
978
|
+
if (!this.editForm.get("showcase")?.value) data.showcase = "";
|
|
979
|
+
}
|
|
980
|
+
handleRectangularPicture(data) {
|
|
981
|
+
if (this.rectangularFile) data.rectangular_picture = this.rectangularFile;
|
|
982
|
+
else delete data.rectangular_picture;
|
|
983
|
+
}
|
|
984
|
+
handleRemovals(data) {
|
|
985
|
+
if (!this.file && !this.image) data.remove_picture = true;
|
|
986
|
+
if (!this.rectangularFile && !this.rectangularImage) data.remove_rectangular_picture = true;
|
|
987
|
+
}
|
|
988
|
+
openRectModal(content) {
|
|
989
|
+
this.imageModalRef = this.modalService.open(content, {
|
|
990
|
+
centered: true,
|
|
991
|
+
windowClass: "modal-holder"
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
handleImageError(event, fallbackPath) {
|
|
995
|
+
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
996
|
+
}
|
|
997
|
+
static {
|
|
998
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
999
|
+
minVersion: "12.0.0",
|
|
1000
|
+
version: "22.2.0",
|
|
1001
|
+
ngImport: i0,
|
|
1002
|
+
type: ResourceEditCardComponent,
|
|
1003
|
+
deps: [
|
|
1004
|
+
{ token: i1.FormBuilder },
|
|
1005
|
+
{ token: i2.NgbModal },
|
|
1006
|
+
{ token: ResourceService },
|
|
1007
|
+
{ token: i3.AuthService },
|
|
1008
|
+
{ token: i3.TagService },
|
|
1009
|
+
{ token: i0.ChangeDetectorRef },
|
|
1010
|
+
{ token: i0.Injector }
|
|
1011
|
+
],
|
|
1012
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
static {
|
|
1016
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1017
|
+
minVersion: "17.0.0",
|
|
1018
|
+
version: "22.2.0",
|
|
1019
|
+
type: ResourceEditCardComponent,
|
|
1020
|
+
isStandalone: false,
|
|
1021
|
+
selector: "pw-resource-edit-card",
|
|
1022
|
+
inputs: {
|
|
1023
|
+
id: "id",
|
|
1024
|
+
resourceData: "resourceData"
|
|
1025
|
+
},
|
|
1026
|
+
outputs: { updated: "updated" },
|
|
1027
|
+
usesInheritance: true,
|
|
1028
|
+
ngImport: i0,
|
|
1029
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"\n aria-label=\"Cta Text\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"\n [attr.aria-label]=\"'Resource.Posts.Body' | transloco\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-auto-complete appendTo=\"body\" [(ngModel)]=\"selectedTags\"\n class=\"body-bg w-100\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-auto-complete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image && !image.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n",
|
|
1030
|
+
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"],
|
|
1031
|
+
dependencies: [
|
|
1032
|
+
{
|
|
1033
|
+
kind: "directive",
|
|
1034
|
+
type: i1$1.NgClass,
|
|
1035
|
+
selector: "[ngClass]",
|
|
1036
|
+
inputs: ["class", "ngClass"]
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
kind: "directive",
|
|
1040
|
+
type: i1.ɵNgNoValidate,
|
|
1041
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
kind: "directive",
|
|
1045
|
+
type: i1.DefaultValueAccessor,
|
|
1046
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
kind: "directive",
|
|
1050
|
+
type: i1.NgControlStatus,
|
|
1051
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
kind: "directive",
|
|
1055
|
+
type: i1.NgControlStatusGroup,
|
|
1056
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
kind: "directive",
|
|
1060
|
+
type: i1.MaxLengthValidator,
|
|
1061
|
+
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
1062
|
+
inputs: ["maxlength"]
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
kind: "directive",
|
|
1066
|
+
type: i1.NgModel,
|
|
1067
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
1068
|
+
inputs: [
|
|
1069
|
+
"name",
|
|
1070
|
+
"disabled",
|
|
1071
|
+
"ngModel",
|
|
1072
|
+
"ngModelOptions"
|
|
1073
|
+
],
|
|
1074
|
+
outputs: ["ngModelChange"],
|
|
1075
|
+
exportAs: ["ngModel"]
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
kind: "directive",
|
|
1079
|
+
type: i1.FormGroupDirective,
|
|
1080
|
+
selector: "[formGroup]",
|
|
1081
|
+
inputs: ["formGroup"],
|
|
1082
|
+
outputs: ["ngSubmit"],
|
|
1083
|
+
exportAs: ["ngForm"]
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
kind: "directive",
|
|
1087
|
+
type: i1.FormControlName,
|
|
1088
|
+
selector: "[formControlName]",
|
|
1089
|
+
inputs: [
|
|
1090
|
+
"formControlName",
|
|
1091
|
+
"disabled",
|
|
1092
|
+
"ngModel"
|
|
1093
|
+
],
|
|
1094
|
+
outputs: ["ngModelChange"]
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
kind: "component",
|
|
1098
|
+
type: i6.DatePicker,
|
|
1099
|
+
selector: "p-datepicker, p-date-picker",
|
|
1100
|
+
inputs: [
|
|
1101
|
+
"iconDisplay",
|
|
1102
|
+
"inputStyle",
|
|
1103
|
+
"inputId",
|
|
1104
|
+
"inputStyleClass",
|
|
1105
|
+
"placeholder",
|
|
1106
|
+
"ariaLabelledBy",
|
|
1107
|
+
"ariaLabel",
|
|
1108
|
+
"iconAriaLabel",
|
|
1109
|
+
"dateFormat",
|
|
1110
|
+
"multipleSeparator",
|
|
1111
|
+
"rangeSeparator",
|
|
1112
|
+
"inline",
|
|
1113
|
+
"showOtherMonths",
|
|
1114
|
+
"selectOtherMonths",
|
|
1115
|
+
"showIcon",
|
|
1116
|
+
"icon",
|
|
1117
|
+
"readonlyInput",
|
|
1118
|
+
"shortYearCutoff",
|
|
1119
|
+
"hourFormat",
|
|
1120
|
+
"timeOnly",
|
|
1121
|
+
"stepHour",
|
|
1122
|
+
"stepMinute",
|
|
1123
|
+
"stepSecond",
|
|
1124
|
+
"showSeconds",
|
|
1125
|
+
"showOnFocus",
|
|
1126
|
+
"showWeek",
|
|
1127
|
+
"startWeekFromFirstDayOfYear",
|
|
1128
|
+
"showClear",
|
|
1129
|
+
"dataType",
|
|
1130
|
+
"selectionMode",
|
|
1131
|
+
"maxDateCount",
|
|
1132
|
+
"showButtonBar",
|
|
1133
|
+
"todayButtonStyleClass",
|
|
1134
|
+
"clearButtonStyleClass",
|
|
1135
|
+
"autofocus",
|
|
1136
|
+
"autoZIndex",
|
|
1137
|
+
"baseZIndex",
|
|
1138
|
+
"panelStyleClass",
|
|
1139
|
+
"panelStyle",
|
|
1140
|
+
"keepInvalid",
|
|
1141
|
+
"hideOnDateTimeSelect",
|
|
1142
|
+
"touchUI",
|
|
1143
|
+
"timeSeparator",
|
|
1144
|
+
"focusTrap",
|
|
1145
|
+
"tabindex",
|
|
1146
|
+
"minDate",
|
|
1147
|
+
"maxDate",
|
|
1148
|
+
"disabledDates",
|
|
1149
|
+
"disabledDays",
|
|
1150
|
+
"showTime",
|
|
1151
|
+
"responsiveOptions",
|
|
1152
|
+
"numberOfMonths",
|
|
1153
|
+
"firstDayOfWeek",
|
|
1154
|
+
"view",
|
|
1155
|
+
"defaultDate",
|
|
1156
|
+
"appendTo",
|
|
1157
|
+
"motionOptions"
|
|
1158
|
+
],
|
|
1159
|
+
outputs: [
|
|
1160
|
+
"onFocus",
|
|
1161
|
+
"onBlur",
|
|
1162
|
+
"onClose",
|
|
1163
|
+
"onSelect",
|
|
1164
|
+
"onClear",
|
|
1165
|
+
"onInput",
|
|
1166
|
+
"onTodayClick",
|
|
1167
|
+
"onClearClick",
|
|
1168
|
+
"onMonthChange",
|
|
1169
|
+
"onYearChange",
|
|
1170
|
+
"onClickOutside",
|
|
1171
|
+
"onShow"
|
|
1172
|
+
]
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
kind: "component",
|
|
1176
|
+
type: i7.AutoComplete,
|
|
1177
|
+
selector: "p-autocomplete, p-auto-complete",
|
|
1178
|
+
inputs: [
|
|
1179
|
+
"minQueryLength",
|
|
1180
|
+
"delay",
|
|
1181
|
+
"panelStyle",
|
|
1182
|
+
"panelStyleClass",
|
|
1183
|
+
"inputStyle",
|
|
1184
|
+
"inputId",
|
|
1185
|
+
"inputStyleClass",
|
|
1186
|
+
"placeholder",
|
|
1187
|
+
"readonly",
|
|
1188
|
+
"scrollHeight",
|
|
1189
|
+
"lazy",
|
|
1190
|
+
"virtualScroll",
|
|
1191
|
+
"virtualScrollItemSize",
|
|
1192
|
+
"virtualScrollOptions",
|
|
1193
|
+
"autoHighlight",
|
|
1194
|
+
"forceSelection",
|
|
1195
|
+
"type",
|
|
1196
|
+
"autoZIndex",
|
|
1197
|
+
"baseZIndex",
|
|
1198
|
+
"ariaLabel",
|
|
1199
|
+
"dropdownAriaLabel",
|
|
1200
|
+
"ariaLabelledBy",
|
|
1201
|
+
"dropdownIcon",
|
|
1202
|
+
"unique",
|
|
1203
|
+
"group",
|
|
1204
|
+
"completeOnFocus",
|
|
1205
|
+
"showClear",
|
|
1206
|
+
"dropdown",
|
|
1207
|
+
"showEmptyMessage",
|
|
1208
|
+
"dropdownMode",
|
|
1209
|
+
"multiple",
|
|
1210
|
+
"addOnTab",
|
|
1211
|
+
"tabindex",
|
|
1212
|
+
"dataKey",
|
|
1213
|
+
"emptyMessage",
|
|
1214
|
+
"autofocus",
|
|
1215
|
+
"autocomplete",
|
|
1216
|
+
"optionGroupChildren",
|
|
1217
|
+
"optionGroupLabel",
|
|
1218
|
+
"overlayOptions",
|
|
1219
|
+
"suggestions",
|
|
1220
|
+
"optionLabel",
|
|
1221
|
+
"optionValue",
|
|
1222
|
+
"id",
|
|
1223
|
+
"searchMessage",
|
|
1224
|
+
"emptySelectionMessage",
|
|
1225
|
+
"selectionMessage",
|
|
1226
|
+
"autoOptionFocus",
|
|
1227
|
+
"selectOnFocus",
|
|
1228
|
+
"searchLocale",
|
|
1229
|
+
"optionDisabled",
|
|
1230
|
+
"focusOnHover",
|
|
1231
|
+
"typeahead",
|
|
1232
|
+
"addOnBlur",
|
|
1233
|
+
"separator",
|
|
1234
|
+
"appendTo",
|
|
1235
|
+
"motionOptions"
|
|
1236
|
+
],
|
|
1237
|
+
outputs: [
|
|
1238
|
+
"completeMethod",
|
|
1239
|
+
"onSelect",
|
|
1240
|
+
"onUnselect",
|
|
1241
|
+
"onAdd",
|
|
1242
|
+
"onFocus",
|
|
1243
|
+
"onBlur",
|
|
1244
|
+
"onDropdownClick",
|
|
1245
|
+
"onClear",
|
|
1246
|
+
"onInputKeydown",
|
|
1247
|
+
"onKeyUp",
|
|
1248
|
+
"onShow",
|
|
1249
|
+
"onHide",
|
|
1250
|
+
"onLazyLoad"
|
|
1251
|
+
]
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
kind: "component",
|
|
1255
|
+
type: i4.ProfileImageCropperComponent,
|
|
1256
|
+
selector: "pw-image-cropper",
|
|
1257
|
+
inputs: ["aspectRatio", "dynamicData"],
|
|
1258
|
+
outputs: [
|
|
1259
|
+
"imageSelectionEvent",
|
|
1260
|
+
"closeEvent",
|
|
1261
|
+
"fileChangeEvent"
|
|
1262
|
+
]
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
kind: "component",
|
|
1266
|
+
type: i2$1.InputContainerComponent,
|
|
1267
|
+
selector: "pw-input-container",
|
|
1268
|
+
inputs: [
|
|
1269
|
+
"name",
|
|
1270
|
+
"controlId",
|
|
1271
|
+
"useAriaLabelledbyOnly",
|
|
1272
|
+
"label",
|
|
1273
|
+
"labelClass",
|
|
1274
|
+
"tooltipPosition",
|
|
1275
|
+
"required",
|
|
1276
|
+
"errorMsg",
|
|
1277
|
+
"isReadOnly",
|
|
1278
|
+
"showTooltip",
|
|
1279
|
+
"tooltipText",
|
|
1280
|
+
"showTriangle",
|
|
1281
|
+
"afterLabel",
|
|
1282
|
+
"showAfterLabel",
|
|
1283
|
+
"showTriangleText",
|
|
1284
|
+
"isLeftTooltip"
|
|
1285
|
+
]
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
kind: "directive",
|
|
1289
|
+
type: i3$1.ButtonBusyDirective,
|
|
1290
|
+
selector: "[buttonBusy]",
|
|
1291
|
+
inputs: ["buttonBusy", "busyText"]
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
kind: "directive",
|
|
1295
|
+
type: i3$1.LazyImgDirective,
|
|
1296
|
+
selector: "img"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
kind: "component",
|
|
1300
|
+
type: i11.QuillEditorComponent,
|
|
1301
|
+
selector: "quill-editor"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
kind: "component",
|
|
1305
|
+
type: i12.UiSwitchComponent,
|
|
1306
|
+
selector: "ui-switch",
|
|
1307
|
+
inputs: [
|
|
1308
|
+
"size",
|
|
1309
|
+
"color",
|
|
1310
|
+
"switchOffColor",
|
|
1311
|
+
"switchColor",
|
|
1312
|
+
"defaultBgColor",
|
|
1313
|
+
"defaultBoColor",
|
|
1314
|
+
"checkedLabel",
|
|
1315
|
+
"uncheckedLabel",
|
|
1316
|
+
"checkedTextColor",
|
|
1317
|
+
"uncheckedTextColor",
|
|
1318
|
+
"beforeChange",
|
|
1319
|
+
"ariaLabel",
|
|
1320
|
+
"checked",
|
|
1321
|
+
"disabled",
|
|
1322
|
+
"reverse",
|
|
1323
|
+
"loading"
|
|
1324
|
+
],
|
|
1325
|
+
outputs: [
|
|
1326
|
+
"change",
|
|
1327
|
+
"changeEvent",
|
|
1328
|
+
"valueChange"
|
|
1329
|
+
]
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
kind: "pipe",
|
|
1333
|
+
type: i6$1.TranslocoPipe,
|
|
1334
|
+
name: "transloco"
|
|
1335
|
+
}
|
|
1336
|
+
],
|
|
1337
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1342
|
+
minVersion: "12.0.0",
|
|
1343
|
+
version: "22.2.0",
|
|
1344
|
+
ngImport: i0,
|
|
1345
|
+
type: ResourceEditCardComponent,
|
|
1346
|
+
decorators: [{
|
|
1347
|
+
type: Component,
|
|
1348
|
+
args: [{
|
|
1349
|
+
selector: "pw-resource-edit-card",
|
|
1350
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1351
|
+
standalone: false,
|
|
1352
|
+
template: "<div class=\"edit-card\">\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center mb-2\"\n (click)=\"openModal(editResourceModal)\"\n (keydown.enter)=\"openModal(editResourceModal)\"\n (keydown.space)=\"openModal(editResourceModal)\"\n title=\"Edit Resource\"></i>\n</div>\n\n<ng-template #editResourceModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Edit Resource</h5>\n <i class=\"fa fa-edit cursor-pointer text-dark in-page-edit-icon d-flex justify-content-center ms-3\"\n (click)=\"navigateToResourceEdit()\"\n (keydown.enter)=\"navigateToResourceEdit()\"\n (keydown.space)=\"navigateToResourceEdit()\"\n title=\"Go to the main edit page\"></i>\n <button type=\"button\" class=\"btn-close\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n\n <div class=\"modal-body\">\n <form [formGroup]=\"editForm\">\n <div class=\"row\">\n\n\n <div class=\"col-12\">\n <pw-input-container label=\"Title\" name=\"title\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" id=\"input_title_1\" name=\"input_title_1\"\n aria-label=\"Title\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <pw-input-container label=\"CTA Text\" name=\"cta_text\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"cta_text\" id=\"input_cta_text_2\" name=\"input_cta_text_2\"\n aria-label=\"Cta Text\"/>\n </pw-input-container>\n\n <pw-input-container label=\"External URL\" name=\"external_url\" class=\"col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\">\n <input type=\"text\" class=\"form-control\" formControlName=\"external_url\" id=\"input_external_url_3\" name=\"input_external_url_3\"\n [attr.aria-label]=\"'Resource.Posts.Body' | transloco\"/>\n </pw-input-container>\n </div>\n\n <div class=\"col-12\">\n <pw-input-container\n [label]=\"'Resource.Posts.Body' | transloco\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor\n [styles]=\"{ height: '300px' }\"\n class=\"quillEditor\"\n [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-3 col-sm-6\">\n <pw-input-container\n [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <p-datepicker inputId=\"resource-edit-card-when\" formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{ 'is-invalid': submitted && f['when'].errors }\">\n </p-datepicker>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container\n [label]=\"'Resource.Posts.Tags' | transloco\"\n class=\"ui-fluid skills-modal tags\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <p-auto-complete appendTo=\"body\" [(ngModel)]=\"selectedTags\"\n class=\"body-bg w-100\"\n [suggestions]=\"tagsSuggestion\"\n dataKey=\"id\"\n optionLabel=\"name\"\n (completeMethod)=\"search($event)\"\n [minLength]=\"1\"\n [maxlength]=\"10\"\n [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\"\n placeholder=\"Tags\"\n [multiple]=\"true\">\n </p-auto-complete>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 row\">\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'SHOWCASE'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Mark as showcase post'\"\n name=\"showcase\">\n <ui-switch formControlName=\"showcase\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'PUBLISHED'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Set to publish the post'\"\n name=\"published_at\">\n <ui-switch formControlName=\"published_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-md-4 col-sm-6\">\n <pw-input-container\n [label]=\"'ACCEPTED BY ADMIN'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Indicates approval by admin'\"\n name=\"accepted_at\">\n <ui-switch formControlName=\"accepted_at\" class=\"d-block\"></ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-cover-picture-label\" class=\"pw-label-style\">{{ 'Resource.Posts.CoverPicture' | transloco }}</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image && !image.includes('default-photo.jpg')) ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openImageModal(imageCropContent)\"\n (keydown.enter)=\"openImageModal(imageCropContent)\"\n class=\"image w-100\"\n alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openImageModal(imageCropContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (image && !image.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"removeImage()\"\n (keydown.enter)=\"removeImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4 col-sm-4 my-4 ms-3\">\n <div class=\"text-center mb-4\">\n <span id=\"resource-edit-rectangular-picture-label\" class=\"pw-label-style\">Rectangular Picture</span>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"(rectangularImage && !rectangularImage.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (click)=\"openRectModal(rectContent)\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n class=\"image w-100\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n @if (rectangularImage && !rectangularImage.includes('default-photo.jpg')) {\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2 cursor-pointer\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"></i>\n }\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </form>\n </div>\n\n <div class=\"modal-footer\">\n <button class=\"btn btn-secondary\" (click)=\"modal.dismiss()\">Cancel</button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\" (click)=\"saveResource()\">Save</button>\n </div>\n</ng-template>\n\n<ng-template #imageCropContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"modal.close()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n",
|
|
1353
|
+
styles: ["::ng-deep .modal-content{margin-top:5rem!important}\n"]
|
|
1354
|
+
}]
|
|
1355
|
+
}],
|
|
1356
|
+
ctorParameters: () => [
|
|
1357
|
+
{ type: i1.FormBuilder },
|
|
1358
|
+
{ type: i2.NgbModal },
|
|
1359
|
+
{ type: ResourceService },
|
|
1360
|
+
{ type: i3.AuthService },
|
|
1361
|
+
{ type: i3.TagService },
|
|
1362
|
+
{ type: i0.ChangeDetectorRef },
|
|
1363
|
+
{ type: i0.Injector }
|
|
1364
|
+
],
|
|
1365
|
+
propDecorators: {
|
|
1366
|
+
id: [{ type: Input }],
|
|
1367
|
+
resourceData: [{ type: Input }],
|
|
1368
|
+
updated: [{ type: Output }]
|
|
1369
|
+
}
|
|
1370
|
+
});
|
|
1371
|
+
var ResourceEditModule = class ResourceEditModule {
|
|
1372
|
+
static {
|
|
1373
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1374
|
+
minVersion: "12.0.0",
|
|
1375
|
+
version: "22.2.0",
|
|
1376
|
+
ngImport: i0,
|
|
1377
|
+
type: ResourceEditModule,
|
|
1378
|
+
deps: [],
|
|
1379
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1382
|
+
static {
|
|
1383
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1384
|
+
minVersion: "14.0.0",
|
|
1385
|
+
version: "22.2.0",
|
|
1386
|
+
ngImport: i0,
|
|
1387
|
+
type: ResourceEditModule,
|
|
1388
|
+
declarations: [ResourceEditCardComponent],
|
|
1389
|
+
imports: [
|
|
1390
|
+
CommonModule,
|
|
1391
|
+
FormsModule,
|
|
1392
|
+
ReactiveFormsModule,
|
|
1393
|
+
DatePickerModule,
|
|
1394
|
+
AutoCompleteModule,
|
|
1395
|
+
ResourceSharedComponentsModule,
|
|
1396
|
+
CoreTranslocoModule,
|
|
1397
|
+
TranslocoModule,
|
|
1398
|
+
DirectivesModule,
|
|
1399
|
+
i11.QuillModule,
|
|
1400
|
+
UiSwitchModule
|
|
1401
|
+
],
|
|
1402
|
+
exports: [ResourceEditCardComponent]
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
static {
|
|
1406
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
1407
|
+
minVersion: "12.0.0",
|
|
1408
|
+
version: "22.2.0",
|
|
1409
|
+
ngImport: i0,
|
|
1410
|
+
type: ResourceEditModule,
|
|
1411
|
+
imports: [
|
|
1412
|
+
CommonModule,
|
|
1413
|
+
FormsModule,
|
|
1414
|
+
ReactiveFormsModule,
|
|
1415
|
+
DatePickerModule,
|
|
1416
|
+
AutoCompleteModule,
|
|
1417
|
+
ResourceSharedComponentsModule,
|
|
1418
|
+
CoreTranslocoModule,
|
|
1419
|
+
TranslocoModule,
|
|
1420
|
+
DirectivesModule,
|
|
1421
|
+
QuillModule.forRoot(),
|
|
1422
|
+
UiSwitchModule
|
|
1423
|
+
]
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1428
|
+
minVersion: "12.0.0",
|
|
1429
|
+
version: "22.2.0",
|
|
1430
|
+
ngImport: i0,
|
|
1431
|
+
type: ResourceEditModule,
|
|
1432
|
+
decorators: [{
|
|
1433
|
+
type: NgModule,
|
|
1434
|
+
args: [{
|
|
1435
|
+
declarations: [ResourceEditCardComponent],
|
|
1436
|
+
imports: [
|
|
1437
|
+
CommonModule,
|
|
1438
|
+
FormsModule,
|
|
1439
|
+
ReactiveFormsModule,
|
|
1440
|
+
DatePickerModule,
|
|
1441
|
+
AutoCompleteModule,
|
|
1442
|
+
ResourceSharedComponentsModule,
|
|
1443
|
+
CoreTranslocoModule,
|
|
1444
|
+
TranslocoModule,
|
|
1445
|
+
DirectivesModule,
|
|
1446
|
+
QuillModule.forRoot(),
|
|
1447
|
+
UiSwitchModule
|
|
1448
|
+
],
|
|
1449
|
+
exports: [ResourceEditCardComponent],
|
|
1450
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
1451
|
+
}]
|
|
1452
|
+
}]
|
|
1453
|
+
});
|
|
1454
|
+
var TestimonialCardListComponent = class TestimonialCardListComponent {
|
|
1455
|
+
constructor() {
|
|
1456
|
+
this.editPost = new EventEmitter();
|
|
1457
|
+
this.posts = [];
|
|
1458
|
+
this.postHeader = "";
|
|
1459
|
+
this.canEdit = false;
|
|
1460
|
+
}
|
|
1461
|
+
ngOnChanges(changes) {
|
|
1462
|
+
if (changes.posts && this.posts?.length) setTimeout(() => this.initSwiper(), 0);
|
|
1463
|
+
}
|
|
1464
|
+
async initSwiper() {
|
|
1465
|
+
const { default: Swiper } = await import("swiper");
|
|
1466
|
+
const { Navigation, Pagination } = await import("swiper/modules");
|
|
1467
|
+
this.swiper = new Swiper(".swiper-container", {
|
|
1468
|
+
modules: [Navigation, Pagination],
|
|
1469
|
+
slidesPerView: 1,
|
|
1470
|
+
spaceBetween: 24,
|
|
1471
|
+
centeredSlides: true,
|
|
1472
|
+
touchRatio: 1,
|
|
1473
|
+
touchAngle: 45,
|
|
1474
|
+
grabCursor: true,
|
|
1475
|
+
navigation: {
|
|
1476
|
+
nextEl: ".swiper-button-next",
|
|
1477
|
+
prevEl: ".swiper-button-prev"
|
|
1478
|
+
},
|
|
1479
|
+
pagination: {
|
|
1480
|
+
el: ".swiper-pagination",
|
|
1481
|
+
clickable: true
|
|
1482
|
+
},
|
|
1483
|
+
breakpoints: {
|
|
1484
|
+
425: {
|
|
1485
|
+
slidesPerView: 1.05,
|
|
1486
|
+
centeredSlides: true
|
|
1487
|
+
},
|
|
1488
|
+
470: {
|
|
1489
|
+
slidesPerView: 1.25,
|
|
1490
|
+
centeredSlides: true
|
|
1491
|
+
},
|
|
1492
|
+
564: {
|
|
1493
|
+
slidesPerView: 1.5,
|
|
1494
|
+
centeredSlides: true
|
|
1495
|
+
},
|
|
1496
|
+
640: {
|
|
1497
|
+
slidesPerView: 1.5,
|
|
1498
|
+
centeredSlides: true
|
|
1499
|
+
},
|
|
1500
|
+
768: {
|
|
1501
|
+
slidesPerView: 1.5,
|
|
1502
|
+
centeredSlides: true
|
|
1503
|
+
},
|
|
1504
|
+
1024: {
|
|
1505
|
+
slidesPerView: 2,
|
|
1506
|
+
centeredSlides: false
|
|
1507
|
+
},
|
|
1508
|
+
1200: {
|
|
1509
|
+
slidesPerView: 3,
|
|
1510
|
+
centeredSlides: false
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
static {
|
|
1516
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1517
|
+
minVersion: "12.0.0",
|
|
1518
|
+
version: "22.2.0",
|
|
1519
|
+
ngImport: i0,
|
|
1520
|
+
type: TestimonialCardListComponent,
|
|
1521
|
+
deps: [],
|
|
1522
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
static {
|
|
1526
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1527
|
+
minVersion: "17.0.0",
|
|
1528
|
+
version: "22.2.0",
|
|
1529
|
+
type: TestimonialCardListComponent,
|
|
1530
|
+
isStandalone: false,
|
|
1531
|
+
selector: "pw-testimonial-card",
|
|
1532
|
+
inputs: {
|
|
1533
|
+
posts: "posts",
|
|
1534
|
+
postHeader: "postHeader",
|
|
1535
|
+
canEdit: "canEdit"
|
|
1536
|
+
},
|
|
1537
|
+
outputs: { editPost: "editPost" },
|
|
1538
|
+
usesOnChanges: true,
|
|
1539
|
+
ngImport: i0,
|
|
1540
|
+
template: "<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>",
|
|
1541
|
+
styles: [".resource-section{box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=767px){.container{padding:0 1rem!important}}.ql-res{resize:none!important;border-width:0}.swiper-container{padding:20px;position:relative;overflow:hidden}@media(width>=768px){.swiper-container{padding:20px 40px}}.resource-card{background:#fff;border-radius:8px;box-shadow:0 0 20px #0000001a;padding:1.5rem;height:100%;display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:350px}.resource-title{font-size:1.25rem;font-weight:600;margin-bottom:1rem}.resource-image{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:4px}.read-now-btn{margin-top:auto;display:inline-flex;align-items:center;gap:.5rem;color:#000;text-decoration:none;font-weight:500}.read-now-btn .arrow{transition:transform .2s ease}.read-now-btn:hover .arrow{transform:translate(5px)}.swiper-button-prev,.swiper-button-next{color:#000}.swiper-button-prev:after,.swiper-button-next:after{font-size:24px}@media(width<=767px){.swiper-button-prev,.swiper-button-next{display:none}}.swiper-pagination{position:relative;margin-top:20px}.swiper-pagination-bullet{background:#000;opacity:.5}.swiper-pagination-bullet-active{opacity:1}.swiper-wrapper{display:flex;align-items:stretch}.swiper-slide{display:flex;align-items:stretch;height:auto}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;border-radius:20px;padding:2.5rem 1.5rem;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;font-size:1.1rem;height:100%;min-height:100%}.testimonial-box span{margin:0;font-size:22px}.testimonial-box .avatar-container{margin-top:auto}.testimonial-box .testimonial-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .stars{font-size:2.2rem;color:#f6b300;margin-bottom:2.5rem}.centaris-text{margin-bottom:3rem!important}@media(width<=768px){::ng-deep .swiper-wrapper{gap:1rem!important}.testimonial-box{width:300px!important}}\n", "textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"],
|
|
1542
|
+
dependencies: [
|
|
1543
|
+
{
|
|
1544
|
+
kind: "directive",
|
|
1545
|
+
type: i3$1.LazyImgDirective,
|
|
1546
|
+
selector: "img"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
kind: "component",
|
|
1550
|
+
type: ResourceEditCardLazyComponent,
|
|
1551
|
+
selector: "pw-resource-edit-card-lazy",
|
|
1552
|
+
inputs: [
|
|
1553
|
+
"id",
|
|
1554
|
+
"resourceData",
|
|
1555
|
+
"canEdit"
|
|
1556
|
+
],
|
|
1557
|
+
outputs: ["updated"]
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
kind: "component",
|
|
1561
|
+
type: i2$1.NoDataComponent,
|
|
1562
|
+
selector: "pw-no-data",
|
|
1563
|
+
inputs: [
|
|
1564
|
+
"message",
|
|
1565
|
+
"description",
|
|
1566
|
+
"withImage"
|
|
1567
|
+
]
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
kind: "pipe",
|
|
1571
|
+
type: i6$1.TranslocoPipe,
|
|
1572
|
+
name: "transloco"
|
|
1573
|
+
}
|
|
1574
|
+
],
|
|
1575
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1579
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1580
|
+
minVersion: "12.0.0",
|
|
1581
|
+
version: "22.2.0",
|
|
1582
|
+
ngImport: i0,
|
|
1583
|
+
type: TestimonialCardListComponent,
|
|
1584
|
+
decorators: [{
|
|
1585
|
+
type: Component,
|
|
1586
|
+
args: [{
|
|
1587
|
+
selector: "pw-testimonial-card",
|
|
1588
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1589
|
+
standalone: false,
|
|
1590
|
+
template: "<section class=\"resource-section section-outer bg-white\">\n <div class=\"container\">\n @if (postHeader) {\n <div class=\"d-flex justify-content-between align-items-center flex-wrap mb-3\">\n <h2 class=\"section-heading\">{{postHeader}}</h2>\n </div>\n }\n @if (posts.length === 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.NoDataMessage' | transloco\"/>\n </div>\n }\n <div [hidden]=\"posts.length === 0\">\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper\">\n @for (post of posts; track post) {\n <div class=\"swiper-slide\">\n <div class=\"testimonial-box\">\n <pw-resource-edit-card-lazy\n [canEdit]=\"canEdit\"\n [id]=\"post.id\"\n [resourceData]=\"post\"\n (updated)=\"editPost.emit(1, 100)\">\n </pw-resource-edit-card-lazy>\n <div class=\"stars mb-5\">★★★★★</div>\n <div class=\"testimonial-content\">\n <div class=\"ql-container ql-snow ql-res\">\n <div class=\"ql-editor\"\n [innerHTML]=\"post?.body\">\n </div>\n </div>\n </div>\n <!-- THIS STAYS AT BOTTOM -->\n <div class=\"avatar-container\">\n @if (!post.rectangular_picture.url.includes('default-photo.jpg') ) {\n <img\n [src]=\"post.rectangular_picture.url\"\n alt=\"Logo\"\n class=\"testimonial-logo mt-4\"\n />\n }\n </div>\n </div>\n </div>\n }\n </div>\n <div class=\"swiper-pagination\"></div>\n <div class=\"swiper-button-prev\"></div>\n <div class=\"swiper-button-next\"></div>\n </div>\n </div>\n </div>\n</section>",
|
|
1591
|
+
styles: [".resource-section{box-shadow:0 4px 32px -14px #40576d4d!important;position:relative}@media(width>=768px)and (width<=1200px){.container{padding:0 6rem!important}}@media(width<=767px){.container{padding:0 1rem!important}}.ql-res{resize:none!important;border-width:0}.swiper-container{padding:20px;position:relative;overflow:hidden}@media(width>=768px){.swiper-container{padding:20px 40px}}.resource-card{background:#fff;border-radius:8px;box-shadow:0 0 20px #0000001a;padding:1.5rem;height:100%;display:flex;flex-direction:column;margin:0 auto;width:100%;max-width:350px}.resource-title{font-size:1.25rem;font-weight:600;margin-bottom:1rem}.resource-image{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:4px}.read-now-btn{margin-top:auto;display:inline-flex;align-items:center;gap:.5rem;color:#000;text-decoration:none;font-weight:500}.read-now-btn .arrow{transition:transform .2s ease}.read-now-btn:hover .arrow{transform:translate(5px)}.swiper-button-prev,.swiper-button-next{color:#000}.swiper-button-prev:after,.swiper-button-next:after{font-size:24px}@media(width<=767px){.swiper-button-prev,.swiper-button-next{display:none}}.swiper-pagination{position:relative;margin-top:20px}.swiper-pagination-bullet{background:#000;opacity:.5}.swiper-pagination-bullet-active{opacity:1}.swiper-wrapper{display:flex;align-items:stretch}.swiper-slide{display:flex;align-items:stretch;height:auto}.testimonial-box{display:flex;flex-direction:column;justify-content:space-between;background:#fff;border-radius:20px;padding:2.5rem 1.5rem;box-shadow:0 0 20px #0000001a;text-align:center;width:338px;font-size:1.1rem;height:100%;min-height:100%}.testimonial-box span{margin:0;font-size:22px}.testimonial-box .avatar-container{margin-top:auto}.testimonial-box .testimonial-logo{width:100%!important;height:auto!important;max-width:150px!important;object-fit:contain;align-self:center}.testimonial-box .stars{font-size:2.2rem;color:#f6b300;margin-bottom:2.5rem}.centaris-text{margin-bottom:3rem!important}@media(width<=768px){::ng-deep .swiper-wrapper{gap:1rem!important}.testimonial-box{width:300px!important}}\n", "textarea{font-size:1rem!important}.resource-body-section{background-color:#fff}.resource-body-section .container{padding:3rem 1.5rem 4rem!important;max-width:850px!important;margin:0 auto;text-align:left}.user-not-logged-in{background:#fafbfc;border:1px solid #e2e5ea;border-radius:8px;font-size:14px;font-weight:400;color:#5a6473;padding:1rem 1.5rem;box-shadow:none!important;margin-bottom:2rem!important}.user-not-logged-in a{color:#1a1d21!important;text-decoration:none;font-weight:600;transition:color .15s ease-out}.user-not-logged-in a:hover,.user-not-logged-in a:focus-visible{color:var(--first)!important}.user-not-logged-in a:focus-visible{outline:2px solid var(--first);outline-offset:2px;border-radius:2px}.resource-book-section{background:#fff;padding-top:4rem;padding-bottom:0}.resource-book-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem!important;text-align:left}.resource-book-section .resource-contact{line-height:1.6;font-size:1rem;color:#3d4654}.resource-book-section .resource-contact a{text-decoration:underline;color:#1a1d21;margin:0 .2rem;transition:color .15s ease-out}.resource-book-section .resource-contact a:hover{color:var(--first)!important}.resource-offer-section{background:#fff;padding-top:1rem}.resource-offer-section .container{max-width:850px;margin:0 auto;padding:0 1.5rem;text-align:left}.resource-divider{border:0;border-top:1px solid #e2e5ea;margin:2rem auto;max-width:850px;height:0;background:none}::ng-deep .body-quill{border-width:0!important;max-width:850px;display:block;margin-left:auto;margin-right:auto}::ng-deep .p-textarea{border-radius:8px;border:1px solid #e2e5ea;font-size:1rem!important}.card{background-color:#fff;border-radius:12px}.comment-row{gap:1.5rem;padding-bottom:3rem;max-width:850px;display:block;margin-left:auto;margin-right:auto}.comment-label{font-size:14px!important;font-weight:600!important;letter-spacing:.04em;text-transform:uppercase;color:#5a6473}.response-row{max-width:850px;display:block;margin-left:auto;margin-right:auto;margin-top:2rem!important}@media(width<=768px){.resource-body-section .container{padding:2rem 1rem 3rem}.resource-book-section{padding-top:2rem!important}.resource-book-section .resource-contact{font-size:.9375rem!important}}\n"]
|
|
1592
|
+
}]
|
|
1593
|
+
}],
|
|
1594
|
+
propDecorators: {
|
|
1595
|
+
editPost: [{ type: Output }],
|
|
1596
|
+
posts: [{ type: Input }],
|
|
1597
|
+
postHeader: [{ type: Input }],
|
|
1598
|
+
canEdit: [{ type: Input }]
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
export { CaseStudyCardComponent, ResourceCardComponent, ResourceCardsModule, ResourceCompanyCardComponent, ResourceEditCardComponent, ResourceEditCardLazyComponent, ResourceEditModule, ResourceModule, ResourceNoteCardComponent, ResourcePublicModule, ResourceService, ResourceSharedModule, ResourceTopBannerEditComponent, ResourceVaultComponent, ResourceVideoCardComponent, TestimonialCardListComponent, Trial4ContactUsModule, UpcomingEventCardComponent, resource_edit_card_component_exports as t };
|
|
1602
|
+
|
|
1603
|
+
//# sourceMappingURL=posiwise-resource-module.mjs.map
|