mogh_ui 0.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.
- package/dist/color.cjs +62 -0
- package/dist/color.cjs.map +1 -0
- package/dist/color.d.cts +5 -0
- package/dist/color.d.ts +5 -0
- package/dist/color.js +37 -0
- package/dist/color.js.map +1 -0
- package/dist/components/back-button.cjs +43 -0
- package/dist/components/back-button.cjs.map +1 -0
- package/dist/components/back-button.d.cts +9 -0
- package/dist/components/back-button.d.ts +9 -0
- package/dist/components/back-button.js +19 -0
- package/dist/components/back-button.js.map +1 -0
- package/dist/components/config/confirm.cjs +191 -0
- package/dist/components/config/confirm.cjs.map +1 -0
- package/dist/components/config/confirm.d.cts +20 -0
- package/dist/components/config/confirm.d.ts +20 -0
- package/dist/components/config/confirm.js +167 -0
- package/dist/components/config/confirm.js.map +1 -0
- package/dist/components/config/group.cjs +102 -0
- package/dist/components/config/group.cjs.map +1 -0
- package/dist/components/config/group.d.cts +11 -0
- package/dist/components/config/group.d.ts +11 -0
- package/dist/components/config/group.js +78 -0
- package/dist/components/config/group.js.map +1 -0
- package/dist/components/config/index.cjs +237 -0
- package/dist/components/config/index.cjs.map +1 -0
- package/dist/components/config/index.d.cts +62 -0
- package/dist/components/config/index.d.ts +62 -0
- package/dist/components/config/index.js +217 -0
- package/dist/components/config/index.js.map +1 -0
- package/dist/components/config/item.cjs +139 -0
- package/dist/components/config/item.cjs.map +1 -0
- package/dist/components/config/item.d.cts +45 -0
- package/dist/components/config/item.d.ts +45 -0
- package/dist/components/config/item.js +119 -0
- package/dist/components/config/item.js.map +1 -0
- package/dist/components/config/layout.cjs +44 -0
- package/dist/components/config/layout.cjs.map +1 -0
- package/dist/components/config/layout.d.cts +11 -0
- package/dist/components/config/layout.d.ts +11 -0
- package/dist/components/config/layout.js +20 -0
- package/dist/components/config/layout.js.map +1 -0
- package/dist/components/config/unsaved-changes.cjs +47 -0
- package/dist/components/config/unsaved-changes.cjs.map +1 -0
- package/dist/components/config/unsaved-changes.d.cts +7 -0
- package/dist/components/config/unsaved-changes.d.ts +7 -0
- package/dist/components/config/unsaved-changes.js +23 -0
- package/dist/components/config/unsaved-changes.js.map +1 -0
- package/dist/components/confirm-button.cjs +85 -0
- package/dist/components/confirm-button.cjs.map +1 -0
- package/dist/components/confirm-button.d.cts +23 -0
- package/dist/components/confirm-button.d.ts +23 -0
- package/dist/components/confirm-button.js +69 -0
- package/dist/components/confirm-button.js.map +1 -0
- package/dist/components/confirm-icon.cjs +70 -0
- package/dist/components/confirm-icon.cjs.map +1 -0
- package/dist/components/confirm-icon.d.cts +20 -0
- package/dist/components/confirm-icon.d.ts +20 -0
- package/dist/components/confirm-icon.js +54 -0
- package/dist/components/confirm-icon.js.map +1 -0
- package/dist/components/confirm-modal.cjs +146 -0
- package/dist/components/confirm-modal.cjs.map +1 -0
- package/dist/components/confirm-modal.d.cts +25 -0
- package/dist/components/confirm-modal.d.ts +25 -0
- package/dist/components/confirm-modal.js +130 -0
- package/dist/components/confirm-modal.js.map +1 -0
- package/dist/components/copy-button.cjs +68 -0
- package/dist/components/copy-button.cjs.map +1 -0
- package/dist/components/copy-button.d.cts +15 -0
- package/dist/components/copy-button.d.ts +15 -0
- package/dist/components/copy-button.js +46 -0
- package/dist/components/copy-button.js.map +1 -0
- package/dist/components/copy-text.cjs +63 -0
- package/dist/components/copy-text.cjs.map +1 -0
- package/dist/components/copy-text.d.cts +11 -0
- package/dist/components/copy-text.d.ts +11 -0
- package/dist/components/copy-text.js +39 -0
- package/dist/components/copy-text.js.map +1 -0
- package/dist/components/create-modal.cjs +100 -0
- package/dist/components/create-modal.cjs.map +1 -0
- package/dist/components/create-modal.d.cts +18 -0
- package/dist/components/create-modal.d.ts +18 -0
- package/dist/components/create-modal.js +82 -0
- package/dist/components/create-modal.js.map +1 -0
- package/dist/components/data-table.cjs +240 -0
- package/dist/components/data-table.cjs.map +1 -0
- package/dist/components/data-table.d.cts +36 -0
- package/dist/components/data-table.d.ts +36 -0
- package/dist/components/data-table.js +233 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/divided-children/index.cjs +53 -0
- package/dist/components/divided-children/index.cjs.map +1 -0
- package/dist/components/divided-children/index.d.cts +15 -0
- package/dist/components/divided-children/index.d.ts +15 -0
- package/dist/components/divided-children/index.js +19 -0
- package/dist/components/divided-children/index.js.map +1 -0
- package/dist/components/divided-children/index.module.scss +4 -0
- package/dist/components/enable-switch.cjs +67 -0
- package/dist/components/enable-switch.cjs.map +1 -0
- package/dist/components/enable-switch.d.cts +12 -0
- package/dist/components/enable-switch.d.ts +12 -0
- package/dist/components/enable-switch.js +43 -0
- package/dist/components/enable-switch.js.map +1 -0
- package/dist/components/entity-header.cjs +137 -0
- package/dist/components/entity-header.cjs.map +1 -0
- package/dist/components/entity-header.d.cts +20 -0
- package/dist/components/entity-header.d.ts +20 -0
- package/dist/components/entity-header.js +113 -0
- package/dist/components/entity-header.js.map +1 -0
- package/dist/components/entity-page.cjs +45 -0
- package/dist/components/entity-page.cjs.map +1 -0
- package/dist/components/entity-page.d.cts +11 -0
- package/dist/components/entity-page.d.ts +11 -0
- package/dist/components/entity-page.js +21 -0
- package/dist/components/entity-page.js.map +1 -0
- package/dist/components/fancy-card/index.cjs +52 -0
- package/dist/components/fancy-card/index.cjs.map +1 -0
- package/dist/components/fancy-card/index.d.cts +17 -0
- package/dist/components/fancy-card/index.d.ts +17 -0
- package/dist/components/fancy-card/index.js +18 -0
- package/dist/components/fancy-card/index.js.map +1 -0
- package/dist/components/fancy-card/index.module.scss +13 -0
- package/dist/components/hover-error.cjs +60 -0
- package/dist/components/hover-error.cjs.map +1 -0
- package/dist/components/hover-error.d.cts +9 -0
- package/dist/components/hover-error.d.ts +9 -0
- package/dist/components/hover-error.js +36 -0
- package/dist/components/hover-error.js.map +1 -0
- package/dist/components/info-card.cjs +44 -0
- package/dist/components/info-card.cjs.map +1 -0
- package/dist/components/info-card.d.cts +21 -0
- package/dist/components/info-card.d.ts +21 -0
- package/dist/components/info-card.js +25 -0
- package/dist/components/info-card.js.map +1 -0
- package/dist/components/input-list.cjs +68 -0
- package/dist/components/input-list.cjs.map +1 -0
- package/dist/components/input-list.d.cts +14 -0
- package/dist/components/input-list.d.ts +14 -0
- package/dist/components/input-list.js +44 -0
- package/dist/components/input-list.js.map +1 -0
- package/dist/components/labelled-switch.cjs +68 -0
- package/dist/components/labelled-switch.cjs.map +1 -0
- package/dist/components/labelled-switch.d.cts +14 -0
- package/dist/components/labelled-switch.d.ts +14 -0
- package/dist/components/labelled-switch.js +48 -0
- package/dist/components/labelled-switch.js.map +1 -0
- package/dist/components/labels-group.cjs +44 -0
- package/dist/components/labels-group.cjs.map +1 -0
- package/dist/components/labels-group.d.cts +10 -0
- package/dist/components/labels-group.d.ts +10 -0
- package/dist/components/labels-group.js +20 -0
- package/dist/components/labels-group.js.map +1 -0
- package/dist/components/loading-screen.cjs +37 -0
- package/dist/components/loading-screen.cjs.map +1 -0
- package/dist/components/loading-screen.d.cts +8 -0
- package/dist/components/loading-screen.d.ts +8 -0
- package/dist/components/loading-screen.js +13 -0
- package/dist/components/loading-screen.js.map +1 -0
- package/dist/components/mobile-friendly-tabs.cjs +141 -0
- package/dist/components/mobile-friendly-tabs.cjs.map +1 -0
- package/dist/components/mobile-friendly-tabs.d.cts +43 -0
- package/dist/components/mobile-friendly-tabs.d.ts +43 -0
- package/dist/components/mobile-friendly-tabs.js +120 -0
- package/dist/components/mobile-friendly-tabs.js.map +1 -0
- package/dist/components/monaco/index.cjs +244 -0
- package/dist/components/monaco/index.cjs.map +1 -0
- package/dist/components/monaco/index.d.cts +32 -0
- package/dist/components/monaco/index.d.ts +32 -0
- package/dist/components/monaco/index.js +208 -0
- package/dist/components/monaco/index.js.map +1 -0
- package/dist/components/monaco/index.scss +3 -0
- package/dist/components/monaco/init.cjs +73 -0
- package/dist/components/monaco/init.cjs.map +1 -0
- package/dist/components/monaco/init.d.cts +2 -0
- package/dist/components/monaco/init.d.ts +2 -0
- package/dist/components/monaco/init.js +49 -0
- package/dist/components/monaco/init.js.map +1 -0
- package/dist/components/monaco/syntax/fancy_toml.cjs +241 -0
- package/dist/components/monaco/syntax/fancy_toml.cjs.map +1 -0
- package/dist/components/monaco/syntax/fancy_toml.d.cts +2 -0
- package/dist/components/monaco/syntax/fancy_toml.d.ts +2 -0
- package/dist/components/monaco/syntax/fancy_toml.js +218 -0
- package/dist/components/monaco/syntax/fancy_toml.js.map +1 -0
- package/dist/components/monaco/syntax/key_value.cjs +107 -0
- package/dist/components/monaco/syntax/key_value.cjs.map +1 -0
- package/dist/components/monaco/syntax/key_value.d.cts +2 -0
- package/dist/components/monaco/syntax/key_value.d.ts +2 -0
- package/dist/components/monaco/syntax/key_value.js +84 -0
- package/dist/components/monaco/syntax/key_value.js.map +1 -0
- package/dist/components/monaco/syntax/shell.cjs +246 -0
- package/dist/components/monaco/syntax/shell.cjs.map +1 -0
- package/dist/components/monaco/syntax/shell.d.cts +2 -0
- package/dist/components/monaco/syntax/shell.d.ts +2 -0
- package/dist/components/monaco/syntax/shell.js +223 -0
- package/dist/components/monaco/syntax/shell.js.map +1 -0
- package/dist/components/monaco/syntax/string_list.cjs +75 -0
- package/dist/components/monaco/syntax/string_list.cjs.map +1 -0
- package/dist/components/monaco/syntax/string_list.d.cts +2 -0
- package/dist/components/monaco/syntax/string_list.d.ts +2 -0
- package/dist/components/monaco/syntax/string_list.js +52 -0
- package/dist/components/monaco/syntax/string_list.js.map +1 -0
- package/dist/components/monaco/syntax/toml.cjs +157 -0
- package/dist/components/monaco/syntax/toml.cjs.map +1 -0
- package/dist/components/monaco/syntax/toml.d.cts +2 -0
- package/dist/components/monaco/syntax/toml.d.ts +2 -0
- package/dist/components/monaco/syntax/toml.js +134 -0
- package/dist/components/monaco/syntax/toml.js.map +1 -0
- package/dist/components/monaco/syntax/yaml.cjs +250 -0
- package/dist/components/monaco/syntax/yaml.cjs.map +1 -0
- package/dist/components/monaco/syntax/yaml.d.cts +2 -0
- package/dist/components/monaco/syntax/yaml.d.ts +2 -0
- package/dist/components/monaco/syntax/yaml.js +227 -0
- package/dist/components/monaco/syntax/yaml.js.map +1 -0
- package/dist/components/monaco/theme.cjs +721 -0
- package/dist/components/monaco/theme.cjs.map +1 -0
- package/dist/components/monaco/theme.d.cts +2 -0
- package/dist/components/monaco/theme.d.ts +2 -0
- package/dist/components/monaco/theme.js +698 -0
- package/dist/components/monaco/theme.js.map +1 -0
- package/dist/components/page-guard.cjs +44 -0
- package/dist/components/page-guard.cjs.map +1 -0
- package/dist/components/page-guard.d.cts +13 -0
- package/dist/components/page-guard.d.ts +13 -0
- package/dist/components/page-guard.js +20 -0
- package/dist/components/page-guard.js.map +1 -0
- package/dist/components/page.cjs +81 -0
- package/dist/components/page.cjs.map +1 -0
- package/dist/components/page.d.cts +31 -0
- package/dist/components/page.d.ts +31 -0
- package/dist/components/page.js +63 -0
- package/dist/components/page.js.map +1 -0
- package/dist/components/search-input.cjs +51 -0
- package/dist/components/search-input.cjs.map +1 -0
- package/dist/components/search-input.d.cts +9 -0
- package/dist/components/search-input.d.ts +9 -0
- package/dist/components/search-input.js +27 -0
- package/dist/components/search-input.js.map +1 -0
- package/dist/components/section.cjs +100 -0
- package/dist/components/section.cjs.map +1 -0
- package/dist/components/section.d.cts +33 -0
- package/dist/components/section.d.ts +33 -0
- package/dist/components/section.js +83 -0
- package/dist/components/section.js.map +1 -0
- package/dist/components/shared-text-update.cjs +83 -0
- package/dist/components/shared-text-update.cjs.map +1 -0
- package/dist/components/shared-text-update.d.cts +20 -0
- package/dist/components/shared-text-update.d.ts +20 -0
- package/dist/components/shared-text-update.js +65 -0
- package/dist/components/shared-text-update.js.map +1 -0
- package/dist/components/show-hide-button.cjs +48 -0
- package/dist/components/show-hide-button.cjs.map +1 -0
- package/dist/components/show-hide-button.d.cts +8 -0
- package/dist/components/show-hide-button.d.ts +8 -0
- package/dist/components/show-hide-button.js +24 -0
- package/dist/components/show-hide-button.js.map +1 -0
- package/dist/components/stat-bar.cjs +68 -0
- package/dist/components/stat-bar.cjs.map +1 -0
- package/dist/components/stat-bar.d.cts +15 -0
- package/dist/components/stat-bar.d.ts +15 -0
- package/dist/components/stat-bar.js +44 -0
- package/dist/components/stat-bar.js.map +1 -0
- package/dist/components/stat-cell.cjs +72 -0
- package/dist/components/stat-cell.cjs.map +1 -0
- package/dist/components/stat-cell.d.cts +17 -0
- package/dist/components/stat-cell.d.ts +17 -0
- package/dist/components/stat-cell.js +54 -0
- package/dist/components/stat-cell.js.map +1 -0
- package/dist/components/status-badge.cjs +63 -0
- package/dist/components/status-badge.cjs.map +1 -0
- package/dist/components/status-badge.d.cts +20 -0
- package/dist/components/status-badge.d.ts +20 -0
- package/dist/components/status-badge.js +39 -0
- package/dist/components/status-badge.js.map +1 -0
- package/dist/components/tabbed-page.cjs +64 -0
- package/dist/components/tabbed-page.cjs.map +1 -0
- package/dist/components/tabbed-page.d.cts +18 -0
- package/dist/components/tabbed-page.d.ts +18 -0
- package/dist/components/tabbed-page.js +40 -0
- package/dist/components/tabbed-page.js.map +1 -0
- package/dist/components/table-skeleton.cjs +36 -0
- package/dist/components/table-skeleton.cjs.map +1 -0
- package/dist/components/table-skeleton.d.cts +8 -0
- package/dist/components/table-skeleton.d.ts +8 -0
- package/dist/components/table-skeleton.js +12 -0
- package/dist/components/table-skeleton.js.map +1 -0
- package/dist/components/text-update-modal.cjs +102 -0
- package/dist/components/text-update-modal.cjs.map +1 -0
- package/dist/components/text-update-modal.d.cts +19 -0
- package/dist/components/text-update-modal.d.ts +19 -0
- package/dist/components/text-update-modal.js +85 -0
- package/dist/components/text-update-modal.js.map +1 -0
- package/dist/components/theme-toggle.cjs +73 -0
- package/dist/components/theme-toggle.cjs.map +1 -0
- package/dist/components/theme-toggle.d.cts +5 -0
- package/dist/components/theme-toggle.d.ts +5 -0
- package/dist/components/theme-toggle.js +54 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/formatting.cjs +124 -0
- package/dist/formatting.cjs.map +1 -0
- package/dist/formatting.d.cts +14 -0
- package/dist/formatting.d.ts +14 -0
- package/dist/formatting.js +89 -0
- package/dist/formatting.js.map +1 -0
- package/dist/hooks.cjs +117 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.cts +30 -0
- package/dist/hooks.d.ts +30 -0
- package/dist/hooks.js +88 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.cjs +99 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +47 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/index.scss +81 -0
- package/dist/theme.cjs +332 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +15 -0
- package/dist/theme.d.ts +15 -0
- package/dist/theme.js +330 -0
- package/dist/theme.js.map +1 -0
- package/dist/theme.scss +76 -0
- package/dist/utils.cjs +48 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +15 -0
- package/dist/utils.d.ts +15 -0
- package/dist/utils.js +24 -0
- package/dist/utils.js.map +1 -0
- package/package.json +61 -0
package/dist/color.cjs
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var color_exports = {};
|
|
20
|
+
__export(color_exports, {
|
|
21
|
+
colorByIntention: () => colorByIntention,
|
|
22
|
+
hexColorByIntention: () => hexColorByIntention
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(color_exports);
|
|
25
|
+
function colorByIntention(intention) {
|
|
26
|
+
switch (intention) {
|
|
27
|
+
case "Good":
|
|
28
|
+
return "green";
|
|
29
|
+
case "Neutral":
|
|
30
|
+
return "blue";
|
|
31
|
+
case "Warning":
|
|
32
|
+
return "yellow";
|
|
33
|
+
case "Critical":
|
|
34
|
+
return "red";
|
|
35
|
+
case "Unknown":
|
|
36
|
+
return "purple";
|
|
37
|
+
case "None":
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function hexColorByIntention(intention) {
|
|
42
|
+
switch (intention) {
|
|
43
|
+
case "Good":
|
|
44
|
+
return "#22C55E";
|
|
45
|
+
case "Neutral":
|
|
46
|
+
return "#3B82F6";
|
|
47
|
+
case "Warning":
|
|
48
|
+
return "#EAB308";
|
|
49
|
+
case "Critical":
|
|
50
|
+
return "#EF0044";
|
|
51
|
+
case "Unknown":
|
|
52
|
+
return "#A855F7";
|
|
53
|
+
case "None":
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
colorByIntention,
|
|
60
|
+
hexColorByIntention
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=color.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/color.ts"],"sourcesContent":["export type ColorIntention =\n | \"Good\"\n | \"Neutral\"\n | \"Warning\"\n | \"Critical\"\n | \"Unknown\"\n | \"None\";\n\nexport function colorByIntention(intention: ColorIntention) {\n switch (intention) {\n case \"Good\":\n return \"green\";\n case \"Neutral\":\n return \"blue\";\n case \"Warning\":\n return \"yellow\";\n case \"Critical\":\n return \"red\";\n case \"Unknown\":\n return \"purple\";\n case \"None\":\n return undefined;\n }\n}\n\nexport function hexColorByIntention(intention: ColorIntention) {\n switch (intention) {\n case \"Good\":\n return \"#22C55E\";\n case \"Neutral\":\n return \"#3B82F6\";\n case \"Warning\":\n return \"#EAB308\";\n case \"Critical\":\n return \"#EF0044\";\n case \"Unknown\":\n return \"#A855F7\";\n case \"None\":\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,iBAAiB,WAA2B;AAC1D,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,EACX;AACF;AAEO,SAAS,oBAAoB,WAA2B;AAC7D,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,EACX;AACF;","names":[]}
|
package/dist/color.d.cts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type ColorIntention = "Good" | "Neutral" | "Warning" | "Critical" | "Unknown" | "None";
|
|
2
|
+
declare function colorByIntention(intention: ColorIntention): "green" | "blue" | "yellow" | "red" | "purple" | undefined;
|
|
3
|
+
declare function hexColorByIntention(intention: ColorIntention): "#22C55E" | "#3B82F6" | "#EAB308" | "#EF0044" | "#A855F7" | undefined;
|
|
4
|
+
|
|
5
|
+
export { type ColorIntention, colorByIntention, hexColorByIntention };
|
package/dist/color.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type ColorIntention = "Good" | "Neutral" | "Warning" | "Critical" | "Unknown" | "None";
|
|
2
|
+
declare function colorByIntention(intention: ColorIntention): "green" | "blue" | "yellow" | "red" | "purple" | undefined;
|
|
3
|
+
declare function hexColorByIntention(intention: ColorIntention): "#22C55E" | "#3B82F6" | "#EAB308" | "#EF0044" | "#A855F7" | undefined;
|
|
4
|
+
|
|
5
|
+
export { type ColorIntention, colorByIntention, hexColorByIntention };
|
package/dist/color.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
function colorByIntention(intention) {
|
|
2
|
+
switch (intention) {
|
|
3
|
+
case "Good":
|
|
4
|
+
return "green";
|
|
5
|
+
case "Neutral":
|
|
6
|
+
return "blue";
|
|
7
|
+
case "Warning":
|
|
8
|
+
return "yellow";
|
|
9
|
+
case "Critical":
|
|
10
|
+
return "red";
|
|
11
|
+
case "Unknown":
|
|
12
|
+
return "purple";
|
|
13
|
+
case "None":
|
|
14
|
+
return void 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function hexColorByIntention(intention) {
|
|
18
|
+
switch (intention) {
|
|
19
|
+
case "Good":
|
|
20
|
+
return "#22C55E";
|
|
21
|
+
case "Neutral":
|
|
22
|
+
return "#3B82F6";
|
|
23
|
+
case "Warning":
|
|
24
|
+
return "#EAB308";
|
|
25
|
+
case "Critical":
|
|
26
|
+
return "#EF0044";
|
|
27
|
+
case "Unknown":
|
|
28
|
+
return "#A855F7";
|
|
29
|
+
case "None":
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
colorByIntention,
|
|
35
|
+
hexColorByIntention
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/color.ts"],"sourcesContent":["export type ColorIntention =\n | \"Good\"\n | \"Neutral\"\n | \"Warning\"\n | \"Critical\"\n | \"Unknown\"\n | \"None\";\n\nexport function colorByIntention(intention: ColorIntention) {\n switch (intention) {\n case \"Good\":\n return \"green\";\n case \"Neutral\":\n return \"blue\";\n case \"Warning\":\n return \"yellow\";\n case \"Critical\":\n return \"red\";\n case \"Unknown\":\n return \"purple\";\n case \"None\":\n return undefined;\n }\n}\n\nexport function hexColorByIntention(intention: ColorIntention) {\n switch (intention) {\n case \"Good\":\n return \"#22C55E\";\n case \"Neutral\":\n return \"#3B82F6\";\n case \"Warning\":\n return \"#EAB308\";\n case \"Critical\":\n return \"#EF0044\";\n case \"Unknown\":\n return \"#A855F7\";\n case \"None\":\n return undefined;\n }\n}\n"],"mappings":"AAQO,SAAS,iBAAiB,WAA2B;AAC1D,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,EACX;AACF;AAEO,SAAS,oBAAoB,WAA2B;AAC7D,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var back_button_exports = {};
|
|
20
|
+
__export(back_button_exports, {
|
|
21
|
+
BackButton: () => BackButton
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(back_button_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_core = require("@mantine/core");
|
|
26
|
+
var import_lucide_react = require("lucide-react");
|
|
27
|
+
var import_react_router_dom = require("react-router-dom");
|
|
28
|
+
function BackButton({ to = -1, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
import_core.Button,
|
|
31
|
+
{
|
|
32
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronLeft, { size: "1rem" }),
|
|
33
|
+
renderRoot: (props2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Link, { to, ...props2 }),
|
|
34
|
+
...props,
|
|
35
|
+
children: "Back"
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
BackButton
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=back-button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/back-button.tsx"],"sourcesContent":["import { Button, ButtonProps } from \"@mantine/core\";\nimport { ChevronLeft } from \"lucide-react\";\nimport { Link } from \"react-router-dom\";\n\nexport interface BackButtonProps extends ButtonProps {\n to?: string | number;\n}\n\nexport function BackButton({ to = -1, ...props }: BackButtonProps) {\n return (\n <Button\n leftSection={<ChevronLeft size=\"1rem\" />}\n renderRoot={(props) => <Link to={to} {...props} />}\n {...props}\n >\n Back\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWmB;AAXnB,kBAAoC;AACpC,0BAA4B;AAC5B,8BAAqB;AAMd,SAAS,WAAW,EAAE,KAAK,IAAI,GAAG,MAAM,GAAoB;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa,4CAAC,mCAAY,MAAK,QAAO;AAAA,MACtC,YAAY,CAACA,WAAU,4CAAC,gCAAK,IAAS,GAAGA,QAAO;AAAA,MAC/C,GAAG;AAAA,MACL;AAAA;AAAA,EAED;AAEJ;","names":["props"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonProps } from '@mantine/core';
|
|
3
|
+
|
|
4
|
+
interface BackButtonProps extends ButtonProps {
|
|
5
|
+
to?: string | number;
|
|
6
|
+
}
|
|
7
|
+
declare function BackButton({ to, ...props }: BackButtonProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { BackButton, type BackButtonProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonProps } from '@mantine/core';
|
|
3
|
+
|
|
4
|
+
interface BackButtonProps extends ButtonProps {
|
|
5
|
+
to?: string | number;
|
|
6
|
+
}
|
|
7
|
+
declare function BackButton({ to, ...props }: BackButtonProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { BackButton, type BackButtonProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "@mantine/core";
|
|
3
|
+
import { ChevronLeft } from "lucide-react";
|
|
4
|
+
import { Link } from "react-router-dom";
|
|
5
|
+
function BackButton({ to = -1, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Button,
|
|
8
|
+
{
|
|
9
|
+
leftSection: /* @__PURE__ */ jsx(ChevronLeft, { size: "1rem" }),
|
|
10
|
+
renderRoot: (props2) => /* @__PURE__ */ jsx(Link, { to, ...props2 }),
|
|
11
|
+
...props,
|
|
12
|
+
children: "Back"
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
BackButton
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=back-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/back-button.tsx"],"sourcesContent":["import { Button, ButtonProps } from \"@mantine/core\";\nimport { ChevronLeft } from \"lucide-react\";\nimport { Link } from \"react-router-dom\";\n\nexport interface BackButtonProps extends ButtonProps {\n to?: string | number;\n}\n\nexport function BackButton({ to = -1, ...props }: BackButtonProps) {\n return (\n <Button\n leftSection={<ChevronLeft size=\"1rem\" />}\n renderRoot={(props) => <Link to={to} {...props} />}\n {...props}\n >\n Back\n </Button>\n );\n}\n"],"mappings":"AAWmB;AAXnB,SAAS,cAA2B;AACpC,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AAMd,SAAS,WAAW,EAAE,KAAK,IAAI,GAAG,MAAM,GAAoB;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa,oBAAC,eAAY,MAAK,QAAO;AAAA,MACtC,YAAY,CAACA,WAAU,oBAAC,QAAK,IAAS,GAAGA,QAAO;AAAA,MAC/C,GAAG;AAAA,MACL;AAAA;AAAA,EAED;AAEJ;","names":["props"]}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var confirm_exports = {};
|
|
20
|
+
__export(confirm_exports, {
|
|
21
|
+
ConfirmUpdate: () => ConfirmUpdate
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(confirm_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_hooks = require("@mantine/hooks");
|
|
27
|
+
var import_core = require("@mantine/core");
|
|
28
|
+
var import_lucide_react = require("lucide-react");
|
|
29
|
+
var import_show_hide_button = require("../show-hide-button");
|
|
30
|
+
var import_monaco = require("../monaco");
|
|
31
|
+
var import_utils = require("../../utils");
|
|
32
|
+
var import_formatting = require("../../formatting");
|
|
33
|
+
var import_hooks2 = require("../../hooks");
|
|
34
|
+
function ConfirmUpdate({
|
|
35
|
+
original,
|
|
36
|
+
update,
|
|
37
|
+
onConfirm,
|
|
38
|
+
loading,
|
|
39
|
+
disabled,
|
|
40
|
+
language,
|
|
41
|
+
fileContentsLanguage,
|
|
42
|
+
fullWidth,
|
|
43
|
+
openKeyListener = true,
|
|
44
|
+
confirmKeyListener = true,
|
|
45
|
+
enableFancyToml
|
|
46
|
+
}) {
|
|
47
|
+
const [opened, { open, close }] = (0, import_hooks.useDisclosure)();
|
|
48
|
+
const handleConfirm = async () => {
|
|
49
|
+
await onConfirm();
|
|
50
|
+
close();
|
|
51
|
+
};
|
|
52
|
+
(0, import_hooks2.useKeyListener)("Enter", () => {
|
|
53
|
+
if (!opened || !confirmKeyListener) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
handleConfirm();
|
|
57
|
+
});
|
|
58
|
+
(0, import_hooks2.useCtrlKeyListener)("Enter", () => {
|
|
59
|
+
if (opened || !openKeyListener) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
open();
|
|
63
|
+
});
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
import_core.Modal,
|
|
67
|
+
{
|
|
68
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Text, { size: "xl", children: "Confirm Update" }),
|
|
69
|
+
opened,
|
|
70
|
+
onClose: close,
|
|
71
|
+
size: "auto",
|
|
72
|
+
styles: { content: { overflowY: "hidden" } },
|
|
73
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
74
|
+
import_core.Stack,
|
|
75
|
+
{
|
|
76
|
+
gap: "xl",
|
|
77
|
+
w: 1400,
|
|
78
|
+
maw: {
|
|
79
|
+
base: "calc(100vw - 100px)",
|
|
80
|
+
xs: "calc(100vw - 150px)",
|
|
81
|
+
sm: "calc(100vw - 200px)",
|
|
82
|
+
md: "calc(100vw - 250px)"
|
|
83
|
+
},
|
|
84
|
+
my: "lg",
|
|
85
|
+
style: { overflowY: "hidden" },
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
import_core.Stack,
|
|
89
|
+
{
|
|
90
|
+
mah: "min(calc(100vh - 300px), 800px)",
|
|
91
|
+
style: { overflowY: "auto" },
|
|
92
|
+
children: Object.entries(update).filter(([key, val]) => !(0, import_utils.deepCompare)(original[key], val)).map(([key, val], i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
ConfirmUpdateItem,
|
|
94
|
+
{
|
|
95
|
+
_key: key,
|
|
96
|
+
val,
|
|
97
|
+
previous: original,
|
|
98
|
+
language,
|
|
99
|
+
fileContentsLanguage,
|
|
100
|
+
enableFancyToml
|
|
101
|
+
},
|
|
102
|
+
i
|
|
103
|
+
))
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Group, { justify: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_core.Button,
|
|
108
|
+
{
|
|
109
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Save, { size: "1rem" }),
|
|
110
|
+
onClick: (e) => {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
handleConfirm();
|
|
113
|
+
},
|
|
114
|
+
w: { base: "100%", xs: 200 },
|
|
115
|
+
loading,
|
|
116
|
+
children: "Save"
|
|
117
|
+
}
|
|
118
|
+
) })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
+
import_core.Button,
|
|
126
|
+
{
|
|
127
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Save, { size: "1rem" }),
|
|
128
|
+
onClick: (e) => {
|
|
129
|
+
e.stopPropagation();
|
|
130
|
+
open();
|
|
131
|
+
},
|
|
132
|
+
disabled,
|
|
133
|
+
w: fullWidth ? void 0 : 100,
|
|
134
|
+
fullWidth,
|
|
135
|
+
children: "Save"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] });
|
|
139
|
+
}
|
|
140
|
+
function ConfirmUpdateItem({
|
|
141
|
+
_key,
|
|
142
|
+
val: _val,
|
|
143
|
+
previous,
|
|
144
|
+
language,
|
|
145
|
+
fileContentsLanguage,
|
|
146
|
+
fileContentsKeys = ["file_contents"],
|
|
147
|
+
keyValueFields,
|
|
148
|
+
enableFancyToml
|
|
149
|
+
}) {
|
|
150
|
+
const [show, setShow] = (0, import_react.useState)(true);
|
|
151
|
+
const val = typeof _val === "string" ? _val : Array.isArray(_val) ? _val.length > 0 && ["string", "number", "boolean"].includes(typeof _val[0]) ? JSON.stringify(_val) : JSON.stringify(_val, null, 2) : JSON.stringify(_val, null, 2);
|
|
152
|
+
const prev_val = typeof previous[_key] === "string" ? previous[_key] : Array.isArray(previous[_key]) ? previous[_key].length > 0 && ["string", "number", "boolean"].includes(typeof previous[_key][0]) ? JSON.stringify(previous[_key]) : JSON.stringify(previous[_key], null, 2) : JSON.stringify(previous[_key], null, 2);
|
|
153
|
+
const showDiff = val?.includes("\n") || prev_val?.includes("\n") || Math.max(val?.length ?? 0, prev_val?.length ?? 0) > 30;
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
155
|
+
import_core.Stack,
|
|
156
|
+
{
|
|
157
|
+
hidden: val === prev_val,
|
|
158
|
+
gap: "xs",
|
|
159
|
+
p: "xl",
|
|
160
|
+
className: "bordered-light",
|
|
161
|
+
bdrs: "md",
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { justify: "space-between", children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Text, { c: "Neutral", children: (0, import_formatting.fmtSnakeCaseToUpperSpaceCase)(_key) }),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_show_hide_button.ShowHideButton, { show, setShow })
|
|
166
|
+
] }),
|
|
167
|
+
show && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: showDiff ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
168
|
+
import_monaco.MonacoDiffEditor,
|
|
169
|
+
{
|
|
170
|
+
original: prev_val,
|
|
171
|
+
modified: val,
|
|
172
|
+
language: language ?? (keyValueFields?.includes(_key) ? "key_value" : fileContentsKeys?.includes(_key) ? fileContentsLanguage : "json"),
|
|
173
|
+
enableFancyToml,
|
|
174
|
+
readOnly: true
|
|
175
|
+
}
|
|
176
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Box, { component: "pre", mih: 0, children: [
|
|
177
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Text, { component: "span", c: "Critical", children: prev_val || "None" }),
|
|
178
|
+
" ",
|
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Text, { component: "span", c: "dimmed", children: "->" }),
|
|
180
|
+
" ",
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Text, { component: "span", c: "Good", children: val || "None" })
|
|
182
|
+
] }) })
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
188
|
+
0 && (module.exports = {
|
|
189
|
+
ConfirmUpdate
|
|
190
|
+
});
|
|
191
|
+
//# sourceMappingURL=confirm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/config/confirm.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { useDisclosure } from \"@mantine/hooks\";\nimport { Box, Button, Group, Modal, Stack, Text } from \"@mantine/core\";\nimport { Save } from \"lucide-react\";\nimport { ShowHideButton } from \"../show-hide-button\";\nimport { MonacoDiffEditor, MonacoLanguage } from \"../monaco\";\nimport { deepCompare } from \"../../utils\";\nimport { fmtSnakeCaseToUpperSpaceCase } from \"../../formatting\";\nimport { useCtrlKeyListener, useKeyListener } from \"../../hooks\";\n\nexport interface ConfirmUpdateProps<T> {\n original: T;\n update: Partial<T>;\n onConfirm: () => Promise<unknown>;\n loading?: boolean;\n disabled: boolean;\n language?: MonacoLanguage;\n fileContentsLanguage?: MonacoLanguage;\n fullWidth?: boolean;\n openKeyListener?: boolean;\n confirmKeyListener?: boolean;\n enableFancyToml?: boolean;\n}\n\nexport function ConfirmUpdate<T>({\n original,\n update,\n onConfirm,\n loading,\n disabled,\n language,\n fileContentsLanguage,\n fullWidth,\n openKeyListener = true,\n confirmKeyListener = true,\n enableFancyToml,\n}: ConfirmUpdateProps<T>) {\n const [opened, { open, close }] = useDisclosure();\n\n const handleConfirm = async () => {\n await onConfirm();\n close();\n };\n\n useKeyListener(\"Enter\", () => {\n if (!opened || !confirmKeyListener) {\n return;\n }\n handleConfirm();\n });\n\n useCtrlKeyListener(\"Enter\", () => {\n if (opened || !openKeyListener) {\n return;\n }\n open();\n });\n\n return (\n <>\n <Modal\n title={<Text size=\"xl\">Confirm Update</Text>}\n opened={opened}\n onClose={close}\n size=\"auto\"\n styles={{ content: { overflowY: \"hidden\" } }}\n >\n <Stack\n gap=\"xl\"\n w={1400}\n maw={{\n base: \"calc(100vw - 100px)\",\n xs: \"calc(100vw - 150px)\",\n sm: \"calc(100vw - 200px)\",\n md: \"calc(100vw - 250px)\",\n }}\n my=\"lg\"\n style={{ overflowY: \"hidden\" }}\n >\n <Stack\n mah=\"min(calc(100vh - 300px), 800px)\"\n style={{ overflowY: \"auto\" }}\n >\n {Object.entries(update)\n .filter(([key, val]) => !deepCompare((original as any)[key], val))\n .map(([key, val], i) => (\n <ConfirmUpdateItem\n key={i}\n _key={key as any}\n val={val as any}\n previous={original}\n language={language}\n fileContentsLanguage={fileContentsLanguage}\n enableFancyToml={enableFancyToml}\n />\n ))}\n </Stack>\n <Group justify=\"flex-end\">\n <Button\n leftSection={<Save size=\"1rem\" />}\n onClick={(e) => {\n e.stopPropagation();\n handleConfirm();\n }}\n w={{ base: \"100%\", xs: 200 }}\n loading={loading}\n >\n Save\n </Button>\n </Group>\n </Stack>\n </Modal>\n\n <Button\n leftSection={<Save size=\"1rem\" />}\n onClick={(e) => {\n e.stopPropagation();\n open();\n }}\n disabled={disabled}\n w={fullWidth ? undefined : 100}\n fullWidth={fullWidth}\n >\n Save\n </Button>\n </>\n );\n}\n\nfunction ConfirmUpdateItem<T>({\n _key,\n val: _val,\n previous,\n language,\n fileContentsLanguage,\n fileContentsKeys = [\"file_contents\"],\n keyValueFields,\n enableFancyToml,\n}: {\n _key: keyof T;\n val: T[keyof T];\n previous: T;\n language?: MonacoLanguage;\n fileContentsLanguage?: MonacoLanguage;\n fileContentsKeys?: string[];\n keyValueFields?: string[];\n enableFancyToml?: boolean;\n}) {\n const [show, setShow] = useState(true);\n const val =\n typeof _val === \"string\"\n ? _val\n : Array.isArray(_val)\n ? _val.length > 0 &&\n [\"string\", \"number\", \"boolean\"].includes(typeof _val[0])\n ? JSON.stringify(_val)\n : JSON.stringify(_val, null, 2)\n : JSON.stringify(_val, null, 2);\n const prev_val =\n typeof previous[_key] === \"string\"\n ? previous[_key]\n : Array.isArray(previous[_key])\n ? previous[_key].length > 0 &&\n [\"string\", \"number\", \"boolean\"].includes(typeof previous[_key][0])\n ? JSON.stringify(previous[_key])\n : JSON.stringify(previous[_key], null, 2)\n : JSON.stringify(previous[_key], null, 2);\n const showDiff =\n val?.includes(\"\\n\") ||\n prev_val?.includes(\"\\n\") ||\n Math.max(val?.length ?? 0, prev_val?.length ?? 0) > 30;\n\n return (\n <Stack\n hidden={val === prev_val}\n gap=\"xs\"\n p=\"xl\"\n className=\"bordered-light\"\n bdrs=\"md\"\n >\n <Group justify=\"space-between\">\n <Text c=\"Neutral\">{fmtSnakeCaseToUpperSpaceCase(_key as string)}</Text>\n <ShowHideButton show={show} setShow={setShow} />\n </Group>\n {show && (\n <>\n {showDiff ? (\n <MonacoDiffEditor\n original={prev_val}\n modified={val}\n language={\n language ??\n (keyValueFields?.includes(_key as string)\n ? \"key_value\"\n : fileContentsKeys?.includes(_key as string)\n ? fileContentsLanguage\n : \"json\")\n }\n enableFancyToml={enableFancyToml}\n readOnly\n />\n ) : (\n <Box component=\"pre\" mih={0}>\n <Text component=\"span\" c=\"Critical\">\n {prev_val || \"None\"}\n </Text>{\" \"}\n <Text component=\"span\" c=\"dimmed\">\n {\"->\"}\n </Text>{\" \"}\n <Text component=\"span\" c=\"Good\">\n {val || \"None\"}\n </Text>\n </Box>\n )}\n </>\n )}\n </Stack>\n );\n}\n"],"mappings":"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","names":["import_hooks"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MonacoLanguage } from '../monaco/index.cjs';
|
|
3
|
+
import '@mantine/core';
|
|
4
|
+
|
|
5
|
+
interface ConfirmUpdateProps<T> {
|
|
6
|
+
original: T;
|
|
7
|
+
update: Partial<T>;
|
|
8
|
+
onConfirm: () => Promise<unknown>;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
language?: MonacoLanguage;
|
|
12
|
+
fileContentsLanguage?: MonacoLanguage;
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
openKeyListener?: boolean;
|
|
15
|
+
confirmKeyListener?: boolean;
|
|
16
|
+
enableFancyToml?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function ConfirmUpdate<T>({ original, update, onConfirm, loading, disabled, language, fileContentsLanguage, fullWidth, openKeyListener, confirmKeyListener, enableFancyToml, }: ConfirmUpdateProps<T>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { ConfirmUpdate, type ConfirmUpdateProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MonacoLanguage } from '../monaco/index.js';
|
|
3
|
+
import '@mantine/core';
|
|
4
|
+
|
|
5
|
+
interface ConfirmUpdateProps<T> {
|
|
6
|
+
original: T;
|
|
7
|
+
update: Partial<T>;
|
|
8
|
+
onConfirm: () => Promise<unknown>;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
language?: MonacoLanguage;
|
|
12
|
+
fileContentsLanguage?: MonacoLanguage;
|
|
13
|
+
fullWidth?: boolean;
|
|
14
|
+
openKeyListener?: boolean;
|
|
15
|
+
confirmKeyListener?: boolean;
|
|
16
|
+
enableFancyToml?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function ConfirmUpdate<T>({ original, update, onConfirm, loading, disabled, language, fileContentsLanguage, fullWidth, openKeyListener, confirmKeyListener, enableFancyToml, }: ConfirmUpdateProps<T>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { ConfirmUpdate, type ConfirmUpdateProps };
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useDisclosure } from "@mantine/hooks";
|
|
4
|
+
import { Box, Button, Group, Modal, Stack, Text } from "@mantine/core";
|
|
5
|
+
import { Save } from "lucide-react";
|
|
6
|
+
import { ShowHideButton } from "../show-hide-button";
|
|
7
|
+
import { MonacoDiffEditor } from "../monaco";
|
|
8
|
+
import { deepCompare } from "../../utils";
|
|
9
|
+
import { fmtSnakeCaseToUpperSpaceCase } from "../../formatting";
|
|
10
|
+
import { useCtrlKeyListener, useKeyListener } from "../../hooks";
|
|
11
|
+
function ConfirmUpdate({
|
|
12
|
+
original,
|
|
13
|
+
update,
|
|
14
|
+
onConfirm,
|
|
15
|
+
loading,
|
|
16
|
+
disabled,
|
|
17
|
+
language,
|
|
18
|
+
fileContentsLanguage,
|
|
19
|
+
fullWidth,
|
|
20
|
+
openKeyListener = true,
|
|
21
|
+
confirmKeyListener = true,
|
|
22
|
+
enableFancyToml
|
|
23
|
+
}) {
|
|
24
|
+
const [opened, { open, close }] = useDisclosure();
|
|
25
|
+
const handleConfirm = async () => {
|
|
26
|
+
await onConfirm();
|
|
27
|
+
close();
|
|
28
|
+
};
|
|
29
|
+
useKeyListener("Enter", () => {
|
|
30
|
+
if (!opened || !confirmKeyListener) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
handleConfirm();
|
|
34
|
+
});
|
|
35
|
+
useCtrlKeyListener("Enter", () => {
|
|
36
|
+
if (opened || !openKeyListener) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
open();
|
|
40
|
+
});
|
|
41
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
Modal,
|
|
44
|
+
{
|
|
45
|
+
title: /* @__PURE__ */ jsx(Text, { size: "xl", children: "Confirm Update" }),
|
|
46
|
+
opened,
|
|
47
|
+
onClose: close,
|
|
48
|
+
size: "auto",
|
|
49
|
+
styles: { content: { overflowY: "hidden" } },
|
|
50
|
+
children: /* @__PURE__ */ jsxs(
|
|
51
|
+
Stack,
|
|
52
|
+
{
|
|
53
|
+
gap: "xl",
|
|
54
|
+
w: 1400,
|
|
55
|
+
maw: {
|
|
56
|
+
base: "calc(100vw - 100px)",
|
|
57
|
+
xs: "calc(100vw - 150px)",
|
|
58
|
+
sm: "calc(100vw - 200px)",
|
|
59
|
+
md: "calc(100vw - 250px)"
|
|
60
|
+
},
|
|
61
|
+
my: "lg",
|
|
62
|
+
style: { overflowY: "hidden" },
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
Stack,
|
|
66
|
+
{
|
|
67
|
+
mah: "min(calc(100vh - 300px), 800px)",
|
|
68
|
+
style: { overflowY: "auto" },
|
|
69
|
+
children: Object.entries(update).filter(([key, val]) => !deepCompare(original[key], val)).map(([key, val], i) => /* @__PURE__ */ jsx(
|
|
70
|
+
ConfirmUpdateItem,
|
|
71
|
+
{
|
|
72
|
+
_key: key,
|
|
73
|
+
val,
|
|
74
|
+
previous: original,
|
|
75
|
+
language,
|
|
76
|
+
fileContentsLanguage,
|
|
77
|
+
enableFancyToml
|
|
78
|
+
},
|
|
79
|
+
i
|
|
80
|
+
))
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx(Group, { justify: "flex-end", children: /* @__PURE__ */ jsx(
|
|
84
|
+
Button,
|
|
85
|
+
{
|
|
86
|
+
leftSection: /* @__PURE__ */ jsx(Save, { size: "1rem" }),
|
|
87
|
+
onClick: (e) => {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
handleConfirm();
|
|
90
|
+
},
|
|
91
|
+
w: { base: "100%", xs: 200 },
|
|
92
|
+
loading,
|
|
93
|
+
children: "Save"
|
|
94
|
+
}
|
|
95
|
+
) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
Button,
|
|
103
|
+
{
|
|
104
|
+
leftSection: /* @__PURE__ */ jsx(Save, { size: "1rem" }),
|
|
105
|
+
onClick: (e) => {
|
|
106
|
+
e.stopPropagation();
|
|
107
|
+
open();
|
|
108
|
+
},
|
|
109
|
+
disabled,
|
|
110
|
+
w: fullWidth ? void 0 : 100,
|
|
111
|
+
fullWidth,
|
|
112
|
+
children: "Save"
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] });
|
|
116
|
+
}
|
|
117
|
+
function ConfirmUpdateItem({
|
|
118
|
+
_key,
|
|
119
|
+
val: _val,
|
|
120
|
+
previous,
|
|
121
|
+
language,
|
|
122
|
+
fileContentsLanguage,
|
|
123
|
+
fileContentsKeys = ["file_contents"],
|
|
124
|
+
keyValueFields,
|
|
125
|
+
enableFancyToml
|
|
126
|
+
}) {
|
|
127
|
+
const [show, setShow] = useState(true);
|
|
128
|
+
const val = typeof _val === "string" ? _val : Array.isArray(_val) ? _val.length > 0 && ["string", "number", "boolean"].includes(typeof _val[0]) ? JSON.stringify(_val) : JSON.stringify(_val, null, 2) : JSON.stringify(_val, null, 2);
|
|
129
|
+
const prev_val = typeof previous[_key] === "string" ? previous[_key] : Array.isArray(previous[_key]) ? previous[_key].length > 0 && ["string", "number", "boolean"].includes(typeof previous[_key][0]) ? JSON.stringify(previous[_key]) : JSON.stringify(previous[_key], null, 2) : JSON.stringify(previous[_key], null, 2);
|
|
130
|
+
const showDiff = val?.includes("\n") || prev_val?.includes("\n") || Math.max(val?.length ?? 0, prev_val?.length ?? 0) > 30;
|
|
131
|
+
return /* @__PURE__ */ jsxs(
|
|
132
|
+
Stack,
|
|
133
|
+
{
|
|
134
|
+
hidden: val === prev_val,
|
|
135
|
+
gap: "xs",
|
|
136
|
+
p: "xl",
|
|
137
|
+
className: "bordered-light",
|
|
138
|
+
bdrs: "md",
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
|
|
141
|
+
/* @__PURE__ */ jsx(Text, { c: "Neutral", children: fmtSnakeCaseToUpperSpaceCase(_key) }),
|
|
142
|
+
/* @__PURE__ */ jsx(ShowHideButton, { show, setShow })
|
|
143
|
+
] }),
|
|
144
|
+
show && /* @__PURE__ */ jsx(Fragment, { children: showDiff ? /* @__PURE__ */ jsx(
|
|
145
|
+
MonacoDiffEditor,
|
|
146
|
+
{
|
|
147
|
+
original: prev_val,
|
|
148
|
+
modified: val,
|
|
149
|
+
language: language ?? (keyValueFields?.includes(_key) ? "key_value" : fileContentsKeys?.includes(_key) ? fileContentsLanguage : "json"),
|
|
150
|
+
enableFancyToml,
|
|
151
|
+
readOnly: true
|
|
152
|
+
}
|
|
153
|
+
) : /* @__PURE__ */ jsxs(Box, { component: "pre", mih: 0, children: [
|
|
154
|
+
/* @__PURE__ */ jsx(Text, { component: "span", c: "Critical", children: prev_val || "None" }),
|
|
155
|
+
" ",
|
|
156
|
+
/* @__PURE__ */ jsx(Text, { component: "span", c: "dimmed", children: "->" }),
|
|
157
|
+
" ",
|
|
158
|
+
/* @__PURE__ */ jsx(Text, { component: "span", c: "Good", children: val || "None" })
|
|
159
|
+
] }) })
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
export {
|
|
165
|
+
ConfirmUpdate
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=confirm.js.map
|