glib-web 0.5.98 → 0.6.2
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/LICENSE +0 -0
- package/README.md +0 -0
- package/action.js +167 -167
- package/actions/analytics/logEvent.js +0 -0
- package/actions/auth/creditCard.js +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/auth/saveCsrfToken.js +0 -0
- package/actions/cables/push.js +0 -0
- package/actions/dialogs/alert.js +0 -0
- package/actions/dialogs/notification.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/open.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/dialogs/show.js +0 -0
- package/actions/forms/submit.js +0 -0
- package/actions/http/delete.js +0 -0
- package/actions/http/patch.js +0 -0
- package/actions/http/post.js +0 -0
- package/actions/http/put.js +0 -0
- package/actions/panels/scrollTo.js +18 -18
- package/actions/panels/scrollToBottom.js +0 -0
- package/actions/runMultiple.js +0 -0
- package/actions/sheets/select.js +0 -0
- package/actions/snackbars/alert.js +0 -0
- package/actions/snackbars/select.js +0 -0
- package/actions/timeouts/set.js +20 -20
- package/actions/windows/close.js +0 -0
- package/actions/windows/closeAll.js +0 -0
- package/actions/windows/closeWithReload.js +0 -0
- package/actions/windows/open.js +0 -0
- package/actions/windows/openWeb.js +0 -0
- package/actions/windows/refreshState.js +5 -5
- package/actions/windows/reload.js +0 -0
- package/actions/ws/push.js +0 -0
- package/app.vue +180 -180
- package/components/_badge.vue +23 -23
- package/components/_button.vue +107 -107
- package/components/_dropdownMenu.vue +76 -76
- package/components/_icon.vue +50 -50
- package/components/_message.vue +0 -0
- package/components/avatar.vue +18 -18
- package/components/banners/alert.vue +0 -0
- package/components/banners/select.vue +82 -82
- package/components/button.vue +33 -40
- package/components/calendar.vue +0 -0
- package/components/charts/column.vue +47 -34
- package/components/charts/line.vue +67 -65
- package/components/chip.vue +51 -26
- package/components/component.vue +225 -225
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_patternText.vue +65 -65
- package/components/fields/_select.vue +86 -86
- package/components/fields/autocomplete.vue +73 -73
- package/components/fields/check.vue +91 -81
- package/components/fields/checkGroup.vue +58 -58
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/field.vue +0 -0
- package/components/fields/country/regions.js +0 -0
- package/components/fields/creditCard.vue +22 -13
- package/components/fields/date.vue +24 -24
- package/components/fields/datetime.vue +0 -0
- package/components/fields/dynamicGroup.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/file.vue +0 -0
- package/components/fields/googlePlace.vue +0 -0
- package/components/fields/hidden.vue +0 -0
- package/components/fields/location.vue +198 -198
- package/components/fields/newRichText.vue +0 -0
- package/components/fields/phone/countries.js +315 -315
- package/components/fields/phone/field.vue +351 -351
- package/components/fields/phone/sprite.css +1071 -1071
- package/components/fields/radio.vue +16 -16
- package/components/fields/radioGroup.vue +42 -42
- package/components/fields/rating.vue +0 -0
- package/components/fields/richText.vue +0 -0
- package/components/fields/select.vue +17 -17
- package/components/fields/stripe/stripeFields.vue +93 -93
- package/components/fields/stripe/stripeIndividualFields.vue +207 -207
- package/components/fields/stripeExternalAccount.vue +135 -135
- package/components/fields/text.vue +0 -0
- package/components/fields/textarea.vue +0 -0
- package/components/fields/timeZone.vue +22 -22
- package/components/fields/timer.vue +83 -83
- package/components/h1.vue +28 -28
- package/components/h2.vue +28 -20
- package/components/h3.vue +29 -22
- package/components/h4.vue +28 -20
- package/components/h5.vue +28 -20
- package/components/h6.vue +28 -20
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/icon.vue +25 -25
- package/components/image.vue +0 -0
- package/components/label.vue +62 -62
- package/components/map.vue +0 -0
- package/components/markdown.vue +0 -0
- package/components/mixins/{chart.js → chart/annotation.js} +73 -73
- package/components/mixins/chart/tooltip.js +31 -0
- package/components/mixins/events.js +178 -178
- package/components/mixins/generic.js +0 -0
- package/components/mixins/list/autoload.js +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +222 -222
- package/components/mixins/table/autoload.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/mixins/text.js +20 -20
- package/components/mixins/tooltip.js +11 -0
- package/components/mixins/ws/actionCable.js +48 -48
- package/components/mixins/ws/phoenixSocket.js +0 -0
- package/components/p.vue +0 -0
- package/components/panels/carousel.vue +55 -55
- package/components/panels/column.vue +0 -0
- package/components/panels/custom.vue +0 -0
- package/components/panels/flow.vue +81 -81
- package/components/panels/form.vue +130 -130
- package/components/panels/horizontal.vue +0 -0
- package/components/panels/list.vue +247 -247
- package/components/panels/responsive.vue +94 -94
- package/components/panels/scroll.vue +0 -0
- package/components/panels/split.vue +0 -0
- package/components/panels/table.vue +0 -0
- package/components/panels/ul.vue +34 -34
- package/components/panels/vertical.vue +0 -0
- package/components/panels/web.vue +11 -11
- package/components/progressbar.vue +36 -36
- package/components/spacer.vue +0 -0
- package/components/switch.vue +42 -42
- package/components/tabBar.vue +68 -68
- package/extensions/array.js +0 -0
- package/extensions/string.js +21 -21
- package/index.js +199 -199
- package/keys.js +0 -0
- package/nav/appbar.vue +136 -136
- package/nav/content.vue +0 -0
- package/nav/dialog.vue +127 -127
- package/nav/drawer.vue +105 -105
- package/nav/drawerButton.vue +31 -31
- package/nav/drawerLabel.vue +0 -0
- package/nav/sheet.vue +0 -0
- package/nav/snackbar.vue +0 -0
- package/package.json +44 -44
- package/settings.json.example +0 -0
- package/static/plugins/alignment/alignment.js +0 -0
- package/static/plugins/alignment/alignment.min.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
- package/static/plugins/blockcode/blockcode.js +0 -0
- package/static/plugins/blockcode/blockcode.min.js +0 -0
- package/static/plugins/clips/clips.js +0 -0
- package/static/plugins/clips/clips.min.js +0 -0
- package/static/plugins/counter/counter.js +0 -0
- package/static/plugins/counter/counter.min.js +0 -0
- package/static/plugins/definedlinks/definedlinks.js +0 -0
- package/static/plugins/definedlinks/definedlinks.min.js +0 -0
- package/static/plugins/handle/handle.js +0 -0
- package/static/plugins/handle/handle.min.js +0 -0
- package/static/plugins/icons/icons.js +0 -0
- package/static/plugins/icons/icons.min.js +0 -0
- package/static/plugins/imageposition/imageposition.js +0 -0
- package/static/plugins/imageposition/imageposition.min.js +0 -0
- package/static/plugins/inlineformat/inlineformat.js +0 -0
- package/static/plugins/inlineformat/inlineformat.min.js +0 -0
- package/static/plugins/removeformat/removeformat.js +0 -0
- package/static/plugins/removeformat/removeformat.min.js +0 -0
- package/static/plugins/selector/selector.js +0 -0
- package/static/plugins/selector/selector.min.js +0 -0
- package/static/plugins/specialchars/specialchars.js +0 -0
- package/static/plugins/specialchars/specialchars.min.js +0 -0
- package/static/plugins/textdirection/textdirection.js +0 -0
- package/static/plugins/textdirection/textdirection.min.js +0 -0
- package/static/plugins/textexpander/textexpander.js +0 -0
- package/static/plugins/textexpander/textexpander.min.js +0 -0
- package/static/plugins/underline/underline.js +0 -0
- package/static/plugins/underline/underline.min.js +0 -0
- package/static/redactorx.css +0 -0
- package/static/redactorx.js +0 -0
- package/static/redactorx.min.css +0 -0
- package/static/redactorx.min.js +0 -0
- package/static/redactorx.usm.min.js +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/_menu.vue +38 -38
- package/templates/comment.vue +202 -202
- package/templates/featured.vue +32 -32
- package/templates/thumbnail.vue +145 -145
- package/templates/unsupported.vue +12 -12
- package/utils/app.js +0 -0
- package/utils/dom.js +0 -0
- package/utils/form.js +0 -0
- package/utils/hash.js +0 -0
- package/utils/helper.js +0 -0
- package/utils/history.js +70 -70
- package/utils/http.js +209 -209
- package/utils/launch.js +135 -135
- package/utils/private/ws.js +0 -0
- package/utils/public.js +0 -0
- package/utils/settings.js +0 -0
- package/utils/storage.js +0 -0
- package/utils/type.js +0 -0
- package/utils/uploader.js +0 -0
- package/utils/url.js +136 -136
|
File without changes
|
|
File without changes
|
package/components/panels/ul.vue
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ul :style="$styles()" :class="$classes()">
|
|
3
|
-
<!-- Use view name for key to avoid component reuse issue -->
|
|
4
|
-
<li v-for="(item, index) in spec.childViews" :key="`${index}_${item.view}`">
|
|
5
|
-
<ui-component :spec="item" />
|
|
6
|
-
</li>
|
|
7
|
-
</ul>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
spec: { type: Object, required: true }
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<style lang="scss" scoped>
|
|
19
|
-
// TODO: Need responsive support for mobile screens.
|
|
20
|
-
ul.breadcrumbs {
|
|
21
|
-
padding-left: 0px;
|
|
22
|
-
list-style: none;
|
|
23
|
-
|
|
24
|
-
li {
|
|
25
|
-
display: inline;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
li + li:before {
|
|
29
|
-
padding: 4px 4px 4px 8px;
|
|
30
|
-
color: black;
|
|
31
|
-
content: "/\00a0";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<ul :style="$styles()" :class="$classes()">
|
|
3
|
+
<!-- Use view name for key to avoid component reuse issue -->
|
|
4
|
+
<li v-for="(item, index) in spec.childViews" :key="`${index}_${item.view}`">
|
|
5
|
+
<ui-component :spec="item" />
|
|
6
|
+
</li>
|
|
7
|
+
</ul>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
props: {
|
|
13
|
+
spec: { type: Object, required: true }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
// TODO: Need responsive support for mobile screens.
|
|
20
|
+
ul.breadcrumbs {
|
|
21
|
+
padding-left: 0px;
|
|
22
|
+
list-style: none;
|
|
23
|
+
|
|
24
|
+
li {
|
|
25
|
+
display: inline;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
li + li:before {
|
|
29
|
+
padding: 4px 4px 4px 8px;
|
|
30
|
+
color: black;
|
|
31
|
+
content: "/\00a0";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<iframe :style="$styles()" :src="spec.url"></iframe>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
export default {
|
|
7
|
-
props: {
|
|
8
|
-
spec: { type: Object, required: true }
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<iframe :style="$styles()" :src="spec.url"></iframe>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
spec: { type: Object, required: true }
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-progress-linear
|
|
3
|
-
:class="$classes()"
|
|
4
|
-
:height="spec.height || 25"
|
|
5
|
-
:color="spec.color"
|
|
6
|
-
:background-color="spec.backgroundColor"
|
|
7
|
-
:disabled="true"
|
|
8
|
-
:value="value_in_percentage"
|
|
9
|
-
:striped="$classes().includes('striped')"
|
|
10
|
-
:reverse="spec.reversed || false"
|
|
11
|
-
rounded
|
|
12
|
-
>
|
|
13
|
-
<strong v-if="!$classes().includes('no-text')"
|
|
14
|
-
>{{ Math.ceil(value_in_percentage) }}%</strong
|
|
15
|
-
>
|
|
16
|
-
</v-progress-linear>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
export default {
|
|
21
|
-
props: {
|
|
22
|
-
spec: { type: Object, required: true }
|
|
23
|
-
},
|
|
24
|
-
computed: {
|
|
25
|
-
value_in_percentage() {
|
|
26
|
-
return this.spec.value * 100;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped>
|
|
33
|
-
.light strong {
|
|
34
|
-
color: #ffffff;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<v-progress-linear
|
|
3
|
+
:class="$classes()"
|
|
4
|
+
:height="spec.height || 25"
|
|
5
|
+
:color="spec.color"
|
|
6
|
+
:background-color="spec.backgroundColor"
|
|
7
|
+
:disabled="true"
|
|
8
|
+
:value="value_in_percentage"
|
|
9
|
+
:striped="$classes().includes('striped')"
|
|
10
|
+
:reverse="spec.reversed || false"
|
|
11
|
+
rounded
|
|
12
|
+
>
|
|
13
|
+
<strong v-if="!$classes().includes('no-text')"
|
|
14
|
+
>{{ Math.ceil(value_in_percentage) }}%</strong
|
|
15
|
+
>
|
|
16
|
+
</v-progress-linear>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
props: {
|
|
22
|
+
spec: { type: Object, required: true }
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
value_in_percentage() {
|
|
26
|
+
return this.spec.value * 100;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style scoped>
|
|
33
|
+
.light strong {
|
|
34
|
+
color: #ffffff;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
package/components/spacer.vue
CHANGED
|
File without changes
|
package/components/switch.vue
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$classes()">
|
|
3
|
-
<v-switch
|
|
4
|
-
v-model="enabled"
|
|
5
|
-
:label="spec.text"
|
|
6
|
-
hide-details
|
|
7
|
-
@change="changed"
|
|
8
|
-
>
|
|
9
|
-
</v-switch>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
props: {
|
|
16
|
-
spec: { type: Object, required: true }
|
|
17
|
-
},
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
enabled: false
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
methods: {
|
|
24
|
-
$ready() {
|
|
25
|
-
this.enabled = this.spec.enabled;
|
|
26
|
-
},
|
|
27
|
-
changed() {
|
|
28
|
-
if (this.enabled) {
|
|
29
|
-
GLib.action.execute(this.spec.onEnabled, {}, this);
|
|
30
|
-
} else {
|
|
31
|
-
GLib.action.execute(this.spec.onDisabled, {}, this);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<style scoped>
|
|
39
|
-
.v-input--selection-controls {
|
|
40
|
-
margin-top: 0;
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$classes()">
|
|
3
|
+
<v-switch
|
|
4
|
+
v-model="enabled"
|
|
5
|
+
:label="spec.text"
|
|
6
|
+
hide-details
|
|
7
|
+
@change="changed"
|
|
8
|
+
>
|
|
9
|
+
</v-switch>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
props: {
|
|
16
|
+
spec: { type: Object, required: true }
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
enabled: false
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
$ready() {
|
|
25
|
+
this.enabled = this.spec.enabled;
|
|
26
|
+
},
|
|
27
|
+
changed() {
|
|
28
|
+
if (this.enabled) {
|
|
29
|
+
GLib.action.execute(this.spec.onEnabled, {}, this);
|
|
30
|
+
} else {
|
|
31
|
+
GLib.action.execute(this.spec.onDisabled, {}, this);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style scoped>
|
|
39
|
+
.v-input--selection-controls {
|
|
40
|
+
margin-top: 0;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
package/components/tabBar.vue
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :style="'width: 100%'" :class="$classes()">
|
|
3
|
-
<v-tabs
|
|
4
|
-
v-model="tab"
|
|
5
|
-
:background-color="spec.backgroundColor"
|
|
6
|
-
:slider-color="spec.color"
|
|
7
|
-
show-arrows
|
|
8
|
-
:height="spec.height || 60"
|
|
9
|
-
:grow="$classes().includes('no-grow') ? false : true"
|
|
10
|
-
>
|
|
11
|
-
<v-tab
|
|
12
|
-
v-for="(item, index) in spec.buttons"
|
|
13
|
-
:key="index"
|
|
14
|
-
height="100%"
|
|
15
|
-
:href="$href(item)"
|
|
16
|
-
@click="$onClick($event, item)"
|
|
17
|
-
>
|
|
18
|
-
<v-badge
|
|
19
|
-
:color="item.badgeColor || 'red'"
|
|
20
|
-
:content="item.badgeContent"
|
|
21
|
-
:value="item.badgeContent || false"
|
|
22
|
-
>
|
|
23
|
-
<common-icon v-if="item.icon" :spec="item.icon" />
|
|
24
|
-
<span :style="{ color: spec.color }">{{ item.text }}</span>
|
|
25
|
-
</v-badge>
|
|
26
|
-
</v-tab>
|
|
27
|
-
</v-tabs>
|
|
28
|
-
<v-divider />
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
export default {
|
|
34
|
-
props: {
|
|
35
|
-
spec: { type: Object, required: true }
|
|
36
|
-
},
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
39
|
-
tab: null,
|
|
40
|
-
buttons: null
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
$ready() {
|
|
45
|
-
this.buttons = this.spec.tabButtons || this.spec.buttons;
|
|
46
|
-
for (const [index, button] of this.buttons.entries()) {
|
|
47
|
-
if (button.disabled) {
|
|
48
|
-
this.tab = this.$href(button);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
</script>
|
|
55
|
-
<style scoped>
|
|
56
|
-
.full-width-divider .v-divider {
|
|
57
|
-
position: absolute;
|
|
58
|
-
left: 0;
|
|
59
|
-
width: 100%;
|
|
60
|
-
}
|
|
61
|
-
.no-divider .v-divider {
|
|
62
|
-
display: none;
|
|
63
|
-
}
|
|
64
|
-
.v-badge {
|
|
65
|
-
top: 50%;
|
|
66
|
-
transform: translate(0, -50%);
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="'width: 100%'" :class="$classes()">
|
|
3
|
+
<v-tabs
|
|
4
|
+
v-model="tab"
|
|
5
|
+
:background-color="spec.backgroundColor"
|
|
6
|
+
:slider-color="spec.color"
|
|
7
|
+
show-arrows
|
|
8
|
+
:height="spec.height || 60"
|
|
9
|
+
:grow="$classes().includes('no-grow') ? false : true"
|
|
10
|
+
>
|
|
11
|
+
<v-tab
|
|
12
|
+
v-for="(item, index) in spec.buttons"
|
|
13
|
+
:key="index"
|
|
14
|
+
height="100%"
|
|
15
|
+
:href="$href(item)"
|
|
16
|
+
@click="$onClick($event, item)"
|
|
17
|
+
>
|
|
18
|
+
<v-badge
|
|
19
|
+
:color="item.badgeColor || 'red'"
|
|
20
|
+
:content="item.badgeContent"
|
|
21
|
+
:value="item.badgeContent || false"
|
|
22
|
+
>
|
|
23
|
+
<common-icon v-if="item.icon" :spec="item.icon" />
|
|
24
|
+
<span :style="{ color: spec.color }">{{ item.text }}</span>
|
|
25
|
+
</v-badge>
|
|
26
|
+
</v-tab>
|
|
27
|
+
</v-tabs>
|
|
28
|
+
<v-divider />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
export default {
|
|
34
|
+
props: {
|
|
35
|
+
spec: { type: Object, required: true }
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
tab: null,
|
|
40
|
+
buttons: null
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
$ready() {
|
|
45
|
+
this.buttons = this.spec.tabButtons || this.spec.buttons;
|
|
46
|
+
for (const [index, button] of this.buttons.entries()) {
|
|
47
|
+
if (button.disabled) {
|
|
48
|
+
this.tab = this.$href(button);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
<style scoped>
|
|
56
|
+
.full-width-divider .v-divider {
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: 0;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
.no-divider .v-divider {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
.v-badge {
|
|
65
|
+
top: 50%;
|
|
66
|
+
transform: translate(0, -50%);
|
|
67
|
+
}
|
|
68
|
+
</style>
|
package/extensions/array.js
CHANGED
|
File without changes
|
package/extensions/string.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript
|
|
2
|
-
String.prototype.hashCode = function() {
|
|
3
|
-
var hash = 0,
|
|
4
|
-
i,
|
|
5
|
-
chr;
|
|
6
|
-
if (this.length === 0) return hash;
|
|
7
|
-
for (i = 0; i < this.length; i++) {
|
|
8
|
-
chr = this.charCodeAt(i);
|
|
9
|
-
hash = (hash << 5) - hash + chr;
|
|
10
|
-
hash |= 0; // Convert to 32bit integer
|
|
11
|
-
}
|
|
12
|
-
return hash;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
String.prototype.contains = function(substr) {
|
|
16
|
-
return this.indexOf(substr) > -1;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
String.prototype.presence = function() {
|
|
20
|
-
return this.length > 0 ? this.toString() : null;
|
|
21
|
-
};
|
|
1
|
+
// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript
|
|
2
|
+
String.prototype.hashCode = function() {
|
|
3
|
+
var hash = 0,
|
|
4
|
+
i,
|
|
5
|
+
chr;
|
|
6
|
+
if (this.length === 0) return hash;
|
|
7
|
+
for (i = 0; i < this.length; i++) {
|
|
8
|
+
chr = this.charCodeAt(i);
|
|
9
|
+
hash = (hash << 5) - hash + chr;
|
|
10
|
+
hash |= 0; // Convert to 32bit integer
|
|
11
|
+
}
|
|
12
|
+
return hash;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
String.prototype.contains = function(substr) {
|
|
16
|
+
return this.indexOf(substr) > -1;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
String.prototype.presence = function() {
|
|
20
|
+
return this.length > 0 ? this.toString() : null;
|
|
21
|
+
};
|