@trops/dash-core 0.1.501 → 0.1.503
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/electron/index.js +1649 -1266
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +39 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -413,7 +413,9 @@ var WidgetApi = {
|
|
|
413
413
|
append = _ref$append === void 0 ? true : _ref$append,
|
|
414
414
|
_ref$returnEmpty = _ref.returnEmpty,
|
|
415
415
|
returnEmpty = _ref$returnEmpty === void 0 ? {} : _ref$returnEmpty,
|
|
416
|
-
uuid = _ref.uuid
|
|
416
|
+
uuid = _ref.uuid,
|
|
417
|
+
_ref$widgetId = _ref.widgetId,
|
|
418
|
+
widgetId = _ref$widgetId === void 0 ? null : _ref$widgetId;
|
|
417
419
|
try {
|
|
418
420
|
// set the filename
|
|
419
421
|
var toFilename = filename !== null ? filename : "".concat(uuid, ".json");
|
|
@@ -436,7 +438,7 @@ var WidgetApi = {
|
|
|
436
438
|
});
|
|
437
439
|
}
|
|
438
440
|
// request.
|
|
439
|
-
eApi.data.saveData(data, toFilename, append, returnEmpty);
|
|
441
|
+
eApi.data.saveData(data, toFilename, append, returnEmpty, widgetId);
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
444
|
} catch (e) {
|
|
@@ -464,7 +466,9 @@ var WidgetApi = {
|
|
|
464
466
|
callbackComplete = _ref2$callbackComplet === void 0 ? null : _ref2$callbackComplet,
|
|
465
467
|
_ref2$callbackError = _ref2.callbackError,
|
|
466
468
|
callbackError = _ref2$callbackError === void 0 ? null : _ref2$callbackError,
|
|
467
|
-
uuid = _ref2.uuid
|
|
469
|
+
uuid = _ref2.uuid,
|
|
470
|
+
_ref2$widgetId = _ref2.widgetId,
|
|
471
|
+
widgetId = _ref2$widgetId === void 0 ? null : _ref2$widgetId;
|
|
468
472
|
try {
|
|
469
473
|
var toFilename = filename !== null ? filename : "".concat(uuid, ".json");
|
|
470
474
|
var eApi = this.electronApi();
|
|
@@ -491,7 +495,7 @@ var WidgetApi = {
|
|
|
491
495
|
return callbackError(response);
|
|
492
496
|
});
|
|
493
497
|
}
|
|
494
|
-
eApi.data.readData(toFilename);
|
|
498
|
+
eApi.data.readData(toFilename, [], widgetId);
|
|
495
499
|
}
|
|
496
500
|
} catch (e) {
|
|
497
501
|
}
|
|
@@ -49437,6 +49441,7 @@ var ConfirmDisableInline = function ConfirmDisableInline(_ref7) {
|
|
|
49437
49441
|
});
|
|
49438
49442
|
};
|
|
49439
49443
|
var WidgetGrantRow = function WidgetGrantRow(_ref8) {
|
|
49444
|
+
var _granted$domains;
|
|
49440
49445
|
var widgetId = _ref8.widgetId,
|
|
49441
49446
|
declared = _ref8.declared,
|
|
49442
49447
|
granted = _ref8.granted,
|
|
@@ -49513,6 +49518,20 @@ var WidgetGrantRow = function WidgetGrantRow(_ref8) {
|
|
|
49513
49518
|
grantedItems: (grant === null || grant === void 0 ? void 0 : grant.writePaths) || []
|
|
49514
49519
|
})]
|
|
49515
49520
|
}, serverName);
|
|
49521
|
+
}), (granted === null || granted === void 0 || (_granted$domains = granted.domains) === null || _granted$domains === void 0 ? void 0 : _granted$domains.fs) && ((granted.domains.fs.readPaths || []).length > 0 || (granted.domains.fs.writePaths || []).length > 0) && /*#__PURE__*/jsxs("div", {
|
|
49522
|
+
className: "flex flex-col space-y-2 border-t border-gray-800 pt-2",
|
|
49523
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
49524
|
+
className: "text-xs uppercase tracking-wider opacity-70",
|
|
49525
|
+
children: "filesystem"
|
|
49526
|
+
}), /*#__PURE__*/jsx(PermsList, {
|
|
49527
|
+
label: "Read filenames",
|
|
49528
|
+
declaredItems: [],
|
|
49529
|
+
grantedItems: granted.domains.fs.readPaths || []
|
|
49530
|
+
}), /*#__PURE__*/jsx(PermsList, {
|
|
49531
|
+
label: "Write filenames",
|
|
49532
|
+
declaredItems: [],
|
|
49533
|
+
grantedItems: granted.domains.fs.writePaths || []
|
|
49534
|
+
})]
|
|
49516
49535
|
})]
|
|
49517
49536
|
});
|
|
49518
49537
|
};
|
|
@@ -49693,6 +49712,22 @@ var EXAMPLE_FIXTURES = [{
|
|
|
49693
49712
|
}
|
|
49694
49713
|
}
|
|
49695
49714
|
}
|
|
49715
|
+
}, {
|
|
49716
|
+
caption: "Phase 2 fs grant — widget granted access to a specific data file via JIT consent on saveData/readData.",
|
|
49717
|
+
widgetId: "@example/fs-domain-widget",
|
|
49718
|
+
hasManifest: false,
|
|
49719
|
+
grantOrigin: "live",
|
|
49720
|
+
declared: null,
|
|
49721
|
+
granted: {
|
|
49722
|
+
grantOrigin: "live",
|
|
49723
|
+
servers: {},
|
|
49724
|
+
domains: {
|
|
49725
|
+
fs: {
|
|
49726
|
+
readPaths: ["notes-state.json"],
|
|
49727
|
+
writePaths: ["notes-state.json"]
|
|
49728
|
+
}
|
|
49729
|
+
}
|
|
49730
|
+
}
|
|
49696
49731
|
}, {
|
|
49697
49732
|
caption: "Stale grant — the widget upgraded and dropped readPaths from its manifest, but the user's grant is still present.",
|
|
49698
49733
|
widgetId: "@example/upgraded-widget",
|