@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.js
CHANGED
|
@@ -431,7 +431,9 @@ var WidgetApi = {
|
|
|
431
431
|
append = _ref$append === void 0 ? true : _ref$append,
|
|
432
432
|
_ref$returnEmpty = _ref.returnEmpty,
|
|
433
433
|
returnEmpty = _ref$returnEmpty === void 0 ? {} : _ref$returnEmpty,
|
|
434
|
-
uuid = _ref.uuid
|
|
434
|
+
uuid = _ref.uuid,
|
|
435
|
+
_ref$widgetId = _ref.widgetId,
|
|
436
|
+
widgetId = _ref$widgetId === void 0 ? null : _ref$widgetId;
|
|
435
437
|
try {
|
|
436
438
|
// set the filename
|
|
437
439
|
var toFilename = filename !== null ? filename : "".concat(uuid, ".json");
|
|
@@ -454,7 +456,7 @@ var WidgetApi = {
|
|
|
454
456
|
});
|
|
455
457
|
}
|
|
456
458
|
// request.
|
|
457
|
-
eApi.data.saveData(data, toFilename, append, returnEmpty);
|
|
459
|
+
eApi.data.saveData(data, toFilename, append, returnEmpty, widgetId);
|
|
458
460
|
}
|
|
459
461
|
}
|
|
460
462
|
} catch (e) {
|
|
@@ -482,7 +484,9 @@ var WidgetApi = {
|
|
|
482
484
|
callbackComplete = _ref2$callbackComplet === void 0 ? null : _ref2$callbackComplet,
|
|
483
485
|
_ref2$callbackError = _ref2.callbackError,
|
|
484
486
|
callbackError = _ref2$callbackError === void 0 ? null : _ref2$callbackError,
|
|
485
|
-
uuid = _ref2.uuid
|
|
487
|
+
uuid = _ref2.uuid,
|
|
488
|
+
_ref2$widgetId = _ref2.widgetId,
|
|
489
|
+
widgetId = _ref2$widgetId === void 0 ? null : _ref2$widgetId;
|
|
486
490
|
try {
|
|
487
491
|
var toFilename = filename !== null ? filename : "".concat(uuid, ".json");
|
|
488
492
|
var eApi = this.electronApi();
|
|
@@ -509,7 +513,7 @@ var WidgetApi = {
|
|
|
509
513
|
return callbackError(response);
|
|
510
514
|
});
|
|
511
515
|
}
|
|
512
|
-
eApi.data.readData(toFilename);
|
|
516
|
+
eApi.data.readData(toFilename, [], widgetId);
|
|
513
517
|
}
|
|
514
518
|
} catch (e) {
|
|
515
519
|
}
|
|
@@ -49455,6 +49459,7 @@ var ConfirmDisableInline = function ConfirmDisableInline(_ref7) {
|
|
|
49455
49459
|
});
|
|
49456
49460
|
};
|
|
49457
49461
|
var WidgetGrantRow = function WidgetGrantRow(_ref8) {
|
|
49462
|
+
var _granted$domains;
|
|
49458
49463
|
var widgetId = _ref8.widgetId,
|
|
49459
49464
|
declared = _ref8.declared,
|
|
49460
49465
|
granted = _ref8.granted,
|
|
@@ -49531,6 +49536,20 @@ var WidgetGrantRow = function WidgetGrantRow(_ref8) {
|
|
|
49531
49536
|
grantedItems: (grant === null || grant === void 0 ? void 0 : grant.writePaths) || []
|
|
49532
49537
|
})]
|
|
49533
49538
|
}, serverName);
|
|
49539
|
+
}), (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__*/jsxRuntime.jsxs("div", {
|
|
49540
|
+
className: "flex flex-col space-y-2 border-t border-gray-800 pt-2",
|
|
49541
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
49542
|
+
className: "text-xs uppercase tracking-wider opacity-70",
|
|
49543
|
+
children: "filesystem"
|
|
49544
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PermsList, {
|
|
49545
|
+
label: "Read filenames",
|
|
49546
|
+
declaredItems: [],
|
|
49547
|
+
grantedItems: granted.domains.fs.readPaths || []
|
|
49548
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PermsList, {
|
|
49549
|
+
label: "Write filenames",
|
|
49550
|
+
declaredItems: [],
|
|
49551
|
+
grantedItems: granted.domains.fs.writePaths || []
|
|
49552
|
+
})]
|
|
49534
49553
|
})]
|
|
49535
49554
|
});
|
|
49536
49555
|
};
|
|
@@ -49711,6 +49730,22 @@ var EXAMPLE_FIXTURES = [{
|
|
|
49711
49730
|
}
|
|
49712
49731
|
}
|
|
49713
49732
|
}
|
|
49733
|
+
}, {
|
|
49734
|
+
caption: "Phase 2 fs grant — widget granted access to a specific data file via JIT consent on saveData/readData.",
|
|
49735
|
+
widgetId: "@example/fs-domain-widget",
|
|
49736
|
+
hasManifest: false,
|
|
49737
|
+
grantOrigin: "live",
|
|
49738
|
+
declared: null,
|
|
49739
|
+
granted: {
|
|
49740
|
+
grantOrigin: "live",
|
|
49741
|
+
servers: {},
|
|
49742
|
+
domains: {
|
|
49743
|
+
fs: {
|
|
49744
|
+
readPaths: ["notes-state.json"],
|
|
49745
|
+
writePaths: ["notes-state.json"]
|
|
49746
|
+
}
|
|
49747
|
+
}
|
|
49748
|
+
}
|
|
49714
49749
|
}, {
|
|
49715
49750
|
caption: "Stale grant — the widget upgraded and dropped readPaths from its manifest, but the user's grant is still present.",
|
|
49716
49751
|
widgetId: "@example/upgraded-widget",
|