folder-pane 3.0.2 → 3.1.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.
@@ -0,0 +1,838 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("SolidLogic"), require("UI"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["SolidLogic", "UI"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["FolderPane"] = factory(require("SolidLogic"), require("UI"));
8
+ else
9
+ root["FolderPane"] = factory(root["SolidLogic"], root["UI"]);
10
+ })(this, (__WEBPACK_EXTERNAL_MODULE__663__, __WEBPACK_EXTERNAL_MODULE__426__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 136
16
+ (module, __webpack_exports__, __webpack_require__) {
17
+
18
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
20
+ /* harmony export */ });
21
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(354);
22
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
23
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
24
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
25
+ // Imports
26
+
27
+
28
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
29
+ // Module
30
+ ___CSS_LOADER_EXPORT___.push([module.id, `.folderPaneInstancePane {
31
+ box-sizing: border-box;
32
+ align-self: stretch;
33
+ text-align: left;
34
+ width: 100%;
35
+ max-width: none;
36
+ margin-left: 0;
37
+ margin-right: 0;
38
+ border-top: solid 1px #777;
39
+ border-bottom: solid 1px #777;
40
+ margin-top: var(--spacing-xs, 0.5em);
41
+ margin-bottom: var(--spacing-xs, 0.5em);
42
+ overflow-x: auto;
43
+ -webkit-overflow-scrolling: touch;
44
+ padding-top: 1rem;
45
+ padding-bottom: 1rem;
46
+ }
47
+
48
+ .folderPanePackageDiv {
49
+ display: block;
50
+ text-align: left;
51
+ width: 100%;
52
+ max-width: none;
53
+ margin-left: 0;
54
+ margin-right: 0;
55
+ border-top: 0.2em solid #ccc;
56
+ overflow-x: auto;
57
+ }
58
+
59
+ .folderPaneMainTable {
60
+ display: table;
61
+ width: 100%;
62
+ max-width: none;
63
+ table-layout: auto;
64
+ text-align: left;
65
+ margin-left: 0;
66
+ margin-right: auto;
67
+ margin-bottom: var(--spacing-lg, 1.5625rem);
68
+ }
69
+
70
+ .folderPaneMainTable td,
71
+ .folderPaneMainTable th {
72
+ text-align: left;
73
+ vertical-align: top;
74
+ overflow-wrap: anywhere;
75
+ word-break: break-word;
76
+ }
77
+
78
+ /* manager.js sets inline padding:0 on object cells; use an important override here */
79
+ .folderPaneMainTable > tr > td.obj,
80
+ .folderPaneMainTable > tbody > tr > td.obj {
81
+ padding-left: var(--spacing-lg, 1.5625rem) !important;
82
+ }
83
+
84
+ .folderPanePredicateCell {
85
+ width: 0;
86
+ min-width: 0;
87
+ max-width: 0;
88
+ padding: 0 !important;
89
+ margin: 0 !important;
90
+ border: 0 !important;
91
+ overflow: hidden;
92
+ }
93
+
94
+ .folderPaneCreationDiv {
95
+ display: flex;
96
+ align-items: flex-start;
97
+ justify-content: flex-start;
98
+ text-align: left;
99
+ width: 100%;
100
+ max-width: none;
101
+ margin-left: 0;
102
+ margin-right: 0;
103
+ }
104
+
105
+ .folderPaneDropTarget {
106
+ display: inline-block;
107
+ width: var(--icon-base, 2em);
108
+ min-width: var(--icon-base, 2em);
109
+ max-width: var(--icon-base, 2em);
110
+ height: var(--icon-base, 2em);
111
+ min-height: var(--icon-base, 2em);
112
+ max-height: var(--icon-base, 2em);
113
+ padding: 0 !important;
114
+ margin: 0 !important;
115
+ box-sizing: content-box;
116
+ flex: 0 0 var(--icon-base, 2em);
117
+ }
118
+
119
+ .folderPaneExplicitDropIcon {
120
+ width: var(--icon-base, 2em);
121
+ height: var(--icon-base, 2em);
122
+ }
123
+
124
+ @media (max-width: 700px) {
125
+ .folderPaneInstancePane {
126
+ border-top: solid 1px #777;
127
+ border-bottom: solid 1px #777;
128
+ margin-top: var(--spacing-2xs, 0.25em);
129
+ margin-bottom: var(--spacing-2xs, 0.25em);
130
+ }
131
+
132
+ .folderPaneExplicitDropIcon {
133
+ width: var(--icon-sm, 1.5em);
134
+ height: var(--icon-sm, 1.5em);
135
+ }
136
+ }
137
+ `, "",{"version":3,"sources":["webpack://./src/styles/folderPane.css"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,WAAW;EACX,eAAe;EACf,cAAc;EACd,eAAe;EACf,0BAA0B;EAC1B,6BAA6B;EAC7B,oCAAoC;EACpC,uCAAuC;EACvC,gBAAgB;EAChB,iCAAiC;EACjC,iBAAiB;EACjB,oBAAoB;AACtB;;AAEA;EACE,cAAc;EACd,gBAAgB;EAChB,WAAW;EACX,eAAe;EACf,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,gBAAgB;AAClB;;AAEA;EACE,cAAc;EACd,WAAW;EACX,eAAe;EACf,kBAAkB;EAClB,gBAAgB;EAChB,cAAc;EACd,kBAAkB;EAClB,2CAA2C;AAC7C;;AAEA;;EAEE,gBAAgB;EAChB,mBAAmB;EACnB,uBAAuB;EACvB,sBAAsB;AACxB;;AAEA,qFAAqF;AACrF;;EAEE,qDAAqD;AACvD;;AAEA;EACE,QAAQ;EACR,YAAY;EACZ,YAAY;EACZ,qBAAqB;EACrB,oBAAoB;EACpB,oBAAoB;EACpB,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,uBAAuB;EACvB,2BAA2B;EAC3B,gBAAgB;EAChB,WAAW;EACX,eAAe;EACf,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,qBAAqB;EACrB,4BAA4B;EAC5B,gCAAgC;EAChC,gCAAgC;EAChC,6BAA6B;EAC7B,iCAAiC;EACjC,iCAAiC;EACjC,qBAAqB;EACrB,oBAAoB;EACpB,uBAAuB;EACvB,+BAA+B;AACjC;;AAEA;EACE,4BAA4B;EAC5B,6BAA6B;AAC/B;;AAEA;EACE;IACE,0BAA0B;IAC1B,6BAA6B;IAC7B,sCAAsC;IACtC,yCAAyC;EAC3C;;EAEA;IACE,4BAA4B;IAC5B,6BAA6B;EAC/B;AACF","sourcesContent":[".folderPaneInstancePane {\n box-sizing: border-box;\n align-self: stretch;\n text-align: left;\n width: 100%;\n max-width: none;\n margin-left: 0;\n margin-right: 0;\n border-top: solid 1px #777;\n border-bottom: solid 1px #777;\n margin-top: var(--spacing-xs, 0.5em);\n margin-bottom: var(--spacing-xs, 0.5em);\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n\n.folderPanePackageDiv {\n display: block;\n text-align: left;\n width: 100%;\n max-width: none;\n margin-left: 0;\n margin-right: 0;\n border-top: 0.2em solid #ccc;\n overflow-x: auto;\n}\n\n.folderPaneMainTable {\n display: table;\n width: 100%;\n max-width: none;\n table-layout: auto;\n text-align: left;\n margin-left: 0;\n margin-right: auto;\n margin-bottom: var(--spacing-lg, 1.5625rem);\n}\n\n.folderPaneMainTable td,\n.folderPaneMainTable th {\n text-align: left;\n vertical-align: top;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n\n/* manager.js sets inline padding:0 on object cells; use an important override here */\n.folderPaneMainTable > tr > td.obj,\n.folderPaneMainTable > tbody > tr > td.obj {\n padding-left: var(--spacing-lg, 1.5625rem) !important;\n}\n\n.folderPanePredicateCell {\n width: 0;\n min-width: 0;\n max-width: 0;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n overflow: hidden;\n}\n\n.folderPaneCreationDiv {\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n text-align: left;\n width: 100%;\n max-width: none;\n margin-left: 0;\n margin-right: 0;\n}\n\n.folderPaneDropTarget {\n display: inline-block;\n width: var(--icon-base, 2em);\n min-width: var(--icon-base, 2em);\n max-width: var(--icon-base, 2em);\n height: var(--icon-base, 2em);\n min-height: var(--icon-base, 2em);\n max-height: var(--icon-base, 2em);\n padding: 0 !important;\n margin: 0 !important;\n box-sizing: content-box;\n flex: 0 0 var(--icon-base, 2em);\n}\n\n.folderPaneExplicitDropIcon {\n width: var(--icon-base, 2em);\n height: var(--icon-base, 2em);\n}\n\n@media (max-width: 700px) {\n .folderPaneInstancePane {\n border-top: solid 1px #777;\n border-bottom: solid 1px #777;\n margin-top: var(--spacing-2xs, 0.25em);\n margin-bottom: var(--spacing-2xs, 0.25em);\n }\n\n .folderPaneExplicitDropIcon {\n width: var(--icon-sm, 1.5em);\n height: var(--icon-sm, 1.5em);\n }\n}\n"],"sourceRoot":""}]);
138
+ // Exports
139
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
140
+
141
+
142
+ /***/ },
143
+
144
+ /***/ 92
145
+ (module, __webpack_exports__, __webpack_require__) {
146
+
147
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
148
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
149
+ /* harmony export */ });
150
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(354);
151
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
152
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
153
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
154
+ // Imports
155
+
156
+
157
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
158
+ // Module
159
+ ___CSS_LOADER_EXPORT___.push([module.id, `:root {
160
+ /* Shared utility variables (e.g., base icon size) */
161
+ --icon-base: 2em;
162
+ }`, "",{"version":3,"sources":["webpack://./src/styles/utilities.css"],"names":[],"mappings":"AAAA;EACE,oDAAoD;EACpD,gBAAgB;AAClB","sourcesContent":[":root {\n /* Shared utility variables (e.g., base icon size) */\n --icon-base: 2em;\n}"],"sourceRoot":""}]);
163
+ // Exports
164
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
165
+
166
+
167
+ /***/ },
168
+
169
+ /***/ 314
170
+ (module) {
171
+
172
+
173
+
174
+ /*
175
+ MIT License http://www.opensource.org/licenses/mit-license.php
176
+ Author Tobias Koppers @sokra
177
+ */
178
+ module.exports = function (cssWithMappingToString) {
179
+ var list = [];
180
+
181
+ // return the list of modules as css string
182
+ list.toString = function toString() {
183
+ return this.map(function (item) {
184
+ var content = "";
185
+ var needLayer = typeof item[5] !== "undefined";
186
+ if (item[4]) {
187
+ content += "@supports (".concat(item[4], ") {");
188
+ }
189
+ if (item[2]) {
190
+ content += "@media ".concat(item[2], " {");
191
+ }
192
+ if (needLayer) {
193
+ content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
194
+ }
195
+ content += cssWithMappingToString(item);
196
+ if (needLayer) {
197
+ content += "}";
198
+ }
199
+ if (item[2]) {
200
+ content += "}";
201
+ }
202
+ if (item[4]) {
203
+ content += "}";
204
+ }
205
+ return content;
206
+ }).join("");
207
+ };
208
+
209
+ // import a list of modules into the list
210
+ list.i = function i(modules, media, dedupe, supports, layer) {
211
+ if (typeof modules === "string") {
212
+ modules = [[null, modules, undefined]];
213
+ }
214
+ var alreadyImportedModules = {};
215
+ if (dedupe) {
216
+ for (var k = 0; k < this.length; k++) {
217
+ var id = this[k][0];
218
+ if (id != null) {
219
+ alreadyImportedModules[id] = true;
220
+ }
221
+ }
222
+ }
223
+ for (var _k = 0; _k < modules.length; _k++) {
224
+ var item = [].concat(modules[_k]);
225
+ if (dedupe && alreadyImportedModules[item[0]]) {
226
+ continue;
227
+ }
228
+ if (typeof layer !== "undefined") {
229
+ if (typeof item[5] === "undefined") {
230
+ item[5] = layer;
231
+ } else {
232
+ item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
233
+ item[5] = layer;
234
+ }
235
+ }
236
+ if (media) {
237
+ if (!item[2]) {
238
+ item[2] = media;
239
+ } else {
240
+ item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
241
+ item[2] = media;
242
+ }
243
+ }
244
+ if (supports) {
245
+ if (!item[4]) {
246
+ item[4] = "".concat(supports);
247
+ } else {
248
+ item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
249
+ item[4] = supports;
250
+ }
251
+ }
252
+ list.push(item);
253
+ }
254
+ };
255
+ return list;
256
+ };
257
+
258
+ /***/ },
259
+
260
+ /***/ 354
261
+ (module) {
262
+
263
+
264
+
265
+ module.exports = function (item) {
266
+ var content = item[1];
267
+ var cssMapping = item[3];
268
+ if (!cssMapping) {
269
+ return content;
270
+ }
271
+ if (typeof btoa === "function") {
272
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
273
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
274
+ var sourceMapping = "/*# ".concat(data, " */");
275
+ return [content].concat([sourceMapping]).join("\n");
276
+ }
277
+ return [content].join("\n");
278
+ };
279
+
280
+ /***/ },
281
+
282
+ /***/ 72
283
+ (module) {
284
+
285
+
286
+
287
+ var stylesInDOM = [];
288
+ function getIndexByIdentifier(identifier) {
289
+ var result = -1;
290
+ for (var i = 0; i < stylesInDOM.length; i++) {
291
+ if (stylesInDOM[i].identifier === identifier) {
292
+ result = i;
293
+ break;
294
+ }
295
+ }
296
+ return result;
297
+ }
298
+ function modulesToDom(list, options) {
299
+ var idCountMap = {};
300
+ var identifiers = [];
301
+ for (var i = 0; i < list.length; i++) {
302
+ var item = list[i];
303
+ var id = options.base ? item[0] + options.base : item[0];
304
+ var count = idCountMap[id] || 0;
305
+ var identifier = "".concat(id, " ").concat(count);
306
+ idCountMap[id] = count + 1;
307
+ var indexByIdentifier = getIndexByIdentifier(identifier);
308
+ var obj = {
309
+ css: item[1],
310
+ media: item[2],
311
+ sourceMap: item[3],
312
+ supports: item[4],
313
+ layer: item[5]
314
+ };
315
+ if (indexByIdentifier !== -1) {
316
+ stylesInDOM[indexByIdentifier].references++;
317
+ stylesInDOM[indexByIdentifier].updater(obj);
318
+ } else {
319
+ var updater = addElementStyle(obj, options);
320
+ options.byIndex = i;
321
+ stylesInDOM.splice(i, 0, {
322
+ identifier: identifier,
323
+ updater: updater,
324
+ references: 1
325
+ });
326
+ }
327
+ identifiers.push(identifier);
328
+ }
329
+ return identifiers;
330
+ }
331
+ function addElementStyle(obj, options) {
332
+ var api = options.domAPI(options);
333
+ api.update(obj);
334
+ var updater = function updater(newObj) {
335
+ if (newObj) {
336
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
337
+ return;
338
+ }
339
+ api.update(obj = newObj);
340
+ } else {
341
+ api.remove();
342
+ }
343
+ };
344
+ return updater;
345
+ }
346
+ module.exports = function (list, options) {
347
+ options = options || {};
348
+ list = list || [];
349
+ var lastIdentifiers = modulesToDom(list, options);
350
+ return function update(newList) {
351
+ newList = newList || [];
352
+ for (var i = 0; i < lastIdentifiers.length; i++) {
353
+ var identifier = lastIdentifiers[i];
354
+ var index = getIndexByIdentifier(identifier);
355
+ stylesInDOM[index].references--;
356
+ }
357
+ var newLastIdentifiers = modulesToDom(newList, options);
358
+ for (var _i = 0; _i < lastIdentifiers.length; _i++) {
359
+ var _identifier = lastIdentifiers[_i];
360
+ var _index = getIndexByIdentifier(_identifier);
361
+ if (stylesInDOM[_index].references === 0) {
362
+ stylesInDOM[_index].updater();
363
+ stylesInDOM.splice(_index, 1);
364
+ }
365
+ }
366
+ lastIdentifiers = newLastIdentifiers;
367
+ };
368
+ };
369
+
370
+ /***/ },
371
+
372
+ /***/ 659
373
+ (module) {
374
+
375
+
376
+
377
+ var memo = {};
378
+
379
+ /* istanbul ignore next */
380
+ function getTarget(target) {
381
+ if (typeof memo[target] === "undefined") {
382
+ var styleTarget = document.querySelector(target);
383
+
384
+ // Special case to return head of iframe instead of iframe itself
385
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
386
+ try {
387
+ // This will throw an exception if access to iframe is blocked
388
+ // due to cross-origin restrictions
389
+ styleTarget = styleTarget.contentDocument.head;
390
+ } catch (e) {
391
+ // istanbul ignore next
392
+ styleTarget = null;
393
+ }
394
+ }
395
+ memo[target] = styleTarget;
396
+ }
397
+ return memo[target];
398
+ }
399
+
400
+ /* istanbul ignore next */
401
+ function insertBySelector(insert, style) {
402
+ var target = getTarget(insert);
403
+ if (!target) {
404
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
405
+ }
406
+ target.appendChild(style);
407
+ }
408
+ module.exports = insertBySelector;
409
+
410
+ /***/ },
411
+
412
+ /***/ 540
413
+ (module) {
414
+
415
+
416
+
417
+ /* istanbul ignore next */
418
+ function insertStyleElement(options) {
419
+ var element = document.createElement("style");
420
+ options.setAttributes(element, options.attributes);
421
+ options.insert(element, options.options);
422
+ return element;
423
+ }
424
+ module.exports = insertStyleElement;
425
+
426
+ /***/ },
427
+
428
+ /***/ 56
429
+ (module, __unused_webpack_exports, __webpack_require__) {
430
+
431
+
432
+
433
+ /* istanbul ignore next */
434
+ function setAttributesWithoutAttributes(styleElement) {
435
+ var nonce = true ? __webpack_require__.nc : 0;
436
+ if (nonce) {
437
+ styleElement.setAttribute("nonce", nonce);
438
+ }
439
+ }
440
+ module.exports = setAttributesWithoutAttributes;
441
+
442
+ /***/ },
443
+
444
+ /***/ 825
445
+ (module) {
446
+
447
+
448
+
449
+ /* istanbul ignore next */
450
+ function apply(styleElement, options, obj) {
451
+ var css = "";
452
+ if (obj.supports) {
453
+ css += "@supports (".concat(obj.supports, ") {");
454
+ }
455
+ if (obj.media) {
456
+ css += "@media ".concat(obj.media, " {");
457
+ }
458
+ var needLayer = typeof obj.layer !== "undefined";
459
+ if (needLayer) {
460
+ css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
461
+ }
462
+ css += obj.css;
463
+ if (needLayer) {
464
+ css += "}";
465
+ }
466
+ if (obj.media) {
467
+ css += "}";
468
+ }
469
+ if (obj.supports) {
470
+ css += "}";
471
+ }
472
+ var sourceMap = obj.sourceMap;
473
+ if (sourceMap && typeof btoa !== "undefined") {
474
+ css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
475
+ }
476
+
477
+ // For old IE
478
+ /* istanbul ignore if */
479
+ options.styleTagTransform(css, styleElement, options.options);
480
+ }
481
+ function removeStyleElement(styleElement) {
482
+ // istanbul ignore if
483
+ if (styleElement.parentNode === null) {
484
+ return false;
485
+ }
486
+ styleElement.parentNode.removeChild(styleElement);
487
+ }
488
+
489
+ /* istanbul ignore next */
490
+ function domAPI(options) {
491
+ if (typeof document === "undefined") {
492
+ return {
493
+ update: function update() {},
494
+ remove: function remove() {}
495
+ };
496
+ }
497
+ var styleElement = options.insertStyleElement(options);
498
+ return {
499
+ update: function update(obj) {
500
+ apply(styleElement, options, obj);
501
+ },
502
+ remove: function remove() {
503
+ removeStyleElement(styleElement);
504
+ }
505
+ };
506
+ }
507
+ module.exports = domAPI;
508
+
509
+ /***/ },
510
+
511
+ /***/ 113
512
+ (module) {
513
+
514
+
515
+
516
+ /* istanbul ignore next */
517
+ function styleTagTransform(css, styleElement) {
518
+ if (styleElement.styleSheet) {
519
+ styleElement.styleSheet.cssText = css;
520
+ } else {
521
+ while (styleElement.firstChild) {
522
+ styleElement.removeChild(styleElement.firstChild);
523
+ }
524
+ styleElement.appendChild(document.createTextNode(css));
525
+ }
526
+ }
527
+ module.exports = styleTagTransform;
528
+
529
+ /***/ },
530
+
531
+ /***/ 663
532
+ (module) {
533
+
534
+ module.exports = __WEBPACK_EXTERNAL_MODULE__663__;
535
+
536
+ /***/ },
537
+
538
+ /***/ 426
539
+ (module) {
540
+
541
+ module.exports = __WEBPACK_EXTERNAL_MODULE__426__;
542
+
543
+ /***/ }
544
+
545
+ /******/ });
546
+ /************************************************************************/
547
+ /******/ // The module cache
548
+ /******/ var __webpack_module_cache__ = {};
549
+ /******/
550
+ /******/ // The require function
551
+ /******/ function __webpack_require__(moduleId) {
552
+ /******/ // Check if module is in cache
553
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
554
+ /******/ if (cachedModule !== undefined) {
555
+ /******/ return cachedModule.exports;
556
+ /******/ }
557
+ /******/ // Create a new module (and put it into the cache)
558
+ /******/ var module = __webpack_module_cache__[moduleId] = {
559
+ /******/ id: moduleId,
560
+ /******/ // no module.loaded needed
561
+ /******/ exports: {}
562
+ /******/ };
563
+ /******/
564
+ /******/ // Execute the module function
565
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
566
+ /******/
567
+ /******/ // Return the exports of the module
568
+ /******/ return module.exports;
569
+ /******/ }
570
+ /******/
571
+ /************************************************************************/
572
+ /******/ /* webpack/runtime/compat get default export */
573
+ /******/ (() => {
574
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
575
+ /******/ __webpack_require__.n = (module) => {
576
+ /******/ var getter = module && module.__esModule ?
577
+ /******/ () => (module['default']) :
578
+ /******/ () => (module);
579
+ /******/ __webpack_require__.d(getter, { a: getter });
580
+ /******/ return getter;
581
+ /******/ };
582
+ /******/ })();
583
+ /******/
584
+ /******/ /* webpack/runtime/define property getters */
585
+ /******/ (() => {
586
+ /******/ // define getter functions for harmony exports
587
+ /******/ __webpack_require__.d = (exports, definition) => {
588
+ /******/ for(var key in definition) {
589
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
590
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
591
+ /******/ }
592
+ /******/ }
593
+ /******/ };
594
+ /******/ })();
595
+ /******/
596
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
597
+ /******/ (() => {
598
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
599
+ /******/ })();
600
+ /******/
601
+ /******/ /* webpack/runtime/nonce */
602
+ /******/ (() => {
603
+ /******/ __webpack_require__.nc = undefined;
604
+ /******/ })();
605
+ /******/
606
+ /************************************************************************/
607
+ var __webpack_exports__ = {};
608
+
609
+ // EXPORTS
610
+ __webpack_require__.d(__webpack_exports__, {
611
+ "default": () => (/* binding */ src_folderPane)
612
+ });
613
+
614
+ // EXTERNAL MODULE: external "SolidLogic"
615
+ var external_SolidLogic_ = __webpack_require__(663);
616
+ // EXTERNAL MODULE: external "UI"
617
+ var external_UI_ = __webpack_require__(426);
618
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
619
+ var injectStylesIntoStyleTag = __webpack_require__(72);
620
+ var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
621
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js
622
+ var styleDomAPI = __webpack_require__(825);
623
+ var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
624
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertBySelector.js
625
+ var insertBySelector = __webpack_require__(659);
626
+ var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
627
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
628
+ var setAttributesWithoutAttributes = __webpack_require__(56);
629
+ var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
630
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js
631
+ var insertStyleElement = __webpack_require__(540);
632
+ var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
633
+ // EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js
634
+ var styleTagTransform = __webpack_require__(113);
635
+ var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
636
+ // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./src/styles/folderPane.css
637
+ var folderPane = __webpack_require__(136);
638
+ ;// ./src/styles/folderPane.css
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+ var options = {};
651
+
652
+ options.styleTagTransform = (styleTagTransform_default());
653
+ options.setAttributes = (setAttributesWithoutAttributes_default());
654
+ options.insert = insertBySelector_default().bind(null, "head");
655
+ options.domAPI = (styleDomAPI_default());
656
+ options.insertStyleElement = (insertStyleElement_default());
657
+
658
+ var update = injectStylesIntoStyleTag_default()(folderPane/* default */.A, options);
659
+
660
+
661
+
662
+
663
+ /* harmony default export */ const styles_folderPane = (folderPane/* default */.A && folderPane/* default */.A.locals ? folderPane/* default */.A.locals : undefined);
664
+
665
+ // EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./src/styles/utilities.css
666
+ var utilities = __webpack_require__(92);
667
+ ;// ./src/styles/utilities.css
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+ var utilities_options = {};
680
+
681
+ utilities_options.styleTagTransform = (styleTagTransform_default());
682
+ utilities_options.setAttributes = (setAttributesWithoutAttributes_default());
683
+ utilities_options.insert = insertBySelector_default().bind(null, "head");
684
+ utilities_options.domAPI = (styleDomAPI_default());
685
+ utilities_options.insertStyleElement = (insertStyleElement_default());
686
+
687
+ var utilities_update = injectStylesIntoStyleTag_default()(utilities/* default */.A, utilities_options);
688
+
689
+
690
+
691
+
692
+ /* harmony default export */ const styles_utilities = (utilities/* default */.A && utilities/* default */.A.locals ? utilities/* default */.A.locals : undefined);
693
+
694
+ ;// ./src/folderPane.ts
695
+ /* Folder pane
696
+ **
697
+ ** This outline pane lists the members of a folder
698
+ */
699
+
700
+
701
+
702
+
703
+
704
+ /* harmony default export */ const src_folderPane = ({
705
+ icon: external_UI_.icons.iconBase + 'noun_973694_expanded.svg',
706
+ name: 'folder',
707
+ // Create a new folder in a Solid system,
708
+ mintNew: function (context, newPaneOptions) {
709
+ const kb = context.session.store;
710
+ const newInstance = newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase);
711
+ let u = newInstance.uri;
712
+ if (u.endsWith('/')) {
713
+ u = u.slice(0, -1); // chop off trailer
714
+ } // { throw new Error('URI of new folder must end in "/" :' + u) }
715
+ newPaneOptions.newInstance = kb.sym(u + '/');
716
+ return kb.fetcher.webOperation('PUT', newInstance.uri).then(function () {
717
+ console.log('New container created: ' + newInstance.uri);
718
+ return newPaneOptions;
719
+ });
720
+ },
721
+ label: function (subject, context) {
722
+ const kb = context.session.store;
723
+ const n = kb.each(subject, external_UI_.ns.ldp('contains')).length;
724
+ if (n > 0) {
725
+ return 'Contents (' + n + ')'; // Show how many in hover text
726
+ }
727
+ if (kb.holds(subject, external_UI_.ns.rdf('type'), external_UI_.ns.ldp('Container'))) {
728
+ // It is declared as being a container
729
+ return 'Container (0)';
730
+ }
731
+ return null; // Suppress pane otherwise
732
+ },
733
+ // Render a file folder in a LDP/solid system
734
+ render: function (subject, context) {
735
+ function noHiddenFiles(obj) {
736
+ // @@ This hiddenness should actually be server defined
737
+ const pathEnd = obj.uri.slice(obj.dir().uri.length);
738
+ return !(pathEnd.startsWith('.') || pathEnd.endsWith('.acl') || pathEnd.endsWith('~'));
739
+ }
740
+ function refresh() {
741
+ let objs = kb.each(subject, external_UI_.ns.ldp('contains')).filter(noHiddenFiles);
742
+ objs = objs.map(obj => [external_UI_.utils.label(obj).toLowerCase(), obj]);
743
+ objs.sort(); // Sort by label case-insensitive
744
+ objs = objs.map(pair => pair[1]);
745
+ external_UI_.utils.syncTableToArray(mainTable, objs, function (obj) {
746
+ const st = kb.statementsMatching(subject, external_UI_.ns.ldp('contains'), obj)[0];
747
+ const defaultpropview = outliner.VIEWAS_boring_default;
748
+ const tr = outliner.propertyTR(dom, st, false);
749
+ const predicateCell = tr.firstChild;
750
+ predicateCell.textContent = ''; // Was initialized to 'Contains'
751
+ predicateCell.classList.add('folderPanePredicateCell');
752
+ tr.appendChild(outliner.outlineObjectTD(obj, defaultpropview, undefined, st));
753
+ // UI.widgets.makeDraggable(tr, obj)
754
+ return tr;
755
+ });
756
+ }
757
+ const dom = context.dom;
758
+ const outliner = context.getOutliner(dom);
759
+ const kb = context.session.store;
760
+ let mainTable; // This is a live synced table
761
+ const div = dom.createElement('div');
762
+ div.classList.add('instancePane', 'folderPaneInstancePane');
763
+ const thisDir = subject.uri.endsWith('/') ? subject.uri : subject.uri + '/';
764
+ const indexThing = kb.sym(thisDir + 'index.ttl#this');
765
+ if (kb.holds(subject, external_UI_.ns.ldp('contains'), indexThing.doc())) {
766
+ console.log('View of folder will be view of indexThing. Loading ' + indexThing);
767
+ const packageDiv = div.appendChild(dom.createElement('div'));
768
+ packageDiv.classList.add('folderPanePackageDiv');
769
+ kb.fetcher.load(indexThing.doc()).then(function () {
770
+ mainTable = packageDiv.appendChild(dom.createElement('table'));
771
+ mainTable.classList.add('folderPaneMainTable');
772
+ context.getOutliner(dom).GotoSubject(indexThing, true, undefined, false, undefined, mainTable);
773
+ });
774
+ return div;
775
+ } else {
776
+ mainTable = div.appendChild(dom.createElement('table'));
777
+ mainTable.classList.add('folderPaneMainTable');
778
+ mainTable.refresh = refresh;
779
+ refresh();
780
+ // addDownstreamChangeListener is a high level function which when someone else changes the resource,
781
+ // reloads it into the kb, then must call addDownstreamChangeListener to be able to update the folder pane.
782
+ kb.updater.addDownstreamChangeListener(subject, refresh); // Update store and call me if folder changes
783
+ }
784
+
785
+ // Allow user to create new things within the folder
786
+ const creationDiv = div.appendChild(dom.createElement('div'));
787
+ creationDiv.classList.add('folderPaneCreationDiv');
788
+ const me = external_SolidLogic_.authn.currentUser(); // @@ respond to login events
789
+ if (!me) {
790
+ return div; // Cannot create new things without being logged in
791
+ }
792
+ const creationContext = {
793
+ folder: subject,
794
+ div: creationDiv,
795
+ dom: dom,
796
+ statusArea: creationDiv,
797
+ me: me
798
+ };
799
+ creationContext.refreshTarget = mainTable;
800
+ external_UI_.login.filterAvailablePanes(context.session.paneRegistry.list).then(function (relevantPanes) {
801
+ external_UI_.create.newThingUI(creationContext, context, relevantPanes); // Have to pass panes down newUI
802
+
803
+ external_UI_.aclControl.preventBrowserDropEvents(dom);
804
+ const explicitDropIcon = false;
805
+ let target;
806
+ if (explicitDropIcon) {
807
+ target = creationDiv.insertBefore(dom.createElement('img'), creationDiv.firstChild);
808
+ target.classList.add('folderPaneExplicitDropIcon');
809
+ target.setAttribute('src', external_UI_.icons.iconBase + 'noun_748003.svg');
810
+ } else {
811
+ target = creationDiv.firstChild; // Overload drop target semantics onto the plus sign
812
+ }
813
+ if (target instanceof HTMLElement) {
814
+ target.classList.add('folderPaneDropTarget');
815
+ }
816
+
817
+ // /////////// Allow new file to be Uploaded
818
+ external_UI_.widgets.makeDropTarget(target, null, droppedFileHandler);
819
+ });
820
+ return div;
821
+ function droppedFileHandler(files) {
822
+ external_UI_.widgets.uploadFiles(kb.fetcher, files, subject.uri, subject.uri, function (file, uri) {
823
+ // A file has been uploaded
824
+ const destination = kb.sym(uri);
825
+ console.log(' Upload: put OK: ' + destination);
826
+ kb.add(subject, external_UI_.ns.ldp('contains'), destination, subject.doc());
827
+ mainTable.refresh();
828
+ });
829
+ }
830
+ }
831
+ });
832
+ // ends
833
+ __webpack_exports__ = __webpack_exports__["default"];
834
+ /******/ return __webpack_exports__;
835
+ /******/ })()
836
+ ;
837
+ });
838
+ //# sourceMappingURL=folder-pane.js.map