@contena/meteor-component-library 5.5.0 → 5.6.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/NOTICE +24 -3
- package/dist/{useRepository-c69e2597.js → Criteria-86968a69.js} +111 -258
- package/dist/{useRepository-dfff5b4a.mjs → Criteria-dda62b10.mjs} +114 -261
- package/dist/{channel-eb1529aa.mjs → channel-c0a7f238.mjs} +65 -25
- package/dist/{channel-782f8c3b.js → channel-c7fd2abb.js} +81 -41
- package/dist/common/MtBaseField.js +1 -1
- package/dist/common/MtCard.d.ts +5 -4
- package/dist/common/MtCard.js +17 -11
- package/dist/common/MtCheckbox.js +1 -1
- package/dist/common/MtColorpicker.js +1 -1
- package/dist/common/MtContextButton.js +1 -1
- package/dist/common/MtContextMenuItem.js +1 -1
- package/dist/common/MtDataTable.d.ts +20 -18
- package/dist/common/MtDataTable.js +137 -130
- package/dist/common/MtDataTableFilter.js +4 -4
- package/dist/common/MtDataTableSettings.js +1 -1
- package/dist/common/MtEntityDataTable.js +4 -3
- package/dist/common/MtEntitySelect.js +4 -3
- package/dist/common/MtGrantPermissionServiceBanner.d.ts +2 -0
- package/dist/common/MtGrantPermissionServiceBanner.js +155 -0
- package/dist/common/MtModal.js +2 -2
- package/dist/common/MtNumberField.js +1 -1
- package/dist/common/MtPagination.js +2 -2
- package/dist/common/MtPasswordField.js +1 -1
- package/dist/common/MtPopover.js +1 -1
- package/dist/common/MtPopoverItem.js +1 -1
- package/dist/common/MtPopoverItemResult.js +1 -1
- package/dist/common/MtSegmentedControl.js +1 -1
- package/dist/common/MtSelect.js +1 -1
- package/dist/common/MtSelectBase.js +1 -1
- package/dist/common/MtSlider.js +1 -1
- package/dist/common/MtTabs.js +1 -1
- package/dist/common/MtTextEditor.d.ts +1 -1
- package/dist/common/MtTextEditor.js +1 -1
- package/dist/common/MtTextEditorToolbar.js +1 -1
- package/dist/common/MtTextEditorToolbarButtonColor.js +1 -1
- package/dist/common/MtTextEditorToolbarButtonLink.js +1 -1
- package/dist/common/MtTextEditorToolbarButtonTable.js +1 -1
- package/dist/common/MtTextField.js +1 -1
- package/dist/common/MtThemeSelect.js +2 -2
- package/dist/common/MtUnitField.js +1 -1
- package/dist/common/index.d.ts +2 -1
- package/dist/common/index.js +10 -5
- package/dist/contena-logo.svg +6 -0
- package/dist/esm/MtBaseField.js +1 -1
- package/dist/esm/MtCard.d.ts +5 -4
- package/dist/esm/MtCard.js +17 -11
- package/dist/esm/MtCheckbox.js +1 -1
- package/dist/esm/MtColorpicker.js +1 -1
- package/dist/esm/MtContextButton.js +1 -1
- package/dist/esm/MtContextMenuItem.js +1 -1
- package/dist/esm/MtDataTable.d.ts +20 -18
- package/dist/esm/MtDataTable.js +138 -131
- package/dist/esm/MtDataTableFilter.js +4 -4
- package/dist/esm/MtDataTableSettings.js +1 -1
- package/dist/esm/MtEntityDataTable.js +4 -3
- package/dist/esm/MtEntitySelect.js +4 -3
- package/dist/esm/MtGrantPermissionServiceBanner.d.ts +2 -0
- package/dist/esm/MtGrantPermissionServiceBanner.js +156 -0
- package/dist/esm/MtModal.js +2 -2
- package/dist/esm/MtNumberField.js +1 -1
- package/dist/esm/MtPagination.js +2 -2
- package/dist/esm/MtPasswordField.js +1 -1
- package/dist/esm/MtPopover.js +1 -1
- package/dist/esm/MtPopoverItem.js +1 -1
- package/dist/esm/MtPopoverItemResult.js +1 -1
- package/dist/esm/MtSegmentedControl.js +1 -1
- package/dist/esm/MtSelect.js +1 -1
- package/dist/esm/MtSelectBase.js +1 -1
- package/dist/esm/MtSlider.js +1 -1
- package/dist/esm/MtTabs.js +1 -1
- package/dist/esm/MtTextEditor.d.ts +1 -1
- package/dist/esm/MtTextEditor.js +1 -1
- package/dist/esm/MtTextEditorToolbar.js +1 -1
- package/dist/esm/MtTextEditorToolbarButtonColor.js +1 -1
- package/dist/esm/MtTextEditorToolbarButtonLink.js +1 -1
- package/dist/esm/MtTextEditorToolbarButtonTable.js +1 -1
- package/dist/esm/MtTextField.js +1 -1
- package/dist/esm/MtThemeSelect.js +2 -2
- package/dist/esm/MtUnitField.js +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +54 -49
- package/dist/favicon.ico +0 -0
- package/dist/index-26e65048.mjs +198 -0
- package/dist/{index-f60dc18c.js → index-2cb63874.js} +4 -195
- package/dist/{index-8ddee025.mjs → index-ddce4e37.mjs} +4 -195
- package/dist/index-f8d7f486.js +197 -0
- package/dist/index.css +2 -2
- package/dist/{mt-base-field-32e14998.js → mt-base-field-b1264b8e.js} +1 -0
- package/dist/{mt-base-field-3b5538c6.mjs → mt-base-field-ddfd1f81.mjs} +2 -1
- package/dist/mt-card.css +37 -37
- package/dist/mt-data-table-filter.css +12 -12
- package/dist/mt-data-table.css +0 -10
- package/dist/{mt-entity-data-table.vue_vue_type_style_index_0_lang-40d1a210.mjs → mt-entity-data-table.vue_vue_type_style_index_0_lang-20da6e77.mjs} +3 -2
- package/dist/{mt-entity-data-table.vue_vue_type_style_index_0_lang-5acc37b3.js → mt-entity-data-table.vue_vue_type_style_index_0_lang-84494335.js} +6 -5
- package/dist/{mt-entity-select.vue_vue_type_script_setup_true_lang-50315e8d.js → mt-entity-select.vue_vue_type_script_setup_true_lang-2cdffea0.js} +5 -4
- package/dist/{mt-entity-select.vue_vue_type_script_setup_true_lang-3733f9fc.mjs → mt-entity-select.vue_vue_type_script_setup_true_lang-f3c35d00.mjs} +2 -1
- package/dist/mt-grant-permission-service-banner.css +88 -0
- package/dist/mt-modal.css +31 -29
- package/dist/mt-pagination.css +15 -15
- package/dist/mt-popover-item.css +0 -5
- package/dist/{mt-theme-select.vue_vue_type_script_setup_true_lang-9e44465e.js → mt-theme-select.vue_vue_type_script_setup_true_lang-42a2e3c8.js} +6 -5
- package/dist/{mt-theme-select.vue_vue_type_script_setup_true_lang-cc325e63.mjs → mt-theme-select.vue_vue_type_script_setup_true_lang-6ecf0bcb.mjs} +6 -5
- package/dist/{repository-30409275.js → repository-9c56cf7b.js} +2 -3
- package/dist/{repository-fd60b763.mjs → repository-e7884115.mjs} +2 -3
- package/dist/useRepository-28dfccf5.mjs +149 -0
- package/dist/useRepository-6804d3b6.js +148 -0
- package/package.json +3 -4
- package/THIRD-PARTY-LICENSES/UPSTREAM-METEOR-MIT.txt +0 -21
package/dist/mt-modal.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.mt-modal[data-v-
|
|
2
|
+
.mt-modal[data-v-684596ac] {
|
|
3
3
|
/* the dialog itself receives the initial focus; don't render a ring around it */
|
|
4
4
|
outline: none;
|
|
5
5
|
height: auto;
|
|
@@ -17,22 +17,22 @@
|
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
19
|
}
|
|
20
|
-
.mt-modal--width-s[data-v-
|
|
20
|
+
.mt-modal--width-s[data-v-684596ac] {
|
|
21
21
|
--mt-modal-width: 27.5rem;
|
|
22
22
|
}
|
|
23
|
-
.mt-modal--width-m[data-v-
|
|
23
|
+
.mt-modal--width-m[data-v-684596ac] {
|
|
24
24
|
--mt-modal-width: 45rem;
|
|
25
25
|
}
|
|
26
|
-
.mt-modal--width-l[data-v-
|
|
26
|
+
.mt-modal--width-l[data-v-684596ac] {
|
|
27
27
|
--mt-modal-width: 64rem;
|
|
28
28
|
}
|
|
29
|
-
.mt-modal--width-xl[data-v-
|
|
29
|
+
.mt-modal--width-xl[data-v-684596ac] {
|
|
30
30
|
--mt-modal-width: 90rem;
|
|
31
31
|
}
|
|
32
|
-
.mt-modal--width-full[data-v-
|
|
32
|
+
.mt-modal--width-full[data-v-684596ac] {
|
|
33
33
|
--mt-modal-width: 100%;
|
|
34
34
|
}
|
|
35
|
-
.modal-enter-active[data-v-
|
|
35
|
+
.modal-enter-active[data-v-684596ac] {
|
|
36
36
|
transition: opacity 400ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
37
37
|
@media (prefers-reduced-motion: no-preference) {
|
|
38
38
|
transition:
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
scale 400ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
.modal-leave-active[data-v-
|
|
43
|
+
.modal-leave-active[data-v-684596ac] {
|
|
44
44
|
transition: opacity 200ms cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
45
45
|
@media (prefers-reduced-motion: no-preference) {
|
|
46
46
|
transition:
|
|
@@ -48,32 +48,32 @@
|
|
|
48
48
|
scale 200ms cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
.modal-enter-from[data-v-
|
|
52
|
-
.modal-leave-to[data-v-
|
|
51
|
+
.modal-enter-from[data-v-684596ac],
|
|
52
|
+
.modal-leave-to[data-v-684596ac] {
|
|
53
53
|
opacity: 0;
|
|
54
54
|
@media (prefers-reduced-motion: no-preference) {
|
|
55
55
|
scale: 0.9;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
.mt-modal__title[data-v-
|
|
58
|
+
.mt-modal__title[data-v-684596ac] {
|
|
59
59
|
margin-block-end: 0;
|
|
60
60
|
}
|
|
61
|
-
.mt-modal__subtitle[data-v-
|
|
61
|
+
.mt-modal__subtitle[data-v-684596ac] {
|
|
62
62
|
font-size: var(--font-size-s);
|
|
63
63
|
font-weight: var(--font-weight-regular);
|
|
64
64
|
line-height: var(--line-height-md);
|
|
65
65
|
}
|
|
66
|
-
.mt-modal__content[data-v-
|
|
66
|
+
.mt-modal__content[data-v-684596ac] {
|
|
67
67
|
position: relative;
|
|
68
68
|
overflow-y: auto;
|
|
69
69
|
}
|
|
70
|
-
.mt-modal__content-inner[data-v-
|
|
70
|
+
.mt-modal__content-inner[data-v-684596ac] {
|
|
71
71
|
padding: var(--scale-size-24);
|
|
72
72
|
}
|
|
73
|
-
.mt-modal__content-inner--no-padding[data-v-
|
|
73
|
+
.mt-modal__content-inner--no-padding[data-v-684596ac] {
|
|
74
74
|
padding: 0;
|
|
75
75
|
}
|
|
76
|
-
.mt-modal__scroll-shadow[data-v-
|
|
76
|
+
.mt-modal__scroll-shadow[data-v-684596ac] {
|
|
77
77
|
position: sticky;
|
|
78
78
|
left: 0;
|
|
79
79
|
right: 0;
|
|
@@ -82,36 +82,38 @@
|
|
|
82
82
|
filter: blur(3px);
|
|
83
83
|
background-color: var(--color-elevation-shadow-default);
|
|
84
84
|
}
|
|
85
|
-
.mt-modal__scroll-shadow--top[data-v-
|
|
85
|
+
.mt-modal__scroll-shadow--top[data-v-684596ac] {
|
|
86
86
|
top: 0;
|
|
87
87
|
}
|
|
88
|
-
.mt-modal__scroll-shadow--bottom[data-v-
|
|
88
|
+
.mt-modal__scroll-shadow--bottom[data-v-684596ac] {
|
|
89
89
|
bottom: 0;
|
|
90
90
|
}
|
|
91
|
-
.shadow-fade-enter-active[data-v-
|
|
91
|
+
.shadow-fade-enter-active[data-v-684596ac] {
|
|
92
92
|
transition: opacity 400ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
93
93
|
@media (prefers-reduced-motion: no-preference) {
|
|
94
94
|
transition: opacity 400ms cubic-bezier(0.05, 0.7, 0.1, 1);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
.shadow-fade-leave-active[data-v-
|
|
97
|
+
.shadow-fade-leave-active[data-v-684596ac] {
|
|
98
98
|
transition: opacity 200ms cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
99
99
|
@media (prefers-reduced-motion: no-preference) {
|
|
100
100
|
transition: opacity 200ms cubic-bezier(0.3, 0, 0.8, 0.15);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
.shadow-fade-enter-from[data-v-
|
|
104
|
-
.shadow-fade-leave-to[data-v-
|
|
103
|
+
.shadow-fade-enter-from[data-v-684596ac],
|
|
104
|
+
.shadow-fade-leave-to[data-v-684596ac] {
|
|
105
105
|
opacity: 0;
|
|
106
106
|
@media (prefers-reduced-motion: no-preference) {
|
|
107
107
|
scale: 0.9;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
.mt-modal__footer[data-v-
|
|
110
|
+
.mt-modal__footer[data-v-684596ac] {
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: flex-end;
|
|
111
113
|
padding: var(--scale-size-24);
|
|
112
114
|
border-top: 1px solid var(--color-border-secondary-default);
|
|
113
115
|
}
|
|
114
|
-
.mt-modal__header[data-v-
|
|
116
|
+
.mt-modal__header[data-v-684596ac] {
|
|
115
117
|
padding: var(--scale-size-24);
|
|
116
118
|
border-bottom: 1px solid var(--color-border-secondary-default);
|
|
117
119
|
display: flex;
|
|
@@ -119,21 +121,21 @@
|
|
|
119
121
|
align-items: center;
|
|
120
122
|
gap: var(--scale-size-12);
|
|
121
123
|
}
|
|
122
|
-
.mt-modal__header-content[data-v-
|
|
124
|
+
.mt-modal__header-content[data-v-684596ac] {
|
|
123
125
|
display: flex;
|
|
124
126
|
flex-direction: column;
|
|
125
127
|
gap: var(--scale-size-2);
|
|
126
128
|
flex: 1;
|
|
127
129
|
min-width: 0; /* allow content to shrink within flex container */
|
|
128
130
|
}
|
|
129
|
-
.mt-modal__header-content-title[data-v-
|
|
131
|
+
.mt-modal__header-content-title[data-v-684596ac] {
|
|
130
132
|
display: flex;
|
|
131
133
|
flex-direction: row;
|
|
132
134
|
align-items: center;
|
|
133
135
|
column-gap: var(--scale-size-8);
|
|
134
136
|
}
|
|
135
137
|
.mt-modal__close-button {
|
|
136
|
-
&[data-v-
|
|
138
|
+
&[data-v-684596ac] {
|
|
137
139
|
cursor: pointer;
|
|
138
140
|
color: var(--color-icon-primary-default);
|
|
139
141
|
border-radius: var(--border-radius-xs);
|
|
@@ -146,11 +148,11 @@
|
|
|
146
148
|
/* prevents hover styles from being applied to non-hoverable devices */
|
|
147
149
|
}
|
|
148
150
|
@media (hover: hover) {
|
|
149
|
-
&[data-v-
|
|
151
|
+
&[data-v-684596ac]:hover {
|
|
150
152
|
background-color: var(--color-interaction-secondary-hover);
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
|
-
&[data-v-
|
|
155
|
+
&[data-v-684596ac]:focus-visible {
|
|
154
156
|
outline: 2px solid var(--color-border-brand-default);
|
|
155
157
|
box-shadow: 0 0 4px 0 rgba(24, 158, 255, 0.3);
|
|
156
158
|
}
|
package/dist/mt-pagination.css
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
.mt-pagination {
|
|
3
|
-
&[data-v-
|
|
3
|
+
&[data-v-3c2685bd] {
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: baseline;
|
|
6
6
|
gap: var(--scale-size-12);
|
|
7
7
|
}
|
|
8
|
-
&[data-v-
|
|
8
|
+
&[data-v-3c2685bd] :last-child {
|
|
9
9
|
border-top-right-radius: var(--border-radius-xs);
|
|
10
10
|
border-bottom-right-radius: var(--border-radius-xs);
|
|
11
11
|
}
|
|
12
|
-
&[data-v-
|
|
12
|
+
&[data-v-3c2685bd] :first-child {
|
|
13
13
|
border-top-left-radius: var(--border-radius-xs);
|
|
14
14
|
border-bottom-left-radius: var(--border-radius-xs);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
.mt-pagination__controls[data-v-
|
|
17
|
+
.mt-pagination__controls[data-v-3c2685bd] {
|
|
18
18
|
display: inline-flex;
|
|
19
19
|
border-radius: var(--border-radius-xs);
|
|
20
20
|
border: 1px solid var(--color-border-primary-default);
|
|
21
21
|
}
|
|
22
|
-
.mt-pagination__info-text[data-v-
|
|
22
|
+
.mt-pagination__info-text[data-v-3c2685bd] {
|
|
23
23
|
color: var(--color-text-secondary-default);
|
|
24
24
|
font-size: var(--font-size-xs);
|
|
25
25
|
line-height: var(--font-line-height-xs);
|
|
26
26
|
font-family: var(--font-family-body);
|
|
27
27
|
}
|
|
28
28
|
.mt-pagination__button {
|
|
29
|
-
&[data-v-
|
|
29
|
+
&[data-v-3c2685bd] {
|
|
30
30
|
border-right: 1px solid var(--color-border-primary-default);
|
|
31
31
|
color: var(--color-icon-primary-default);
|
|
32
32
|
height: var(--scale-size-32);
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
transition-duration: 0.15s;
|
|
38
38
|
transition-timing-function: ease-out;
|
|
39
39
|
}
|
|
40
|
-
&[data-v-
|
|
40
|
+
&[data-v-3c2685bd]:focus-visible {
|
|
41
41
|
outline: var(--scale-size-2) solid var(--color-border-brand-default);
|
|
42
42
|
outline-offset: var(--scale-size-2);
|
|
43
43
|
background-color: var(--color-interaction-secondary-hover);
|
|
44
44
|
}
|
|
45
|
-
&[data-v-
|
|
45
|
+
&[data-v-3c2685bd]:hover:not(:disabled) {
|
|
46
46
|
background-color: var(--color-interaction-secondary-hover);
|
|
47
47
|
}
|
|
48
|
-
&[data-v-
|
|
48
|
+
&[data-v-3c2685bd]:last-of-type {
|
|
49
49
|
border-right: none;
|
|
50
50
|
}
|
|
51
|
-
&[data-v-
|
|
51
|
+
&[data-v-3c2685bd]:disabled {
|
|
52
52
|
background-color: var(--color-interaction-secondary-disabled);
|
|
53
53
|
cursor: not-allowed;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
.mt-pagination__current-page-input {
|
|
57
|
-
&[data-v-
|
|
57
|
+
&[data-v-3c2685bd] {
|
|
58
58
|
all: unset;
|
|
59
59
|
width: auto;
|
|
60
60
|
border-right: 1px solid var(--color-border-primary-default);
|
|
@@ -63,16 +63,16 @@
|
|
|
63
63
|
font-size: var(--font-size-xs);
|
|
64
64
|
line-height: var(--font-line-height-xs);
|
|
65
65
|
font-family: var(--font-family-body);
|
|
66
|
-
font-
|
|
66
|
+
font-variant-numeric: tabular-nums;
|
|
67
67
|
|
|
68
68
|
/* Firefox */
|
|
69
69
|
}
|
|
70
|
-
&[data-v-
|
|
71
|
-
&[data-v-
|
|
70
|
+
&[data-v-3c2685bd]::-webkit-outer-spin-button,
|
|
71
|
+
&[data-v-3c2685bd]::-webkit-inner-spin-button {
|
|
72
72
|
-webkit-appearance: none;
|
|
73
73
|
margin: 0;
|
|
74
74
|
}
|
|
75
|
-
&[type="number"][data-v-
|
|
75
|
+
&[type="number"][data-v-3c2685bd] {
|
|
76
76
|
-moz-appearance: textfield;
|
|
77
77
|
}
|
|
78
78
|
}
|
package/dist/mt-popover-item.css
CHANGED
|
@@ -45,11 +45,6 @@
|
|
|
45
45
|
.mt-popover-item * {
|
|
46
46
|
font-family: var(--font-family-body);
|
|
47
47
|
}
|
|
48
|
-
@supports (font-variation-settings: normal) {
|
|
49
|
-
.mt-popover-item * {
|
|
50
|
-
font-feature-settings: "ss01" on, "ss02" on, "case" on, "cpsp" on, "zero" on, "cv09" on, "cv07" on, "cv06" on, "cv10" on, "cv11" on;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
48
|
.mt-popover-item.mt-popover-item--clickable {
|
|
54
49
|
cursor: pointer;
|
|
55
50
|
}
|
|
@@ -21,10 +21,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
21
21
|
dark: "Dark",
|
|
22
22
|
system: "System"
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
light: "
|
|
26
|
-
dark: "
|
|
27
|
-
system: "
|
|
24
|
+
zh: {
|
|
25
|
+
light: "浅色",
|
|
26
|
+
dark: "深色",
|
|
27
|
+
system: "跟随系统"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -37,8 +37,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
37
|
return value === "light" || value === "dark" || value === "system";
|
|
38
38
|
}
|
|
39
39
|
function onSelect(value) {
|
|
40
|
-
if (isTheme(value))
|
|
40
|
+
if (isTheme(value)) {
|
|
41
41
|
model.value = value;
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
44
|
return (_ctx, _cache) => {
|
|
44
45
|
return vue.openBlock(), vue.createBlock(MtSelect, {
|
|
@@ -20,10 +20,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
dark: "Dark",
|
|
21
21
|
system: "System"
|
|
22
22
|
},
|
|
23
|
-
|
|
24
|
-
light: "
|
|
25
|
-
dark: "
|
|
26
|
-
system: "
|
|
23
|
+
zh: {
|
|
24
|
+
light: "浅色",
|
|
25
|
+
dark: "深色",
|
|
26
|
+
system: "跟随系统"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
});
|
|
@@ -36,8 +36,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
return value === "light" || value === "dark" || value === "system";
|
|
37
37
|
}
|
|
38
38
|
function onSelect(value) {
|
|
39
|
-
if (isTheme(value))
|
|
39
|
+
if (isTheme(value)) {
|
|
40
40
|
model.value = value;
|
|
41
|
+
}
|
|
41
42
|
}
|
|
42
43
|
return (_ctx, _cache) => {
|
|
43
44
|
return openBlock(), createBlock(MtSelect, {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const channel = require("./channel-
|
|
4
|
-
require("./
|
|
5
|
-
require("vue");
|
|
3
|
+
const channel = require("./channel-c7fd2abb.js");
|
|
4
|
+
require("./Criteria-86968a69.js");
|
|
6
5
|
const repository = (entityName) => ({
|
|
7
6
|
search: (criteria, context) => {
|
|
8
7
|
return channel.send("repositorySearch", { entityName, context, criteria });
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { s as send } from "./channel-
|
|
2
|
-
import "./
|
|
3
|
-
import "vue";
|
|
1
|
+
import { s as send } from "./channel-c0a7f238.mjs";
|
|
2
|
+
import "./Criteria-dda62b10.mjs";
|
|
4
3
|
const repository = (entityName) => ({
|
|
5
4
|
search: (criteria, context) => {
|
|
6
5
|
return send("repositorySearch", { entityName, context, criteria });
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { inject, computed, unref } from "vue";
|
|
2
|
+
var __awaiter$1 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) {
|
|
4
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
5
|
+
resolve(value);
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
9
|
+
function fulfilled(value) {
|
|
10
|
+
try {
|
|
11
|
+
step(generator.next(value));
|
|
12
|
+
} catch (e) {
|
|
13
|
+
reject(e);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function rejected(value) {
|
|
17
|
+
try {
|
|
18
|
+
step(generator["throw"](value));
|
|
19
|
+
} catch (e) {
|
|
20
|
+
reject(e);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function step(result) {
|
|
24
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
25
|
+
}
|
|
26
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
function isPromise(value) {
|
|
30
|
+
return !!value && typeof value === "object" && "then" in value && typeof value.then === "function" && "catch" in value && typeof value.catch === "function";
|
|
31
|
+
}
|
|
32
|
+
class RepositoryAdapter {
|
|
33
|
+
// eslint-disable-next-line no-empty-function,no-useless-constructor
|
|
34
|
+
constructor(sourceRepository) {
|
|
35
|
+
Object.defineProperty(this, "sourceRepository", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true,
|
|
39
|
+
value: sourceRepository
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
search(criteria, context) {
|
|
43
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
44
|
+
return this.sourceRepository.search(criteria, context);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
get(id, context, criteria) {
|
|
48
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
49
|
+
return this.sourceRepository.get(id, context, criteria);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
save(entity, context) {
|
|
53
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
54
|
+
return this.sourceRepository.save(entity, context);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
clone(entityId, behavior, context) {
|
|
58
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
59
|
+
return this.sourceRepository.clone(entityId, behavior, context);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
hasChanges(entity) {
|
|
63
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
64
|
+
const result = this.sourceRepository.hasChanges(entity);
|
|
65
|
+
return isPromise(result) ? result : Promise.resolve(result);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
saveAll(entities, context) {
|
|
69
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
70
|
+
return this.sourceRepository.saveAll(entities, context);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
delete(entityId, context) {
|
|
74
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
75
|
+
return this.sourceRepository.delete(entityId, context);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
create(context, entityId) {
|
|
79
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
80
|
+
const result = this.sourceRepository.create(context, entityId);
|
|
81
|
+
return isPromise(result) ? result : Promise.resolve(result);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function createRepositoryAdapter(source) {
|
|
86
|
+
return new RepositoryAdapter(source);
|
|
87
|
+
}
|
|
88
|
+
var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
89
|
+
function adopt(value) {
|
|
90
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
91
|
+
resolve(value);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
95
|
+
function fulfilled(value) {
|
|
96
|
+
try {
|
|
97
|
+
step(generator.next(value));
|
|
98
|
+
} catch (e) {
|
|
99
|
+
reject(e);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function rejected(value) {
|
|
103
|
+
try {
|
|
104
|
+
step(generator["throw"](value));
|
|
105
|
+
} catch (e) {
|
|
106
|
+
reject(e);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function step(result) {
|
|
110
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
111
|
+
}
|
|
112
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
function getRepository(entityName, propRepositoryFactory) {
|
|
116
|
+
if (propRepositoryFactory) {
|
|
117
|
+
return createRepositoryAdapter(propRepositoryFactory(entityName));
|
|
118
|
+
}
|
|
119
|
+
const injectedFactory = inject("repositoryFactory");
|
|
120
|
+
if (injectedFactory) {
|
|
121
|
+
return createRepositoryAdapter(injectedFactory.create(entityName));
|
|
122
|
+
}
|
|
123
|
+
let lazyDataRepository;
|
|
124
|
+
return new Proxy({}, {
|
|
125
|
+
get(_, property) {
|
|
126
|
+
return function(...args) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
if (!lazyDataRepository) {
|
|
129
|
+
lazyDataRepository = (yield import("./repository-e7884115.mjs")).default(entityName);
|
|
130
|
+
}
|
|
131
|
+
const method = lazyDataRepository[property];
|
|
132
|
+
return method(...args);
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function useRepository(entityNameRef, repositoryFactoryRef) {
|
|
139
|
+
const injectedFactory = inject("repositoryFactory");
|
|
140
|
+
return computed(() => {
|
|
141
|
+
const entityName = unref(entityNameRef);
|
|
142
|
+
const repositoryFactory = unref(repositoryFactoryRef);
|
|
143
|
+
return getRepository(entityName, repositoryFactory !== null && repositoryFactory !== void 0 ? repositoryFactory : injectedFactory ? (entityName2) => injectedFactory.create(entityName2) : void 0);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
getRepository as g,
|
|
148
|
+
useRepository as u
|
|
149
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
var __awaiter$1 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) {
|
|
5
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
6
|
+
resolve(value);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
10
|
+
function fulfilled(value) {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.next(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function rejected(value) {
|
|
18
|
+
try {
|
|
19
|
+
step(generator["throw"](value));
|
|
20
|
+
} catch (e) {
|
|
21
|
+
reject(e);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function step(result) {
|
|
25
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26
|
+
}
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
function isPromise(value) {
|
|
31
|
+
return !!value && typeof value === "object" && "then" in value && typeof value.then === "function" && "catch" in value && typeof value.catch === "function";
|
|
32
|
+
}
|
|
33
|
+
class RepositoryAdapter {
|
|
34
|
+
// eslint-disable-next-line no-empty-function,no-useless-constructor
|
|
35
|
+
constructor(sourceRepository) {
|
|
36
|
+
Object.defineProperty(this, "sourceRepository", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: sourceRepository
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
search(criteria, context) {
|
|
44
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
45
|
+
return this.sourceRepository.search(criteria, context);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
get(id, context, criteria) {
|
|
49
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
50
|
+
return this.sourceRepository.get(id, context, criteria);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
save(entity, context) {
|
|
54
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
55
|
+
return this.sourceRepository.save(entity, context);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
clone(entityId, behavior, context) {
|
|
59
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
60
|
+
return this.sourceRepository.clone(entityId, behavior, context);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
hasChanges(entity) {
|
|
64
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
65
|
+
const result = this.sourceRepository.hasChanges(entity);
|
|
66
|
+
return isPromise(result) ? result : Promise.resolve(result);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
saveAll(entities, context) {
|
|
70
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
71
|
+
return this.sourceRepository.saveAll(entities, context);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
delete(entityId, context) {
|
|
75
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
76
|
+
return this.sourceRepository.delete(entityId, context);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
create(context, entityId) {
|
|
80
|
+
return __awaiter$1(this, void 0, void 0, function* () {
|
|
81
|
+
const result = this.sourceRepository.create(context, entityId);
|
|
82
|
+
return isPromise(result) ? result : Promise.resolve(result);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function createRepositoryAdapter(source) {
|
|
87
|
+
return new RepositoryAdapter(source);
|
|
88
|
+
}
|
|
89
|
+
var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
90
|
+
function adopt(value) {
|
|
91
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
92
|
+
resolve(value);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
96
|
+
function fulfilled(value) {
|
|
97
|
+
try {
|
|
98
|
+
step(generator.next(value));
|
|
99
|
+
} catch (e) {
|
|
100
|
+
reject(e);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function rejected(value) {
|
|
104
|
+
try {
|
|
105
|
+
step(generator["throw"](value));
|
|
106
|
+
} catch (e) {
|
|
107
|
+
reject(e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function step(result) {
|
|
111
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
112
|
+
}
|
|
113
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
function getRepository(entityName, propRepositoryFactory) {
|
|
117
|
+
if (propRepositoryFactory) {
|
|
118
|
+
return createRepositoryAdapter(propRepositoryFactory(entityName));
|
|
119
|
+
}
|
|
120
|
+
const injectedFactory = vue.inject("repositoryFactory");
|
|
121
|
+
if (injectedFactory) {
|
|
122
|
+
return createRepositoryAdapter(injectedFactory.create(entityName));
|
|
123
|
+
}
|
|
124
|
+
let lazyDataRepository;
|
|
125
|
+
return new Proxy({}, {
|
|
126
|
+
get(_, property) {
|
|
127
|
+
return function(...args) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
if (!lazyDataRepository) {
|
|
130
|
+
lazyDataRepository = (yield Promise.resolve().then(() => require("./repository-9c56cf7b.js"))).default(entityName);
|
|
131
|
+
}
|
|
132
|
+
const method = lazyDataRepository[property];
|
|
133
|
+
return method(...args);
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function useRepository(entityNameRef, repositoryFactoryRef) {
|
|
140
|
+
const injectedFactory = vue.inject("repositoryFactory");
|
|
141
|
+
return vue.computed(() => {
|
|
142
|
+
const entityName = vue.unref(entityNameRef);
|
|
143
|
+
const repositoryFactory = vue.unref(repositoryFactoryRef);
|
|
144
|
+
return getRepository(entityName, repositoryFactory !== null && repositoryFactory !== void 0 ? repositoryFactory : injectedFactory ? (entityName2) => injectedFactory.create(entityName2) : void 0);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
exports.getRepository = getRepository;
|
|
148
|
+
exports.useRepository = useRepository;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contena/meteor-component-library",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@github.com:contena/meteor.git"
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
35
|
-
"NOTICE"
|
|
36
|
-
"THIRD-PARTY-LICENSES"
|
|
35
|
+
"NOTICE"
|
|
37
36
|
],
|
|
38
37
|
"sideEffects": [
|
|
39
38
|
"*.vue",
|
|
@@ -84,7 +83,7 @@
|
|
|
84
83
|
"vue-codemirror6": "^1.3.8",
|
|
85
84
|
"vue-i18n": "^9.9.1",
|
|
86
85
|
"vue-smooth-reflow": "^0.1.12",
|
|
87
|
-
"@contena/meteor-admin-sdk": "6.
|
|
86
|
+
"@contena/meteor-admin-sdk": "6.12.0",
|
|
88
87
|
"@contena/meteor-tokens": "1.4.1",
|
|
89
88
|
"@contena/meteor-icon-kit": "5.10.0"
|
|
90
89
|
},
|