glib-web 0.5.77
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/.eslintrc.js +37 -0
- package/LICENSE +201 -0
- package/README.md +33 -0
- package/action.js +167 -0
- package/actions/analytics/logEvent.js +26 -0
- package/actions/auth/creditCard.js +29 -0
- package/actions/auth/restart.js +5 -0
- package/actions/auth/saveCsrfToken.js +12 -0
- package/actions/cables/push.js +38 -0
- package/actions/dialogs/alert.js +15 -0
- package/actions/dialogs/close.js +7 -0
- package/actions/dialogs/notification.js +14 -0
- package/actions/dialogs/oauth.js +6 -0
- package/actions/dialogs/open.js +7 -0
- package/actions/dialogs/options.js +5 -0
- package/actions/dialogs/show.js +5 -0
- package/actions/forms/submit.js +15 -0
- package/actions/http/delete.js +7 -0
- package/actions/http/patch.js +7 -0
- package/actions/http/post.js +7 -0
- package/actions/http/put.js +7 -0
- package/actions/panels/scrollTo.js +18 -0
- package/actions/panels/scrollToBottom.js +11 -0
- package/actions/runMultiple.js +11 -0
- package/actions/sheets/select.js +5 -0
- package/actions/snackbars/alert.js +15 -0
- package/actions/snackbars/select.js +5 -0
- package/actions/timeouts/set.js +20 -0
- package/actions/windows/close.js +13 -0
- package/actions/windows/closeAll.js +16 -0
- package/actions/windows/closeWithReload.js +18 -0
- package/actions/windows/open.js +5 -0
- package/actions/windows/openWeb.js +5 -0
- package/actions/windows/refreshState.js +5 -0
- package/actions/windows/reload.js +24 -0
- package/actions/ws/push.js +35 -0
- package/app.vue +180 -0
- package/components/_button.vue +101 -0
- package/components/_dropdownMenu.vue +76 -0
- package/components/_icon.vue +50 -0
- package/components/_message.vue +25 -0
- package/components/avatar.vue +16 -0
- package/components/banners/alert.vue +49 -0
- package/components/banners/select.vue +82 -0
- package/components/button.vue +13 -0
- package/components/calendar.vue +105 -0
- package/components/charts/column.vue +26 -0
- package/components/charts/line.vue +61 -0
- package/components/chip.vue +24 -0
- package/components/component.vue +222 -0
- package/components/datetime.vue +54 -0
- package/components/fab.vue +33 -0
- package/components/fields/_patternText.vue +61 -0
- package/components/fields/_select.vue +86 -0
- package/components/fields/autocomplete.vue +73 -0
- package/components/fields/check.vue +104 -0
- package/components/fields/checkGroup.vue +51 -0
- package/components/fields/country/countries.js +251 -0
- package/components/fields/country/field.vue +81 -0
- package/components/fields/country/regions.js +12 -0
- package/components/fields/creditCard.vue +105 -0
- package/components/fields/date.vue +24 -0
- package/components/fields/datetime.vue +49 -0
- package/components/fields/dynamicGroup.vue +106 -0
- package/components/fields/dynamicSelect.vue +173 -0
- package/components/fields/file.vue +166 -0
- package/components/fields/googlePlace.vue +158 -0
- package/components/fields/hidden.vue +18 -0
- package/components/fields/location.vue +223 -0
- package/components/fields/newRichText.vue +191 -0
- package/components/fields/phone/countries.js +315 -0
- package/components/fields/phone/field.vue +348 -0
- package/components/fields/phone/sprite.css +1071 -0
- package/components/fields/radio.vue +64 -0
- package/components/fields/radioGroup.vue +93 -0
- package/components/fields/rating.vue +26 -0
- package/components/fields/richText.vue +172 -0
- package/components/fields/select.vue +17 -0
- package/components/fields/stripe/stripeFields.vue +93 -0
- package/components/fields/stripe/stripeIndividualFields.vue +207 -0
- package/components/fields/stripeExternalAccount.vue +135 -0
- package/components/fields/stripeToken.vue +59 -0
- package/components/fields/submit.vue +23 -0
- package/components/fields/text.vue +144 -0
- package/components/fields/textarea.vue +59 -0
- package/components/fields/timeZone.vue +22 -0
- package/components/fields/timer.vue +83 -0
- package/components/h1.vue +28 -0
- package/components/h2.vue +20 -0
- package/components/h3.vue +22 -0
- package/components/h4.vue +20 -0
- package/components/h5.vue +20 -0
- package/components/h6.vue +20 -0
- package/components/hr.vue +13 -0
- package/components/html.vue +13 -0
- package/components/icon.vue +25 -0
- package/components/image.vue +87 -0
- package/components/label.vue +62 -0
- package/components/map.vue +206 -0
- package/components/markdown.vue +52 -0
- package/components/mixins/events.js +178 -0
- package/components/mixins/generic.js +58 -0
- package/components/mixins/list/autoload.js +144 -0
- package/components/mixins/longClick.js +56 -0
- package/components/mixins/scrolling.js +35 -0
- package/components/mixins/styles.js +221 -0
- package/components/mixins/table/autoload.js +131 -0
- package/components/mixins/table/export.js +52 -0
- package/components/mixins/table/import.js +106 -0
- package/components/mixins/text.js +20 -0
- package/components/mixins/ws/actionCable.js +48 -0
- package/components/mixins/ws/phoenixSocket.js +117 -0
- package/components/p.vue +36 -0
- package/components/panels/carousel.vue +55 -0
- package/components/panels/column.vue +117 -0
- package/components/panels/custom.vue +52 -0
- package/components/panels/flow.vue +81 -0
- package/components/panels/form.vue +126 -0
- package/components/panels/horizontal.vue +73 -0
- package/components/panels/list.vue +241 -0
- package/components/panels/responsive.vue +88 -0
- package/components/panels/scroll.vue +68 -0
- package/components/panels/split.vue +52 -0
- package/components/panels/table.vue +234 -0
- package/components/panels/ul.vue +34 -0
- package/components/panels/vertical.vue +71 -0
- package/components/panels/web.vue +11 -0
- package/components/spacer.vue +11 -0
- package/components/switch.vue +42 -0
- package/components/tabBar.vue +44 -0
- package/extensions/array.js +20 -0
- package/extensions/string.js +21 -0
- package/index.js +195 -0
- package/keys.js +12 -0
- package/nav/appbar.vue +117 -0
- package/nav/content.vue +40 -0
- package/nav/dialog.vue +127 -0
- package/nav/drawer.vue +88 -0
- package/nav/drawerButton.vue +28 -0
- package/nav/drawerLabel.vue +21 -0
- package/nav/sheet.vue +57 -0
- package/nav/snackbar.vue +72 -0
- package/package.json +42 -0
- package/settings.json.example +21 -0
- package/static/plugins/alignment/alignment.js +76 -0
- package/static/plugins/alignment/alignment.min.js +1 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +46 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +1 -0
- package/static/plugins/blockcode/blockcode.js +110 -0
- package/static/plugins/blockcode/blockcode.min.js +1 -0
- package/static/plugins/clips/clips.js +44 -0
- package/static/plugins/clips/clips.min.js +1 -0
- package/static/plugins/counter/counter.js +60 -0
- package/static/plugins/counter/counter.min.js +1 -0
- package/static/plugins/definedlinks/definedlinks.js +64 -0
- package/static/plugins/definedlinks/definedlinks.min.js +1 -0
- package/static/plugins/handle/handle.js +173 -0
- package/static/plugins/handle/handle.min.js +1 -0
- package/static/plugins/icons/icons.js +72 -0
- package/static/plugins/icons/icons.min.js +1 -0
- package/static/plugins/imageposition/imageposition.js +85 -0
- package/static/plugins/imageposition/imageposition.min.js +1 -0
- package/static/plugins/inlineformat/inlineformat.js +85 -0
- package/static/plugins/inlineformat/inlineformat.min.js +1 -0
- package/static/plugins/removeformat/removeformat.js +28 -0
- package/static/plugins/removeformat/removeformat.min.js +1 -0
- package/static/plugins/selector/selector.js +96 -0
- package/static/plugins/selector/selector.min.js +1 -0
- package/static/plugins/specialchars/specialchars.js +63 -0
- package/static/plugins/specialchars/specialchars.min.js +1 -0
- package/static/plugins/textdirection/textdirection.js +55 -0
- package/static/plugins/textdirection/textdirection.min.js +1 -0
- package/static/plugins/textexpander/textexpander.js +46 -0
- package/static/plugins/textexpander/textexpander.min.js +1 -0
- package/static/plugins/underline/underline.js +27 -0
- package/static/plugins/underline/underline.min.js +1 -0
- package/static/redactorx.css +1344 -0
- package/static/redactorx.js +14254 -0
- package/static/redactorx.min.css +1 -0
- package/static/redactorx.min.js +1 -0
- package/static/redactorx.usm.min.js +2 -0
- package/styles/test.sass +3 -0
- package/styles/test.scss +5 -0
- package/templates/_menu.vue +38 -0
- package/templates/comment.vue +202 -0
- package/templates/featured.vue +32 -0
- package/templates/thumbnail.vue +138 -0
- package/templates/unsupported.vue +12 -0
- package/utils/app.js +14 -0
- package/utils/dom.js +13 -0
- package/utils/form.js +34 -0
- package/utils/format.js +14 -0
- package/utils/hash.js +29 -0
- package/utils/helper.js +44 -0
- package/utils/history.js +70 -0
- package/utils/http.js +209 -0
- package/utils/launch.js +135 -0
- package/utils/private/ws.js +22 -0
- package/utils/public.js +23 -0
- package/utils/settings.js +48 -0
- package/utils/storage.js +9 -0
- package/utils/type.js +69 -0
- package/utils/uploader.js +121 -0
- package/utils/url.js +132 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
RedactorX.add('plugin', 'textdirection', {
|
|
2
|
+
translations: {
|
|
3
|
+
en: {
|
|
4
|
+
"textdirection": {
|
|
5
|
+
"title": "RTL-LTR",
|
|
6
|
+
"ltr": "Left to Right",
|
|
7
|
+
"rtl": "Right to Left"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaults: {
|
|
12
|
+
icon: '<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.8 8.10002943c.12590292.09442719.2.24262134.2.4v1.49999997h9c.5522847 0 1 .4477153 1 1 0 .5128359-.3860402.9355072-.8833789.9932723l-.1166211.0067277h-9v1.5c0 .2761424-.22385763.5-.5.5-.15737865 0-.30557281-.0740971-.4-.2l-1.875-2.5c-.13333333-.1777778-.13333333-.4222222 0-.6l1.875-2.49999997c.16568542-.2209139.4790861-.26568543.7-.1zm7.4-6c.2209139-.16568543.5343146-.1209139.7.1l1.875 2.5c.1333333.17777777.1333333.42222222 0 .6l-1.875 2.5c-.0944272.12590292-.2426213.2-.4.2-.2761424 0-.5-.22385763-.5-.5v-1.5h-9c-.55228475 0-1-.44771525-1-1 0-.51283584.38604019-.93550716.88337887-.99327227l.11662113-.00672773 8.999-.00002943.001-1.49997057c0-.12590293.0474221-.24592777.1308533-.33724831z"/></svg>'
|
|
13
|
+
},
|
|
14
|
+
start: function() {
|
|
15
|
+
this.app.toolbar.add('textdirection', {
|
|
16
|
+
title: '## textdirection.title ##',
|
|
17
|
+
icon: this.opts.textdirection.icon,
|
|
18
|
+
command: 'textdirection.toggle',
|
|
19
|
+
blocks: {
|
|
20
|
+
all: 'editable',
|
|
21
|
+
types: ['pre']
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
toggle: function(params, button) {
|
|
26
|
+
var instance = this.app.block.get();
|
|
27
|
+
var $block = instance.getBlock();
|
|
28
|
+
var currentDir = $block.attr('dir');
|
|
29
|
+
var items = {
|
|
30
|
+
ltr: { title: '## textdirection.ltr ##', command: 'textdirection.set' },
|
|
31
|
+
rtl: { title: '## textdirection.rtl ##', command: 'textdirection.set' },
|
|
32
|
+
};
|
|
33
|
+
var dir = (currentDir) ? currentDir : this.opts.editor.direction;
|
|
34
|
+
|
|
35
|
+
items[dir].active = true;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
this.app.popup.create('textdirection', { items: items });
|
|
39
|
+
this.app.popup.open({ button: button });
|
|
40
|
+
},
|
|
41
|
+
set: function(params, item, name) {
|
|
42
|
+
this.app.popup.close();
|
|
43
|
+
|
|
44
|
+
var instance = this.app.block.get();
|
|
45
|
+
var $block = instance.getBlock();
|
|
46
|
+
var dir = this.opts.editor.direction;
|
|
47
|
+
|
|
48
|
+
if (dir === name) {
|
|
49
|
+
$block.removeAttr('dir');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
$block.attr('dir', name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RedactorX.add("plugin","textdirection",{translations:{en:{textdirection:{title:"RTL-LTR",ltr:"Left to Right",rtl:"Right to Left"}}},defaults:{icon:'<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.8 8.10002943c.12590292.09442719.2.24262134.2.4v1.49999997h9c.5522847 0 1 .4477153 1 1 0 .5128359-.3860402.9355072-.8833789.9932723l-.1166211.0067277h-9v1.5c0 .2761424-.22385763.5-.5.5-.15737865 0-.30557281-.0740971-.4-.2l-1.875-2.5c-.13333333-.1777778-.13333333-.4222222 0-.6l1.875-2.49999997c.16568542-.2209139.4790861-.26568543.7-.1zm7.4-6c.2209139-.16568543.5343146-.1209139.7.1l1.875 2.5c.1333333.17777777.1333333.42222222 0 .6l-1.875 2.5c-.0944272.12590292-.2426213.2-.4.2-.2761424 0-.5-.22385763-.5-.5v-1.5h-9c-.55228475 0-1-.44771525-1-1 0-.51283584.38604019-.93550716.88337887-.99327227l.11662113-.00672773 8.999-.00002943.001-1.49997057c0-.12590293.0474221-.24592777.1308533-.33724831z"/></svg>'},start:function(){this.app.toolbar.add("textdirection",{title:"## textdirection.title ##",icon:this.opts.textdirection.icon,command:"textdirection.toggle",blocks:{all:"editable",types:["pre"]}})},toggle:function(t,i){var e=this.app.block.get().getBlock().attr("dir"),o={ltr:{title:"## textdirection.ltr ##",command:"textdirection.set"},rtl:{title:"## textdirection.rtl ##",command:"textdirection.set"}};o[e||this.opts.editor.direction].active=!0,this.app.popup.create("textdirection",{items:o}),this.app.popup.open({button:i})},set:function(t,i,e){this.app.popup.close();var o=this.app.block.get().getBlock();this.opts.editor.direction===e?o.removeAttr("dir"):o.attr("dir",e)}});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
RedactorX.add('plugin', 'textexpander', {
|
|
2
|
+
defaults: {
|
|
3
|
+
items: false
|
|
4
|
+
},
|
|
5
|
+
start: function() {
|
|
6
|
+
if (!this.opts.textexpander.items) return;
|
|
7
|
+
|
|
8
|
+
this.$editor = this.app.editor.getEditor();
|
|
9
|
+
this.$editor.on('keyup.' + this.prefix + '-plugin-textexpander', this._expand.bind(this));
|
|
10
|
+
},
|
|
11
|
+
stop: function() {
|
|
12
|
+
this.$editor.off('.' + this.prefix + '-plugin-textexpander');
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// private
|
|
16
|
+
_expand: function(e) {
|
|
17
|
+
var key = e.which;
|
|
18
|
+
if (key === this.app.keycodes.SPACE) {
|
|
19
|
+
var items = this.opts.textexpander.items;
|
|
20
|
+
for (var key in items) {
|
|
21
|
+
var str = items[key];
|
|
22
|
+
var re = new RegExp(this.app.utils.escapeRegExp(key) + '\\s$');
|
|
23
|
+
var rangeText = this.app.selection.getText('before', key.length + 2).trim();
|
|
24
|
+
|
|
25
|
+
if (key === rangeText) {
|
|
26
|
+
return this._replaceSelection(re, str);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
_replaceSelection: function(re, replacement) {
|
|
33
|
+
this.app.marker.insert();
|
|
34
|
+
|
|
35
|
+
var marker = this.app.marker.find('start');
|
|
36
|
+
var current = marker.previousSibling;
|
|
37
|
+
var currentText = current.textContent;
|
|
38
|
+
|
|
39
|
+
currentText = currentText.replace(/ /, ' ');
|
|
40
|
+
currentText = currentText.replace(re, replacement);
|
|
41
|
+
current.textContent = currentText;
|
|
42
|
+
|
|
43
|
+
this.app.marker.remove();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RedactorX.add("plugin","textexpander",{defaults:{items:!1},start:function(){this.opts.textexpander.items&&(this.$editor=this.app.editor.getEditor(),this.$editor.on("keyup."+this.prefix+"-plugin-textexpander",this._expand.bind(this)))},stop:function(){this.$editor.off("."+this.prefix+"-plugin-textexpander")},_expand:function(e){if((i=e.which)===this.app.keycodes.SPACE){var t=this.opts.textexpander.items;for(var i in t){var p=t[i],r=new RegExp(this.app.utils.escapeRegExp(i)+"\\s$");if(i===this.app.selection.getText("before",i.length+2).trim())return this._replaceSelection(r,p)}}},_replaceSelection:function(e,t){this.app.marker.insert();var i=this.app.marker.find("start").previousSibling,p=i.textContent;p=(p=p.replace(/ /," ")).replace(e,t),i.textContent=p,this.app.marker.remove()}});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
RedactorX.add('plugin', 'underline', {
|
|
2
|
+
defaults: {
|
|
3
|
+
icon: '<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12.2307692 12c.5522848 0 1 .4477153 1 1 0 .5128358-.3860402.9355072-.8833788.9932723l-.1166212.0067277h-8.2307692c-.55228475 0-1-.4477153-1-1 0-.5128358.38604019-.9355072.88337887-.9932723l.11662113-.0067277zm-1.2307692-10c.5128358 0 .9355072.43429521.9932723.99380123l.0067277.13119877v3.51108871c0 2.42071645-1.7998593 4.36391129-4 4.36391129-2.13138633 0-3.8871179-1.82364282-3.99476969-4.13841284l-.00523031-.22549845v-3.51108871c0-.62132034.44771525-1.125 1-1.125.51283584 0 .93550716.43429521.99327227.99380123l.00672773.13119877v3.51108871c0 1.15688618.88643222 2.11391129 2 2.11391129 1.06054074 0 1.91506284-.86804999 1.99404104-1.95008319l.00595896-.1638281v-3.51108871c0-.62132034.4477153-1.125 1-1.125z"/></svg>'
|
|
4
|
+
},
|
|
5
|
+
start: function() {
|
|
6
|
+
var button = {
|
|
7
|
+
title: '## buttons.underline ##',
|
|
8
|
+
icon: this.opts.underline.icon,
|
|
9
|
+
command: 'inline.set',
|
|
10
|
+
position: {
|
|
11
|
+
after: 'italic'
|
|
12
|
+
},
|
|
13
|
+
active: {
|
|
14
|
+
tags: ['u']
|
|
15
|
+
},
|
|
16
|
+
params: {
|
|
17
|
+
tag: 'u'
|
|
18
|
+
},
|
|
19
|
+
blocks: {
|
|
20
|
+
all: 'editable'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
this.app.toolbar.add('underline', button);
|
|
25
|
+
this.app.context.add('underline', button);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RedactorX.add("plugin","underline",{defaults:{icon:'<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12.2307692 12c.5522848 0 1 .4477153 1 1 0 .5128358-.3860402.9355072-.8833788.9932723l-.1166212.0067277h-8.2307692c-.55228475 0-1-.4477153-1-1 0-.5128358.38604019-.9355072.88337887-.9932723l.11662113-.0067277zm-1.2307692-10c.5128358 0 .9355072.43429521.9932723.99380123l.0067277.13119877v3.51108871c0 2.42071645-1.7998593 4.36391129-4 4.36391129-2.13138633 0-3.8871179-1.82364282-3.99476969-4.13841284l-.00523031-.22549845v-3.51108871c0-.62132034.44771525-1.125 1-1.125.51283584 0 .93550716.43429521.99327227.99380123l.00672773.13119877v3.51108871c0 1.15688618.88643222 2.11391129 2 2.11391129 1.06054074 0 1.91506284-.86804999 1.99404104-1.95008319l.00595896-.1638281v-3.51108871c0-.62132034.4477153-1.125 1-1.125z"/></svg>'},start:function(){var t={title:"## buttons.underline ##",icon:this.opts.underline.icon,command:"inline.set",position:{after:"italic"},active:{tags:["u"]},params:{tag:"u"},blocks:{all:"editable"}};this.app.toolbar.add("underline",t),this.app.context.add("underline",t)}});
|