@mmlogic/components 0.3.9 → 0.3.11
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/{mrd-boolean-field_22.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +684 -41
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/mrd-document-container/mrd-document-container.js +421 -0
- package/dist/collection/components/mrd-document-container/mrd-document-container.scss +79 -0
- package/dist/collection/components/mrd-document-list/mrd-document-list.js +653 -16
- package/dist/collection/components/mrd-document-list/mrd-document-list.scss +66 -0
- package/dist/collection/components/mrd-document-view/mrd-document-view.js +1 -1
- package/dist/collection/components/mrd-email-field/mrd-email-field.js +1 -1
- package/dist/collection/components/mrd-file-field/mrd-file-field.js +1 -1
- package/dist/collection/components/mrd-image-field/mrd-image-field.js +1 -1
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +165 -14
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +0 -44
- package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
- package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
- package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +2 -2
- package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
- package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
- package/dist/collection/dev/app.js +47 -0
- package/dist/collection/utils/i18n.js +12 -0
- package/dist/components/i18n.js +1 -1
- package/dist/components/mrd-document-container.d.ts +11 -0
- package/dist/components/mrd-document-container.js +1 -0
- package/dist/components/mrd-document-container2.js +1 -0
- package/dist/components/mrd-document-list2.js +1 -1
- package/dist/components/mrd-document-view2.js +1 -1
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-file-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-longtext-field2.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-secret-field2.js +1 -1
- package/dist/components/mrd-text-field2.js +1 -1
- package/dist/components/mrd-textarea-field2.js +1 -1
- package/dist/components/mrd-time-field2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/{mrd-boolean-field_22.entry.js → mrd-boolean-field_23.entry.js} +684 -42
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-a9618055.entry.js +1 -0
- package/dist/types/components/mrd-document-container/mrd-document-container.d.ts +99 -0
- package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +126 -1
- package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +32 -5
- package/dist/types/components.d.ts +250 -0
- package/dist/types/types/client-layout.d.ts +5 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-b547291b.entry.js +0 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"components/mrd-currency-field/mrd-currency-field.js",
|
|
6
6
|
"components/mrd-date-field/mrd-date-field.js",
|
|
7
7
|
"components/mrd-datetime-field/mrd-datetime-field.js",
|
|
8
|
+
"components/mrd-document-container/mrd-document-container.js",
|
|
8
9
|
"components/mrd-document-view/mrd-document-view.js",
|
|
9
10
|
"components/mrd-email-field/mrd-email-field.js",
|
|
10
11
|
"components/mrd-field/mrd-field.js",
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { t } from "../../utils/i18n";
|
|
3
|
+
/**
|
|
4
|
+
* Owns a document collection view: a single toolbar (view switch + collection
|
|
5
|
+
* actions like "New folder", and — later — upload / drag-drop) plus the two
|
|
6
|
+
* interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
|
|
7
|
+
* table (`mrd-table`).
|
|
8
|
+
*
|
|
9
|
+
* `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
|
|
10
|
+
* forwards the re-emitted load/navigate/action events to the host. The embedded
|
|
11
|
+
* table/list keep their `data-view` / `data-doclist` attributes so the host's
|
|
12
|
+
* existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
|
|
13
|
+
* (recursive querySelector) still resolve them unchanged.
|
|
14
|
+
*/
|
|
15
|
+
export class MrdDocumentContainer {
|
|
16
|
+
constructor() {
|
|
17
|
+
/** The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config). */
|
|
18
|
+
this.item = null;
|
|
19
|
+
/** Parent record id — required for RELATED_VIEW path building. */
|
|
20
|
+
this.parentId = '';
|
|
21
|
+
/** Canonical parent href, forwarded to the folder tree for single-container seeding. */
|
|
22
|
+
this.containerHref = '';
|
|
23
|
+
/** Lookup key used for the embedded `data-doclist` / `data-view` attributes. */
|
|
24
|
+
this.viewKey = '';
|
|
25
|
+
/** Fixed height (px) of the scrolling folder-tree body — the toolbar stays put
|
|
26
|
+
* on top, Finder-style. The table manages its own height. */
|
|
27
|
+
this.height = 460;
|
|
28
|
+
this.locale = navigator.language;
|
|
29
|
+
/** Active body: folder tree or flat table. */
|
|
30
|
+
this.mode = 'tree';
|
|
31
|
+
/** Whether the folder tree currently has a valid target for "New folder". */
|
|
32
|
+
this.canCreate = false;
|
|
33
|
+
/** Whether the currently mounted table has been init()'d. Reset on every mode switch. */
|
|
34
|
+
this.tableInited = false;
|
|
35
|
+
this.createFolder = () => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
(_b = (_a = this.listEl) === null || _a === void 0 ? void 0 : _a.createFolder) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** The embedded table does not self-load: like every mrd-table it waits for the
|
|
41
|
+
* host to call init() (which emits mrdLoadPage, and — once page 0 lands —
|
|
42
|
+
* mrdLoadAggregations). The section only init()s tables mounted at load time, so
|
|
43
|
+
* when the user switches to list view we init the freshly mounted table here. */
|
|
44
|
+
componentDidRender() {
|
|
45
|
+
var _a;
|
|
46
|
+
if (this.mode === 'list' && this.tableEl && !this.tableInited) {
|
|
47
|
+
this.tableInited = true;
|
|
48
|
+
const table = this.tableEl;
|
|
49
|
+
Promise.resolve((_a = table.componentOnReady) === null || _a === void 0 ? void 0 : _a.call(table)).then(() => { var _a; return (_a = table.init) === null || _a === void 0 ? void 0 : _a.call(table); });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
setMode(mode) {
|
|
53
|
+
if (mode === this.mode)
|
|
54
|
+
return;
|
|
55
|
+
// The tree remounts on switch and re-emits mrdCanCreate; until then, disable.
|
|
56
|
+
this.canCreate = false;
|
|
57
|
+
// The table remounts on switch; re-init it once it is back in the DOM.
|
|
58
|
+
this.tableInited = false;
|
|
59
|
+
this.mode = mode;
|
|
60
|
+
}
|
|
61
|
+
// ── Toolbar ────────────────────────────────────────────────────────────────
|
|
62
|
+
renderToolbar() {
|
|
63
|
+
return (h("div", { class: "mrd-document-container__toolbar" }, this.mode === 'tree' && (h("button", { type: "button", class: "mrd-document-container__action", disabled: !this.canCreate, onClick: this.createFolder }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }), h("path", { d: "M12 11v4M10 13h4" })), t('new_folder', this.locale))), h("div", { class: "mrd-document-container__seg", role: "group", "aria-label": t('doc_view_switch', this.locale) }, h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'tree'), title: t('doc_view_tree', this.locale), "aria-label": t('doc_view_tree', this.locale), onClick: () => this.setMode('tree') }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M3 5h6M3 12h9M3 19h6" }), h("circle", { cx: "18", cy: "5", r: "1.6" }), h("circle", { cx: "18", cy: "19", r: "1.6" }), h("path", { d: "M16 12h4" }))), h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'list'), title: t('doc_view_list', this.locale), "aria-label": t('doc_view_list', this.locale), onClick: () => this.setMode('list') }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }))))));
|
|
64
|
+
}
|
|
65
|
+
// ── Bodies ───────────────────────────────────────────────────────────────
|
|
66
|
+
renderTree() {
|
|
67
|
+
return (h("mrd-document-list", { "data-doclist": this.viewKey, ref: el => (this.listEl = el), item: this.item, archetype: this.archetype, parentId: this.parentId, containerHref: this.containerHref, locale: this.locale, onMrdLoadDistinct: (e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
this.mrdLoadDistinct.emit(e.detail);
|
|
70
|
+
}, onMrdLoadPage: (e) => {
|
|
71
|
+
e.stopPropagation();
|
|
72
|
+
this.mrdLoadPage.emit(e.detail);
|
|
73
|
+
}, onMrdNavigate: (e) => {
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
this.mrdNavigate.emit(e.detail);
|
|
76
|
+
}, onMrdCanCreate: (e) => {
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
this.canCreate = e.detail;
|
|
79
|
+
}, onMrdUpdateObject: (e) => {
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
this.mrdUpdateObject.emit(e.detail);
|
|
82
|
+
}, onMrdUpload: (e) => {
|
|
83
|
+
e.stopPropagation();
|
|
84
|
+
this.mrdUpload.emit(e.detail);
|
|
85
|
+
}, onMrdCreateObject: (e) => {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
this.mrdCreateObject.emit(e.detail);
|
|
88
|
+
} }));
|
|
89
|
+
}
|
|
90
|
+
renderList() {
|
|
91
|
+
return (h("mrd-table", { "data-view": this.viewKey, ref: el => (this.tableEl = el), item: this.item, parentId: this.parentId, locale: this.locale, onMrdLoadPage: (e) => {
|
|
92
|
+
e.stopPropagation();
|
|
93
|
+
this.mrdLoadPage.emit(e.detail);
|
|
94
|
+
}, onMrdLoadAggregations: (e) => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
this.mrdLoadAggregations.emit(e.detail);
|
|
97
|
+
}, onMrdRowClick: (e) => {
|
|
98
|
+
var _a, _b, _c;
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
const row = e.detail;
|
|
101
|
+
this.mrdNavigate.emit({ href: (_b = (_a = row === null || row === void 0 ? void 0 : row._links) === null || _a === void 0 ? void 0 : _a.self) === null || _b === void 0 ? void 0 : _b.href, label: (_c = row === null || row === void 0 ? void 0 : row.name) !== null && _c !== void 0 ? _c : '' });
|
|
102
|
+
}, onMrdAction: (e) => {
|
|
103
|
+
e.stopPropagation();
|
|
104
|
+
this.mrdAction.emit(e.detail);
|
|
105
|
+
} }));
|
|
106
|
+
}
|
|
107
|
+
render() {
|
|
108
|
+
const treeMode = this.mode === 'tree';
|
|
109
|
+
return (h(Host, { key: '5d8a9a9bb4f1126a304b796aff9d1cb0100b8fc6' }, this.renderToolbar(), h("div", { key: '80ac7e5dd39ffcc4161059447221045a6e035099', class: "mrd-document-container__body", style: treeMode ? { height: `${this.height}px`, overflowY: 'auto' } : {} }, treeMode ? this.renderTree() : this.renderList())));
|
|
110
|
+
}
|
|
111
|
+
static get is() { return "mrd-document-container"; }
|
|
112
|
+
static get encapsulation() { return "scoped"; }
|
|
113
|
+
static get originalStyleUrls() {
|
|
114
|
+
return {
|
|
115
|
+
"$": ["mrd-document-container.scss"]
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
static get styleUrls() {
|
|
119
|
+
return {
|
|
120
|
+
"$": ["mrd-document-container.css"]
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get properties() {
|
|
124
|
+
return {
|
|
125
|
+
"item": {
|
|
126
|
+
"type": "unknown",
|
|
127
|
+
"mutable": false,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "ClientLayoutItem | null",
|
|
130
|
+
"resolved": "ClientLayoutItem | null",
|
|
131
|
+
"references": {
|
|
132
|
+
"ClientLayoutItem": {
|
|
133
|
+
"location": "import",
|
|
134
|
+
"path": "../../types/client-layout",
|
|
135
|
+
"id": "src/types/client-layout.ts::ClientLayoutItem",
|
|
136
|
+
"referenceLocation": "ClientLayoutItem"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": false,
|
|
141
|
+
"optional": false,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": "The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config)."
|
|
145
|
+
},
|
|
146
|
+
"getter": false,
|
|
147
|
+
"setter": false,
|
|
148
|
+
"defaultValue": "null"
|
|
149
|
+
},
|
|
150
|
+
"archetype": {
|
|
151
|
+
"type": "unknown",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "ClientArchetype",
|
|
155
|
+
"resolved": "ClientArchetype",
|
|
156
|
+
"references": {
|
|
157
|
+
"ClientArchetype": {
|
|
158
|
+
"location": "import",
|
|
159
|
+
"path": "../../types/client-layout",
|
|
160
|
+
"id": "src/types/client-layout.ts::ClientArchetype",
|
|
161
|
+
"referenceLocation": "ClientArchetype"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": true,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Resolved `commons.document` archetype binding for the folder tree."
|
|
170
|
+
},
|
|
171
|
+
"getter": false,
|
|
172
|
+
"setter": false
|
|
173
|
+
},
|
|
174
|
+
"parentId": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "string",
|
|
179
|
+
"resolved": "string",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": "Parent record id \u2014 required for RELATED_VIEW path building."
|
|
187
|
+
},
|
|
188
|
+
"getter": false,
|
|
189
|
+
"setter": false,
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"attribute": "parent-id",
|
|
192
|
+
"defaultValue": "''"
|
|
193
|
+
},
|
|
194
|
+
"containerHref": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "Canonical parent href, forwarded to the folder tree for single-container seeding."
|
|
207
|
+
},
|
|
208
|
+
"getter": false,
|
|
209
|
+
"setter": false,
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"attribute": "container-href",
|
|
212
|
+
"defaultValue": "''"
|
|
213
|
+
},
|
|
214
|
+
"viewKey": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "string",
|
|
219
|
+
"resolved": "string",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Lookup key used for the embedded `data-doclist` / `data-view` attributes."
|
|
227
|
+
},
|
|
228
|
+
"getter": false,
|
|
229
|
+
"setter": false,
|
|
230
|
+
"reflect": false,
|
|
231
|
+
"attribute": "view-key",
|
|
232
|
+
"defaultValue": "''"
|
|
233
|
+
},
|
|
234
|
+
"height": {
|
|
235
|
+
"type": "number",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "number",
|
|
239
|
+
"resolved": "number",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": "Fixed height (px) of the scrolling folder-tree body \u2014 the toolbar stays put\non top, Finder-style. The table manages its own height."
|
|
247
|
+
},
|
|
248
|
+
"getter": false,
|
|
249
|
+
"setter": false,
|
|
250
|
+
"reflect": false,
|
|
251
|
+
"attribute": "height",
|
|
252
|
+
"defaultValue": "460"
|
|
253
|
+
},
|
|
254
|
+
"locale": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "string",
|
|
259
|
+
"resolved": "string",
|
|
260
|
+
"references": {}
|
|
261
|
+
},
|
|
262
|
+
"required": false,
|
|
263
|
+
"optional": false,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": ""
|
|
267
|
+
},
|
|
268
|
+
"getter": false,
|
|
269
|
+
"setter": false,
|
|
270
|
+
"reflect": false,
|
|
271
|
+
"attribute": "locale",
|
|
272
|
+
"defaultValue": "navigator.language"
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static get states() {
|
|
277
|
+
return {
|
|
278
|
+
"mode": {},
|
|
279
|
+
"canCreate": {}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
static get events() {
|
|
283
|
+
return [{
|
|
284
|
+
"method": "mrdLoadPage",
|
|
285
|
+
"name": "mrdLoadPage",
|
|
286
|
+
"bubbles": true,
|
|
287
|
+
"cancelable": true,
|
|
288
|
+
"composed": true,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": "Re-emitted from the embedded list/table. `nodeId` present for a folder load."
|
|
292
|
+
},
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "{ page: number; sort: string; path: string; qs: string; nodeId?: string }",
|
|
295
|
+
"resolved": "{ page: number; sort: string; path: string; qs: string; nodeId?: string | undefined; }",
|
|
296
|
+
"references": {}
|
|
297
|
+
}
|
|
298
|
+
}, {
|
|
299
|
+
"method": "mrdLoadDistinct",
|
|
300
|
+
"name": "mrdLoadDistinct",
|
|
301
|
+
"bubbles": true,
|
|
302
|
+
"cancelable": true,
|
|
303
|
+
"composed": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Re-emitted from the embedded folder tree."
|
|
307
|
+
},
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "{ nodeId: string; distinct: string; path: string; qs: string }",
|
|
310
|
+
"resolved": "{ nodeId: string; distinct: string; path: string; qs: string; }",
|
|
311
|
+
"references": {}
|
|
312
|
+
}
|
|
313
|
+
}, {
|
|
314
|
+
"method": "mrdLoadAggregations",
|
|
315
|
+
"name": "mrdLoadAggregations",
|
|
316
|
+
"bubbles": true,
|
|
317
|
+
"cancelable": true,
|
|
318
|
+
"composed": true,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "Re-emitted from the embedded table."
|
|
322
|
+
},
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "{ path: string; qs: string; aggQs: string }",
|
|
325
|
+
"resolved": "{ path: string; qs: string; aggQs: string; }",
|
|
326
|
+
"references": {}
|
|
327
|
+
}
|
|
328
|
+
}, {
|
|
329
|
+
"method": "mrdNavigate",
|
|
330
|
+
"name": "mrdNavigate",
|
|
331
|
+
"bubbles": true,
|
|
332
|
+
"cancelable": true,
|
|
333
|
+
"composed": true,
|
|
334
|
+
"docs": {
|
|
335
|
+
"tags": [],
|
|
336
|
+
"text": "A row / document was activated. Host routes to the object page."
|
|
337
|
+
},
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "{ href?: string; label: string }",
|
|
340
|
+
"resolved": "{ href?: string | undefined; label: string; }",
|
|
341
|
+
"references": {}
|
|
342
|
+
}
|
|
343
|
+
}, {
|
|
344
|
+
"method": "mrdAction",
|
|
345
|
+
"name": "mrdAction",
|
|
346
|
+
"bubbles": true,
|
|
347
|
+
"cancelable": true,
|
|
348
|
+
"composed": true,
|
|
349
|
+
"docs": {
|
|
350
|
+
"tags": [],
|
|
351
|
+
"text": "A table toolbar action was triggered."
|
|
352
|
+
},
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "{ action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }",
|
|
355
|
+
"resolved": "{ action: string; path?: string | undefined; qs?: string | undefined; parentPath?: string | null | undefined; basicType?: string | undefined; }",
|
|
356
|
+
"references": {}
|
|
357
|
+
}
|
|
358
|
+
}, {
|
|
359
|
+
"method": "mrdUpdateObject",
|
|
360
|
+
"name": "mrdUpdateObject",
|
|
361
|
+
"bubbles": true,
|
|
362
|
+
"cancelable": true,
|
|
363
|
+
"composed": true,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "Generic \"update an existing object\" request, re-emitted from the folder tree\n(a document was dragged into another folder/container)."
|
|
367
|
+
},
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "{ href: string; values: Record<string, unknown> }",
|
|
370
|
+
"resolved": "{ href: string; values: Record<string, unknown>; }",
|
|
371
|
+
"references": {
|
|
372
|
+
"Record": {
|
|
373
|
+
"location": "global",
|
|
374
|
+
"id": "global::Record"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}, {
|
|
379
|
+
"method": "mrdUpload",
|
|
380
|
+
"name": "mrdUpload",
|
|
381
|
+
"bubbles": true,
|
|
382
|
+
"cancelable": true,
|
|
383
|
+
"composed": true,
|
|
384
|
+
"docs": {
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": "An external file was dropped on a folder; host uploads and calls back."
|
|
387
|
+
},
|
|
388
|
+
"complexType": {
|
|
389
|
+
"original": "{ file: File }",
|
|
390
|
+
"resolved": "{ file: File; }",
|
|
391
|
+
"references": {
|
|
392
|
+
"File": {
|
|
393
|
+
"location": "global",
|
|
394
|
+
"id": "global::File"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}, {
|
|
399
|
+
"method": "mrdCreateObject",
|
|
400
|
+
"name": "mrdCreateObject",
|
|
401
|
+
"bubbles": true,
|
|
402
|
+
"cancelable": true,
|
|
403
|
+
"composed": true,
|
|
404
|
+
"docs": {
|
|
405
|
+
"tags": [],
|
|
406
|
+
"text": "Create a new document from an uploaded file; host POSTs `values` to `path`."
|
|
407
|
+
},
|
|
408
|
+
"complexType": {
|
|
409
|
+
"original": "{ path: string; values: Record<string, unknown> }",
|
|
410
|
+
"resolved": "{ path: string; values: Record<string, unknown>; }",
|
|
411
|
+
"references": {
|
|
412
|
+
"Record": {
|
|
413
|
+
"location": "global",
|
|
414
|
+
"id": "global::Record"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}];
|
|
419
|
+
}
|
|
420
|
+
static get elementRef() { return "el"; }
|
|
421
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.mrd-document-container__toolbar {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: flex-end;
|
|
9
|
+
gap: var(--mrd-space-2);
|
|
10
|
+
padding: var(--mrd-space-2) var(--mrd-space-4);
|
|
11
|
+
border-bottom: 1px solid var(--mrd-color-neutral-100);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mrd-document-container__action {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--mrd-space-2);
|
|
18
|
+
height: 1.625rem;
|
|
19
|
+
padding: 0 var(--mrd-space-3);
|
|
20
|
+
font-size: var(--mrd-font-size-sm);
|
|
21
|
+
color: var(--mrd-color-neutral-700);
|
|
22
|
+
background: var(--mrd-color-white);
|
|
23
|
+
border: 1px solid var(--mrd-color-neutral-200);
|
|
24
|
+
border-radius: var(--mrd-border-radius);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
transition: background var(--mrd-transition-fast), border-color var(--mrd-transition-fast);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mrd-document-container__action svg {
|
|
30
|
+
width: 1rem;
|
|
31
|
+
height: 1rem;
|
|
32
|
+
color: #d9a441;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mrd-document-container__action:hover:not(:disabled) {
|
|
36
|
+
background: var(--mrd-color-neutral-50);
|
|
37
|
+
border-color: var(--mrd-color-neutral-300);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mrd-document-container__action:disabled {
|
|
41
|
+
opacity: 0.5;
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mrd-document-container__seg {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
gap: 2px;
|
|
48
|
+
padding: 2px;
|
|
49
|
+
background: var(--mrd-color-neutral-100);
|
|
50
|
+
border-radius: var(--mrd-border-radius);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mrd-document-container__seg-btn {
|
|
54
|
+
width: 1.875rem;
|
|
55
|
+
height: 1.625rem;
|
|
56
|
+
display: grid;
|
|
57
|
+
place-items: center;
|
|
58
|
+
border: none;
|
|
59
|
+
background: none;
|
|
60
|
+
border-radius: var(--mrd-border-radius-sm);
|
|
61
|
+
color: var(--mrd-color-neutral-500);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: color var(--mrd-transition-fast), background var(--mrd-transition-fast);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mrd-document-container__seg-btn:hover {
|
|
67
|
+
color: var(--mrd-color-neutral-800);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mrd-document-container__seg-btn[aria-pressed='true'] {
|
|
71
|
+
background: var(--mrd-color-white);
|
|
72
|
+
color: var(--mrd-color-primary-dark);
|
|
73
|
+
box-shadow: var(--mrd-shadow-sm);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mrd-document-container__seg-btn svg {
|
|
77
|
+
width: 1rem;
|
|
78
|
+
height: 1rem;
|
|
79
|
+
}
|