@stratusjs/angular 0.11.2 → 0.11.3

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.
Files changed (58) hide show
  1. package/dist/angular.bundle.js +6474 -5007
  2. package/dist/angular.bundle.min.js +1 -1
  3. package/package.json +1 -1
  4. package/src/{froala/view/froala-view.module.js → angular.modules.js} +12 -14
  5. package/src/angular.modules.js.map +1 -0
  6. package/src/angular.modules.min.js +1 -0
  7. package/src/core/dialog.interface.js.map +1 -0
  8. package/src/editor/media-dialog.component.js +2 -1
  9. package/src/editor/media-dialog.component.js.map +1 -1
  10. package/src/editor/media-dialog.component.min.js +1 -1
  11. package/src/editor/media-dialog.component.ts +2 -1
  12. package/src/froala/plugins/citationManager.min.js +1 -1
  13. package/src/froala/plugins/mediaManager.min.js +1 -1
  14. package/src/froala/plugins/menuButton.min.js +1 -1
  15. package/src/json/json.component.css +2 -0
  16. package/src/json/json.component.css.map +1 -0
  17. package/src/json/json.component.js +257 -0
  18. package/src/json/json.component.js.map +1 -0
  19. package/src/json/json.component.min.css +0 -0
  20. package/src/json/json.component.min.js +1 -0
  21. package/src/material.js +196 -0
  22. package/src/material.js.map +1 -0
  23. package/src/material.min.js +1 -0
  24. package/src/editor/quill-break-blot.plugin.js +0 -38
  25. package/src/editor/quill-break-blot.plugin.js.map +0 -1
  26. package/src/editor/quill-break-blot.plugin.min.js +0 -1
  27. package/src/editor/quill-html-edit.plugin.js +0 -164
  28. package/src/editor/quill-html-edit.plugin.js.map +0 -1
  29. package/src/editor/quill-html-edit.plugin.min.js +0 -1
  30. package/src/editor/quill-image-format.plugin.js +0 -50
  31. package/src/editor/quill-image-format.plugin.js.map +0 -1
  32. package/src/editor/quill-image-format.plugin.min.js +0 -1
  33. package/src/editor/quill-input-button.plugin.js +0 -98
  34. package/src/editor/quill-input-button.plugin.js.map +0 -1
  35. package/src/editor/quill-input-button.plugin.min.js +0 -1
  36. package/src/froala/editor/froala-editor.directive.js +0 -328
  37. package/src/froala/editor/froala-editor.directive.js.map +0 -1
  38. package/src/froala/editor/froala-editor.directive.min.js +0 -1
  39. package/src/froala/editor/froala-editor.module.js +0 -37
  40. package/src/froala/editor/froala-editor.module.js.map +0 -1
  41. package/src/froala/editor/froala-editor.module.min.js +0 -1
  42. package/src/froala/editor/index.js +0 -22
  43. package/src/froala/editor/index.js.map +0 -1
  44. package/src/froala/editor/index.min.js +0 -1
  45. package/src/froala/plugins/image_manager.js +0 -364
  46. package/src/froala/plugins/image_manager.js.map +0 -1
  47. package/src/froala/plugins/image_manager.min.js +0 -1
  48. package/src/froala/view/froala-view.directive.js +0 -49
  49. package/src/froala/view/froala-view.directive.js.map +0 -1
  50. package/src/froala/view/froala-view.directive.min.js +0 -1
  51. package/src/froala/view/froala-view.module.js.map +0 -1
  52. package/src/froala/view/froala-view.module.min.js +0 -1
  53. package/src/froala/view/index.js +0 -22
  54. package/src/froala/view/index.js.map +0 -1
  55. package/src/froala/view/index.min.js +0 -1
  56. package/src/root/root.component.js +0 -43
  57. package/src/root/root.component.js.map +0 -1
  58. package/src/root/root.component.min.js +0 -1
