@stratusjs/angular 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular.bundle.js +87 -1302
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +1 -1
- package/src/boot.js +1 -0
- package/src/boot.js.map +1 -1
- package/src/boot.min.js +1 -1
- package/src/boot.ts +1 -0
- package/src/core/dialog.interface.js.map +1 -0
- package/src/tree/tree-node.component.html +1 -1
- package/src/tree/tree-node.component.min.html +1 -1
- package/src/tree/tree.component.css +47 -2
- package/src/tree/tree.component.css.map +1 -1
- package/src/tree/tree.component.min.css +1 -1
- package/src/tree/tree.component.scss +99 -6
- package/src/editor/quill-break-blot.plugin.js +0 -38
- package/src/editor/quill-break-blot.plugin.js.map +0 -1
- package/src/editor/quill-break-blot.plugin.min.js +0 -1
- package/src/editor/quill-html-edit.plugin.js +0 -164
- package/src/editor/quill-html-edit.plugin.js.map +0 -1
- package/src/editor/quill-html-edit.plugin.min.js +0 -1
- package/src/editor/quill-image-format.plugin.js +0 -50
- package/src/editor/quill-image-format.plugin.js.map +0 -1
- package/src/editor/quill-image-format.plugin.min.js +0 -1
- package/src/editor/quill-input-button.plugin.js +0 -98
- package/src/editor/quill-input-button.plugin.js.map +0 -1
- package/src/editor/quill-input-button.plugin.min.js +0 -1
- package/src/froala/editor/froala-editor.directive.js +0 -328
- package/src/froala/editor/froala-editor.directive.js.map +0 -1
- package/src/froala/editor/froala-editor.directive.min.js +0 -1
- package/src/froala/editor/froala-editor.module.js +0 -37
- package/src/froala/editor/froala-editor.module.js.map +0 -1
- package/src/froala/editor/froala-editor.module.min.js +0 -1
- package/src/froala/editor/index.js +0 -22
- package/src/froala/editor/index.js.map +0 -1
- package/src/froala/editor/index.min.js +0 -1
- package/src/froala/plugins/image_manager.js +0 -364
- package/src/froala/plugins/image_manager.js.map +0 -1
- package/src/froala/plugins/image_manager.min.js +0 -1
- package/src/froala/view/froala-view.directive.js +0 -49
- package/src/froala/view/froala-view.directive.js.map +0 -1
- package/src/froala/view/froala-view.directive.min.js +0 -1
- package/src/froala/view/froala-view.module.js +0 -37
- package/src/froala/view/froala-view.module.js.map +0 -1
- package/src/froala/view/froala-view.module.min.js +0 -1
- package/src/froala/view/index.js +0 -22
- package/src/froala/view/index.js.map +0 -1
- package/src/froala/view/index.min.js +0 -1
- package/src/root/root.component.js +0 -43
- package/src/root/root.component.js.map +0 -1
- package/src/root/root.component.min.js +0 -1
package/package.json
CHANGED
package/src/boot.js
CHANGED
|
@@ -21,6 +21,7 @@ System.register(["@stratusjs/core/dom"], function (exports_1, context_1) {
|
|
|
21
21
|
'sa-map',
|
|
22
22
|
'sa-media-selector',
|
|
23
23
|
'sa-selector',
|
|
24
|
+
'sa-stripe-payment-method-item-display',
|
|
24
25
|
'sa-stripe-payment-method-list',
|
|
25
26
|
'sa-stripe-payment-method-selector',
|
|
26
27
|
'sa-tree'
|
package/src/boot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["boot.ts"],"names":[],"mappings":";;;;IAUA,SAAS,kBAAkB;QACvB,IAAI,cAAc,GAAG,YAAY,EAAE;YAC/B,OAAO,YAAY,CAAA;SACtB;QACD,MAAM,cAAc,GAAG,cAAc,CAAA;QACrC,cAAc,GAAG,cAAc,GAAG,GAAG,CAAA;QACrC,OAAO,cAAc,CAAA;IACzB,CAAC;IAKD,SAAS,WAAW;QAEhB,IAAI,IAAI,EAAE;YACN,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAA;YAClE,OAAM;SACT;QAID,MAAM,EAAE,GAAG;YAEP,SAAS;YACT,WAAW;YACX,QAAQ;YACR,mBAAmB;YACnB,aAAa;YACb,+BAA+B;YAC/B,mCAAmC;YACnC,SAAS;SAEZ,CAAA;QAED,IAAI,QAAQ,GAAG,KAAK,CAAA;QACpB,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YACnB,IAAI,QAAQ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AAE;gBAC/B,OAAM;aACT;YACD,QAAQ,GAAG,IAAI,CAAA;QACnB,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,QAAQ,EAAE;YACX,UAAU,CAAC,GAAG,EAAE;gBAEZ,WAAW,EAAE,CAAA;YACjB,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAA;YACxB,OAAM;SACT;QAED,IAAI,GAAG,IAAI,CAAA;QAEX,OAAO,CAAC,yBAAyB,CAAC,CAAA;IACtC,CAAC;;;;;;;;YA3DG,cAAc,GAAG,IAAI,CAAA;YACnB,YAAY,GAAG,IAAI,CAAA;YAYrB,IAAI,GAAG,KAAK,CAAA;YAiDhB,iBAAW,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;QACvC,CAAC","file":"boot.js"}
|
package/src/boot.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@stratusjs/core/dom"],function(e,t){"use strict";var s,r,o,
|
|
1
|
+
System.register(["@stratusjs/core/dom"],function(e,t){"use strict";var s,r,o,a;t&&t.id;function n(){if(a)return void console.log("stopped angular boot attempt after successful boot.");let e=!1;["sa-boot","sa-editor","sa-map","sa-media-selector","sa-selector","sa-stripe-payment-method-item-display","sa-stripe-payment-method-list","sa-stripe-payment-method-selector","sa-tree"].forEach(t=>{if(e)return;const s=document.getElementsByTagName(t);s&&s.length&&(e=!0)}),e?(a=!0,require("@stratusjs/angular/main")):setTimeout(()=>{n()},function(){if(r>o)return o;const e=r;return r*=1.2,e}())}return{setters:[function(e){s=e}],execute:function(){r=1e3,o=5e3,a=!1,s.DOMComplete().then(()=>n())}}});
|
package/src/boot.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["dialog.interface.ts"],"names":[],"mappings":"","file":"dialog.interface.js"}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
{{node.model.get('url') || node.model.get('route') || 'No route set!'}}
|
|
72
72
|
</small>
|
|
73
73
|
|
|
74
|
-
<span class="hover-show position-absolute svg-grey">
|
|
74
|
+
<span class="hover-box hover-show position-absolute svg-grey">
|
|
75
75
|
<a mat-button
|
|
76
76
|
(click)="openDialogClick(node)"
|
|
77
77
|
(dblclick)="openDialogDblClick(node)">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<div class="tree-node-content" [class.display-none]="parent && !isExpanded(parent)" [attr.data-id]="node.id" [attr.id]="'node-'+node.id"><a mat-icon-button class="hover-box" *ngIf="!hasChild(node)" disabled="disabled"></a><a mat-icon-button class="hover-box" *ngIf="hasChild(node)" (click)="toggleExpandedClick(node)" (dblclick)="toggleExpandedDblClick(node)" [attr.aria-label]="'toggle ' + getName(node)"><mat-icon class="mat-icon-rtl-mirror">{{isExpanded(node) ? 'expand_more' : 'chevron_right'}}</mat-icon></a><mat-icon class="type-icon hover-box" aria-hidden="true" *ngIf="node.model.get('content.contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + node.model.get('content.contentType.iconResourcePath')) | async"></mat-icon><mat-icon class="type-icon hover-box" aria-hidden="true" *ngIf="!node.model.get('content.contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + 'sitetheorycore/images/menuTypeIcon/default.svg') | async"></mat-icon><span cdkDragPlaceholder class="node-name hover-box" [attr.data-id]="node.id" [attr.id]="'node-'+node.id" [class.visibility-off]="node.model.get('status') === 0" [innerHTML]="getName(node)" (click)="openDialogClick(node)" (dblclick)="openDialogDblClick(node)"></span><small class="hover-box" [class.route-none]="!node.model.get('route')" [class.type-none]="!node.model.get('content.contentType.iconResourcePath')">{{node.model.get('url') || node.model.get('route') || 'No route set!'}} </small><span class="hover-show position-absolute svg-grey"><a mat-button (click)="openDialogClick(node)" (dblclick)="openDialogDblClick(node)"><mat-icon svgIcon="tree_edit" aria-hidden="false" aria-label="Edit Item">Edit</mat-icon></a><a mat-button (click)="destroy()"><mat-icon svgIcon="tree_delete" aria-hidden="false" aria-label="Delete Item">Delete</mat-icon></a><a mat-button [class.visibility-off]="node.model.get('status') === 0" (click)="toggleStatus()"><mat-icon svgIcon="tree_visibility" aria-hidden="false" aria-label="Toggle Visibility">Visibility</mat-icon></a><a mat-button [disabled]="!node.model.id" (click)="addChild()"><mat-icon svgIcon="tree_add" aria-hidden="false" aria-label="Add Child">Add Child</mat-icon></a></span><div cdkDropList [id]="tree.uid + '_node_' + node.id + '_drop_list'" [cdkDropListConnectedTo]="tree.dropLists" [cdkDropListData]="node" [cdkDropListDisabled]="false" (cdkDropListDropped)="tree.onDragDrop($event)" [cdkDropListSortingDisabled]="tree.cdkDropListSortingDisabled" class="tree-node-drop-list"><sa-tree-node cdkDrag *ngFor="let child of node.children" (cdkDragMoved)="tree.onDragMove($event)" [cdkDragData]="child" [tree]="tree" [parent]="node" [node]="child" class="tree-node"></sa-tree-node></div></div>
|
|
1
|
+
<div class="tree-node-content" [class.display-none]="parent && !isExpanded(parent)" [attr.data-id]="node.id" [attr.id]="'node-'+node.id"><a mat-icon-button class="hover-box" *ngIf="!hasChild(node)" disabled="disabled"></a><a mat-icon-button class="hover-box" *ngIf="hasChild(node)" (click)="toggleExpandedClick(node)" (dblclick)="toggleExpandedDblClick(node)" [attr.aria-label]="'toggle ' + getName(node)"><mat-icon class="mat-icon-rtl-mirror">{{isExpanded(node) ? 'expand_more' : 'chevron_right'}}</mat-icon></a><mat-icon class="type-icon hover-box" aria-hidden="true" *ngIf="node.model.get('content.contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + node.model.get('content.contentType.iconResourcePath')) | async"></mat-icon><mat-icon class="type-icon hover-box" aria-hidden="true" *ngIf="!node.model.get('content.contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + 'sitetheorycore/images/menuTypeIcon/default.svg') | async"></mat-icon><span cdkDragPlaceholder class="node-name hover-box" [attr.data-id]="node.id" [attr.id]="'node-'+node.id" [class.visibility-off]="node.model.get('status') === 0" [innerHTML]="getName(node)" (click)="openDialogClick(node)" (dblclick)="openDialogDblClick(node)"></span><small class="hover-box" [class.route-none]="!node.model.get('route')" [class.type-none]="!node.model.get('content.contentType.iconResourcePath')">{{node.model.get('url') || node.model.get('route') || 'No route set!'}} </small><span class="hover-box hover-show position-absolute svg-grey"><a mat-button (click)="openDialogClick(node)" (dblclick)="openDialogDblClick(node)"><mat-icon svgIcon="tree_edit" aria-hidden="false" aria-label="Edit Item">Edit</mat-icon></a><a mat-button (click)="destroy()"><mat-icon svgIcon="tree_delete" aria-hidden="false" aria-label="Delete Item">Delete</mat-icon></a><a mat-button [class.visibility-off]="node.model.get('status') === 0" (click)="toggleStatus()"><mat-icon svgIcon="tree_visibility" aria-hidden="false" aria-label="Toggle Visibility">Visibility</mat-icon></a><a mat-button [disabled]="!node.model.id" (click)="addChild()"><mat-icon svgIcon="tree_add" aria-hidden="false" aria-label="Add Child">Add Child</mat-icon></a></span><div cdkDropList [id]="tree.uid + '_node_' + node.id + '_drop_list'" [cdkDropListConnectedTo]="tree.dropLists" [cdkDropListData]="node" [cdkDropListDisabled]="false" (cdkDropListDropped)="tree.onDragDrop($event)" [cdkDropListSortingDisabled]="tree.cdkDropListSortingDisabled" class="tree-node-drop-list"><sa-tree-node cdkDrag *ngFor="let child of node.children" (cdkDragMoved)="tree.onDragMove($event)" [cdkDragData]="child" [tree]="tree" [parent]="node" [node]="child" class="tree-node"></sa-tree-node></div></div>
|
|
@@ -33,23 +33,47 @@
|
|
|
33
33
|
border-bottom: 2px solid #00b7ff !important;
|
|
34
34
|
}
|
|
35
35
|
.tree .tree-node {
|
|
36
|
-
display:
|
|
36
|
+
display: grid;
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
place-content: center start;
|
|
37
39
|
cursor: move;
|
|
38
40
|
}
|
|
39
41
|
.tree .tree-node a, .tree .tree-node mat-button, .tree .tree-node mat-icon-button {
|
|
40
42
|
cursor: pointer;
|
|
41
43
|
}
|
|
44
|
+
.tree .tree-node .hover-box {
|
|
45
|
+
padding-right: 0.5rem;
|
|
46
|
+
}
|
|
42
47
|
.tree .tree-node .hover-box:hover ~ .hover-show {
|
|
43
48
|
display: unset;
|
|
44
49
|
}
|
|
45
50
|
.tree .tree-node .hover-show {
|
|
46
51
|
display: none;
|
|
52
|
+
padding-bottom: 1rem;
|
|
53
|
+
padding-right: 5rem;
|
|
47
54
|
}
|
|
48
55
|
.tree .tree-node .hover-show:hover {
|
|
49
56
|
display: unset;
|
|
50
57
|
}
|
|
51
58
|
.tree .tree-node .tree-node {
|
|
52
|
-
padding-left:
|
|
59
|
+
padding-left: 2.5rem;
|
|
60
|
+
}
|
|
61
|
+
.tree .tree-node .tree-node .tree-node-content {
|
|
62
|
+
padding-top: 0.25rem;
|
|
63
|
+
padding-bottom: 0.25rem;
|
|
64
|
+
}
|
|
65
|
+
.tree .tree-node .tree-node .tree-node-content .node-name {
|
|
66
|
+
font-size: 10pt;
|
|
67
|
+
}
|
|
68
|
+
.tree .tree-node .tree-node-content {
|
|
69
|
+
padding-top: 1rem;
|
|
70
|
+
padding-bottom: 1rem;
|
|
71
|
+
padding-right: 0.5rem;
|
|
72
|
+
}
|
|
73
|
+
.tree .tree-node .tree-node-content .node-name {
|
|
74
|
+
font-weight: bold;
|
|
75
|
+
font-size: 15pt;
|
|
76
|
+
padding-right: 0.5rem;
|
|
53
77
|
}
|
|
54
78
|
.tree .tree-node .tree-node-content .visibility-off {
|
|
55
79
|
opacity: 0.5;
|
|
@@ -67,6 +91,27 @@
|
|
|
67
91
|
.tree .tree-node .tree-node-content .mat-button-disabled {
|
|
68
92
|
height: 24px;
|
|
69
93
|
}
|
|
94
|
+
.tree .tree-node.cdk-drop-list-dragging .tree-node:not(.cdk-drag-placeholder) {
|
|
95
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
96
|
+
}
|
|
97
|
+
.tree .cdk-drop-list-dragging .hover-show {
|
|
98
|
+
display: none !important;
|
|
99
|
+
}
|
|
100
|
+
.cdk-drag-preview {
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
border-radius: 4px;
|
|
103
|
+
padding: 0 !important;
|
|
104
|
+
}
|
|
105
|
+
.cdk-drag-preview .hover-show {
|
|
106
|
+
display: none !important;
|
|
107
|
+
}
|
|
108
|
+
.cdk-drag-placeholder {
|
|
109
|
+
opacity: 50%;
|
|
110
|
+
}
|
|
111
|
+
.cdk-drag-placeholder .hover-show {
|
|
112
|
+
display: none !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
70
115
|
.tree-dialog-content .form-field {
|
|
71
116
|
width: 320px;
|
|
72
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/angular/src/tree/tree.component.scss"],"names":[],"mappings":"AAAA;AAMI;EACE;;AAIF;EACE;;AAKF;EACE;;AAIF;EACE;;AAIF;EACE;;AAGJ;EACE;EACA;EACA;;AAEF;EACE;EACA;;
|
|
1
|
+
{"version":3,"sources":["packages/angular/src/tree/tree.component.scss"],"names":[],"mappings":"AAAA;AAMI;EACE;;AAIF;EACE;;AAKF;EACE;;AAIF;EACE;;AAIF;EACE;;AAGJ;EACE;EACA;EACA;;AAEF;EACE;EACA;;AAIA;EACE;;AAIF;EACE;;AAIF;EACE;;AAKJ;EAKE;EASA;EACA;EAiBA;;AAeA;EACE;;AAIA;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;;AACA;EACE;;AAKN;EAEE;;AACA;EACE;EACA;;AACA;EACE;;AAON;EAME;EACA;EACA;;AAPA;EACE;EACA;EACA;;AASF;EACE;;AAEF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAmBF;EACE;;AA2CA;EACE;;AAiDN;EACE;EACA;EAIA;;AACA;EACE;;AAGJ;EACE;;AACA;EACE;;;AAWN;EACE;;AAEF;EACE;;AAQA;EAEE;;AAKF;EACE","file":"tree.component.css","sourcesContent":["/* Based on Angular Material 8+ */\n.tree {\n //margin: 0 25px 25px 0;\n //display: inline-block;\n //vertical-align: top;\n .display {\n &-none {\n display: none;\n }\n }\n .position {\n &-absolute {\n position: absolute;\n }\n }\n // SVG Colors\n .svg-grey {\n svg g {\n fill: #666666;\n }\n }\n .visibility-off {\n svg g {\n fill: #FF5B3A;\n }\n }\n .full {\n &-width {\n width: 100%;\n }\n }\n ul, li {\n margin-top: 0;\n margin-bottom: 0;\n list-style-type: none;\n }\n .float-right {\n position: relative;\n float: right;\n }\n // Drop Location Borders\n .drop {\n &-inside {\n border: 2px solid #00b7ff !important;\n //padding-top: 5px;\n //padding-bottom: 5px;\n }\n &-before {\n border-top: 2px solid #00b7ff !important;\n //padding-top: 5px;\n //padding-bottom: 5px;\n }\n &-after {\n border-bottom: 2px solid #00b7ff !important;\n //padding-top: 5px;\n //padding-bottom: 5px;\n }\n }\n .tree-node {\n // We have to use 'block' since 'flex' makes the Drag & Drop even more inaccurate\n //display: block;\n\n // Grid works better for alignment and Drag & Drop calculations\n display: grid;\n\n // Padding Options\n //padding-top: .225rem;\n //padding-bottom: .225rem;\n //padding: 20px 10px;\n\n // Height & Alignment\n //min-height: 2.5rem;\n vertical-align: middle;\n place-content: center start;\n\n // Debug Borders\n //border: dashed 1px #ccc;\n\n //color: rgba(0, 0, 0, 0.87);\n\n // Flex Design (Doesn't work well with Drag & Drop(\n //display: flex;\n //flex-direction: row;\n\n // Flex Alignment\n //align-items: center;\n //justify-content: space-between;\n //box-sizing: border-box;\n\n // Cursor\n cursor: move;\n\n // Alternate Indentation Calculations\n //&:before {\n // position: absolute;\n // top: 15px;\n // left: 0;\n // width: 10px;\n // height: 1px;\n // margin: auto;\n // content: '';\n // background-color: #666;\n //}\n\n // Material Buttons\n a, mat-button, mat-icon-button {\n cursor: pointer;\n }\n // only show certain elements on hover\n .hover {\n &-box {\n padding-right: 0.5rem;\n }\n &-box:hover ~ .hover-show {\n display: unset;\n }\n &-show {\n display: none;\n padding-bottom: 1rem;\n padding-right: 5rem;\n &:hover {\n display: unset;\n }\n }\n }\n\n .tree-node {\n // be explicit for child padding\n padding-left: 2.5rem;\n .tree-node-content {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n .node-name {\n font-size: 10pt;\n }\n }\n\n // Debug Borders\n //border: dashed 1px #ccc;\n }\n .tree-node-content {\n .node-name {\n font-weight: bold;\n font-size: 15pt;\n padding-right: 0.5rem;\n }\n padding-top: 1rem;\n padding-bottom: 1rem;\n padding-right: 0.5rem;\n //.mat-icon-button {\n // width: auto;\n // height: auto;\n //}\n .visibility-off {\n opacity: 0.5;\n }\n .type-icon {\n height: 15px;\n width: 22px;\n }\n .type-none {\n padding-left: 6px;\n }\n .route-none {\n color: #FF5B3A;\n }\n .mat-button-disabled {\n height: 24px;\n }\n }\n &-drag {\n &-preview {\n //box-sizing: border-box;\n //border-radius: 4px;\n //padding: 10px;\n //box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);\n }\n }\n &-drop-list {\n //border: solid 1px #ccc;\n //min-height: 20px;\n //border-radius: 4px;\n //overflow: hidden;\n //display: block;\n }\n &.cdk-drop-list-dragging {\n .tree-node:not(.cdk-drag-placeholder) {\n transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n }\n }\n &:last-child {\n //border: none;\n }\n }\n .cdk {\n // NOTE: Much of these Drag Selectors won't work, since this element gets pulled out of the Tree Element when being dragged.\n &-drag {\n &-preview {\n //box-sizing: border-box;\n //border-radius: 4px;\n //box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n //0 8px 10px 1px rgba(0, 0, 0, 0.14),\n //0 3px 14px 2px rgba(0, 0, 0, 0.12);\n }\n &-placeholder {\n //opacity: 0;\n }\n &-animating {\n //transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n }\n }\n &-drop-list {\n &-dragging {\n //min-width: 100px;\n //min-height: 20px;\n //border-style: dashed !important;\n //border-radius: 4px !important;\n //background: lightgreen !important;\n //.tree-node-drop-list {\n // min-width: 100px;\n // min-height: 20px;\n // border-style: dashed !important;\n // border-radius: 4px !important;\n //}\n //&.tree-node-drop-list {\n // min-width: 100px;\n // min-height: 20px;\n // border-style: dashed !important;\n // border-radius: 4px !important;\n //}\n .hover-show {\n display: none !important;\n }\n }\n &-receiving {\n //min-width: 100px;\n //min-height: 20px;\n //border-style: dashed !important;\n //border-radius: 4px !important;\n //background: lightyellow !important;\n .tree-node-drop-list {\n //min-width: 100px;\n //min-height: 20px;\n //border-style: dashed !important;\n //border-radius: 4px !important;\n //background: lightcyan !important;\n }\n &.tree-node-drop-list {\n //min-width: 100px;\n //min-height: 20px;\n //border-style: dashed !important;\n //border-radius: 4px !important;\n //background: lightsalmon !important;\n }\n }\n }\n }\n}\n//.tree-node {\n// z-index: 994;\n// .tree-node {\n// z-index: 995;\n// .tree-node {\n// z-index: 996;\n// .tree-node {\n// z-index: 997;\n// .tree-node {\n// z-index: 998;\n// .tree-node {\n// z-index: 999;\n// }\n// }\n// }\n// }\n// }\n//}\n\n// NOTE: CDK Drag needs to be outside .tree, since this element gets pulled out of the Tree Element when being dragged.\n.cdk {\n &-drag {\n &-preview {\n box-sizing: border-box;\n border-radius: 4px;\n //box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n //0 8px 10px 1px rgba(0, 0, 0, 0.14),\n //0 3px 14px 2px rgba(0, 0, 0, 0.12);\n padding: 0 !important;\n .hover-show {\n display: none !important;\n }\n }\n &-placeholder {\n opacity: 50%;\n .hover-show {\n display: none !important;\n }\n }\n //&-animating {\n // transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\n //}\n }\n}\n\n// Tree Dialog\n.tree-dialog-content {\n .form-field {\n width: 320px;\n }\n .dialog-form {\n margin-top: 20px;\n }\n .radio {\n &-group {\n //display: flex;\n //flex-direction: column;\n //margin: 15px 0;\n }\n &-button {\n //margin: 5px;\n padding: 0 5px;\n }\n }\n // SVG Colors\n .svg-grey {\n svg g {\n fill: #666666;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tree .display-none{display:none}.tree .position-absolute{position:absolute}.tree .svg-grey svg g{fill:#666}.tree .visibility-off svg g{fill:#ff5b3a}.tree .full-width{width:100%}.tree li,.tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.tree .float-right{position:relative;float:right}.tree .drop-inside{border:2px solid #00b7ff!important}.tree .drop-before{border-top:2px solid #00b7ff!important}.tree .drop-after{border-bottom:2px solid #00b7ff!important}.tree .tree-node{display:
|
|
1
|
+
.tree .display-none{display:none}.tree .position-absolute{position:absolute}.tree .svg-grey svg g{fill:#666}.tree .visibility-off svg g{fill:#ff5b3a}.tree .full-width{width:100%}.tree li,.tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.tree .float-right{position:relative;float:right}.tree .drop-inside{border:2px solid #00b7ff!important}.tree .drop-before{border-top:2px solid #00b7ff!important}.tree .drop-after{border-bottom:2px solid #00b7ff!important}.tree .tree-node{display:grid;vertical-align:middle;place-content:center start;cursor:move}.tree .tree-node a,.tree .tree-node mat-button,.tree .tree-node mat-icon-button{cursor:pointer}.tree .tree-node .hover-box{padding-right:.5rem}.tree .tree-node .hover-box:hover~.hover-show{display:unset}.tree .tree-node .hover-show{display:none;padding-bottom:1rem;padding-right:5rem}.tree .tree-node .hover-show:hover{display:unset}.tree .tree-node .tree-node{padding-left:2.5rem}.tree .tree-node .tree-node .tree-node-content{padding-top:.25rem;padding-bottom:.25rem}.tree .tree-node .tree-node .tree-node-content .node-name{font-size:10pt}.tree .tree-node .tree-node-content{padding-top:1rem;padding-bottom:1rem;padding-right:.5rem}.tree .tree-node .tree-node-content .node-name{font-weight:700;font-size:15pt;padding-right:.5rem}.tree .tree-node .tree-node-content .visibility-off{opacity:.5}.tree .tree-node .tree-node-content .type-icon{height:15px;width:22px}.tree .tree-node .tree-node-content .type-none{padding-left:6px}.tree .tree-node .tree-node-content .route-none{color:#ff5b3a}.tree .tree-node .tree-node-content .mat-button-disabled{height:24px}.tree .tree-node.cdk-drop-list-dragging .tree-node:not(.cdk-drag-placeholder){transition:transform 250ms cubic-bezier(0,0,.2,1)}.tree .cdk-drop-list-dragging .hover-show{display:none!important}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;padding:0!important}.cdk-drag-preview .hover-show{display:none!important}.cdk-drag-placeholder{opacity:50%}.cdk-drag-placeholder .hover-show{display:none!important}.tree-dialog-content .form-field{width:320px}.tree-dialog-content .dialog-form{margin-top:20px}.tree-dialog-content .radio-button{padding:0 5px}.tree-dialog-content .svg-grey svg g{fill:#666}
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
position: relative;
|
|
39
39
|
float: right;
|
|
40
40
|
}
|
|
41
|
+
// Drop Location Borders
|
|
41
42
|
.drop {
|
|
42
43
|
&-inside {
|
|
43
44
|
border: 2px solid #00b7ff !important;
|
|
@@ -57,37 +58,99 @@
|
|
|
57
58
|
}
|
|
58
59
|
.tree-node {
|
|
59
60
|
// We have to use 'block' since 'flex' makes the Drag & Drop even more inaccurate
|
|
60
|
-
display: block;
|
|
61
|
+
//display: block;
|
|
62
|
+
|
|
63
|
+
// Grid works better for alignment and Drag & Drop calculations
|
|
64
|
+
display: grid;
|
|
65
|
+
|
|
66
|
+
// Padding Options
|
|
67
|
+
//padding-top: .225rem;
|
|
68
|
+
//padding-bottom: .225rem;
|
|
61
69
|
//padding: 20px 10px;
|
|
62
|
-
|
|
70
|
+
|
|
71
|
+
// Height & Alignment
|
|
72
|
+
//min-height: 2.5rem;
|
|
73
|
+
vertical-align: middle;
|
|
74
|
+
place-content: center start;
|
|
75
|
+
|
|
76
|
+
// Debug Borders
|
|
77
|
+
//border: dashed 1px #ccc;
|
|
78
|
+
|
|
63
79
|
//color: rgba(0, 0, 0, 0.87);
|
|
80
|
+
|
|
81
|
+
// Flex Design (Doesn't work well with Drag & Drop(
|
|
64
82
|
//display: flex;
|
|
65
83
|
//flex-direction: row;
|
|
84
|
+
|
|
85
|
+
// Flex Alignment
|
|
66
86
|
//align-items: center;
|
|
67
87
|
//justify-content: space-between;
|
|
68
88
|
//box-sizing: border-box;
|
|
89
|
+
|
|
90
|
+
// Cursor
|
|
69
91
|
cursor: move;
|
|
92
|
+
|
|
93
|
+
// Alternate Indentation Calculations
|
|
94
|
+
//&:before {
|
|
95
|
+
// position: absolute;
|
|
96
|
+
// top: 15px;
|
|
97
|
+
// left: 0;
|
|
98
|
+
// width: 10px;
|
|
99
|
+
// height: 1px;
|
|
100
|
+
// margin: auto;
|
|
101
|
+
// content: '';
|
|
102
|
+
// background-color: #666;
|
|
103
|
+
//}
|
|
104
|
+
|
|
105
|
+
// Material Buttons
|
|
70
106
|
a, mat-button, mat-icon-button {
|
|
71
107
|
cursor: pointer;
|
|
72
108
|
}
|
|
73
109
|
// only show certain elements on hover
|
|
74
110
|
.hover {
|
|
111
|
+
&-box {
|
|
112
|
+
padding-right: 0.5rem;
|
|
113
|
+
}
|
|
75
114
|
&-box:hover ~ .hover-show {
|
|
76
115
|
display: unset;
|
|
77
116
|
}
|
|
78
117
|
&-show {
|
|
79
118
|
display: none;
|
|
119
|
+
padding-bottom: 1rem;
|
|
120
|
+
padding-right: 5rem;
|
|
80
121
|
&:hover {
|
|
81
122
|
display: unset;
|
|
82
123
|
}
|
|
83
124
|
}
|
|
84
125
|
}
|
|
85
126
|
|
|
86
|
-
.tree-node {
|
|
87
|
-
padding
|
|
88
|
-
|
|
127
|
+
.tree-node {
|
|
128
|
+
// be explicit for child padding
|
|
129
|
+
padding-left: 2.5rem;
|
|
130
|
+
.tree-node-content {
|
|
131
|
+
padding-top: 0.25rem;
|
|
132
|
+
padding-bottom: 0.25rem;
|
|
133
|
+
.node-name {
|
|
134
|
+
font-size: 10pt;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Debug Borders
|
|
139
|
+
//border: dashed 1px #ccc;
|
|
89
140
|
}
|
|
90
141
|
.tree-node-content {
|
|
142
|
+
.node-name {
|
|
143
|
+
font-weight: bold;
|
|
144
|
+
font-size: 15pt;
|
|
145
|
+
padding-right: 0.5rem;
|
|
146
|
+
}
|
|
147
|
+
padding-top: 1rem;
|
|
148
|
+
padding-bottom: 1rem;
|
|
149
|
+
padding-right: 0.5rem;
|
|
150
|
+
//.mat-icon-button {
|
|
151
|
+
// width: auto;
|
|
152
|
+
// height: auto;
|
|
153
|
+
//}
|
|
91
154
|
.visibility-off {
|
|
92
155
|
opacity: 0.5;
|
|
93
156
|
}
|
|
@@ -122,7 +185,7 @@
|
|
|
122
185
|
}
|
|
123
186
|
&.cdk-drop-list-dragging {
|
|
124
187
|
.tree-node:not(.cdk-drag-placeholder) {
|
|
125
|
-
|
|
188
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
126
189
|
}
|
|
127
190
|
}
|
|
128
191
|
&:last-child {
|
|
@@ -130,6 +193,7 @@
|
|
|
130
193
|
}
|
|
131
194
|
}
|
|
132
195
|
.cdk {
|
|
196
|
+
// NOTE: Much of these Drag Selectors won't work, since this element gets pulled out of the Tree Element when being dragged.
|
|
133
197
|
&-drag {
|
|
134
198
|
&-preview {
|
|
135
199
|
//box-sizing: border-box;
|
|
@@ -164,6 +228,9 @@
|
|
|
164
228
|
// border-style: dashed !important;
|
|
165
229
|
// border-radius: 4px !important;
|
|
166
230
|
//}
|
|
231
|
+
.hover-show {
|
|
232
|
+
display: none !important;
|
|
233
|
+
}
|
|
167
234
|
}
|
|
168
235
|
&-receiving {
|
|
169
236
|
//min-width: 100px;
|
|
@@ -208,6 +275,32 @@
|
|
|
208
275
|
// }
|
|
209
276
|
//}
|
|
210
277
|
|
|
278
|
+
// NOTE: CDK Drag needs to be outside .tree, since this element gets pulled out of the Tree Element when being dragged.
|
|
279
|
+
.cdk {
|
|
280
|
+
&-drag {
|
|
281
|
+
&-preview {
|
|
282
|
+
box-sizing: border-box;
|
|
283
|
+
border-radius: 4px;
|
|
284
|
+
//box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
285
|
+
//0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
286
|
+
//0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
287
|
+
padding: 0 !important;
|
|
288
|
+
.hover-show {
|
|
289
|
+
display: none !important;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
&-placeholder {
|
|
293
|
+
opacity: 50%;
|
|
294
|
+
.hover-show {
|
|
295
|
+
display: none !important;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
//&-animating {
|
|
299
|
+
// transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
300
|
+
//}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
211
304
|
// Tree Dialog
|
|
212
305
|
.tree-dialog-content {
|
|
213
306
|
.form-field {
|
|
@@ -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 || '<>';
|
|
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;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K,CAAC,eAAe,CAAA;oBAC3C,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;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=" ".repeat(2);let n=0;let l=null,i=null,r="";for(let o=0;o<=t.length;o++){l=t.substr(o,1),i=t.substr(o+1,1);const s="<br>"===t.substr(o,4),c="<"===l&&"/"===i&&!s;s&&(r+="\n",n--,o+=4),"<"===l&&"/"!==i&&!s?(r+="\n"+e.repeat(n),n++):c?(--n<0&&(n=0),r+="\n"+e.repeat(n)):(" "===l&&" "===i||"\n"===l&&""===t.substr(o,t.substr(o).indexOf("<")).trim())&&(l=""),r+=l}return o.log("formatHTML",{before:t,after:r}),r}(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||"<>",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)}}});
|