@ditojs/admin 3.2.7 → 3.3.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.css +1 -1
- package/dist/dito-admin.es.js +6011 -5826
- package/dist/dito-admin.umd.js +3 -7
- package/package.json +18 -17
- package/src/DitoAdmin.js +44 -24
- package/src/DitoContext.js +28 -2
- package/src/DitoTypeComponent.js +1 -0
- package/src/appState.js +6 -3
- package/src/components/DitoAccount.vue +35 -27
- package/src/components/DitoAffixes.vue +9 -2
- package/src/components/DitoClipboard.vue +59 -93
- package/src/components/DitoConfirmMessage.vue +18 -0
- package/src/components/DitoContainer.vue +56 -18
- package/src/components/DitoCreateButton.vue +36 -84
- package/src/components/DitoDialog.vue +20 -15
- package/src/components/DitoDragHandle.vue +44 -0
- package/src/components/DitoDraggable.vue +43 -16
- package/src/components/DitoEditButtons.vue +48 -24
- package/src/components/DitoErrors.vue +9 -56
- package/src/components/DitoForm.vue +82 -42
- package/src/components/DitoInputAffixes.vue +50 -0
- package/src/components/DitoLabel.vue +1 -15
- package/src/components/DitoMenu.vue +45 -52
- package/src/components/DitoNotifications.vue +38 -14
- package/src/components/DitoOptionList.vue +81 -0
- package/src/components/DitoOptionsEditButtons.vue +57 -0
- package/src/components/DitoPagination.vue +1 -8
- package/src/components/DitoPane.vue +51 -39
- package/src/components/DitoPanel.vue +12 -26
- package/src/components/DitoPanels.vue +11 -5
- package/src/components/DitoResizeHandle.vue +47 -0
- package/src/components/DitoRoot.vue +113 -320
- package/src/components/DitoSchema.vue +72 -63
- package/src/components/DitoSchemaInlined.vue +8 -9
- package/src/components/DitoScopes.vue +14 -18
- package/src/components/DitoSidebar.vue +4 -29
- package/src/components/DitoSourceItem.vue +114 -0
- package/src/components/DitoTableCell.vue +4 -0
- package/src/components/DitoTableHead.vue +15 -17
- package/src/components/DitoTabs.vue +25 -0
- package/src/components/DitoTrail.vue +25 -25
- package/src/components/DitoTreeItem.vue +102 -141
- package/src/components/DitoUploadFile.vue +5 -2
- package/src/components/DitoView.vue +33 -24
- package/src/index.js +4 -1
- package/src/mixins/DitoMixin.js +77 -110
- package/src/mixins/DomMixin.js +12 -14
- package/src/mixins/EmitterMixin.js +3 -2
- package/src/mixins/ItemMixin.js +38 -94
- package/src/mixins/OptionsMixin.js +38 -25
- package/src/mixins/ResourceMixin.js +182 -111
- package/src/mixins/RouteMixin.js +61 -44
- package/src/mixins/SchemaParentMixin.js +4 -1
- package/src/mixins/SourceMixin.js +118 -100
- package/src/mixins/TypeMixin.js +42 -40
- package/src/mixins/ValidationMixin.js +16 -4
- package/src/mixins/ValidatorMixin.js +1 -1
- package/src/styles/_settings.scss +4 -0
- package/src/styles/_tippy.scss +0 -11
- package/src/styles/style.scss +0 -1
- package/src/types/DitoTypeButton.vue +11 -14
- package/src/types/DitoTypeCheckboxes.vue +35 -17
- package/src/types/DitoTypeCode.vue +19 -41
- package/src/types/DitoTypeColor.vue +67 -19
- package/src/types/DitoTypeDate.vue +11 -14
- package/src/types/DitoTypeList.vue +50 -62
- package/src/types/DitoTypeMarkup.vue +41 -54
- package/src/types/DitoTypeMultiselect.vue +82 -52
- package/src/types/DitoTypeNumber.vue +12 -15
- package/src/types/DitoTypeObject.vue +4 -38
- package/src/types/DitoTypeRadio.vue +19 -6
- package/src/types/DitoTypeSection.vue +23 -9
- package/src/types/DitoTypeSelect.vue +39 -23
- package/src/types/DitoTypeSlider.vue +9 -1
- package/src/types/DitoTypeSwitch.vue +1 -1
- package/src/types/DitoTypeText.vue +11 -14
- package/src/types/DitoTypeTreeList.vue +46 -8
- package/src/types/DitoTypeUpload.vue +190 -67
- package/src/utils/DataModel.js +368 -146
- package/src/utils/FileDropTargets.js +97 -0
- package/src/utils/ItemStores.js +31 -0
- package/src/utils/ListQuery.js +115 -0
- package/src/utils/LoadingTracker.js +76 -0
- package/src/utils/SchemaGraph.js +3 -2
- package/src/utils/Session.js +151 -0
- package/src/utils/ViewRegistry.js +85 -0
- package/src/utils/accessor.js +12 -4
- package/src/utils/affixes.js +33 -0
- package/src/utils/changeOnceEdited.js +33 -0
- package/src/utils/clipboard.js +55 -0
- package/src/utils/data.js +10 -5
- package/src/utils/dialogs.js +59 -0
- package/src/utils/dragResize.js +61 -0
- package/src/utils/filter.js +36 -2
- package/src/utils/html.js +9 -0
- package/src/utils/list.js +10 -0
- package/src/utils/options.js +4 -0
- package/src/utils/registration.js +18 -0
- package/src/utils/request.js +108 -13
- package/src/utils/route.js +6 -17
- package/src/utils/schema/data.js +24 -2
- package/src/utils/schema/events.js +19 -0
- package/src/utils/schema/item.js +114 -0
- package/src/utils/schema/lookup.js +39 -14
- package/src/utils/schema/setup.js +5 -5
- package/src/utils/schema/validation.js +16 -2
- package/src/utils/uid.js +105 -8
- package/src/validators/_decimals.js +16 -5
- package/types/index.d.ts +168 -41
- package/src/mixins/LoadingMixin.js +0 -23
- package/src/mixins/PulldownMixin.js +0 -72
- package/src/styles/_pulldown.scss +0 -38
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import DomMixin from './DomMixin.js'
|
|
2
|
-
|
|
3
|
-
// @vue/component
|
|
4
|
-
export default {
|
|
5
|
-
mixins: [DomMixin],
|
|
6
|
-
|
|
7
|
-
data() {
|
|
8
|
-
return {
|
|
9
|
-
pulldown: {
|
|
10
|
-
open: false,
|
|
11
|
-
startTime: 0,
|
|
12
|
-
checkTime: true,
|
|
13
|
-
events: {
|
|
14
|
-
mousedown: () => {
|
|
15
|
-
this.setPulldownOpen(false)
|
|
16
|
-
this.pulldown.handlers.remove()
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
mouseup: () => {
|
|
20
|
-
if (this.onPulldownMouseUp()) {
|
|
21
|
-
this.pulldown.handlers.remove()
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
handlers: null
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
computed: {
|
|
31
|
-
pulldownTriggerAttributes() {
|
|
32
|
-
return {
|
|
33
|
-
'aria-haspopup': 'menu',
|
|
34
|
-
'aria-expanded': this.pulldown.open
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
methods: {
|
|
40
|
-
onPulldownMouseDown(value = null) {
|
|
41
|
-
if (value === null) {
|
|
42
|
-
this.setPulldownOpen(true)
|
|
43
|
-
this.checkTime = true
|
|
44
|
-
} else {
|
|
45
|
-
this.checkTime = false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
onPulldownMouseUp(value = null) {
|
|
50
|
-
const { startTime } = this.pulldown
|
|
51
|
-
if (!this.checkTime || startTime && (Date.now() - startTime > 250)) {
|
|
52
|
-
this.setPulldownOpen(false)
|
|
53
|
-
if (value !== null) {
|
|
54
|
-
this.onPulldownSelect(value)
|
|
55
|
-
}
|
|
56
|
-
return true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
onPulldownSelect(/* value */) {
|
|
61
|
-
// NOTE: To be overridden.
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
setPulldownOpen(open) {
|
|
65
|
-
this.pulldown.open = open
|
|
66
|
-
this.pulldown.startTime = open ? Date.now() : 0
|
|
67
|
-
if (open) {
|
|
68
|
-
this.pulldown.handlers = this.domOn(document, this.pulldown.events)
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
@import '../styles/_imports';
|
|
2
|
-
|
|
3
|
-
.dito-pulldown {
|
|
4
|
-
$self: &;
|
|
5
|
-
|
|
6
|
-
display: none;
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 0;
|
|
9
|
-
z-index: $z-index-popup;
|
|
10
|
-
border-radius: $pulldown-radius;
|
|
11
|
-
box-shadow: $shadow-window;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
|
|
14
|
-
&--open {
|
|
15
|
-
display: block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
li {
|
|
19
|
-
@include user-select(none);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&__item {
|
|
23
|
-
display: block;
|
|
24
|
-
padding: $pulldown-padding;
|
|
25
|
-
line-height: 1;
|
|
26
|
-
background: $button-color;
|
|
27
|
-
|
|
28
|
-
&--disabled {
|
|
29
|
-
color: $color-disabled;
|
|
30
|
-
cursor: default;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:not(&--disabled):hover {
|
|
34
|
-
background: $color-active;
|
|
35
|
-
color: $color-white;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|