@@ -0,0 +1,196 @@
1
+ System.register(["@angular/cdk/a11y", "@angular/cdk/drag-drop", "@angular/cdk/portal", "@angular/cdk/scrolling", "@angular/cdk/stepper", "@angular/cdk/table", "@angular/cdk/tree", "@angular/core", "@angular/material/autocomplete", "@angular/material/badge", "@angular/material/bottom-sheet", "@angular/material/button", "@angular/material/button-toggle", "@angular/material/card", "@angular/material/checkbox", "@angular/material/chips", "@angular/material/datepicker", "@angular/material/dialog", "@angular/material/divider", "@angular/material/expansion", "@angular/material/grid-list", "@angular/material/icon", "@angular/material/input", "@angular/material/list", "@angular/material/menu", "@angular/material/core", "@angular/material/paginator", "@angular/material/progress-bar", "@angular/material/progress-spinner", "@angular/material/radio", "@angular/material/select", "@angular/material/sidenav", "@angular/material/slide-toggle", "@angular/material/slider", "@angular/material/snack-bar", "@angular/material/sort", "@angular/material/stepper", "@angular/material/table", "@angular/material/tabs", "@angular/material/toolbar", "@angular/material/tooltip", "@angular/material/tree"], function (exports_1, context_1) {
2
+ "use strict";
3
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
4
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8
+ };
9
+ var a11y_1, drag_drop_1, portal_1, scrolling_1, stepper_1, table_1, tree_1, core_1, autocomplete_1, badge_1, bottom_sheet_1, button_1, button_toggle_1, card_1, checkbox_1, chips_1, datepicker_1, dialog_1, divider_1, expansion_1, grid_list_1, icon_1, input_1, list_1, menu_1, core_2, paginator_1, progress_bar_1, progress_spinner_1, radio_1, select_1, sidenav_1, slide_toggle_1, slider_1, snack_bar_1, sort_1, stepper_2, table_2, tabs_1, toolbar_1, tooltip_1, tree_2, MaterialModules;
10
+ var __moduleName = context_1 && context_1.id;
11
+ return {
12
+ setters: [
13
+ function (a11y_1_1) {
14
+ a11y_1 = a11y_1_1;
15
+ },
16
+ function (drag_drop_1_1) {
17
+ drag_drop_1 = drag_drop_1_1;
18
+ },
19
+ function (portal_1_1) {
20
+ portal_1 = portal_1_1;
21
+ },
22
+ function (scrolling_1_1) {
23
+ scrolling_1 = scrolling_1_1;
24
+ },
25
+ function (stepper_1_1) {
26
+ stepper_1 = stepper_1_1;
27
+ },
28
+ function (table_1_1) {
29
+ table_1 = table_1_1;
30
+ },
31
+ function (tree_1_1) {
32
+ tree_1 = tree_1_1;
33
+ },
34
+ function (core_1_1) {
35
+ core_1 = core_1_1;
36
+ },
37
+ function (autocomplete_1_1) {
38
+ autocomplete_1 = autocomplete_1_1;
39
+ },
40
+ function (badge_1_1) {
41
+ badge_1 = badge_1_1;
42
+ },
43
+ function (bottom_sheet_1_1) {
44
+ bottom_sheet_1 = bottom_sheet_1_1;
45
+ },
46
+ function (button_1_1) {
47
+ button_1 = button_1_1;
48
+ },
49
+ function (button_toggle_1_1) {
50
+ button_toggle_1 = button_toggle_1_1;
51
+ },
52
+ function (card_1_1) {
53
+ card_1 = card_1_1;
54
+ },
55
+ function (checkbox_1_1) {
56
+ checkbox_1 = checkbox_1_1;
57
+ },
58
+ function (chips_1_1) {
59
+ chips_1 = chips_1_1;
60
+ },
61
+ function (datepicker_1_1) {
62
+ datepicker_1 = datepicker_1_1;
63
+ },
64
+ function (dialog_1_1) {
65
+ dialog_1 = dialog_1_1;
66
+ },
67
+ function (divider_1_1) {
68
+ divider_1 = divider_1_1;
69
+ },
70
+ function (expansion_1_1) {
71
+ expansion_1 = expansion_1_1;
72
+ },
73
+ function (grid_list_1_1) {
74
+ grid_list_1 = grid_list_1_1;
75
+ },
76
+ function (icon_1_1) {
77
+ icon_1 = icon_1_1;
78
+ },
79
+ function (input_1_1) {
80
+ input_1 = input_1_1;
81
+ },
82
+ function (list_1_1) {
83
+ list_1 = list_1_1;
84
+ },
85
+ function (menu_1_1) {
86
+ menu_1 = menu_1_1;
87
+ },
88
+ function (core_2_1) {
89
+ core_2 = core_2_1;
90
+ },
91
+ function (paginator_1_1) {
92
+ paginator_1 = paginator_1_1;
93
+ },
94
+ function (progress_bar_1_1) {
95
+ progress_bar_1 = progress_bar_1_1;
96
+ },
97
+ function (progress_spinner_1_1) {
98
+ progress_spinner_1 = progress_spinner_1_1;
99
+ },
100
+ function (radio_1_1) {
101
+ radio_1 = radio_1_1;
102
+ },
103
+ function (select_1_1) {
104
+ select_1 = select_1_1;
105
+ },
106
+ function (sidenav_1_1) {
107
+ sidenav_1 = sidenav_1_1;
108
+ },
109
+ function (slide_toggle_1_1) {
110
+ slide_toggle_1 = slide_toggle_1_1;
111
+ },
112
+ function (slider_1_1) {
113
+ slider_1 = slider_1_1;
114
+ },
115
+ function (snack_bar_1_1) {
116
+ snack_bar_1 = snack_bar_1_1;
117
+ },
118
+ function (sort_1_1) {
119
+ sort_1 = sort_1_1;
120
+ },
121
+ function (stepper_2_1) {
122
+ stepper_2 = stepper_2_1;
123
+ },
124
+ function (table_2_1) {
125
+ table_2 = table_2_1;
126
+ },
127
+ function (tabs_1_1) {
128
+ tabs_1 = tabs_1_1;
129
+ },
130
+ function (toolbar_1_1) {
131
+ toolbar_1 = toolbar_1_1;
132
+ },
133
+ function (tooltip_1_1) {
134
+ tooltip_1 = tooltip_1_1;
135
+ },
136
+ function (tree_2_1) {
137
+ tree_2 = tree_2_1;
138
+ }
139
+ ],
140
+ execute: function () {
141
+ MaterialModules = class MaterialModules {
142
+ };
143
+ MaterialModules = __decorate([
144
+ core_1.NgModule({
145
+ exports: [
146
+ a11y_1.A11yModule,
147
+ stepper_1.CdkStepperModule,
148
+ table_1.CdkTableModule,
149
+ tree_1.CdkTreeModule,
150
+ drag_drop_1.DragDropModule,
151
+ autocomplete_1.MatAutocompleteModule,
152
+ badge_1.MatBadgeModule,
153
+ bottom_sheet_1.MatBottomSheetModule,
154
+ button_1.MatButtonModule,
155
+ button_toggle_1.MatButtonToggleModule,
156
+ card_1.MatCardModule,
157
+ checkbox_1.MatCheckboxModule,
158
+ chips_1.MatChipsModule,
159
+ stepper_2.MatStepperModule,
160
+ datepicker_1.MatDatepickerModule,
161
+ dialog_1.MatDialogModule,
162
+ divider_1.MatDividerModule,
163
+ expansion_1.MatExpansionModule,
164
+ grid_list_1.MatGridListModule,
165
+ icon_1.MatIconModule,
166
+ input_1.MatInputModule,
167
+ list_1.MatListModule,
168
+ menu_1.MatMenuModule,
169
+ core_2.MatNativeDateModule,
170
+ paginator_1.MatPaginatorModule,
171
+ progress_bar_1.MatProgressBarModule,
172
+ progress_spinner_1.MatProgressSpinnerModule,
173
+ radio_1.MatRadioModule,
174
+ core_2.MatRippleModule,
175
+ select_1.MatSelectModule,
176
+ sidenav_1.MatSidenavModule,
177
+ slider_1.MatSliderModule,
178
+ slide_toggle_1.MatSlideToggleModule,
179
+ snack_bar_1.MatSnackBarModule,
180
+ sort_1.MatSortModule,
181
+ table_2.MatTableModule,
182
+ tabs_1.MatTabsModule,
183
+ toolbar_1.MatToolbarModule,
184
+ tooltip_1.MatTooltipModule,
185
+ tree_2.MatTreeModule,
186
+ portal_1.PortalModule,
187
+ scrolling_1.ScrollingModule,
188
+ ]
189
+ })
190
+ ], MaterialModules);
191
+ exports_1("MaterialModules", MaterialModules);
192
+ }
193
+ };
194
+ });
195
+
196
+ //# sourceMappingURL=material.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["material.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA0Fa,eAAe,GAArB,MAAM,eAAe;aAC3B,CAAA;YADY,eAAe;gBA9C3B,eAAQ,CAAC;oBACN,OAAO,EAAE;wBACL,iBAAU;wBACV,0BAAgB;wBAChB,sBAAc;wBACd,oBAAa;wBACb,0BAAc;wBACd,oCAAqB;wBACrB,sBAAc;wBACd,mCAAoB;wBACpB,wBAAe;wBACf,qCAAqB;wBACrB,oBAAa;wBACb,4BAAiB;wBACjB,sBAAc;wBACd,0BAAgB;wBAChB,gCAAmB;wBACnB,wBAAe;wBACf,0BAAgB;wBAChB,8BAAkB;wBAClB,6BAAiB;wBACjB,oBAAa;wBACb,sBAAc;wBACd,oBAAa;wBACb,oBAAa;wBACb,0BAAmB;wBACnB,8BAAkB;wBAClB,mCAAoB;wBACpB,2CAAwB;wBACxB,sBAAc;wBACd,sBAAe;wBACf,wBAAe;wBACf,0BAAgB;wBAChB,wBAAe;wBACf,mCAAoB;wBACpB,6BAAiB;wBACjB,oBAAa;wBACb,sBAAc;wBACd,oBAAa;wBACb,0BAAgB;wBAChB,0BAAgB;wBAChB,oBAAa;wBACb,qBAAY;wBACZ,2BAAe;qBAClB;iBACJ,CAAC;eACW,eAAe,CAC3B;;QACD,CAAC","file":"material.js"}
@@ -0,0 +1 @@
1
+ System.register(["@angular/cdk/a11y","@angular/cdk/drag-drop","@angular/cdk/portal","@angular/cdk/scrolling","@angular/cdk/stepper","@angular/cdk/table","@angular/cdk/tree","@angular/core","@angular/material/autocomplete","@angular/material/badge","@angular/material/bottom-sheet","@angular/material/button","@angular/material/button-toggle","@angular/material/card","@angular/material/checkbox","@angular/material/chips","@angular/material/datepicker","@angular/material/dialog","@angular/material/divider","@angular/material/expansion","@angular/material/grid-list","@angular/material/icon","@angular/material/input","@angular/material/list","@angular/material/menu","@angular/material/core","@angular/material/paginator","@angular/material/progress-bar","@angular/material/progress-spinner","@angular/material/radio","@angular/material/select","@angular/material/sidenav","@angular/material/slide-toggle","@angular/material/slider","@angular/material/snack-bar","@angular/material/sort","@angular/material/stepper","@angular/material/table","@angular/material/tabs","@angular/material/toolbar","@angular/material/tooltip","@angular/material/tree"],function(a,t){"use strict";var e,n,l,o,r,u,i,c,M,d,g,f,s,m,p,b,k,S,h,T,v,y,D,x,B,C,P,R,j,O,A,I,L,N,_,w,E,G,q,z,F,H,J,K=this&&this.__decorate||function(a,t,e,n){var l,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,t,e,n);else for(var u=a.length-1;u>=0;u--)(l=a[u])&&(r=(o<3?l(r):o>3?l(t,e,r):l(t,e))||r);return o>3&&r&&Object.defineProperty(t,e,r),r};t&&t.id;return{setters:[function(a){e=a},function(a){n=a},function(a){l=a},function(a){o=a},function(a){r=a},function(a){u=a},function(a){i=a},function(a){c=a},function(a){M=a},function(a){d=a},function(a){g=a},function(a){f=a},function(a){s=a},function(a){m=a},function(a){p=a},function(a){b=a},function(a){k=a},function(a){S=a},function(a){h=a},function(a){T=a},function(a){v=a},function(a){y=a},function(a){D=a},function(a){x=a},function(a){B=a},function(a){C=a},function(a){P=a},function(a){R=a},function(a){j=a},function(a){O=a},function(a){A=a},function(a){I=a},function(a){L=a},function(a){N=a},function(a){_=a},function(a){w=a},function(a){E=a},function(a){G=a},function(a){q=a},function(a){z=a},function(a){F=a},function(a){H=a}],execute:function(){J=class{},J=K([c.NgModule({exports:[e.A11yModule,r.CdkStepperModule,u.CdkTableModule,i.CdkTreeModule,n.DragDropModule,M.MatAutocompleteModule,d.MatBadgeModule,g.MatBottomSheetModule,f.MatButtonModule,s.MatButtonToggleModule,m.MatCardModule,p.MatCheckboxModule,b.MatChipsModule,E.MatStepperModule,k.MatDatepickerModule,S.MatDialogModule,h.MatDividerModule,T.MatExpansionModule,v.MatGridListModule,y.MatIconModule,D.MatInputModule,x.MatListModule,B.MatMenuModule,C.MatNativeDateModule,P.MatPaginatorModule,R.MatProgressBarModule,j.MatProgressSpinnerModule,O.MatRadioModule,C.MatRippleModule,A.MatSelectModule,I.MatSidenavModule,N.MatSliderModule,L.MatSlideToggleModule,_.MatSnackBarModule,w.MatSortModule,G.MatTableModule,q.MatTabsModule,z.MatToolbarModule,F.MatTooltipModule,H.MatTreeModule,l.PortalModule,o.ScrollingModule]})],J),a("MaterialModules",J)}}});
@@ -1,38 +0,0 @@
1
- System.register(["quill", "@stratusjs/core/environment"], function (exports_1, context_1) {
2
- "use strict";
3
- var quill_1, environment_1, Break, Embed, QuillBreak;
4
- var __moduleName = context_1 && context_1.id;
5
- return {
6
- setters: [
7
- function (quill_1_1) {
8
- quill_1 = quill_1_1;
9
- },
10
- function (environment_1_1) {
11
- environment_1 = environment_1_1;
12
- }
13
- ],
14
- execute: function () {
15
- Break = quill_1.default.import('blots/break');
16
- Embed = quill_1.default.import('blots/embed');
17
- QuillBreak = class QuillBreak extends Break {
18
- length() {
19
- return 1;
20
- }
21
- value() {
22
- return '\n';
23
- }
24
- insertInto(parent, ref) {
25
- if (environment_1.cookie('env')) {
26
- console.log('insertInto:', parent, ref);
27
- }
28
- Embed.prototype.insertInto.call(this, parent, ref);
29
- }
30
- };
31
- exports_1("QuillBreak", QuillBreak);
32
- QuillBreak.blotName = 'break';
33
- QuillBreak.tagName = 'BR';
34
- }
35
- };
36
- });
37
-
38
- //# sourceMappingURL=quill-break-blot.plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["quill-break-blot.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;YAKM,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;YACnC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;YAWzC,aAAA,MAAa,UAAW,SAAQ,KAAK;gBACjC,MAAM;oBACF,OAAO,CAAC,CAAA;gBACZ,CAAC;gBACD,KAAK;oBACD,OAAO,IAAI,CAAA;gBACf,CAAC;gBAED,UAAU,CAAC,MAAW,EAAE,GAAQ;oBAC5B,IAAI,oBAAM,CAAC,KAAK,CAAC,EAAE;wBACf,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;qBAC1C;oBACD,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;gBACtD,CAAC;aACJ,CAAA;;YAED,UAAU,CAAC,QAAQ,GAAG,OAAO,CAAA;YAC7B,UAAU,CAAC,OAAO,GAAG,IAAI,CAAA;QACzB,CAAC","file":"quill-break-blot.plugin.js"}
@@ -1 +0,0 @@
1
- System.register(["quill","@stratusjs/core/environment"],function(t,e){"use strict";var n,r,o,s,i;e&&e.id;return{setters:[function(t){n=t},function(t){r=t}],execute:function(){o=n.default.import("blots/break"),s=n.default.import("blots/embed"),t("QuillBreak",i=class extends o{length(){return 1}value(){return"\n"}insertInto(t,e){r.cookie("env")&&console.log("insertInto:",t,e),s.prototype.insertInto.call(this,t,e)}}),i.blotName="break",i.tagName="BR"}}});
@@ -1,164 +0,0 @@
1
- System.register(["quill"], function (exports_1, context_1) {
2
- "use strict";
3
- var quill_1, debug, Logger, QuillHtmlEditPlugin;
4
- var __moduleName = context_1 && context_1.id;
5
- function $create(elName) {
6
- return document.createElement(elName);
7
- }
8
- function $setAttr(el, key, value) {
9
- return el.setAttribute(key, value);
10
- }
11
- function launchPopupEditor(quill, options) {
12
- const htmlFromEditor = quill.container.querySelector('.ql-editor').innerHTML;
13
- const popupContainer = $create('div');
14
- const overlayContainer = $create('div');
15
- const msg = options.msg || 'Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced';
16
- const cancelText = options.cancelText || 'Cancel';
17
- const okText = options.okText || 'Ok';
18
- $setAttr(overlayContainer, 'class', 'ql-html-overlayContainer');
19
- $setAttr(popupContainer, 'class', 'ql-html-popupContainer');
20
- const popupTitle = $create('i');
21
- $setAttr(popupTitle, 'class', 'ql-html-popupTitle');
22
- popupTitle.innerText = msg;
23
- const textContainer = $create('div');
24
- textContainer.appendChild(popupTitle);
25
- $setAttr(textContainer, 'class', 'ql-html-textContainer');
26
- const textArea = $create('textarea');
27
- $setAttr(textArea, 'class', 'ql-html-textArea');
28
- textArea.value = formatHTML(htmlFromEditor);
29
- const buttonCancel = $create('button');
30
- buttonCancel.innerHTML = cancelText;
31
- $setAttr(buttonCancel, 'class', 'ql-html-buttonCancel');
32
- const buttonOk = $create('button');
33
- buttonOk.innerHTML = okText;
34
- const buttonGroup = $create('div');
35
- $setAttr(buttonGroup, 'class', 'ql-html-buttonGroup');
36
- buttonGroup.appendChild(buttonCancel);
37
- buttonGroup.appendChild(buttonOk);
38
- textContainer.appendChild(textArea);
39
- textContainer.appendChild(buttonGroup);
40
- popupContainer.appendChild(textContainer);
41
- overlayContainer.appendChild(popupContainer);
42
- document.body.appendChild(overlayContainer);
43
- buttonCancel.onclick = () => {
44
- document.body.removeChild(overlayContainer);
45
- };
46
- overlayContainer.onclick = buttonCancel.onclick;
47
- popupContainer.onclick = (e) => {
48
- e.preventDefault();
49
- e.stopPropagation();
50
- };
51
- buttonOk.onclick = () => {
52
- const output = textArea.value.split(/\r?\n/g).map((el) => el.trim());
53
- const noNewlines = output.join('');
54
- quill.container.querySelector('.ql-editor').innerHTML = noNewlines;
55
- document.body.removeChild(overlayContainer);
56
- };
57
- }
58
- function formatHTML(code) {
59
- 'use strict';
60
- const stripWhiteSpaces = true;
61
- const stripEmptyLines = true;
62
- const whitespace = ' '.repeat(2);
63
- let currentIndent = 0;
64
- const newlineChar = '\n';
65
- let char = null;
66
- let nextChar = null;
67
- let result = '';
68
- for (let pos = 0; pos <= code.length; pos++) {
69
- char = code.substr(pos, 1);
70
- nextChar = code.substr(pos + 1, 1);
71
- const isBrTag = code.substr(pos, 4) === '<br>';
72
- const isOpeningTag = char === '<' && nextChar !== '/' && !isBrTag;
73
- const isClosingTag = char === '<' && nextChar === '/' && !isBrTag;
74
- if (isBrTag) {
75
- result += newlineChar;
76
- currentIndent--;
77
- pos += 4;
78
- }
79
- if (isOpeningTag) {
80
- result += newlineChar + whitespace.repeat(currentIndent);
81
- currentIndent++;
82
- }
83
- else if (isClosingTag) {
84
- if (--currentIndent < 0) {
85
- currentIndent = 0;
86
- }
87
- result += newlineChar + whitespace.repeat(currentIndent);
88
- }
89
- else if (stripWhiteSpaces === true && char === ' ' && nextChar === ' ') {
90
- char = '';
91
- }
92
- else if (stripEmptyLines === true && char === newlineChar) {
93
- if (code.substr(pos, code.substr(pos).indexOf('<')).trim() === '') {
94
- char = '';
95
- }
96
- }
97
- result += char;
98
- }
99
- Logger.log('formatHTML', {
100
- before: code,
101
- after: result
102
- });
103
- return result;
104
- }
105
- return {
106
- setters: [
107
- function (quill_1_1) {
108
- quill_1 = quill_1_1;
109
- }
110
- ],
111
- execute: function () {
112
- debug = false;
113
- Logger = {
114
- prefixString() {
115
- return `</> quill-html-edit-button: `;
116
- },
117
- get log() {
118
- if (!debug) {
119
- return () => { };
120
- }
121
- const boundLogFn = console.log.bind(console, this.prefixString());
122
- return boundLogFn;
123
- }
124
- };
125
- QuillHtmlEditPlugin = class QuillHtmlEditPlugin {
126
- constructor(quill, options) {
127
- debug = options && options.debug;
128
- Logger.log('logging enabled');
129
- const toolbarModule = quill.getModule('toolbar');
130
- if (!toolbarModule) {
131
- throw new Error('quill.htmlEditButton requires the "toolbar" module to be included too');
132
- }
133
- this.registerDivModule();
134
- const toolbarEl = toolbarModule.container;
135
- const buttonContainer = $create('span');
136
- $setAttr(buttonContainer, 'class', 'ql-formats');
137
- const button = $create('button');
138
- button.innerHTML = options.buttonHTML || '&lt;&gt;';
139
- button.title = options.buttonTitle || 'Show HTML source';
140
- button.onclick = (e) => {
141
- e.preventDefault();
142
- launchPopupEditor(quill, options);
143
- };
144
- buttonContainer.appendChild(button);
145
- toolbarEl.appendChild(buttonContainer);
146
- }
147
- registerDivModule() {
148
- const Block = quill_1.default.import('blots/block');
149
- class Div extends Block {
150
- }
151
- Div.tagName = 'div';
152
- Div.blotName = 'div';
153
- Div.allowedChildren = Block.allowedChildren;
154
- Div.allowedChildren.push(Block);
155
- quill_1.default.register(Div);
156
- }
157
- };
158
- exports_1("QuillHtmlEditPlugin", QuillHtmlEditPlugin);
159
- exports_1("default", QuillHtmlEditPlugin);
160
- }
161
- };
162
- });
163
-
164
- //# sourceMappingURL=quill-html-edit.plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["quill-html-edit.plugin.ts"],"names":[],"mappings":";;;;IAQA,SAAS,OAAO,CAAC,MAAW;QACxB,OAAO,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IACzC,CAAC;IACD,SAAS,QAAQ,CAAC,EAAO,EAAE,GAAQ,EAAE,KAAU;QAC3C,OAAO,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACtC,CAAC;IAuDD,SAAS,iBAAiB,CAAC,KAAU,EAAE,OAAY;QAC/C,MAAM,cAAc,GAA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A;oBAC/B,eAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;gBACvB,CAAC;aACJ,CAAA;;iCA6Gc,mBAAmB;QAElC,CAAC","file":"quill-html-edit.plugin.js"}
@@ -1 +0,0 @@
1
- System.register(["quill"],function(t,e){"use strict";var n,l,o,i;e&&e.id;function r(t){return document.createElement(t)}function s(t,e,n){return t.setAttribute(e,n)}function c(t,e){const n=t.container.querySelector(".ql-editor").innerHTML,l=r("div"),i=r("div"),c=e.msg||'Edit HTML here, when you click "OK" the quill editor\'s contents will be replaced',u=e.cancelText||"Cancel",d=e.okText||"Ok";s(i,"class","ql-html-overlayContainer"),s(l,"class","ql-html-popupContainer");const a=r("i");s(a,"class","ql-html-popupTitle"),a.innerText=c;const p=r("div");p.appendChild(a),s(p,"class","ql-html-textContainer");const h=r("textarea");s(h,"class","ql-html-textArea"),h.value=function(t){const e=!0,n=!0,l=" ".repeat(2);let i=0;const r="\n";let s=null,c=null,u="";for(let o=0;o<=t.length;o++){s=t.substr(o,1),c=t.substr(o+1,1);const d="<br>"===t.substr(o,4),a="<"===s&&"/"===c&&!d;d&&(u+=r,i--,o+=4),"<"===s&&"/"!==c&&!d?(u+=r+l.repeat(i),i++):a?(--i<0&&(i=0),u+=r+l.repeat(i)):(!0===e&&" "===s&&" "===c||!0===n&&s===r&&""===t.substr(o,t.substr(o).indexOf("<")).trim())&&(s=""),u+=s}return o.log("formatHTML",{before:t,after:u}),u}(n);const b=r("button");b.innerHTML=u,s(b,"class","ql-html-buttonCancel");const m=r("button");m.innerHTML=d;const g=r("div");s(g,"class","ql-html-buttonGroup"),g.appendChild(b),g.appendChild(m),p.appendChild(h),p.appendChild(g),l.appendChild(p),i.appendChild(l),document.body.appendChild(i),b.onclick=()=>{document.body.removeChild(i)},i.onclick=b.onclick,l.onclick=t=>{t.preventDefault(),t.stopPropagation()},m.onclick=()=>{const e=h.value.split(/\r?\n/g).map(t=>t.trim()).join("");t.container.querySelector(".ql-editor").innerHTML=e,document.body.removeChild(i)}}return{setters:[function(t){n=t}],execute:function(){l=!1,o={prefixString:()=>"</> quill-html-edit-button: ",get log(){if(!l)return()=>{};return console.log.bind(console,this.prefixString())}},t("QuillHtmlEditPlugin",i=class{constructor(t,e){l=e&&e.debug,o.log("logging enabled");const n=t.getModule("toolbar");if(!n)throw new Error('quill.htmlEditButton requires the "toolbar" module to be included too');this.registerDivModule();const i=n.container,u=r("span");s(u,"class","ql-formats");const d=r("button");d.innerHTML=e.buttonHTML||"&lt;&gt;",d.title=e.buttonTitle||"Show HTML source",d.onclick=n=>{n.preventDefault(),c(t,e)},u.appendChild(d),i.appendChild(u)}registerDivModule(){const t=n.default.import("blots/block");class e extends t{}e.tagName="div",e.blotName="div",e.allowedChildren=t.allowedChildren,e.allowedChildren.push(t),n.default.register(e)}}),t("default",i)}}});
@@ -1,50 +0,0 @@
1
- System.register(["quill"], function (exports_1, context_1) {
2
- "use strict";
3
- var quill_1, BaseImage, ATTRIBUTES, QuillImageFormatPlugin;
4
- var __moduleName = context_1 && context_1.id;
5
- return {
6
- setters: [
7
- function (quill_1_1) {
8
- quill_1 = quill_1_1;
9
- }
10
- ],
11
- execute: function () {
12
- BaseImage = quill_1.default.import('formats/image');
13
- ATTRIBUTES = [
14
- 'alt',
15
- 'height',
16
- 'width',
17
- 'stratus-src',
18
- 'stratusSrc'
19
- ];
20
- QuillImageFormatPlugin = class QuillImageFormatPlugin extends BaseImage {
21
- constructor() {
22
- super(...arguments);
23
- this.blotName = 'imageCustom';
24
- this.tagName = 'IMG';
25
- }
26
- format(name, value) {
27
- console.log('format:', name, value, this.domNode.getAttribute('src'));
28
- if (ATTRIBUTES.indexOf(name) === -1) {
29
- super.format(name, value);
30
- return;
31
- }
32
- if (!value) {
33
- this.domNode.removeAttribute(name);
34
- return;
35
- }
36
- if (name === 'stratus-src') {
37
- console.log('stratus-src:', value);
38
- }
39
- if (name === 'stratusSrc') {
40
- console.log('stratusSrc:', value);
41
- }
42
- this.domNode.setAttribute(name, value);
43
- }
44
- };
45
- exports_1("QuillImageFormatPlugin", QuillImageFormatPlugin);
46
- }
47
- };
48
- });
49
-
50
- //# sourceMappingURL=quill-image-format.plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["quill-image-format.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;YACM,SAAS,GAAG,eAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;YAEzC,UAAU,GAAG;gBACf,KAAK;gBACL,QAAQ;gBACR,OAAO;gBACP,aAAa;gBACb,YAAY;aACf,CAAA;YAED,yBAAA,MAAa,sBAAuB,SAAQ,SAAS;gBAArD;;oBAGI,aAAQ,GAAG,aAAa,CAAA;oBACxB,YAAO,GAAG,KAAK,CAAA;gBA2DnB,CAAC;gBApBG,MAAM,CAAC,IAAS,EAAE,KAAU;oBACxB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;oBACrE,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;wBACjC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;wBACzB,OAAM;qBACT;oBACD,IAAI,CAAC,KAAK,EAAE;wBACR,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;wBAClC,OAAM;qBACT;oBACD,IAAI,IAAI,KAAK,aAAa,EAAE;wBACxB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;qBAErC;oBACD,IAAI,IAAI,KAAK,YAAY,EAAE;wBACvB,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;qBAEpC;oBACD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;gBAC1C,CAAC;aACJ,CAAA;;QACD,CAAC","file":"quill-image-format.plugin.js"}
@@ -1 +0,0 @@
1
- System.register(["quill"],function(t,s){"use strict";var e,r,o,i;s&&s.id;return{setters:[function(t){e=t}],execute:function(){r=e.default.import("formats/image"),o=["alt","height","width","stratus-src","stratusSrc"],i=class extends r{constructor(){super(...arguments),this.blotName="imageCustom",this.tagName="IMG"}format(t,s){console.log("format:",t,s,this.domNode.getAttribute("src")),-1!==o.indexOf(t)?s?("stratus-src"===t&&console.log("stratus-src:",s),"stratusSrc"===t&&console.log("stratusSrc:",s),this.domNode.setAttribute(t,s)):this.domNode.removeAttribute(t):super.format(t,s)}},t("QuillImageFormatPlugin",i)}}});
@@ -1,98 +0,0 @@
1
- System.register(["@stratusjs/runtime/stratus", "lodash", "quill"], function (exports_1, context_1) {
2
- "use strict";
3
- var stratus_1, lodash_1, quill_1, QuillInputButtonPlugin;
4
- var __moduleName = context_1 && context_1.id;
5
- return {
6
- setters: [
7
- function (stratus_1_1) {
8
- stratus_1 = stratus_1_1;
9
- },
10
- function (lodash_1_1) {
11
- lodash_1 = lodash_1_1;
12
- },
13
- function (quill_1_1) {
14
- quill_1 = quill_1_1;
15
- }
16
- ],
17
- execute: function () {
18
- QuillInputButtonPlugin = class QuillInputButtonPlugin {
19
- constructor(quill, options) {
20
- this.debug = false;
21
- this.buttonHTML = '<i class="fas fa-carrot"></i>';
22
- this.buttonTitle = 'Input Button';
23
- this.name = 'inputButton';
24
- this.eventName = 'input-button';
25
- this.uid = lodash_1.default.uniqueId(`quill_input_button_`);
26
- stratus_1.Stratus.Instances[this.uid] = this;
27
- this.debug = options && options.debug;
28
- if (!options || typeof options !== 'object') {
29
- options = {};
30
- }
31
- this.buttonHTML = options.buttonHTML || this.buttonHTML;
32
- this.buttonTitle = options.buttonTitle || this.buttonTitle;
33
- this.name = options.name || this.name;
34
- this.eventName = options.eventName || this.eventName;
35
- this.createToolbarModule(quill);
36
- }
37
- createToolbarModule(quill) {
38
- const toolbarModule = quill.getModule('toolbar');
39
- if (!toolbarModule) {
40
- throw new Error(`quill.${this.name} requires the "toolbar" module`);
41
- }
42
- this.registerDivModule();
43
- const toolbarEl = toolbarModule.container;
44
- const buttonContainer = document.createElement('span');
45
- buttonContainer.setAttribute('class', 'ql-formats');
46
- const button = document.createElement('button');
47
- button.innerHTML = this.buttonHTML;
48
- button.title = this.buttonTitle;
49
- button.onclick = (e) => {
50
- e.preventDefault();
51
- this.onClick(quill);
52
- };
53
- buttonContainer.appendChild(button);
54
- toolbarEl.appendChild(buttonContainer);
55
- }
56
- registerDivModule() {
57
- const Block = quill_1.default.import('blots/block');
58
- class Div extends Block {
59
- }
60
- Div.tagName = 'div';
61
- Div.blotName = 'div';
62
- Div.allowedChildren = Block.allowedChildren;
63
- Div.allowedChildren.push(Block);
64
- quill_1.default.register(Div);
65
- }
66
- findUID(el) {
67
- if ('uid' in el.dataset) {
68
- return el.dataset.uid;
69
- }
70
- return this.findUID(el.parentElement);
71
- }
72
- getInstance(uid) {
73
- if (!(uid in stratus_1.Stratus.Instances)) {
74
- return undefined;
75
- }
76
- return stratus_1.Stratus.Instances[uid];
77
- }
78
- onClick(quill) {
79
- const container = quill.container;
80
- const uid = this.findUID(container);
81
- const instance = this.getInstance(uid);
82
- if (!instance) {
83
- return;
84
- }
85
- instance.trigger(this.eventName, null, this);
86
- }
87
- trigger(name, data, callee) {
88
- if (this.debug) {
89
- console.log(`quill.${this.name}.trigger:`, name, data, callee);
90
- }
91
- }
92
- };
93
- exports_1("QuillInputButtonPlugin", QuillInputButtonPlugin);
94
- }
95
- };
96
- });
97
-
98
- //# sourceMappingURL=quill-input-button.plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["quill-input-button.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;YAeA,yBAAA,MAAa,sBAAsB;gBAY/B,YAAY,KAAU,EAAE,OAAY;oBAPpC,UAAK,GAAG,KAAK,CAAA;oBACb,eAAU,GAAG,+BAA+B,CAAA;oBAC5C,gBAAW,GAAG,cAAc,CAAA;oBAC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,CAAC,KAAU;oBACd,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;oBACjC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;oBACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;oBACtC,IAAI,CAAC,QAAQ,EAAE;wBACX,OAAM;qBACT;oBACD,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;gBAChD,CAAC;gBAED,OAAO,CAAC,IAAY,EAAE,IAAS,EAAE,MAAwB;oBAErD,IAAI,IAAI,CAAC,KAAK,EAAE;wBACZ,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,IAAI,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;qBACjE;gBACL,CAAC;aACJ,CAAA;;QAID,CAAC","file":"quill-input-button.plugin.js"}
@@ -1 +0,0 @@
1
- System.register(["@stratusjs/runtime/stratus","lodash","quill"],function(t,e){"use strict";var n,i,s;e&&e.id;return{setters:[function(t){n=t},function(t){i=t},function(t){s=t}],execute:function(){t("QuillInputButtonPlugin",class{constructor(t,e){this.debug=!1,this.buttonHTML='<i class="fas fa-carrot"></i>',this.buttonTitle="Input Button",this.name="inputButton",this.eventName="input-button",this.uid=i.default.uniqueId("quill_input_button_"),n.Stratus.Instances[this.uid]=this,this.debug=e&&e.debug,e&&"object"==typeof e||(e={}),this.buttonHTML=e.buttonHTML||this.buttonHTML,this.buttonTitle=e.buttonTitle||this.buttonTitle,this.name=e.name||this.name,this.eventName=e.eventName||this.eventName,this.createToolbarModule(t)}createToolbarModule(t){const e=t.getModule("toolbar");if(!e)throw new Error(`quill.${this.name} requires the "toolbar" module`);this.registerDivModule();const n=e.container,i=document.createElement("span");i.setAttribute("class","ql-formats");const s=document.createElement("button");s.innerHTML=this.buttonHTML,s.title=this.buttonTitle,s.onclick=e=>{e.preventDefault(),this.onClick(t)},i.appendChild(s),n.appendChild(i)}registerDivModule(){const t=s.default.import("blots/block");class e extends t{}e.tagName="div",e.blotName="div",e.allowedChildren=t.allowedChildren,e.allowedChildren.push(t),s.default.register(e)}findUID(t){return"uid"in t.dataset?t.dataset.uid:this.findUID(t.parentElement)}getInstance(t){if(t in n.Stratus.Instances)return n.Stratus.Instances[t]}onClick(t){const e=t.container,n=this.findUID(e),i=this.getInstance(n);i&&i.trigger(this.eventName,null,this)}trigger(t,e,n){this.debug&&console.log(`quill.${this.name}.trigger:`,t,e,n)}})}}});