@ditojs/admin 2.8.2 → 2.9.1
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/dito-admin.es.js +1917 -1849
- package/dist/dito-admin.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/src/appState.js +2 -0
- package/src/components/DitoClipboard.vue +37 -57
- package/src/components/DitoContainer.vue +5 -7
- package/src/components/DitoDialog.vue +3 -7
- package/src/components/DitoDraggable.vue +16 -13
- package/src/components/DitoLabel.vue +2 -1
- package/src/components/DitoPane.vue +23 -10
- package/src/components/DitoRoot.vue +32 -8
- package/src/components/DitoSchema.vue +9 -4
- package/src/components/DitoSidebar.vue +29 -4
- package/src/components/DitoUploadFile.vue +1 -1
- package/src/mixins/DitoMixin.js +4 -3
- package/src/types/DitoTypeCheckbox.vue +8 -7
- package/src/types/DitoTypeCheckboxes.vue +10 -9
- package/src/utils/agent.js +47 -0
|
@@ -7,14 +7,15 @@ ul.dito-checkboxes(
|
|
|
7
7
|
v-for="option in options"
|
|
8
8
|
)
|
|
9
9
|
label
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
.dito-checkbox
|
|
11
|
+
input(
|
|
12
|
+
ref="element"
|
|
13
|
+
v-model="selectedOptions"
|
|
14
|
+
type="checkbox"
|
|
15
|
+
:value="getValueForOption(option)"
|
|
16
|
+
v-bind="attributes"
|
|
17
|
+
)
|
|
18
|
+
span {{ getLabelForOption(option) }}
|
|
18
19
|
</template>
|
|
19
20
|
|
|
20
21
|
<script>
|
|
@@ -51,7 +52,7 @@ export default DitoTypeComponent.register('checkboxes', {
|
|
|
51
52
|
@extend %input-borderless;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
input {
|
|
55
56
|
margin-right: $form-spacing;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// This user-agent parser was lifted from Paper.js:
|
|
2
|
+
// https://github.com/paperjs/paper.js/blob/cc15696750035ab00e00c64c7c95daa2c85efe01/src/core/PaperScope.js#L75-L107
|
|
3
|
+
|
|
4
|
+
export function parseUserAgent(userAgent = '') {
|
|
5
|
+
const agent = {}
|
|
6
|
+
// Use replace() to get all matches, and deal with Chrome/Webkit overlap:
|
|
7
|
+
const ua = userAgent.toLowerCase()
|
|
8
|
+
const [os] =
|
|
9
|
+
/(iphone|ipad|linux; android|darwin|win|mac|linux|freebsd|sunos)/.exec(
|
|
10
|
+
ua
|
|
11
|
+
) || []
|
|
12
|
+
const platform = (
|
|
13
|
+
{
|
|
14
|
+
'darwin': 'mac',
|
|
15
|
+
'iphone': 'ios',
|
|
16
|
+
'ipad': 'ios',
|
|
17
|
+
'linux; android': 'android'
|
|
18
|
+
}[os] ||
|
|
19
|
+
os
|
|
20
|
+
)
|
|
21
|
+
if (platform) {
|
|
22
|
+
agent.platform = platform
|
|
23
|
+
agent[platform] = true
|
|
24
|
+
}
|
|
25
|
+
ua.replace(
|
|
26
|
+
/(opera|chrome|safari|webkit|firefox|msie|trident)\/?\s*([.\d]+)(?:.*version\/([.\d]+))?(?:.*rv:v?([.\d]+))?/g,
|
|
27
|
+
(match, browser, v1, v2, rv) => {
|
|
28
|
+
// Do not set additional browsers once chrome is detected.
|
|
29
|
+
if (!agent.chrome) {
|
|
30
|
+
const version = rv || v2 || v1
|
|
31
|
+
if (!agent.version || browser !== 'safari') {
|
|
32
|
+
// Use the version we get for webkit for Safari, which is actually
|
|
33
|
+
// The Safari version, e.g. 16.0
|
|
34
|
+
agent.version = version
|
|
35
|
+
agent.versionNumber = parseFloat(version)
|
|
36
|
+
}
|
|
37
|
+
agent.browser = browser
|
|
38
|
+
agent[browser] = true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
if (agent.chrome) {
|
|
43
|
+
// Can't have it both ways, Chrome.
|
|
44
|
+
delete agent.webkit
|
|
45
|
+
}
|
|
46
|
+
return agent
|
|
47
|
+
}
|